Home Technical Talk

Glass material and time of day

Got a weird graphical issue here, I created a glass jug, and put it indoors, and all was well. But then if I set the outdoor time of day to after sunset, the jug goes dark and no lights or environment probes shoved in its face seem to bring it back again. The sun seems to be the only thing to give it any light. So even if the room is lit, the fact that it is midnight leaves me with a near black jug. Did I make a mistake somewhere along the way? I can manually "fix" the jug, by applying more tint cloudiness or a sunny day environment map, but then when the sun comes back up in the world, the jug becomes a waxy crayon looking thing. Does the glass shader require the sun? It would seem to be the case, since shoving a light with diffuse multipliers and HDR levels in excess of 5 simply made the darkness "lighter overall", without returning the glassy look. I had not foreseen this, am I wrong? I hope that I am, otherwise having to clone my props that are supposed to be glass but indoors would be a bother.

Replies

  • MightyT
    Options
    Offline / Send Message
    And trying to replicate the effect with an illum shader. Doesn't look as good, don't suppose I would have suspected so, but it seems like that's not going to matter, because running the scene with the launder results in the environment map not being applied, leaving the bottle simply a half transparent flat grey. This has not been a good day for science.
  • Demokk
    Options
    Offline / Send Message
    Demokk polycounter lvl 3
    According to the documentation (link), the glass shader only works with sunlight for now. I had the same problem when trying to create a glass material with a transparency mask, it only worked when I dragged it out of the VisArea / Interior.
  • MightyT
    Options
    Offline / Send Message
    Yep, that would follow with what I found out the hard way. Too bad, turned my effortlessly good looking glass jug into an electric sandwhich wrap bubble. Glad I'm not the only one.
  • CRV3N
    Options
    Offline / Send Message
    Hi

    I have not had a problem with using the glass shader in interiors within visareaes. if anything, the sun doesn't make it work for me. incase you havent tried some of these:
    -Remember to turn up the shininess and give a light specular colour
    -Under shader params did you set the environment map check box
    -Have you tried using the "nearest_cubemap' function? its in here http://freesdk.crydev.net/display/SDKDOC2/Glass+Shader

    Im pretty sure the glass shader does not only work with the sun.
  • MightyT
    Options
    Offline / Send Message
    Browsed through with environment probes and stuff, it didn't seem to need to be told to use an environment map in the material editor. Seems that just being shiny and close to a probe caused it to be mirror-like on its own. Ultimately that helped, but initially the bottle came in nearly black until I changed the material from glass to illum
Sign In or Register to comment.