Hi
probably the refraction display
I made the material for the rain on the glass
but the refraction is displayed strangely
Hi
probably the refraction display
I made the material for the rain on the glass
I suppose, strange relative to what? What is the desired behavior?
Reflection in any real-time software is going to be quite compromised compared to offline work, and achieving a desired effect will often be the product of a lot of hacks and custom shading models.
unfortunately, in this case I can’t use the screen color to add refraction to it and set it to color
Below is an example of this method, and it works perfectly.
I understood the problem that glass should refract only where there are drops, and where there are no drops and just pure glass, we should see what is behind it without distortion.
But I still don’t understand how to do it
Is there a reason you chose 2D offset as your refraction method?
I’ve tried other methods.
IOR is the only physicalized refraction method supported by UE, everything else is more or less a hack for games. I’d first test your material with the path-tracer, and if it’s giving you the result you want there, then you have a lighting limitation and not a material one.
I can’t use tracing the way I’m making a real-time game. I am sure that it is possible to create a way to advertise a message, since it is easily done through (screen position )
But I can’t reuse this method for refraction. Since my raindrops are already using this method. To distort the background. And if I use it again, I won’t see raindrops through the glass.
I’m not suggesting using the PT as a game tool, just to diagnose if your materials are acting up or your lighting pipeline is.
Just checking in on your knowledge base, have you spent much time working with real-time transparency, or is your background more offline DCCs?
Disable refraction for the pane of glass itself. Only use it for the drops.
IRL, when light passes through glass, it’s vector changes. When it passes through the back side of the glass back into air, it will change again. If both of these surfaces are parallel to each other, the incoming and outgoing vector will be the exact same direction. In other words, the ray will not actually have any net change in direction.
It will have a slight offset in position, relative to the thickness of the glass, but that is basically imperceptible in thin glass.
Water drops on the other hand, will visibly refract light, because the curved surface of the drop is not parallel to the flat surface where the light passes from the water to the glass.
No refraction besides ray tracing can achieve physical accuracy, only an approximation. And 0 refraction is a better approximation for a flat pane of glass. Use a mask to disable the effect wherever there isn’t a droplet.
Anyway, thanks, I kind of found a way of adequate refractions, but I have a new problem. In this video you can notice that. Refractive drops leave a trace on the screen space. And therefore, when I move away from them Or approach, you can notice the tunnel effect
That is most likely due to TSR or TAA. You would need to make sure transparent materials are outputting their velocities in your project to avoid ghosting on things like that.
Is this what I need?
But in any case, the problem has not disappeared.