Couldn't export a mesh containing submeshes

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Couldn't export a mesh containing submeshes

Post by celic »

I'm using 3DS Max and Mesh exporter for exporting models, but couldn't export a model to a single .mesh file. Only one object per .mesh file.
Has anybody encountered the same problem?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

You have to combine your objects first, I believe grouping works.
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

Thanks a lot for the reply, sinbad. I'll try this.
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

You have to combine your objects first, I believe grouping works.
I've tried this and it doesn't work :(
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Try attatch the whole lot into one object.
(You can undo the whole operation - or better: save it first).
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

Try attatch the whole lot into one object.
I think this will simply make a single mesh containing the whole model, and there will be no submeshes. :?

I saw the models which came with OGRE and they contain submeshes, were they exported from another 3d modeler or just using another exporters?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7

Post by haffax »

celic, submeshes are created by the exporter according to the materials used. Submeshes can have only one material each. So don't worry about that.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

so, if I have, for example, a model which consists of three objects A, B and C, using two materials M1 and M2, the exporter will create a .mesh file containing only two submeshes?
I'm puzzled a little, because the exporter exports only one object, which is selected :oops:
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7

Post by haffax »

I don't know what the 3dsmax converter does specifically. When you have three seperate objects, I'd guess, that the exporter
When you combine/join/howeverthisiscalledin3dsmax the objects to one, I'd guess the exporter will export it all to one mesh containing two submeshes.

Just play with it and try it out. Knowledge earned by own experience last longer. ;)
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

Thaks for the reply haffax.
Knowledge earned by own experience last longer. Wink
This experience will last long, for sure :) [/list]
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

it doesn't export the whole model with all objects into a single .mesh file :(
I think I use an old version of the 3ds exporter.
meybe someone had the same problems?
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain

Post by BlasterN »

Try this.
Attach all submeshes, and then convert to edit poly & then again to edit mesh.
And test you have a good model, use STL CHECK ( I think this is the name in engish version of 3dsmax ), select al checkbox & press check. if you have errors you can see it selected in the viewport.
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

Thanks for the replies, I've managed to export the model with submeshes.
and it was quite simple 8)
User avatar
DrPain
Gnome
Posts: 349
Joined: Tue Jul 05, 2005 2:51 pm
Location: Connecticut, USA

Post by DrPain »

celic wrote:Thanks for the replies, I've managed to export the model with submeshes.
and it was quite simple 8)
Ok, so what did you do? I'm wrestling with the same issue, and some tips would be helpful. :)
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova

Post by celic »

DrPain wrote: Ok, so what did you do? I'm wrestling with the same issue, and some tips would be helpful. :)
I've simply attached all the objects, thus I obtained a single object.
Then export the mesh. 8)

There are also three options to choose if the attached objects use different materials. The idea is that you could export the mesh containing as many submeshes as many materials there are or to keep the submeshes count unaffected.
User avatar
DrPain
Gnome
Posts: 349
Joined: Tue Jul 05, 2005 2:51 pm
Location: Connecticut, USA

Post by DrPain »

celic wrote:There are also three options to choose if the attached objects use different materials. The idea is that you could export the mesh containing as many submeshes as many materials there are or to keep the submeshes count unaffected.
I don't really understand what you're saying here.

To keep things simple while figuring this out, I have a single material applied to all the meshes. (The entity has a biped/skin attached). Any of these meshes export individually just fine. However, when I create a group and try to export, I get the error message:

Skin need to be selected and in the modifier panel Skin:Skin

I tried adding a skin to the group, but Max doesn't seem to allow that. Each of the meshes had a skin applied before grouping.

I did some more experiments, and removed the biped/skin and regrouped the meshes. It exported, but it seems only one of the meshes actually exported. When I select the group in the exporter (or start the exporter with the group selected), the group name is not displayed, but rather one of the mesh names is, and it is that mesh that gets exported.

If any brave souls want to take a look at the MAX file, I posted it at http://www.greygames.com/Ogre/Ciceto1.zip
This version has the biped/skin attached.

Any ideas what I'm doing wrong?
User avatar
DrPain
Gnome
Posts: 349
Joined: Tue Jul 05, 2005 2:51 pm
Location: Connecticut, USA

Post by DrPain »

Well, I don't know what's up, but I can't get it to work to save my life.

Starting from scratch. I created two spheres and applied materials to them. They each export fine by themselves.

Then I grouped them together. When I export them (using the Octopus exporter now), I get two mesh files, one for each sphere. Will this always be the case, or is there some way to get multiple meshes in one file?

Next I applied a skin to each sphere. Then I created a single bone, and expanded it's envelopes to enclose both spheres. At this point, each sphere still exports correctly.

Finally, I grouped both spheres together, and tried exporting. I get the same error message mentioned in the previous post.

Is this supposed to work? Am I doing something wrong, or do the exporters just not support multiple skinned meshes in one model?
User avatar
DrPain
Gnome
Posts: 349
Joined: Tue Jul 05, 2005 2:51 pm
Location: Connecticut, USA

Post by DrPain »

Well, I've almost got this figured out (thanks for the tip, Nithril).

Just one last problem. My animation is not coming out in the exported version as it should be.

Here's a video of how it should look:
http://www.greygames.com/Ogre/MaxRecording.avi

Here's how it comes out of the exporter (recorded from MeshViewer):
http://www.greygames.com/Ogre/OgreOutput.avi

Here's a zip file of the original artwork and the exporter output:
http://www.greygames.com/Ogre/TestBoxes.zip

Any help will be greatly appreciated.
iloveyy7758521
Gnoblar
Posts: 4
Joined: Tue Sep 04, 2012 7:44 am

Re:

Post by iloveyy7758521 »

I've simply attached all the objects, thus I obtained a single object.
Then export the mesh. 8)
Could you please tell me how to do it in 3D MAX step by step(screenshots posted would be better)?
Because I really suck at this software and I am terribly in need of this single mesh file with individual parts included in it as submeshes.