I effectively want to create a trail of where the player has walked and rather than placing decals/particles I am looking into a hitmask component type method found here:
http://udn.epicgames.com/Three/DevelopmentKitGemsRealTimeDeformation.html
Is there an easier way to integrate this method into UE4?
To expand on this.
http://www.gdcvault.com/play/1020177/Deformable-Snow-Rendering-in-Batman
Is there a material driven way to have trails in snow? Or is spawning decals with a camera render pass outputting a heightmap via a capture 2D the only way?
For the leaving trails in the snow portion, you could use distance field information (enable the Project setting (under Rendering) Generate Mesh Distance Fields and restart the editor) in your material to displace or WPO downward on the z axis by adding/subtracting displacement/WPO values while using a component mask with only the B channel ticked. That way any object affecting distance field lighting will displace your snow downward. From there, you can set up an event to fire with every footstep to spawn an actor with a transparent material that affects distance field lighting at the footstep location, and have it stay there for as long as performance allows, then have it delete itself once it’s no longer visible or performative. A good practice would be to have a maximum number of “displacer actors” that are spawned at each footstep, and once that limit is reached, the oldest one is deleted. How many you decide to allow is up to you based on performance/visual balancing, but that’s the general idea.
Let me know if you have any questions
I will have to give this a go, sounds alright, I haven’t forced meshes to affect the distance field stuff yet so not sure if because of the samples and blurring with the distance field it might act too soft/lack of control?
I mean ideally I suppose tessellation with distance based LOD on that would work just fine for optimisation. It would be nice to actually have a height map generated of the footsteps that could mip in and out based on distance, saving the most rendering power.