Download

Glass Material Sunlight problem

Hello, I have run into this problem while working on my game, the Material I got for the glass doesn’t really get affected correctly by the directional sunlight. It works fine but when the sun shines over the glass it doesn’t change its appearance. The glass material is set to Translucent as Blending Mode and Surface TranslucencyVolume as Lighting Mode, If anyone has a idea about this, please let me know.

I also got some pictures as reference.


Your screenshot is unreadable (too large area covered and not enough resolution) for the material graph. Draw an arrow or something on the in-editor picture that points at the object(s) you applied the glass onto. As it is, I don’t know what you are using it for, and so lacking information.

It appears that you’re multiplying the texture coordinates (texcoord) by normal UVs (as a scalar parameter). Why are you doing that? In addition, when you Flatten Normal, you may be interrupting the light’s ability to refract and interact correctly with the glass material on the mesh.

Hey man, Thank you for the reply but I found a way around it and it looks fine now, I just changed the shading model to Thin Translucent and Surface ForwardShading for Lighting mode in the material editor. I am sorry to hear that my explanation was so uninformative and that the screenshots were quite bad I will try to do it properly next time I need help.

Referring to your comment on the texture coordinates by normal UVs, Its because the normal is a 2DParamater so I can change the normal to a different one in the Instance depending on what I need so I can play around with the UVs.

Right, I remember now. Thanks. I was asking because I wasn’t sure how it was reading that, and it reminds me to do the same lol.

As far as screenshot quality, I’ve had trouble with it too in the past. If you maximize the screen coverage of the graph area by dragging the pane handles for the other areas so those areas become mostly out of the view (preview window, details panel, node list, etc), then you can get full resolution screenshots of the graph. Even cutting it in pieces is going to yield better resolution and make it readable in the forums despite it seeming like it would complicate viewing it all.

I am working on a game right now and I am trying to get it to look the way I want it so I am most likely gonna come back on the UE4 forums to ask help if I have another problem so thanks for the tips, I hope you have a great day!