different textures for different faces

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

different textures for different faces

Post by grunt »

I need to be able to change the texture of different faces on a mesh or cube scenenode. Does that mean that each face has to be a seperate scenenode? Or should I figure out a way to dynamically create a uvmap texture?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You don't need a separate scene node, just separate meshbuffers. E.g. by grouping faces and exporting via .obj format. Or you use a texture atlas and advanced texture coords. Of course it's not that far then to completly dynamically generated texture coords.
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

Ok I got that working, but the texture is all black even when I turned off lighting for the scenenode. I am not scaling it either and I tried normalize normals anyway.
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

nm it was a problem with the exporter I was using in deled. After exporting, some of them still only show one meshbuffer. .x format shows 6 meshbuffer but the texturing is all messed up. .b3d works great.
Anthony
Posts: 121
Joined: Sun Jan 09, 2011 12:03 pm

Post by Anthony »

you can also make a texture that has all the different textures. Then apply it through the texture coords to get the right 'frame'
No :shock: I am no noob, just checking if your not one too :roll:

Thanks to Niko and all others that made Irrlicht possible.
Post Reply