Quote Originally Posted by bazbazus
tpascal thanks , ok my model is a smd file and i made a skeleton
how i can select different parts of my model
i want to do exemple :
Model[head].rotation.z:=Model[head].rotation.z+1;

What is the correct source ?
//--------------------------------------------------------
Ok, you did the skeleton, you already know a skeleton is a Hierarchical bone tree structure starting with root bone and then following with childrens. From your modeler you need to take note where the "head" bone is located in the tree.

ok, model is a tglactor type, so you can have access to bones this way:

model.skeleton.rootbones.items[rootNo].items[childrenNo]...until you get the desired "head" bone, .items[desiredbone].globalmatrix

Transform "Globalmatrix" matrix as you like for translate/rotate the bone, then you need to propagate the matrix change to all his childrens using procedure .items[desiredbone].PrepareGlobalMatrices;

you can also get the desired bone using:
model.skeleton.BoneByName() or model.skeleton.BoneByID() functions.

The above was about transforming at run time the skeleton "Bind pose", or "T pose", which is not just a standard procedure, and it will affect the keyed frames animation current playing, for example the run animation will be played with the head rotated. You have to be skiled with matrices math to restore the globalmatrix to original state and do different transformation.

//-----------------------------------------------------------------------
Transforming at run time the skeleton it is not commun and maybe it is not what you want; in games most the time what it is done is to animate the character via key frames, preserving the original skeleton pose.

You build all animation in your modeler, standstill, run, walk, jump, die, attack, etc.
Then in game you switch from animation to animation, based in user control or events, your character will ALWAYS have an animation current playing; when the user is not using the control and nothing is happening in the game, then the character is playing a standstill animation and ocasionally it's interrupted by a random iddle animation.
//-------------------------------------------

Anyway, lets say that you still interested in animate your character passing values inside the program like in your example above; for doing that using frames you need to add ad a "empty" animation, and then add one or more "empty" frames;

then you acces the frames:

model.skeleton.skeletonframelist.items[FrameNo].Position.items[boneNo]; //x,y,z
model.skeleton.skeletonframelist.items[FrameNo].Rotation.items[boneNo]; //x,y,z euler.

You need to use then: model.skeleton.skeletonframelist.items[FrameNo].flushlocalmatrixlist;
to propagate the changes to all his childrens.

Note that model.skeleton.skeletonframelist.items[] store ALL FRAMES for ALL animations, (run, jump, walk, etc) linearly, you have to use model.animations.items[AnimationNo].startframe & .endframe for know the ranges frames for your desired animation.
//--------------------------------

I may be wrong, but I think they added support for animations in a 3DS file.
Brainer:
I have checked the file3ds.pas and seem that you are right, it looks like skeleton and frames are now parsed, i have not tested if that is really working, but it is good to know that seem finally we can read animations from 3ds in delphi;

GLscene is the best source code info for 3d programing in delphi, , too bad the info was never full documented, we have to check for the demos to learn how class work; i am very interested in the OPENBSP code, that is somthing that i have not seen exploited in delphi, it is even forgoten, the guy who coded openBSP removed that product from his web site, i wonder if there is some legal issue; I dont found another free BSP compiler for pascal programmers.