HI There,
I wonder if somebody knows how to make a glass material for using with realtime raytracing.
We tried importing window frames with glass through datasmith, we tried making the glass material from scratch inside unreal, and we tried using the advanced glass library from the marketplace, and nothing worked. We know this materials are meant to be used in raster rendering, but the thing is that they don’t even let the light in. Once we turn on the windows layer (with the glass material applied), the light dissappears from the scene.All materials we tried have the "Cast raytraced shadows"on.
Find below the examples:
First: windows layer turned off.
Second: windows layer turned on.
Any help would be appreciated, we couldn’t find any resource on the net.
Thanks in advance
QUOTE=presto423;n1817179]Is “Visible in Ray Tracing” enabled in every window object (under Rendering)?
Is two-sided enabled for every window object and material?
[/QUOTE]
Thank you, I feel as tough as I have a similar problem. Although in one of my other project that worked could not repeat that in a new one. I’ll check that options
I ask because I have created a project before that had certain ray tracing checkboxes disabled at the start, before I had changed them to enabled. I simply didn’t know where the OP was at in the project, not intending to sound condescending or double-check more obvious settings. It’s not always obvious when certain projects have the setting enabled by default, and other projects don’t.
You got a few options here to figure out what is going wrong.
First a silly question: Do you have ray traced refraction in the post process enabled? If yes the max refraction rays must be more than 1 afaik.
You can also disable casting shadow in the mesh properties for any material id like the glass. It’s in the LOD 0 setting. So you can double click your window mesh and set the glass to not casting shadow. This should let light through. You can also disable cast shadow per object in the details panel. Maybe try that and then figure out what is wrong with the material.
maybe make a super simple material with only opacity set to a linear value of 0. Set Material Domain to Surface. Blend Mode to Translucent. Apply that to the windows and see how it goes. In the translucency section you may want to try Surface Translucency Volume for the lighting mode. It may need a normal map for that. You could fake a flat normal map with a vector set to 0,0,1. (hold 3 on the keyboard and click into the material graph)
Thanks to everyone for the help. After some testings following your responses I managed to make it work. Still not perfect but almost.
"First a silly question: Do you have ray traced refraction in the post process enabled? If yes the max refraction rays must be more than 1 afaik. Yes I have this right
You can also disable casting shadow in the mesh properties for any material id like the glass. It’s in the LOD 0 setting. So you can double click your window mesh and set the glass to not casting shadow. This should let light through. You can also disable cast shadow per object in the details panel. Maybe try that and then figure out what is wrong with the material. This was the main thing that let the light in. Thanks!
Is “Visible in Ray Tracing” enabled in every window object (under Rendering)? Yes
Is two-sided enabled for every window object and material? Yes
A have a new issue related to translucency. I don’t know if it is related to material, post-process volume or mesh. I’ll explain below:
Once I have the glass reflecting and letting the light pass through, I realised that translucency is not showing in the reflective shapes. I have a mirror in front of a glass and if i look to the mirror the reflcted glass appears opaque (but shows reflections). Find attached the examples.
A: Note that the lamp glass balls are reflecting black in the glass doors
B: The reflected doors don’t show the translucency
PS: Include Translucent Objects in Raytracing Reflections is already enabled, and Max. refraction Rays is 3. Enabling and disabling Refraction doesn’t affect.
Any help would be appreciated, and thanks again for the previous answers.
Thanks in advance