Deformation

I wrote this page because I want to briefly explain, what approaches I will be using to create a deformation effect on meshes. I will experiment with two approaches and maybe try out a third if I still have enough time. I will then decide for an approach (or maybe use a hybrid version) and implement a more elaborate version of it.

Approach #1: Materials
In this approach I will create a material that move the vertices along the normal according to a colour channel (probably green) of a specific deformation texture. I will try to access the vertices of the mesh and calculate the impact information, which then would be send to the texture. The texture would then be coloured based on the impact. Since the colouring will be during runtime I will have to implement a dynamic texture that can be modified during runtime. I assume that this approach would be the best performance-wise, since it won’t be needed to redraw the mesh every time a collision occurs. A downside will be that the collision mesh won’t automatically update after a collision. There is probably a workaround for this problem and with some more research this will certainly get clarified.

Progress #1

Progress #2

Progress #3

Approach #2: Dynamic Mesh
The second approach will be a dynamic mesh that can be modified during runtime. In this case no special material will be needed. The impact information calculation algorithm will be similar to the one of the first approach. With this approach the mesh will be redrawn after each impact. Therefore, the collision mesh should be automatically updated but probably with a higher performance cost.

Progress #1

Approach #3: NVIDIA Flex
Flex is a particle-based approach for many visual effects, including deformations. NVIDIA released a Unreal Engine version with flex integration. I will take a look at the possibilites of this system and analyze if it may be a suitable approach.