Horde3D

Next-Generation Graphics Engine
It is currently 08.12.2021, 10:18

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 29.06.2012, 18:39 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
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?


Top
 Profile  
Reply with quote  
PostPosted: 30.06.2012, 02:33 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
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?


Top
 Profile  
Reply with quote  
PostPosted: 30.06.2012, 21:04 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 01.07.2012, 02:30 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
No, it's not showing up on debug rendering anywhere.


Top
 Profile  
Reply with quote  
PostPosted: 04.07.2012, 02:35 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
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?


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 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:  
cron
Powered by phpBB® Forum Software © phpBB Group