lost texture when do animating

Started by guillaume, December 21, 2011, 01:56:37 PM

Previous topic - Next topic

guillaume

I do a setTexture on my model , and setup keyframe animation for it,
but after animate, the model become black, seems lost its texture ,
how can I keep the texture ? should re setTexture after each frame ?
thanks.

EgonOlsen

Actually there's no relation between animations and textures. The data structures corresponding to textures are not even touched when animating a model. Maybe you forgot to calculate normals for the meshes, so that the texture is actually there but lighting is missing? Try to increase ambient lighting in the world to see if something shows up then.

guillaume

ah, yes. I do a calcNormals(), and it shows up. thanks.