Download

raytracing Reflections and Refractions

Hi, whenever I try to make a raytraced glass (or use some of the examples found on marketplace) I never get both reflections and refractions to work on glass/translucent materials.

I can get raytraced reflections on opaque materials or raytraced refractions on translucent materials, I can’t make glass that does both using raytracing. This makes it impossible to make a proper thick glass panel that would at certain angles reflect environment.

I’m using 4.25.3…

Is there some example or tutorial for a material that can do proper raytraced thick glass? Or is there some additional setting that needs enabling?

thanks

That’s strange that it’s not working. I was able to get it working with static lighting in a basic scene with a floor and the table/chairs/glass statue from starter content, and not high samples or a ton of bounces / refraction rays. I also use a 5-year-old laptop with a dual-core Intel 2.4 GHz and integrated graphics 5500U, which is DX12 ready, but is a rather outdated graphics hardware for ray tracing. I’ve seen similar / same threads about that problem of refraction / reflections not working right, or one not working, for the past couple of months. I got it working in 4.24.3, so it could be a bug in 4.25.3 and/or a hardware / Windows issue (such as something in DX12 Ray Tracing not functioning correctly for 4.25.3). There’s also a thread that details how to create raytraced thick glass so it’s not scaling reflected / refracted images up and to get multi-reflection based inter-reflections without dark artifacts and such. In the project, is the GBuffer Format (in Project Settings > Rendering > Optimizations) set at High Precision Normals? and the glass material’s object needs “Use High Precision Tangent Basis” and “Use Full Precision UVs” enabled in the mesh-editor Build settings for the object in order to get better results for reflections at least. It might also get both reflections and refraction working, but not sure. What ray tracing mode is set in the post process volume (Final Gather or Brute Force) and what are the settings for it?

Thanks, I’ll look into this some more… So far I only got reflections working on translucent objects if I disable raytraced translucency. Funny thing is that in material editor it works.

Yeah, it’s interesting how things work rather well in the material editor or the mesh editor, but then back to the viewport and it’s not functioning. One of the things I consider with reflections and refractions in ray tracing is how the number of refraction rays needs to be cooperative with the number of reflection bounces. If there’s not enough reflection bounces, the refraction isn’t set to complete. If there’s not enough refraction rays, the reflection bounces are going to fail at correctly or fully rendering. I’ll try to check my project that it worked in, and see if there’s Project settings or something else that I’m able to identify are the necessary aspect.

Ok it seems that something about the automotive glass shaders wasn’t working in my scene. I was able to built my own glass shader that can work with reflections…

However no matter how many bounces I set up in either reflections and refractions it’s still looks quite a bit unrealistic and dark and also I can’t make rough reflections…

this shader: https://www.youtube.com/watch?v=WTABH-f8rbE looks really nice. Is it possible to get something like this in 4.25? If I understand it right this is a different shading model, can it be bought as a plugin?

One thing to watch out for with Ray-traced reflections and refractions… make sure if you have a post-process volume you have “Include Translucent Objects” checked in the Ray Tracing Reflections section.