Horde3D

Next-Generation Graphics Engine
It is currently 02.05.2025, 14:44

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 30.04.2008, 13:40 
Offline

Joined: 30.04.2008, 13:28
Posts: 6
Hi folks.
I'm trying to implement basic IK into horde 3D.

I want to animate a basic kinematic chain ( skinned tentacle made of six bones designed in blender and imported using collada converter)

To do so, I thought the most straightforward fashion would be to directly manipulate the Kinematic chain's joints using the setModelAnimParams() function.

Althouh I have access to joints (findNodes()), applying manual transformation on tentacles' chilren joints (Bone_00X) does not change the tentacle configuration. Is there something I hve missed ?

heres is the code :

printf("%i\n",Horde3D::findNodes(RootNode,"Bone_004", SceneNodeTypes::Joint));
tentacleFirstBone = Horde3D::getNodeFindResult(0);

Horde3D::getNodeTransform(tentacleFirstBone,&tx,&ty,&tz,&rx,&ry,&rz,&foo,&foo,&foo);
Horde3D::setNodeTransform(tentacleFirstBone,tx,ty,tz,rx-0.1f,ry,rz,foo,foo,foo);

Many thanks.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 16:50 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
-0.1f of 360.0f degrees isn't going to do much.

Are you only setting the position once or is it looping?


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 17:58 
Offline

Joined: 30.04.2008, 13:28
Posts: 6
Hi AcidFaucet.

>Horde3D::getNodeTransform(tentacleFirstBone,&tx,&ty,&tz,&rx,&ry,&rz,&foo,&foo,&foo);
>Horde3D::setNodeTransform(tentacleFirstBone,tx,ty,tz,rx-0.1f,ry,rz,foo,foo,foo);

The piece of code is embedded in the maiLoop loop.
So, yes, it is looping.
As a consequence, Bone_004 should bend.
But nothing happens.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 19:52 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I guess you made sure the tentacleFirstBone is a valid NodeHandle? Have you tried any other joint?

Maybe you can load the model into the editor and check the joint hierarchy.


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 09:02 
Offline

Joined: 30.04.2008, 13:28
Posts: 6
Hi Volker.

For instance, Bone_004 had index n° 7 (So I guess it is a valid NodeHandle). If there is another way to check, please tell me.

The models looks OK in Blender, hierarchy is valid both in blender and Horde xml format. You will find the tentacle.scene file.

The first node of the model (Bone) (which is the tentacles' root joint) do actually modify the orientation of the whole tentacle. Subsequent joints have no influence on the tentacle mesh.

/************************************************************************************************************************************************************
<Model name="tentacle" geometry="tentacle.geo">
<Joint name="Bone" tx="-0.01265" ty="0.00212" tz="0.05203" rx="89.2457" ry="0" rz="0.0108862" sx="1" sy="1" sz="0.999997" jointIndex="1">
<Joint name="Bone_001" tx="0" ty="0" tz="-1" jointIndex="2">
<Joint name="Bone_002" tx="0" ty="0" tz="-0.92662" jointIndex="3">
<Joint name="Bone_003" tx="-0.01041" ty="0" tz="-1.031" jointIndex="4">
<Joint name="Bone_004" tx="0.03124" ty="0" tz="-0.79148" jointIndex="5">
<Joint name="Bone_005" tx="-0.01041" ty="0" tz="-0.90603" jointIndex="6">
<Joint name="Bone_006" tx="0.02083" ty="0" tz="-0.66651" jointIndex="7" />
</Joint>
</Joint>
</Joint>
</Joint>
</Joint>
<Mesh name="Cube" material="tentacle/tentacle_Cube_tga.material.xml" tx="0.01476" ty="0.01334" tz="-1.03475" rx="0.736269" ry="0.0131791" rz="0.164452" sx="1" sy="0.999997" sz="1" batchStart="0" batchCount="3648" vertRStart="0" vertREnd="2431" />
</Joint>

</Model>
********************************************************************************************************************************************************/


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 09:13 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
How did you convert the model from blender to Horde3D? I thought the collada exporter of blender does not support skeletal animations correctly? Did you have any warnings during the conversion? Maybe that will cause problems with the association between joints and meshes. Are you able to export the model from 3Dmax?


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 10:48 
Offline

Joined: 30.04.2008, 13:28
Posts: 6
>I thought the collada exporter of blender does not support skeletal animations correctly?
Well, that's indeed true regarding recorded animation, I this precise case, I just need the skeletal structure. and export seema all right (no warning)
(And, the tentacle.scene description included looks good isn't it).
>Did you have any warnings during the conversion?
no, everything was fine
>Are you able to export the model from 3Dmax?
I dit it using maya, same result


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 16:45 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Is there a means to find out if vertices are weighted against the bone? It's starting to sound like they're not skinned.


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 16:46 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
You are using the skinning.shader.xml right? Not the standard shader.


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 16:52 
Offline

Joined: 30.04.2008, 13:28
Posts: 6
skinning.shader.xml is the one used to render the tentacle node.

Is there a way to check if weights are correctly taken into account ?


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 17:03 
Offline

Joined: 30.04.2008, 13:28
Posts: 6
Or is there a way to display the bones/joints into Horde ?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 54 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group