Hi!
I’m creating a glass screen for a CRT monitor, I need it for rendering a sequence. I’m trying to achieve some kind of light dispersion effect. I could easily make it in Blender to work in both EEVEE and Cycles, so it should be something achievable in Unreal. In Blender, I’ve simply mixed 3 different glass materials (one for each RGB Channel) and changed slightly the IOR for each material.
I tried some different approaches in UE but nothing close to the result I want so far. I wouldn’t necessarily need something physically or mathematically accurate or a whole caustic system, I have an emissive texture behind the glass, and I’d like for some of the light to get dispersed diffently on the GB channels depending on the distance, the angle and the IOR.
Any ideas?
how does it look if you render it without all the cgi fluff?
Put 3 scene texture samples in your material, offset the UVs used to sample each of them slightly differently based on the surface normal which can be retrieved with another scene texture sample. Take the R value of one, the G of the next and the B of the 3rd then append them back into a single RGB vector.
Hey bro, Could you please explain it in detail.I’m a beginner and don’t quite understand.
Here’s an example graph:
Result:
The camera vector is refracted by 3 different amounts, and the cubemap is sampled once for each vector. This roughly approximates how dispersion works in real life.
This looks great! I tried to rebuild from your screenshot, but I’m probably making some newbie mistake. It seems no matter the CubeMap I put in, I cannot get the material to become translucent.
Are there any obvious gotchas you could point me towards?
Thanks, any help much appreciated ![]()
Is there an error message at the bottom of the material graph?
What Cube texture are you using here? Is it the reflection map?
The reflection probe cubemaps aren’t accessible in the material editor without engine modification as far as I know. If they were, they would work for this purpose. Alternatively you can just capture your own cubemap specifically for this purpose.
I am using the epic courtyard cubemap for the example image, which is part of the engine content.
Right, okay.. I was experimenting with a fully white cubemap but that doesn’t work (of course!) since if there is no contrast of any kind the displaced RGB values still add up to the same white. So it needs to be some simulation of the reflection, like what you’re doing with the courtyard.
Exactly. A cubemap sampled with the refraction vector instead of the reflection vector will simulate proper refraction. This is a classic technique to fake refraction and was used for the famous liquid/bottle shaders in Half-Life: Alyx, so it is suitable for high end results too.



