- Home /
If it is possible to record motion vector of each vertices of a model?,If it is possible to record the motion vector of each vertices of a model?
I want collect those motion vector of each vertices of a model and compute in Matlab. I wander if it is possible to get those data (motion vector of each vertex between 2 frame). Or I can get the motion vector of a part of model, like leg, arm? Thx!
You can probably do this with Unity or a 3D modeller, this is not explicitly a Unity question.
Answer by hexagonius · Mar 15, 2018 at 01:38 PM
You have access to the vertices via the mesh of the MeshFilter. You can save the positions of each in the first, then in the next frame and compare the difference. I know that MeshRenderers are capable of generating motion vectors, maybe there's a way to just access those.
Thanks for your answer. It worked, and the array of vertices at each frame is always one-to-one correspondence, right? Like vertices[3] in each array are the same vertex from the model?
yes, otherwise the index array for which vertex goes into which triangle would be messed up.
Excuse me I have another problem. I downloaded a model with animation (like a walking man). I tried to access those vertices coordinate using $$anonymous$$eshFilter when the man walks, but however I choose the frame to run the script, the vertices I got is the initial vertices (Which shows the man just standing over there, never walked). So do you know how can I access vertices coordinate of a model in an animation? Thx
Your answer
Follow this Question
Related Questions
Any good mocap programs? 1 Answer
Humanoid with custom motion (like exercise) 0 Answers
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers