PDA

View Full Version : Selective translation, and rotation?



dabeav
09-08-2002, 01:19 PM
I may have mentioned this before, but I dont believe I got an answer, or maybe I did, but anyways.

I was pondering. Can you conditionaly rotate or translate verts? Or more to the point, Say i have a model ( i know opengl dosnt understand models, but thatis what it is ) of a hand. I would like to wiggle the fingers. Now the WHOLE hand is saved as one vertex array for performance reasons. Now i know the verts that have to move to create the wiggle, and the ones that dont have to more, (uniniform movment of the verts versus the model). Is it possible to select only the verts I want to translate and rotate? Or is something like this best done by first Actualy moving the verts by way of math, then simply moving the ENTIRE model into its new location??

MarcusL
09-08-2002, 01:37 PM
Sounds like you want to do skinning. I.e. use several modelview matrices and blend between these on a per-vertex basis.

OpenGL has support for this, the number of matrices however is implementation dependant.

jwatte
09-08-2002, 01:49 PM
The problem with the OpenGL matrix weighting extension is that EACH vertex has a weight factor for EACH bone. That turns into a very big weight array very fast.

What you actually want is matrix palette skinning. This can be done using a vertex program, or you can do it in software before sending the vertex array to OpenGL (I do the latter, because I target pre-GF3 hardware).

dabeav
09-08-2002, 02:01 PM
So it would be smarter to just change the values before sending it to Opengl. Ok I can do that, i will require ALOT of recoding, because right now I am working off one model for multiple items. Like if i have 10 characters with the same body, I simply use the Same Array, That will have to change. But thank you for your help.