Using UI to drive shader
This was my first approach to the project, but I reached an impasse when I was going to apply an animation and read that skeletal meshes can only have 4 UV sets in UE5.
Using Hit detection to drive shader
My first intention with this scene was to use render targets and project color onto the UV space of the mesh to get localized deformations. But I couldn't quite get the projection to work as intended.
My goal for this project was to learn a bit more houdini and see if I could store deformations in UV sets as a more performative alternative to blendshapes.
While the accuracy seem to be worse than when using blendshapes directly, the performance in real time should be quite a bit better since all deformations are running on the GPU, as for comparison to using textures to store the deformations,the amount of samples becomes a lot fewer making it easier to add more samples for other purposes.
The limitations seems to be accuracy as well as limitations of UV sets handled by the game engine used. In my case, Unreal Engine 5 can only handle 8 UV sets so you cannot blend too many attributes for a mesh. Additionally, Unreal cannot handle more than 4 UV sets in a shader for a rigged mesh so for the purpose of this project I ended up discarding my rig and animation since I already had the shader set up with the attributes based on 7 UV sets. So that is a lesson learned, check the engine limitations before working on a project in said engine. So for characters this way of storing vertex displacement is not ideal, but I can imagine it being a method for dynamically growing vegetation for example.
A few things I noticed during the project was that the accuracy seems to be higher when splitting coordinates into 3 channels utilizing 1.5 UV sets per deformation instead of 1 UV set storing the values together. It was also beneficial for swizzling purposes in the shader since unreal has a different coordinate system than houdini and maya.
--- All assets and implementations are made by me besides the default UE5 content like the gun ---