Watching livestream about making of bullet train - part 2, I followed description of the material used to fake reflections on the station hall.
It’s a translucent unlit material.
I reproduced it, to test it and it appeared to me that if you place a mesh with such a material under a floor, of course it is hidden by the floor.
So the only way I could reproduce the effect in the video was to disable depth test on the material.
But in this case, the mesh always appears in front of any other mesh, which is not the case in the video.
We were using the ‘receives decals’ setting to write to the decal mask and simply flagging objects above the floor to write in that pass. Then masking using decal mask in the shader.
fwiw decalmask is gone in the latest build and you would have to use custom depth or some other threshold method of detection.
You could for instance mask the effect with a fresnel that favors the angle of your floor by using the scene texture world normal, or instead by creating a soft mask based on the Z height of “world position behind translucency”. So there are many ways to go about resolving these sorting issues.
Thanks for your answer.
I didn’t know decalmask was removed (in 4.11, I suppose?). As the technique you used is now outdated, I’ll have to investigate in the directions you’re pointing at.
Would you mind providing a very basic setup example for this, as there is no documentation at all for the “world position behind translucency” node in the UE4 pages? Also, I found nothing on the web.
Does it mean there’s a part of the shader that we don’t see in the video?
How can a Surface translucent material behave like a decal, so that if you uncheck “receive decals” it doesn’t pass through a mesh?
It doesn’t make sense unless you used scenetexture:decalmask somewhere, in the translucent material or in a postprocess material. What it the case?