PDA

View Full Version : rotating and transforming specific part of 3dmodel



hana09
04-05-2010, 06:24 AM
Dear All,

i am beginner to OpenGl. my problem is that i have bird 3ds model, i imported it in VC++ project using opengl, but when apply any kind of transformation or rotation it is applied to the whole bird, but i dnt wanna that. i wanna to rotate and transform for example wings separately than whole object.

please, if any one can help me with tht, i would appreciate.

thx in advance.

Mukund
04-05-2010, 09:03 AM
Hello hana09..Even i am a beginner..In fact i too have a similar problem..
I have an object(a man) i need to move only parts of the body..say hand or leg separately..

so i thought of using different vertex sets for different parts of the body..

I guess you could try the same thing by defining the wings as a separate entity..so that you could operate on wings separetely..

This is what im trying to do..I do not know if there is a better way of doing it..

Bloodtoes
04-05-2010, 09:45 PM
To do it smoothly what you probably want to do is rig the model with bones and each vertex has a weight to the bones painted to it. This is a pretty dense topic though to actually get bone animation working for your model. Typically for games each vertex can be weighted to 3 bones where the sum of all weights is = 1.

For an organic object like a bird though that is probably the best option. If it were something more mechanical like a helicopter you could just separate out, say, the blades, and rotate them around easily. But with a bird you'll want some vertices (most of the wing) to be transformed 100% and then some (the body) to be transformed 0% and then other verts in between to only be transformed a percentage of those.

Mukund sort of has it right. The verts that are weighted to a bone could be thought of as a vertex set that are transformed by some percentage of the bone. But without that the animation will look very rigid and you won't get the kind of volume preservation you'd expect with an organic object. I guess it depends on the model.. with some models you maybe could get away with rigid vertex sets.