nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nel] animation problem


From: Andi 'Debug' Allen
Subject: Re: [Nel] animation problem
Date: Fri, 20 Feb 2004 02:47:29 -0000

hey cyril
 
hate to be a pain old chap
 
but this
 
- Evaluate the current animation time (ie where the animation must by played)
- Get the matrix of the root bone from the current animation (evalute the "pos" and the "rotquat" tracks and build a matrix)
- Translate the matrix with your snaped world position (if need be, rotate it)
- Set the final skeleton world matrix. (Skeleton->setMatrix (finalRootBoneWorldMatrix))
 
ive looked at the animation system and trying to get my head around it
 
how do i do this could you shoot me a quick example if thats ok
 
in my head im thinking
 
animationset of animations
playlists of animations from animation set
each entity has a playlist
 
i need to iterate entities
then get their playlist
then it gets fuzzy...
 
how do i get the current animation time per entity per animation
 
how do i evaluate the pos and rotquat tracks via that i assume which is gained via  getTrackByName
 
this i would of done like this
 
NL3D::UAnimation *testAnimation = CAnimationManager::instance().AnimationSet->getAnimation(0);
NL3D::UTrack *testTrack = testAnimation->getTrackByName("pos");
 
but if we are adjusting each entity via its own playlist? i think im just a little confused as of how
to proceed
 
then how do i use that id to get the
 
 
----- Original Message -----
Sent: Thursday, February 19, 2004 4:46 PM
Subject: Re: [Nel] animation problem

Ok,
 
In the previous mail, i tried to solve the bad skinning problem. :-)
For the bad position problem here is the point :
I assume that you move the creature skeleton with a code like:
 
Skeleton->setPos (LastSnapedOnTheGroundPosition);
 
It works with the GNU because it is not skinned to a skeleton and the GNU local origine is 1 meter under the object. So the GNU floats perfectly.
 
In the case of a skeleton, setPos() sets the world position of the root bone. (here, it is "Bip01"). The root bone is snap on the landscape and your creature is half into the ground. It is the animation that will give the delta Z position above the ground.
 
In Ryzom, we make the following things:
 
- Evaluate the next world position of the creature
- Snap it on the ground
- Evaluate the current animation time (ie where the animation must by played)
- Get the matrix of the root bone from the current animation (evalute the "pos" and the "rotquat" tracks and build a matrix)
- Translate the matrix with your snaped world position (if need be, rotate it)
- Set the final skeleton world matrix. (Skeleton->setMatrix (finalRootBoneWorldMatrix))
 
If you have animated your creature with its feet snaped on z=0, the "pos" track should return a decent Z value (>0, in fact the same than in 3dsmax).
 
I hope this helps.
 
Hld.
----- Original Message -----
Sent: Thursday, February 19, 2004 4:34 PM
Subject: Re: [Nel] animation problem

ok if the shape and skeleton are in the same position
no matter where that is they appear half underground
and (facing forwards in max ) appear facing left in game
even tho GNU is facing right way and happily floating above the
ground
 
 
 
----- Original Message -----
Sent: Thursday, February 19, 2004 3:06 PM
Subject: Re: [Nel] animation problem

moving the shape without the physique modifier
then pasting the physique modifier back on worked
 
i am about 0.0001" off but it doesnt notice visually
which i can cope with
 
strange tho if i clicked VIEW SCENE in 3ds max it
animated fine its only when i export that the shapes
position comes into play.
 
wouldnt it be a good idea to have a node option
that took its worldspace position instead of object space?
 
 
 
----- Original Message -----
Sent: Thursday, February 19, 2004 2:47 PM
Subject: Re: [Nel] animation problem

hi cyril :)
 
if i disable the physique modifier he drops back to 0,0,0
so that maybe the issue...
 
ill try moving him and let you know how it goes :)
 
incidentally do you know how to resize an object in 3ds
i cant seem to do more than rescale its world space interpretation
 
 
----- Original Message -----
Sent: Thursday, February 19, 2004 10:23 AM
Subject: Re: [Nel] animation problem

Oops, forget the previous message..
 
Hi Andi,
 
> after loading into our game i notice that after adding the skeleton our monster is half under the floor
> and facing the wrong way...
 
This is a classic issue, in max, when you create your biped, it looks at the -Y axis to face the front view.
 
> same issue his tail went crazy and im sure he enjoyed it but was pretty unbecomming even for a horny little monster
 
Can you check this points before we go further:
 
    The skin shape vertices are exported in world space (it's a special case). At run time, vertices are moved back in bone local space using the inverted "figure mode" bone world matrix and then transformed in word space using the "current" bone world matrix. It means that :
    - whatever you may change on your skeleton (position, posture, orientation, size) you have to reexport the skin model.
    - you have to be sure that your skin shape, with physique modifier disabled, matchs the skeleton in figure mode.
    - the skin shape and the skeleton have to be exported in figure mode.
 
I hope your monster will get back on form :-)
 
Hld.


_______________________________________________
Nel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/nel-all


_______________________________________________
Nel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/nel-all


_______________________________________________
Nel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/nel-all


_______________________________________________
Nel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/nel-all


_______________________________________________
Nel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/nel-all

reply via email to

[Prev in Thread] Current Thread [Next in Thread]