I’m experimenting with combining skinned animation and morph targets. I can do it in c# but I’d like to get it running on the GPU in the vertex shader. To do this though I need the vertices for the morph targets in local space before they have been transformed by the bone matrices. I’m wondering if there is any way to do this with the way the render pipeline is set up in unity? As far as I can tell the verts have already been transformed before they arrive at the vertex shader. Possibly the transform is being done CPU side? I’m interested in how this works and how versatile the system is.
Here is a movie which demonstrates what I am doing with this tech.
The worm is completely generated and animated using procedural code. Only the texture is needed and that is blended and mapped procedurally too. The body contains 6 bones which are simulated in physics as capsules and connected using springs. The bones are used to drive the mesh using skinned animation, the weights are calculated at the same time as the vertices. The mouth is animated using a morph target. Currently the morphing is done in C# code in the fixedupdate call. Obviously it would be much more efficient to do that in the vertex shader which is what I’m trying to find out about in this post
And another movie demonstrating more creatures built the same way.
1 Like