So I spent my weekend playing a ton of the new Doom (fantastic game btw!) and was instantly struck by how beautiful the game is. One thing that struck me in particular was fantastic usage of translucency not only receiving light, but shadows as well, and at a very high frequency. here is a screen grab for example:
So, being intrigued by what I saw, I tried to emulate it in UE4 to no avail. The translucency shader is only capable of receiving the shadows to a certain extent; It understands that if the particle effect is too far left or right of the grate it shouldn’t receive light, but it doesn’t pick up shadowing from the individual grates. I tried using spot, point, and directional lights, all set to movable as well. Nothing I try matches the crispness the effect in Doom has though. Can someone help here? Is the translucency shader itself the problem, or did I miss something? I did also try using a dithered masked material, which did give me the crisp shadows, but at the cost of everything else looking terrible.
The rails in the floor don’t match the rails in the smoke, it’s obviously just faked.
It actually isn’t. You can see the artifacts created by the shadows hitting the planes when you walk around them. They warp the way you would expect from planes that always face the player receiving shadows. Anyways I figured out how to do it in UE4. The trick is in two console commands: r.TranslucencyLighintVolumeDim and r.TranslucencyLightingVolumeInnerDistance. The first one affects the resolution of the Translucency lighting volume. By default it is set to 64. I was able to get it up to 256 before maxing out my vram usage. The second one is similar to the nearest cascade in directional lighting. Lowering it reduces the range of the effect, but condenses the samples, thus increasing the quality. Sure enough, my results in UE4 look identical to the screenshot above, and even with the same warping artifacts seen when walking around the smoke. Can confirm, Id didn’t fake it.