Meshes

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
overburn
Posts: 101
Joined: Sun Nov 04, 2007 8:08 am
Location: Romania, Ploiesti

Meshes

Post by overburn »

If i have a mesh with multiple submeshes (layers in max) , can i assign a separate texture for each submesh? And how? :)
Thanks
One Tequila, Two Tequila, Three Tequila, Floor.
_______________________________________
ASUS P5V-VM Ultra
Intel Pentium D930
1x 2GB DDR2 Kingmax 800mhz/533mhz mb
Leadtek PX9600GT W 512MB DDR3
200GB Maxtor HDD
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

In Irrlicht terms mesh can not have several submeshes (there is animated mesh but thats not what you want probably).

Mesh however have one or more meshbuffers. Meshbuffer is where geometry (vertices, normals, UVs) and material (texture, color, lighting) are stored.

You can assign different texture to different meshbuffers.
overburn
Posts: 101
Joined: Sun Nov 04, 2007 8:08 am
Location: Romania, Ploiesti

Post by overburn »

ok so - if anyone knows. when i export a multilayered model from 3d studio max , it exports the layers as independent meshes or as meshbuffers?
One Tequila, Two Tequila, Three Tequila, Floor.
_______________________________________
ASUS P5V-VM Ultra
Intel Pentium D930
1x 2GB DDR2 Kingmax 800mhz/533mhz mb
Leadtek PX9600GT W 512MB DDR3
200GB Maxtor HDD
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

i think your'e making this more complicated than it actually is. All you have to do is select the faces or meshes and apply a material to them and then apply a texture to that material(in 3d studio). Since I don't think irrlicht transfers textures with the object, all you should have to do is apply the textures to the materials in irrlicht (or irredit a lot easier, no code)
multum in parvo
overburn
Posts: 101
Joined: Sun Nov 04, 2007 8:08 am
Location: Romania, Ploiesti

Post by overburn »

ok :) thanks.
and another thing -
say i have a door that's part of the building, but it's a separate layer. and i want to be able to open that door. how should i go about it (procedurally in irrlicht or?) ? :) thanks
One Tequila, Two Tequila, Three Tequila, Floor.
_______________________________________
ASUS P5V-VM Ultra
Intel Pentium D930
1x 2GB DDR2 Kingmax 800mhz/533mhz mb
Leadtek PX9600GT W 512MB DDR3
200GB Maxtor HDD
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you want to animate parts of a mesh you have to go via animated meshes. 3ds animations are not supported, so your best try is to go the skeletal animation way, e.g. via b3d. Create and attach a bone to the door and you can easily animated the door via the joint.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Well its not the best advice in this case.
It will work fine if you have one door ...Once you want some more you are in trouble. You would need many many animations to cower all posible scenarios of door opening: One door opens, second opens, both open, one opens while second is closed, then it opens while second is opened already... and so on.

Rather animate door on its own. Made it independent object or at last meshbuffer and animate it in code. Its not that hard to code object rotating few degrees you need. Or you can use it animated but then it must be independent node.
Post Reply