www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: guillaume on December 21, 2011, 01:56:37 pm

Title: lost texture when do animating
Post by: guillaume on December 21, 2011, 01:56:37 pm
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.
Title: Re: lost texture when do animating
Post by: EgonOlsen on December 21, 2011, 02:03:48 pm
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.
Title: Re: lost texture when do animating
Post by: guillaume on December 22, 2011, 05:56:07 am
ah, yes. I do a calcNormals(), and it shows up. thanks.