Horde3D
http://horde3d.org/forums/

h3dSetupModelAnimStage removes node?
http://horde3d.org/forums/viewtopic.php?f=2&t=1688
Page 1 of 1

Author:  tshannon [ 29.06.2012, 18:39 ]
Post subject:  h3dSetupModelAnimStage removes node?

I've got the knight demo almost completely replicated in Go, but for some reason when I call setupModelAnimStage, the knight model gets removed from the scene. The knight's node, resource, and animation resources all have non-zero numbers, which I take to mean they are still part of the scene. The knight just doesn't seem to render, even with debug for wireframe on.

Here in c++
Code:
   h3dSetupModelAnimStage( _knight, 0, knightAnim1Res, 0, "", false );
   h3dSetupModelAnimStage( _knight, 1, knightAnim2Res, 0, "", false );


here in Go

Code:
horde3d.SetupModelAnimStage(app.knight, 0, knightAnim1Res, 0, "", false)
   horde3d.SetupModelAnimStage(app.knight, 1, knightAnim2Res, 0, "", false)


If I remove this line, then the knight (and the attached particle effect) shows up fine, just not animated.

Any ideas?

Author:  tshannon [ 30.06.2012, 02:33 ]
Post subject:  Re: h3dSetupModelAnimStage removes node?

Another interesting point is that whether the knight is visible or not, it still seems to be contributing to the triangle stat count. Also the nodes position is the same regardless of whether it's visible or not.

What else can I check to see where the hell my knight is going to?

Author:  Volker [ 30.06.2012, 21:04 ]
Post subject:  Re: h3dSetupModelAnimStage removes node?

Maybe, for some reason the knight is just transformed to a position invisible to the current camera position, although it shouldn't make a difference if you're running the sample demo from Go or C++.

Have you tried rendering in debug mode, if hardware skinning is enabled, maybe debug rendering shows it still at the correct position, if only the animation transformations are wrong.

Author:  tshannon [ 01.07.2012, 02:30 ]
Post subject:  Re: h3dSetupModelAnimStage removes node?

No, it's not showing up on debug rendering anywhere.

Author:  tshannon [ 04.07.2012, 02:35 ]
Post subject:  Re: h3dSetupModelAnimStage removes node?

Well, this is embarrassing, but I figured out what the issue was.

In my conversion from Go booleans to C ints (as there is no bool), I had mistakenly made false = 1 and true = 0. So in my call to

Code:
h3dSetupModelAnimStage( _knight, 1, knightAnim2Res, 0, "", false );


was really like this:

Code:
h3dSetupModelAnimStage( _knight, 1, knightAnim2Res, 0, "", true );


Fixed that complete oversight, and now the demo works perfectly. Now the only question is, why would setting Additive to true make the model completely disappear?

From the documentation:
Quote:
Additive animations completely ignore the layer settings. They are only applied by the engine if a non-additive animation is assigned to the model as well.


So basically I was trying to apply an additive animation without first applying a non-additive animation. Should this have made the model disappear?

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/