I try to figure out how to improve de shadow quality on my clouds. On the screenshot, i disabled SkyAtmosphere and SkyLight to show how the shadows are poorly rendered on the clouds compared to the plane surface above it.
The clouds have a translucent material with the “Surface TransluencyVolume” parameter. I tried the “surface ForwardShadowing” parameter as well but the result still looks very pixelated.
I tried either “virtual shadow map” and “shadow map” in the project settings, but the problem remains in both situations.
any idea on how to improve the shadows casted on translucent materials ?
Volumetric clouds are handled a bit differently from normal translucency. The settings you’re dealing with have to do with the shadows clouds receive from normal mesh objects, and the surface properties don’t really do anything to affect that. In cases of VSM, try the command: r.Shadow.Virtual.TranslucentQuality 2
The likely explanation is that the shadowmaps covering the translucency are too low-res to effectively shadow your clouds. You can fix that by telling the VSMs to boost their translucent quality.
That’s good to know, and in that case the problem would be the same: it’s not the object receiving the shadows, it’s the resolution of the shadow cast itself. If the problem persists, then you may have a more complex problem.
surface forwardshading should actually work and produce nice shadows. unless the shadow distance is too large and it uses a lower lod cascade or dropped to distance field shadows. also check “r.Shadow.MaxCSMResolution ?” for the cascade resolution. default should be 2k and not look like this. the csm resolution also influences the capture of the translucency volume’s information. the translucency volume is a low resolution approximation, btw. it has only 2 lods, hence why it’s highly voxelated at far camera distances. the resolution can be increased, but that comes at a performance cost to update it.
this is how Surface Forwardshading renders, its better but still excessively pixelated. Adding some blur to the shadows could be nice but i didnt find a way to do this.
increasing r.Shadow.MaxCSMResolution to 4096 looks slightly better but but the shadows still looks very pixelated.
the camera is not very far from the scene : the space ship is around 200 pixels long, the closest cloud is is very near from it (about the same distance as the ships length) and the camera is placed at 800-1000 pixels above the ship. If i zoom in very close to the cloud, the shadows still looks very pixelated.
that’s cascaded shadow mapping in a nutshell. you move the camera back, you drop the cascades. if you have a somewhat stable distance you can use the distribution exponent to tweak which cascade is the main “focal point”. unfortunately this exponent math is not the greatest shadow detail controller. no smooth talking that. it’s absolute rubbish. especially for those kinda top down angles. but that’s what you got.
i don’t use vsm, but i think it has the same or a similar issue. it’s just called clipmaps, iirc. no clue howto fix that.
also… other render programs allow to turn the directional light on it’s local x axis to turn the jaggies to be “screen space aligned”. that’d be nice for pixel artsy games. again… unfortunately unreal doesn’t allow that.
Thank you very much for these explanations, i somehow manage to slightly improve the shadows by using the distribution exponent slider. But you are right, i cant get rid of the overly pixelated look.
its really strange that the shadows are rendered so differently on opaque and translucent surfaces. Im not looking for very detailed shadows but i was hoping for something at least a bit better…
is there any way to add some blur on a shadowmap, with post processing or something like that ?
blur? not with cascaded shadow maps. vsm allows a certain degree of penumbra if you increase the directional light source and source soft angles. it basicly dithers it and taa/tsr cleans it up.
no chance to post process shadows. that shadow pass is not exposed for post processing.