Hi,
I’m having an issue with rt shadows for directional light where the shadows ignore the animated leaves on my trees, the leaves are animated using world position offset in the material.
What ends up happening is a weird look on the trees and static shadows on the floor.
Cascade shadows work perfectly but are more taxing on the hardware.
Screen shots wont help as this is only visible in motion.
So is there a way to make the directional light take these materials into account?
2023 Update: There’s a much easier way to resolve this now, simply run the following command: r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1
Original Reply
Use actor foliage instead of static mesh foliage:
Make a new blueprint class that inherits from static mesh actor
Turn evaluate world position offset on in the static mesh component, set the mesh to your desired mesh
Create an Actor Foliage class that uses your new class as its base class
Use the actor foliage with the foliage tool
I’ve used this trick before in order to use settings that are typically unavailable to foliage, such as indirect distance field shadows. I tested it just a second ago and it works. Can’t vouch for the performance in dense scenes though. I have no suggestions otherwise, the documentation makes it seem like this is a hard limitation.
■■■■, that is a great idea (I will need to try it to see if I can actually do it)
But I tried several times to use the distance field stuff and at the end I gave up.
Will try this.
Got it to work!!
Fantastic man! Awesome, I will do some testing regarding performance and will post back.
Also, will probably use distance field indirect shadows as I had to create a shader-based AO to simulate it since it didnt work before. nice!!
I’m on 4.27 and the hack with Actor Foliage works, BUT the performance is totally screwed. I droped from 60fps to just 8.
I’m a bit surprised that an issue of this magnitute doesn’t got more attention, or at least I didn’t notice it. It makes RT unuasable with slightly bigger landscaped.
That’s expected… the raytracing acceleration structure has to be rebuilt every frame for skinned/dynamic meshes which is insanely slow. There’s no solution to this. Unless you’re making a cinematic you should not be enabling WPO for raytracing on many objects in your scene, thats why it is disabled by default.