UV Set Based Deformation

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.

Base Mesh

I started with making a base sculpt in Zbrush which I then retopologized in maya.

Base Mesh

I started with making a base sculpt in Zbrush which I then retopologized in maya.

I then took the base mesh back to zbrush and created the deformation variants so that I could bake them in houdini.

I then took the base mesh back to zbrush and created the deformation variants so that I could bake them in houdini.

I made handpainted texture variations to get as much difference in the albedo as possible.

I made handpainted texture variations to get as much difference in the albedo as possible.

Houdini Setup

While the setup is quite simple it took me quite a bit of time to come to the conclusion to use 1.5 UV sets per displacement as I struggled to get the displacement to look good with just 1 set.

Houdini Setup

While the setup is quite simple it took me quite a bit of time to come to the conclusion to use 1.5 UV sets per displacement as I struggled to get the displacement to look good with just 1 set.

Displacement blending shader

This is how the shader blends between the different UV sets to create the displacement. 
The swizzling of the coordinates can be seen here.

Displacement blending shader

This is how the shader blends between the different UV sets to create the displacement.
The swizzling of the coordinates can be seen here.

A better view of displacement

Here, some uv coordinates needed to be inverted for correct displacement to get the right directions.

A better view of displacement

Here, some uv coordinates needed to be inverted for correct displacement to get the right directions.

Blending between textures

To make the shader easier to handle for the case of this mesh I opted to just use normal and albedo textures and just set constants for material values. Here is the full logic used for both albedo and normal.

Blending between textures

To make the shader easier to handle for the case of this mesh I opted to just use normal and albedo textures and just set constants for material values. Here is the full logic used for both albedo and normal.

A better view of texture blending

To get the blending to go between a midpoint of 0.5 I had to multiply in the base texture using a similar approach to the displacement logic as I wanted the shader to have a solid midpoint when both attributes are 50%.

A better view of texture blending

To get the blending to go between a midpoint of 0.5 I had to multiply in the base texture using a similar approach to the displacement logic as I wanted the shader to have a solid midpoint when both attributes are 50%.

UV Set Based Deformation

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 ---