https://zhuanlan.zhihu.com/p/82682271
The interaction is implemented by referring to the details in the link above.
Interactive Sand
The reason why I did this interaction is that I saw the character walking in the snow level in the Wind Journey Man, leaving footprints on the snow as he walked. For this, I found relevant production tutorials on Youtube.
But the interactive effect in this production tutorial is not very good. Its limitation is that the collision space is limited to the plane. As for my terrain, it is complicated and uneven. I am still looking for a solution to this. However, when I adjusted the height of a certain interaction space, I found that 80% of the area can be interacted normally.
The effect is mainly to use the function of Unreal’s virtual texture.
The two pictures above are Sand’s virtual texture material and sand surface material.
Two of the key things are Runtime virtual Texture and Virtual Textural Volume blueprint which can specify the scope of the interactive space.
Character BluePrint: I preset the collision body capsule to trigger the displacement effect of the virtual texture when the speed is greater than 50. The depth of its displacement and the radius of influence need to be controlled by the internal parameters of the sand shader.
The above is the content of this week’s work, as well as all the technical analysis of the game scene production. In the next two weeks and vacation time. I will study the game role blueprint and game interaction and UI blueprint.