Author Topic: lost texture when do animating  (Read 2118 times)

Offline guillaume

  • int
  • **
  • Posts: 67
    • View Profile
lost texture when do animating
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: lost texture when do animating
« Reply #1 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.

Offline guillaume

  • int
  • **
  • Posts: 67
    • View Profile
Re: lost texture when do animating
« Reply #2 on: December 22, 2011, 05:56:07 am »
ah, yes. I do a calcNormals(), and it shows up. thanks.