Frosted window not allowing light through it

Hi 

Almost christmas!

OK so I have created a scene where my charcter is putting her hand out in front of herself in a "stop!" kind of pose her hand is meant to be touching a frosted window and my camera is on the other side, the "window" is a plane with the slightly frosted glass Iray shader applied. The effect i am going for is hand is sharpish and face will be blurred.

Now i want to use a spotlight or emiisive surface to pass light though the window and light her up.

BUT the light will not pass though the glass at all no matter how big I make the old lumens but if the light source is on the other side of the glass she is lit up and I can see her though my window

So what am i doing wrong? 

 

Comments

  • QuasarQuasar Posts: 651

    I can't be sure what is going on, but I have noticed light doesn't pass through glass shaders properly on flat planes when using Iray. Is the plane set to thin walled in the surface settings? Also, try replacing the plane with a flattened cube if you can. Glass seems to work a lot better with a closed 3D object.

  • SevrinSevrin Posts: 6,310

    It's really helpful to have a picture of what your current result is, because describing this stuff is hard.  We also don't know what shader you are using for the frosted effect, so that limits how much help we can offer.  Sometimes these threads are like an episode of House.  At least we know it's not lupus.

    Anyway, using the KA Glassworx Frosted shader, you get better visibility through the glass if you lower the brightness of the base colour.  Here are examples with the default setting and another with the base colour set to almost black.  The key and fill lights are on the camera side of the glass, while the backlights are on the other side.

     

    KA Glassworkx Dirty Glass A Frosted Default.jpg
    1108 x 1440 - 1M
    KA Glassworkx Dirty Glass A Frosted Base Colour Almost Black.jpg
    1108 x 1440 - 801K
  • If you're talking about actual frosted glass (not some snow frost on some of the glass), not much light is going to get through in comparison. You can play around with the glossy roughness amount to change that (more roughness = more frostiness).

    If you're looking to let light through but you want the glass itself to look dirty or have bit of snow or ice on it, I would use a weight map in the refraction weight channel. This will let you get both light coming through and seeing things on the other side of the glass, but allso let you have some texture and detail on the glass. 

    In the included examples (both pngs so you can download and use photoshop or gimp to put a background behind it) I have a scene lit only by a ghostlight behind the wall pointed at the window. The lighting amount is blown out on purpose. 

    The first image is with a standard glass shader on the window, you can see the light pouring in and lighting some of the wood. The second image I've taken a grayscale streaky rust texture and dropped it into the weight map for the refraction weight. As you can see, now the window has a buch of streaks and stains, but light is still coming through the window. Just remember, whatever is colored white will refract the most (let through the most amount of light), whatever is colored black will let no light through at all.

    This technique also works if you want the affect of a glass window that has a decal on it, like say a storefront window. Make the diffuse image black except for the decal part, then make a copy of that image, fill the decal part black, and the glass part white and then drop that in the refraction weight map channel.

    regular window.png
    1200 x 1100 - 151K
    window with weightmap in the refraction weight channel.png
    1200 x 1100 - 234K
  • PitmaticPitmatic Posts: 918
    edited December 2020

    OK so the shader being used is "glass solid lightly frosted" which is one of the DAZ studio shaders nothing exotic :)

    I do not want dirt or scratches etc i would like it clean so i can do that in post if needs be etc

    In the sceenshots you should be able to see the scene its just a figure behind glass from the point of view of the camera and a spotlight to light the scene i tried an emissive plane and it was worse than the spotlight. Anyway in the realworld a frosted window would not drop the light level so much I can do this using multiple lights where one or two would do normaly but then this is not the real world I suppose smiley

    TYhin walled does not seem to m ake any difference?

    In the screenshot the light is getting over the top of the plane and lighting the face which is lighter than the hand which is nearer the light but behind the glass if that makes sense

    scene.jpg
    747 x 1020 - 185K
    shader.jpg
    1350 x 999 - 1M
    Post edited by Pitmatic on
  • j cadej cade Posts: 2,310

    If you want light to pass through glass enough to actually light the inside a bit refraction roughness has to be set to 0 

    using refraction roughness is more accurate but does not get reasonable ammounts of lights passing through. I prefer to cheat by blending refraction with translucency

    general settings off the top of my head

    translucency color white and stregth all the way up

    share glossy imputs off

    glossy roughness what looks good

    refraction roughness 0

    refraction strength 90% (this is what blends with the translucency to get the semi opaque look of frosted glass)

     

    sticking maps in so the roughness is less uniform is recommended

     

     

     

  • LinwellyLinwelly Posts: 5,981

    make sure your render settings are to dome and scene, scne alone or sunlight alone witll not allow for spotlights to work. Alternatively you can use a plane and make it emissive instead of the spotlight. that works even when the render settings are sunlight or dome alone

  • PitmaticPitmatic Posts: 918

    This is my best effort so far using the enviroment lighting and two spotlights otherwise the figure would be dark Idealy I would like to tint the "glass" too bt one step at a time!

    I shall have another go at J Cades suggestions later tonight and see how i get on smiley

     

     

    test3.png
    500 x 600 - 692K
  • j cadej cade Posts: 2,310

    Alright so I did some more testing

    and I'm going to ammend my suggestion as it works well strictly for lighting rooms with frosty glass where you don't really care about whats outside

     

    If you want what you're seeing throught the glass to look proper you probably need some refraction roughness however blending it with translucency can help get some of the light back

     

    heres:

    translucency strength 1

    translucency color white

    translucency mode scatter transmi intensity

    refraction strength .6

    refraction roughness .2

    thin walled on

    and the mesh is a simple plane

    obviously it would need to render way longer

    the genesis figure is in a cube so all light hitting her is coming through the glass

     

    I also included a comparison render with refraction turned all the way on notice how much darker the room gets

     

     

    refrat.jpg
    700 x 840 - 484K
    refrat2.jpg
    700 x 840 - 580K
  • FishtalesFishtales Posts: 6,162
    edited December 2020

    I wasn't sure how bright or how much frosting but this is what I got.

    2020-12-22 22:54:22.929 Total Rendering Time: 2 hours 5 minutes 47.13 seconds

    Pane with Glass Thin Clear

    Share Glossy Input Off

    Refraction Index 1.55; Weight 1.00; Colour white; Roughness 0.15

    Distant Light at 50,000 Lumen; Temperature 6500 shining directly from the front.

    Dome set to Dome and Scene; Midnight, 21st June, Northern Hemisphere.

    Tone Mapping set to Shutter Speed 60; F/stop 6.0; Film ISO 200.

    If you want to change the Glass tint change the Refraction Colour.

    Click on image for full size.

    through-frosted-glass-copyright-001.jpg
    1000 x 1500 - 480K
    Post edited by Fishtales on
  • FishtalesFishtales Posts: 6,162
    edited December 2020

    I did one from the left after changing the glass tint to an aqua colour.

    2020-12-23 09:03:55.602 Total Rendering Time: 55 minutes 10.97 seconds

    Click on image for full size.

    through-frosted-glass-copyright-002.jpg
    1000 x 1500 - 264K
    Post edited by Fishtales on
  • QuasarQuasar Posts: 651

    When I mentioned before that Iray doesn't render the same with a flat plane as it does with a 3D object, I mean that flat planes with glass shaders block a lot of light if "thin walled" is off. You can see it in the renders I made. I set up a scene similar to yours. On the left is a 5 foot cube that I scaled down on one axis to 0.1% to make it like a thin pane of 3D glass. On the right is a 5 foot flat plane. They both have the same shader you used on them without any changes. For whatever reason, the flat plane causes a noticeably darker shadow than the 3D pane. I guess having "thin walled" off makes Iray act as if light is passing through a solid object, but when it's just a flat plane, it must not know how two calculate proper refraction. In the second picture, I turned "thin walled" on for the flat plane, and it rendered more like the 3D pane. The shadows with a flat plane and a non-frosted glass shader get even worse with "thin walled" off. However, with "thin walled" on, there is never any perspective shifting/bending like through real glass or lenses.

    glass test A.jpg
    1200 x 900 - 422K
    glass test B.jpg
    1200 x 900 - 444K
  • PitmaticPitmatic Posts: 918
    edited December 2020

    OK I have been down a load of very deep rabbit holes since starting on this idea and I never really got the front lit affect to work for me as i wanted so i went a bit sideways and converted my "glass" to dforce and blew it around a bit

    And this is what I got which i will live with smiley

     

    ,

     

    plastic sheet 1-Edit.jpg
    667 x 800 - 129K
    Post edited by Pitmatic on
  • I wasn't ever quite sure if you were trying to have the scene lit and everything behind the glass but the hand on the glass blurred out?

    If that was the case, you may want to try this. Instead of a plane, make a cube primitive. In the geometry editor select the front polys of the cube and make a new surface (e.g. "front"), and then select the backside of the cube's polys and make a second new surface (e.g. "back"). Set the cube's Z scale to something small. In the pic attached I started with a 25 foot cube and scaled it down to 28%, and then scaled the Z scale down to 9%.

    Now set the "back" surface to frosted glass, take the "front" surface and use "glass - solid- lightly frosted" and turn down the glossy roughness to .05 - .10 range.

    Now place the figure behind the cube, but have the hand go through the back surface of the cube so it's inside the cube. That will give you a clear hand with a slight blur and then everything will be blurred out, but light will pass through cleanly. You may need to do a little clean-up in Photoshop/Gimp, but it might be closer to the effect you were trying to do.

    Changing the glossy roughness on either of the surfaces will change how much is blurred and what's visible.

    See attached example.

    Glass test.png
    1400 x 1600 - 2M
  • PitmaticPitmatic Posts: 918

    Very clever smiley

     

     

    ,

     

  • SevrinSevrin Posts: 6,310

    So this thread got me thinking and I tried this out using a clear glass plane stuck onto a volumetric atmospheric cubic.

Sign In or Register to comment.