Loading texture on .md2 model mesh

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
gauravjha
Posts: 26
Joined: Thu Jan 24, 2013 4:52 am

Loading texture on .md2 model mesh

Post by gauravjha »

Hi,

Can anybody please confirm the material settings required for loading texture on to a .md2 model mesh?

I am using the following properties but the texture does not appear on the mesh. Used some properties described in example 7.

material.setTexture(0, finalTexture);
material.Lighting = true;
material.NormalizeNormals = true;
node->getMaterial(0) = material;
node->setMaterialType(EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR);
node->setMaterialFlag(EMF_TEXTURE_WRAP, true);
Any help would be great.

Regards,
Gaurav Jha
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: Loading texture on .md2 model mesh

Post by zerochen »

hi,

i guess you forgot to add a light. if so just add a light source or disable the lighting flag of the material.

regards
zerochen
Mitchell M
Posts: 15
Joined: Sat Jul 06, 2013 2:18 pm

Re: Loading texture on .md2 model mesh

Post by Mitchell M »

When I am testing out loading things and don't have a light in my scene yet I always use ->setMaterialFlag(EMF_LIGHTING, false);
Post Reply