3dsexporter question: too many submeshes?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
Marc
Gremlin
Posts: 182
Joined: Tue Jan 25, 2005 7:56 am
Location: Germany
Contact:

3dsexporter question: too many submeshes?

Post by Marc »

When I create a Box and export it, I get a mesh with 6 submeshes, one for each side. Wouldn't it be more efficient if it was just one submesh? Since the operationtype the exporter uses is triangle_list, and the box has the same material on all sides, this shouldn't be a problem, or am I wrong?

Is there something I have to do before exporting to get all sides into one submesh or is it an optimization for the exporter that is still on the todo list?
User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1
Contact:

Post by psyclonist »

That's standard behaviour of 3dsmax which assigns a different material ID to each side, IIRC or something similar. Simply edit mesh, select the faces and change that to the same ID.

-psy
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I remember this problem, with my bunny meshes it insisted on exporting the ears as a seperate submesh. I then pulled some trick to merge the submeshes as xml, my limited 3ds experience was not enough to merge then in the editor.
User avatar
Marc
Gremlin
Posts: 182
Joined: Tue Jan 25, 2005 7:56 am
Location: Germany
Contact:

Post by Marc »

@Psyclonist: That's the info I needed. Thx. :)

@wumpus: Psyclonists hint to set all triangles to MatID 1 fixes it for me. I think that's easier than fiddeling around in the xml file. But funny thing, I had the same problem as you and didn't know about MatID before Psychlonists post. :)
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Might be a stupid question, but how do I change the MatID? The three submeshes already have the same 3ds material dragged to them so that's not it.
User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1
Contact:

Post by psyclonist »

:wumpus: wrote:Might be a stupid question, but how do I change the MatID? The three submeshes already have the same 3ds material dragged to them so that's not it.
Dragging the material onto the objects or subobjects is actually not the same.
- select object (woah!)
- use edit mesh modifier
- use select poly mode
- scroll down in the modifier dialog
- now you can select by mat id and assign a new id
- You may have to select the polys for each of the 6 standard mat ids and then reassign them. IIRC, sometimes it didn't work to apply one mat id to the whole thing.

Oh, and is the correct name 'submaterial id' ? I'm not sure...

That's all off the top of my head, so it may not be totally accurate.

-psy
User avatar
Marc
Gremlin
Posts: 182
Joined: Tue Jan 25, 2005 7:56 am
Location: Germany
Contact:

Post by Marc »

There is a Frame titled Material and in it there is a Textbox "Set ID". That's it. For me it worked to go to polygon mode and select all polygons with dragging a selection rectangle over the whole model and then typing "1" into that Textbox.
Post Reply