Bending by joints

So as i wrote in my last post ( I currently exploring how to bend meshes by a spline, i.e. Beziér curve. I was struggling with getting the control points of the Bezér into the correct space to offset the vertices.

It’s not optimal to do these calculations in a vertex shader and with also having problems with spaces I changed approach.

One way to animate a mesh is to do it by rigging and skinning a mesh. Rigging a mesh is when you build the “skeleton”/bones a the mesh and skinning is when you assign different vertices to the corresponding bones.

This approach can be used in my current situation. I asked one of the artist at Station to rigg and skin a mesh for me. I then built this solution in which if offset every bone from start to end with the corresponding calculated Beziér value from start to end. This makes the skin (surface of the mesh) follow the bones.

The draw back of this approach is that hardware instanced skinned meshes isn’t currently supported in Unity 3D which is needed for the current project. There are some ways to make it work, but right now I need to focus on some other parts of the project at Station.

Here you can read more about solutions to hardware instance skinned meshes:

Here’s the current result

A skinned mesh with the bones visualized

Resultatet och problemet med instanciering

A skinned mesh animated by the result of a quadratic Beziér curve