Pages

Sunday, September 15, 2024

Footprint Effect

     The footprint effect is functional now. There's still an issue where some of the prints appear in the wrong location while going up sloped surfaces. It isn't too noticeable from the player's perspective though, so I think it will suffice.

 

 

    To make the footprint textures, I basically added cubes around the feet in ZBrush and then applied a boolean to them.



    After that, I smoothed out some of the edges and then baked the imprints to a height and normal map.



    Since I divided the texture into quarters, I also used the flip book function in Unreal to make it easy to select each print based on a phase value.



    Next, I added anim notifies in the walk cycle for each frame where a foot contacts the ground.



    Finally, I added those anim notify events into the animation blueprint to trigger a spawn footprint event. This event creates a particle system and also spawns a decal.


 

    Aside from that, I also used a line trace to get the ground's physical material so I can select different effects and footprint materials based on the surface type.



    Once all of that was working, I realized that the physical material detection wasn't always the most accurate due to the relatively low polygon count of my landscape. To work around that, I made a footstep override volume. Basically, it allows me to set a specific physical material for the area within the volume, rather than pulling it from the landscape. It should also be useful in cases where there isn't collision available to represent the material, such as with decals.



    Now that I've got the footprints set up, I'm going to apply wind animations to the rest of the foliage.