UE4 still does not have any proper way to do tinted glass

This is a very interesting topic. I am trying to work this out - step by step and I hope to get all your help. So here we go, please see the video below.

video: Glass Refraction - YouTube

Download UE4 Project File:

Thank you so much for any of your help, hints, tips & suggestions.

Happy pixeling,
Bernhard :slight_smile:

an update:

all my test results for creating a Glass Material using the Translucency Type Ray Tracing can be found here:
https://forums.unrealengine.com/development-discussion/rendering/1681464-glass-bump-issue-how-to-fix

Yes, yes yes yes yes yes yes!

Yes! Yes!

Yes yes yes yes!

Yes!
YES!

Looks good, but i still miss their reflections in the metal object (there is something pink in the left corner, but i am not sure, if it is one of the glass spheres, or one of its shadows on the ground), and in each other. So reflections for translucent/transparent objects seems still not active by default and have to be done by a customized engine, like:

https://forums.unrealengine.com/development-discussion/rendering/1709750-ue4-24-implement-fix-thick-glass-refraction-and-double-reflection-in-ray-tracing

Looks like the highlight seen through one of the sphere. They arenā€™t perfectly aligned.

I just hope .25 isnā€™t as bad of a mess as .24 has been.

Itā€™s just a screenshot, there can be 100 reasons for it. Itā€™s a default scene so all that the metal object has could be reflection capture captured before sphere were placed + SSR. I am 90% sure theyā€™d show up in raytraced reflections.

Ha! I knew I was not imagining it. Anisotropy indeed was there originally for 4.24 but then promptly removed. It seems to be back in 4.25!

Did you ever find a solution to tinted raytraced glass? Iā€™ve been trying to solve this as well. One solution Iā€™ve found is to use a mesh decal, but it doesnt get that saturated, tinted look. Its still super cloudy. It seems they got it to work in the nvidia porsche demo, but from the way itā€™s explained in their presentation, itā€™s still impossible with out of the box raytracing. They talk about it on page 158. The problem is that the tinted materials dont work with translucency, but theirs somehow do? https://on-demand.gputechconf.com/gtā€¦pdf/CH8807.pdf

Iā€™ve made a thread on this as well if you want to hop in.

For non-raytracing, they introduced Thin-Translucency, as described here:

https://docs.unrealengine.com/en-US/ā€¦ncy/index.html

But that seem to not work with raytraced reflections. Or at least i was unable to get the described setup to work with raytraced reflections, but that could also just be a bug or a wrong setup on my end. Would be interested to see, if others get it to work with raytracing.

https://docs.unrealengine.com/Images/Engine/Rendering/LightingAndShadows/LitTranslucency/ThinTransparency.webp

https://docs.unrealengine.com/Images/Engine/Rendering/LightingAndShadows/LitTranslucency/ThinTranslucencyGraph.webp

This thread was started way before thin translucency model was introduced. In fact, I like to think it was introduced partially because of this thread :slight_smile:

I hope so :slight_smile: would be a fix for a long lasting problem, or to a missing feature. I just also hope, that it also works with raytracing and raytraced reflections, not just with raster :confused: But i have a bad feeling in that regard (someone prove me wrong, pleaaaaaaase).

If you look at page 158 of this paper, they do it perfectly. How they did it though, is a mystery. The methods in the paper donā€™t seem to line up when I try it. Anybody have any pointers on how they got tint with raytraced translucency?
https://on-demand.gputechconf.com/gtā€¦pdf/CH8807.pdf

This paper was released before that Thin Translucency Shader was released, they used a different method there. I think they stacked several meshes/layers together, which should not be necessary with a real glass shader.

reading Yeah, they even described it there, first comes a mesh that acts as reflective layer, followed by a second mesh/layer for the tinted glass part, then mirror those two layers for the other side of the windshield. So you have two layers facing forward (reflective and tint layer), and two layers facing in the opposite direction = 4 layers/meshes. Way to much trouble and possibilities to mess up :frowning:

On page 159 you see the chosen materials for the layers/meshes.

The problem is that those material setups donā€™t work with default raytracing translucency. When raytracing translucency is enabled, backfaces appear. Modulated blend modes and tints disappear with raytraced translucency enabled.They work just fine in rasterization workflows, but Iā€™m confused as to how they were able to achieve a modulated tinted glass while still having raytraced reflections.