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.
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!
I found a solution different than OP and I wanted to share with anyone else that stumbles upon this. I had a pretty simple glass material (Translucent) that was used in a lot of the assets I owed but I sadly kept getting the problem even with thin translucent and surface forwardshading. So instead I made the material masked and used the green color channel(This will differ for you if they choose different colors for different data) from the “ORM” texture as the opacity mask. Then I simply enabled Differ Opacity Mask since I’m using Temporal AA this treats the material as translucent, atleast thats what the tool tip says and it works how I think it should work.
Gif of it before -
And a Gif of it as a masked material with the dithered checked
Screen shot of the translucent material before I changed it to masked -