Skip to main content
GameDev.net gamedev.net
🔒 Locked

Vertex morph animation

Started by w00tguy123 Nov 7, 2012 at 5:08 AM 0 replies 2.1k views
Original Post
w00tguy123
w00tguy123
I'm used to skeletal animation, but I'm not sure where to start with per-vertex animations. Is there anyone that has experience making per-vertex animations/morphs? How can you indicate the destination of a vertex with a modeling program? Do I really have to create a bone for every single vertex?

Say I have a two meshes with the exact same amount of faces and vertices and save them both to separate frames/files, I can only expect that vertices from the first frame will interpolate to random vertices in the second frame, which would turn into triangle soup. I need a modeling program that can let me assign an ID to a vertex or something so that I can choose which vertices go where in the next frame. Does something like this exist? If not, what is common practice for vertex animators?
Ashaman73
Ashaman73

Do I really have to create a bone for every single vertex?

What ? No.


I need a modeling program that can let me assign an

Well, blender for example supports shape keys, which are the same model (tris + vertices), but each shape key have an other position of the vertices. You don't need unique IDs, the tool just needs to ensure, that the exported vertices are in the same order.

In this case you would morph between two meshes like this:


vertexSource : attribute
vertexTarget : attribute
alpha : uniform
..
positionSource = applySkeletalAnimation(vertexSource.position);
positionTarget = applySkeletalAnimation(vertexTarget.position);
positionFinal = mix(positionSource,positionTarget,alpha);
...


Basically the source and target vertex are two different streams of two meshes, representing the same topology. In fact there're only two position/normal streams, you can share other data like uv coords or color. When exporting your meshes from a modelling tool just ensure, that
1. same number and order of vertices
2. bound to the same skeleton
3. same tris

Shape keys should do exactly this, other modelling tools should have similar features.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.