bone animations

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

bone animations

Post by Acki »

Hi,
I had a search and found that there is still no way to set the angles of a bone manualy !!! :cry:
So, has someone figured out how to manipulate a bone anim ???

I want to create ragdolls (Newton) and now I have only the choise to create every body part as an single mesh... :cry:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

I'm doing it with a callback, I set the callback in the scene nodes that pass it as a parameter of getmesh(),that passes it to animateSkeleton().
And of course the callback sets the transformation of bones.
It would be simplier to add a procedure like setBoneRotation, but it is not possible since the meshes are shared between the scene nodes.
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

whoops double post
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, I see...
But how to do this ???
I'm something missing... :oops:
Could you give me a little example, please ??? ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

Of course you've got to modify the engine. If you like this solution, I'll post some source.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, I want to use bones and if there is no other way for... ;)
Yes, post it, please :D

It would be great, if Nico adds a feature to manipulate the bones to the engine, wouldn't it?

thx, Acki
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Wow Acki you must have been away for awhile.. you seem to have forgotten his name is Niko.. :roll:
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

I've uploaded a zip file with a step-by-step help on how to modify the engine. The complete source of my version of the engine is included if you have some problems with modifications or if I've missed something in the help file.
That's a modification of Irrlicht version 0.10, but it should work with newer versions of the engine (or older).
I hope this can help you.
You can download the zip here:
http://web.infinito.it/utenti/p/phenix1/toSetJoints.zip
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

@Midnight:
well, another little type mismatch... ;)

@Phenix:
great, I'll check this out
thank you verry much !!! :)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Yeah, you gave me a great hint !!! :idea:
I wrote a private message to you, for more infos... ;)

thx a 1000k !!! :)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

thanks Phenix for this great feature you should tell niko to put it in

btw can u make us a little example plz
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

@acki: I've replied

@omaremad: It's a little bit too rough to be added in Irrlicht :roll:
I'll make an example if you like, it will be ready soon.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, with your method all nodes, that uses this mesh, are affected !!!
I created a new IAnimatedMeshSceneNode class that supports bone control for every single node !!! :)
You can download a demo and all changed source files at:
http://people.freenet.de/abusoft

:) !!! check this out !!! :)

@Niko: sorry for my eMail !!! Well, I have overlooked something, but now it really works !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

i had the same bug 2

how did u solve it
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8805

btw
any demos
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

Will this be added to Irrlicht? I'll change my callback-based code :)
Now I don't have to make a demo anymore :D
Btw, I didn't understand it from your previous post (damned beer) : did your code have that bug?

@omaremad: Imho you can solve your problem with Acki's code, the transformations of joints are stored in the scenenodes, use these instead of the transformations stored in the mesh.
Post Reply