Horde3D
http://horde3d.org/forums/

[solved] Multiple material bug with animation?
http://horde3d.org/forums/viewtopic.php?f=3&t=225
Page 1 of 1

Author:  Mikmacer [ 23.01.2008, 05:29 ]
Post subject:  [solved] Multiple material bug with animation?

I was playing a little bit with horde3D when I tried to change the material of the knight. I tried to change the material of the knight helmet, in the example, and I found that the rest of the knight was invisible when Ive started the program. Then, the rest of the body became visible only if I get DONT look at the knight. And the animation of this part of the knight is working only while i'm not looking at the knight.

Heres some screens:


First, When I start the application, only the helmet is visible:

Image

And, if I dont look the knight, the body appear and became visible but without animation( While I'm not looking at the knight ):

Image

Author:  marciano [ 24.01.2008, 03:10 ]
Post subject: 

I just changed the material of the helmet and didn't encounter any problems.

What shader are you using for the helmet?

Author:  Mikmacer [ 24.01.2008, 03:29 ]
Post subject: 

marciano wrote:
I just changed the material of the helmet and didn't encounter any problems.

What shader are you using for the helmet?


I'm using this one: "skinning.shader.xml"

The material script is:

Quote:
<Material>
<Shader name="skinning.shader.xml" />

<TexUnit unit="0" map="rouge.tga" />

</Material>


"rouge.tga" is a single red pixel.

Author:  Mikmacer [ 24.01.2008, 06:36 ]
Post subject: 

Ive just uploaded an example of this problem:

http://www.mediafire.com/?1fn0my3em3g

The code used in this example is exactly the same code that came with the horde sdk. Ive juste changed the helmet material.

Author:  marciano [ 24.01.2008, 11:28 ]
Post subject: 

Thanks for the sample!

It helped me greatly to reproduce and quickly track the problem. It really was a bug in Horde, but actually the solution is quite simple:

Find the line
Code:
if( skelChanged )

in Renderer::drawMeshes (egRenderer.cpp) and replace it by
Code:
if( skelChanged || _curShader != prevShader )

That's it.

Thanks again for revealing this problem :)

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