How to make a glass ball?

PesegatoPesegato Posts: 40
edited December 1969 in New Users

I'd like to render a glass ball, like this: http://www.bewallpaper.com/free-3d-glass-balls-photos-pictures-images-free/

I actually don't care about the red/blue content, I just want an empty transparent ball that reflects light.

«1

Comments

  • Cris PalominoCris Palomino Posts: 11,151
    edited December 1969

    What do you want to render in?

  • PesegatoPesegato Posts: 40
    edited December 1969

    I'm making a videogame, and I'd like to make a liquid contend that goes up and down, but this will probably be handled by photoshop or the game itself.

  • Herald of FireHerald of Fire Posts: 3,504
    edited October 2014

    Errm... if it's to be handled in the game itself, then all you need is a ball. The shaders will have to be done within the game engine you're using. Nothing you create in Daz Studio or Poser will have transferable shaders, since they are computationally expensive and cannot be performed in real-time. They're also specific to their own render engines.

    If you want a flat render that you can use as an in-game sprite, then I suggest checking out Sha's Shortcut Shaders (link in signature), as it includes a good preset.

    Post edited by Herald of Fire on
  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks HeraldOfFire! But I can't find Sha’s Shortcut Shaders... checked all the links of your signature :(

  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks for the shader, but where do I find a sphere?

  • cecilia.robinsoncecilia.robinson Posts: 2,208
    edited December 1969

    pesegato said:
    Thanks for the shader, but where do I find a sphere?

    You can make a primitive.

  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks everybody, but my glass ball is opaque! :(
    How can I make it transparent (so that I can paint the content on a different layer)?

  • JimmyC_2009JimmyC_2009 Posts: 8,891
    edited December 1969

    If you have applied the shader, the sphere will not be opaque.

    You need to do a render to see the effect of the shader. You must select the sphere in the Scene pane first, then select the sphere in the Surfaces pane as well, then apply the shader.

    Save you render as a PNG, then you will be able to load it into Photoshop with a transparent background.

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    Sorry about the link, I was getting a bid muddled.

    It's important to note that the special properties of a surface will not appear in the viewport window. You need to render the object to a still image to get the effect. However, it gets a bit more complicated than that too.

    What you are trying to render is a glass sphere, which is basically a see-through object. What makes a see-through object visible? Reflections and refractions. Basically, it's the way the light interacts with the sphere which makes it visible to our eyes. The same is true for a rendered sphere.

    Now the problem with rendering this to an alpha (transparent) image is that a lot of this reflection and all of this refraction is lost in translation. After all, the render engine can't bend light coming from an object which isn't there yet. Reflections tend to come out very feint too, which can make them harder to discern.

    Maybe if you explained what your ultimate goal is we might be able to give you the steps to reproduce the effect you need.

  • PesegatoPesegato Posts: 40
    edited December 1969

    The ultimate goal is something like this:

    http://i1050.photobucket.com/albums/s403/stephlim/Diablo/LifeOrb.jpg
    http://forum.unity3d.com/threads/animated-healthbar.176138/

    @JimmyC_2009: I've selected the Sphere, then selected the Glass shader preset on the Content Library, then nothing happens... :(

  • fixmypcmikefixmypcmike Posts: 19,565
    edited December 1969

    pesegato said:
    The ultimate goal is something like this:

    http://i1050.photobucket.com/albums/s403/stephlim/Diablo/LifeOrb.jpg
    http://forum.unity3d.com/threads/animated-healthbar.176138/

    @JimmyC_2009: I've selected the Sphere, then selected the Glass shader preset on the Content Library, then nothing happens... :(

    You also need to select the surfaces in the Surfaces tab that the shader is being applied to.

  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks @fixmypcmike! However the rendered ball is still opaque... If I add other items "behind" the ball they get correctly distorted (so the ball is transparent while working with DAZ, but becomes opaque on the .png) :(

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    As already mentioned, refraction (the distortion you refer to) is something which cannot be stored in a simple PNG file. A PNG is just a static image file, it won't directly affect anything you put behind it aside from any translucent areas. The other problem is that reflection tends to be rendered close to invisible when on a transparent background, so you lose some detail.

    You can use programs like Photoshop or Gimp to distort anything you need in the background manually. If the PNG is intended to be used directly in the game (with no external edits) then you'd have to code a shader to deal with the distortion or use a preset which includes it.

  • PesegatoPesegato Posts: 40
    edited December 1969

    @HeraldOfFire I specified the distortion just to give additional information. My goal does not involve distortions:
    http://i1050.photobucket.com/albums/s403/stephlim/Diablo/LifeOrb.jpg
    http://forum.unity3d.com/threads/animated-healthbar.176138/

    My problem is that the rendered glass is fully opaque.

  • JimmyC_2009JimmyC_2009 Posts: 8,891
    edited December 1969

    If you saved it as a PNG, then it should have the necessary opacity information. Have you tried using a PNG inside Photoshop, you wont see the transparency in a browser or windows media manager?

    If you save it as JPEG, that will be lost.

    You can post images directly to the forum, JPG or PNG, by clicking on the Browse button when you are about to post a reply, navigate to the image file, and select it.

  • PesegatoPesegato Posts: 40
    edited December 1969

    Here is the ball, created as I was told.

    As you can see, it's a png but the glass is opaque.

    glass.png
    618 x 800 - 101K
  • Herald of FireHerald of Fire Posts: 3,504
    edited October 2014

    What are your material settings? You need opacity set to less than 100% to make it translucent. It also pays to use a normal light rather than relying on Daz's headlamp. To be perfectly honest though, since it's really only intended for a simple sphere, it might be easier just to create one in Photoshop.

    You'd have a lot more control over the final appearance, and you can make it as transparent or not as you need.

    Post edited by Herald of Fire on
  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks @HeraldOfFire!

    How do I set the Material opacity?
    About the light: I've tried with Uberenviroment2, but as you have guessed I have a lot to learn about it and the result weren't satisfactory.

    About photoshop: already tried and got a "passable" result,I hoped to achieve better result with DAZ ;)

  • prixatprixat Posts: 1,585
    edited December 1969

    If you've done it right you should end up with something like the attached image, obviously you'll want the lights are out of shot. :-)

    0test.png
    600 x 600 - 25K
    00a.jpg
    1323 x 975 - 198K
  • prixatprixat Posts: 1,585
    edited December 1969

    Then I took that to photoshop and it has to go in both the layer and the layer mask.

  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks @prixat! But how can I select the "Surfaces" tab? My DAZ studio looks different! :(

  • JimmyC_2009JimmyC_2009 Posts: 8,891
    edited December 1969

    If you cannot already see the Surfaces pane in your setup, go to Window > Panes (Tabs) and you will find Surfaces there. Click on it, and it will appear as a new window which can be docked anywhere.

  • PesegatoPesegato Posts: 40
    edited December 1969

    Thanks everybody! I've learned a lot of things, still haven't managed to make the transparent ball, but I'll try experimenting a little more with lights.

    However, I've downloaded the .png and @prixat ball is opaque black, not transparent.

  • prixatprixat Posts: 1,585
    edited December 1969

    Yes this method produces a transparent background but opaque ball.

    In photoshop I put the image in both the layer and the layer mask then you can see the red background through the sphere.

    sphere.jpg
    1035 x 792 - 140K
  • PesegatoPesegato Posts: 40
    edited December 1969

    @prixat Awesome! Didn't know I could do that! I'm using GIMP but it works the same :)

  • PesegatoPesegato Posts: 40
    edited December 1969

    @prixat I've tried with your settings, but my result doesn't look like yours :(

    Please help me!

    testglass.png
    618 x 800 - 123K
  • PesegatoPesegato Posts: 40
    edited December 1969

    Hi,
    I can't post on my own old thread, so I'll repost the relevant details:

    I want to do this:

    http://www.daz3d.com/forums/discussion/47390/P15/#695655

    but instead I manage to do this:

    http://www.daz3d.com/forums/discussion/47390/P15/#703413

    How should I do? Thanks!

  • ChoholeChohole Posts: 33,604
    edited December 1969

    Merging this into your other thread.

  • prixatprixat Posts: 1,585
    edited December 1969

    Hi pesegato
    sorry for the delay, I missed the notification.

    I've been messing about with the latest beta, these material settings for the sphere may work better than the previous ones.

    spheresettings2.jpg
    492 x 933 - 95K
    spheresettings1.jpg
    1236 x 942 - 208K
Sign In or Register to comment.