Download

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.

https://youtube.com/watch?v=azGdQYGiq5g
video: https://youtu.be/azGdQYGiq5g

Download UE4 Project File:
https://mega.nz/#!3g9QkAyI!z6VhQH_3x_Z9owB6wU1yKclcHayl8KHMcQEHEPIaQEo

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:

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:

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.