Horde3D

Next-Generation Graphics Engine
It is currently 29.09.2024, 00:20

All times are UTC + 1 hour




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: 07.05.2009, 22:05 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
You don't have any animation set on the bone do you? Because in this case you may have reproduced the bug described here: viewtopic.php?f=2&t=443


Top
 Profile  
Reply with quote  
PostPosted: 08.05.2009, 06:50 
Offline

Joined: 08.04.2008, 14:05
Posts: 14
marciano wrote:
tmart wrote:
How do I set the GPU skinning flag to "disabled" in the material.xml?

Open the material files that are used by your model (in the same directory as the model) and remove the line <ShaderFlag name="_F01_Skinning"/>


Is that all you have to do for enabling software skinning? In that case it is not working anymore. You can simply try it. Just remove the <ShaderFlag name="_F01_Skinning"/> from the Chicago man and his walking animation is gone.


Top
 Profile  
Reply with quote  
PostPosted: 08.05.2009, 07:39 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
You still have to enable it using setNodeParami

Code:
Index: Binaries/Content/models/man/civilian1.material.xml
===================================================================
--- Binaries/Content/models/man/civilian1.material.xml   (revision 140)
+++ Binaries/Content/models/man/civilian1.material.xml   (working copy)
@@ -1,6 +1,6 @@
 <Material>
    <Shader source="shaders/model.shader" />
-   <ShaderFlag name="_F01_Skinning" />
+   <!--<ShaderFlag name="_F01_Skinning" />-->
 
    <Sampler name="albedoMap" map="models/man/civil01.jpg" />
 </Material>
Index: Samples/Chicago/crowd.cpp
===================================================================
--- Samples/Chicago/crowd.cpp   (revision 140)
+++ Samples/Chicago/crowd.cpp   (working copy)
@@ -49,6 +49,7 @@
       
       // Add character to scene and apply animation
       p.node = Horde3D::addNodes( RootNode, characterRes );
+      Horde3D::setNodeParami( p.node, ModelNodeParams::SoftwareSkinning, 1 );
       Horde3D::setupModelAnimStage( p.node, 0, characterWalkRes, "", false );
       
       // Characters start in a circle formation


Top
 Profile  
Reply with quote  
PostPosted: 08.05.2009, 08:07 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
Volker wrote:
You don't have any animation set on the bone do you? Because in this case you may have reproduced the bug described here: http://www.horde3d.org/forums/viewtopic.php?f=2&t=443

No I'm not using any animation on the bone.


Top
 Profile  
Reply with quote  
PostPosted: 09.05.2009, 00:28 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
OK I've updated to Beta3, and I found the problem. I was adding the arm node to the RootNode before adding the camera node. Apparently the camera node must be first....I didnt realize this. I figured since it was a tree structure it wouldnt matter. Software skinning works now as well.

Thanks for all your suggestions.

EDIT: Disregard this moment of opptimism


Last edited by tmart on 09.05.2009, 00:51, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 09.05.2009, 00:50 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
Whooops. Didnt get the problem fixed. It seems I'm still having the same problem

Code:
Horde3D::getNodeTransform(bone,&tx,&ty,&tz,&rx,&ry,&rz,&foo,&foo,&foo);
   Horde3D::setNodeTransform(bone, 5,ty,tz,rx,90,rz,1,1,1);


I'm using Beta3 with software skinning now. It seems I can move the parent node of the arm. But setting the transform of any of the individual bones inside in the arm (children of the arm node) has no effect. It would seem hardware skinning of the joints works (with some frustum culling problems due to AABB not being updated) but software skinning does not.

Does anyone have code of initializing, and changing transforms for bones in a model? Maybe even with software skinning enabled?


Top
 Profile  
Reply with quote  
PostPosted: 09.05.2009, 04:02 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
Can someone tell me where in the Horde3D source I can turn off frustum culling? Then I can rebuild and avoid this problem. I don't have many objects in my scene.


Top
 Profile  
Reply with quote  
PostPosted: 09.05.2009, 06:39 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I checked it myself yesterday night, and found a bug that may has been introduced in Beta3. If you set software skinning to be enabled and change the transformation of a joint that belongs to a model without enabled morphtargets or animations, the skinningDirty flag in Horde3D won't be set, and so the skinning won't be applied. That has nothing to do with frustum culling, but with the update of the skinned mesh.
I talked with marciano yesterday about the problem, but it was quite late and some quick and dirty fixes introduced even more problems. So give us some more time, and it should be fixed (Although I thought Beta2 shouldn't have this problem).


Top
 Profile  
Reply with quote  
PostPosted: 09.05.2009, 10:35 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
Yes the frustum culling problem, I believe, is because of the AABBs not being updated. Thanks for the help.


Top
 Profile  
Reply with quote  
PostPosted: 10.05.2009, 21:12 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
We have a fix in the SourceForge svn which should make manual joint updates work with software skinning. Could you please try it out?


Top
 Profile  
Reply with quote  
PostPosted: 10.05.2009, 21:47 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
Awesome. The SVN fix works. Software skinning is working correctly with my manual bone updates. The problem still exists in hardware skinning though. Thanks again for your help.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 20 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