how to bind several objects in 3DS Max into one objects
-
DJ Trauma
- Gnoblar
- Posts: 8
- Joined: Sat Jul 02, 2005 8:38 pm
- Location: Belgium
how to bind several objects in 3DS Max into one objects
Hi all. This'll be my first post here.
I've just downloaded the ogre exporter for 3DS Max. When using it, you must select one object to export. The problem is my scene (in 3D max) is build out of several objects. The question is: how can I make one object from them? I tried to group them but that doesn't seem to work.
Thx in advance.
I've just downloaded the ogre exporter for 3DS Max. When using it, you must select one object to export. The problem is my scene (in 3D max) is build out of several objects. The question is: how can I make one object from them? I tried to group them but that doesn't seem to work.
Thx in advance.
- jacmoe
- OGRE Retired Moderator

- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
Lioric
- Google Summer of Code Mentor

- Posts: 295
- Joined: Fri Aug 06, 2004 10:25 pm
Ogre mesh file format can only have one mesh per file
Each mesh is composed of one or several submeshes, each submesh is determined by its material id
Probaly you can do a quick maxscript that iterate over your scene objects and export all of them, or you can wait a few weeks and use the new max exporter that its in beta testing right now
Lioric
Each mesh is composed of one or several submeshes, each submesh is determined by its material id
Probaly you can do a quick maxscript that iterate over your scene objects and export all of them, or you can wait a few weeks and use the new max exporter that its in beta testing right now
Lioric
-
DJ Trauma
- Gnoblar
- Posts: 8
- Joined: Sat Jul 02, 2005 8:38 pm
- Location: Belgium
- jacmoe
- OGRE Retired Moderator

- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
You can undo this, if you - like me - want to continue editing your level.BlasterN wrote:Attach all submeshes, and then convert to edit poly & then again to edit mesh.
If you find a better way of doing this, don't hesitate posting the solution here!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- celic
- Gnome
- Posts: 363
- Joined: Wed Mar 23, 2005 11:05 am
- Location: Chisinau/Moldova
- Contact:
I have found almost the same solution, just without converting anything.
Simply attach all your objects from the scene/model in 3ds max, then if they are using different materials you will be asked to convert materials to material IDs, and viceversa.
The difference is:
in first case you'll get as many submeshes as many materials you have, in second - you'll have as many submeshes as many objects you have.
Simply attach all your objects from the scene/model in 3ds max, then if they are using different materials you will be asked to convert materials to material IDs, and viceversa.
The difference is:
in first case you'll get as many submeshes as many materials you have, in second - you'll have as many submeshes as many objects you have.
- celic
- Gnome
- Posts: 363
- Joined: Wed Mar 23, 2005 11:05 am
- Location: Chisinau/Moldova
- Contact:
-
Lioric
- Google Summer of Code Mentor

- Posts: 295
- Joined: Fri Aug 06, 2004 10:25 pm
No, no, you are wasting rendering/processing resources if you convert all of your scene objects to one object, when the multiple objects are attached to form a single object, no matter if the created submeshes have different materials (in fact it will be better if all the materials can be baked on a single texture and you can have a single submesh, for porformance, i.e single rendering state change), with a single object, in this case your complete level objects, can't benefit from occlusion culling, because no matter if you are only rendering a few objects, if they are attached to the complete scene exported, then you will be rendering all the level meshes even when they are not in the fustrum, because you have converted to a single object.
The same happens for collision detection, lod optimization, lod materials
Lioric
The same happens for collision detection, lod optimization, lod materials
Lioric
-
DJ Trauma
- Gnoblar
- Posts: 8
- Joined: Sat Jul 02, 2005 8:38 pm
- Location: Belgium
I'm not trying to put my whole scene into one object. It's a building I designed out of separate blocks that I now want to convert into one object. I know that was probably a very bad way of building it, but my skills with 3DS Max are very very low.
I'm still looking on how to do this, but in the meanwhile I've found another problem. I watched that 3DS Max exporter flash tutorial and I saw that the author uses an Ogre Material exporter in 3DS Max. Now this is probably a very stupid question, but where can I find that material exporter? I only have the mesh exporter tool.
I'm still looking on how to do this, but in the meanwhile I've found another problem. I watched that 3DS Max exporter flash tutorial and I saw that the author uses an Ogre Material exporter in 3DS Max. Now this is probably a very stupid question, but where can I find that material exporter? I only have the mesh exporter tool.
-
Gf11speed
- Goblin
- Posts: 242
- Joined: Sat Mar 20, 2004 7:53 am
- Location: Orlando, FL
- x 1
- Contact:
To attach all objects into one object you must:
1) Highlight all meshes you want to merge.
2) Right click, hit convert to->editable mesh
3) Then deselect all meshes.
4) Select one of the meshes you want to merge
5) Right click on this message and hit Attach
6) Then click on the remaining messages to attach them to that mesh
That should make all the submeshes into one mesh.
The 3dsmax exporter comes with a material exporter I believe. So you can export it with that.
1) Highlight all meshes you want to merge.
2) Right click, hit convert to->editable mesh
3) Then deselect all meshes.
4) Select one of the meshes you want to merge
5) Right click on this message and hit Attach
6) Then click on the remaining messages to attach them to that mesh
That should make all the submeshes into one mesh.
The 3dsmax exporter comes with a material exporter I believe. So you can export it with that.
Coming soon...
-
DJ Trauma
- Gnoblar
- Posts: 8
- Joined: Sat Jul 02, 2005 8:38 pm
- Location: Belgium
Thanks! I finally succeeded to make one object from the submeshes.
About the material exporter, it does export the material successfull, but when converting the mesh.xml file into a .mesh file with the Ogre Mesh utility, it fails to load the materials.
I've put all the textures, the material file and the mesh.xml and .mesh file into the same folder. I also tried to edit the material file generated by the Ogre Mesh utility by replacing all info with the info generated by the material exporter. Still no luck though.
Don't know if this helps, but here is (a part of) the output of the Ogre Mesh viewer and the material script.
Ogre Mesh viewer log:
About the material exporter, it does export the material successfull, but when converting the mesh.xml file into a .mesh file with the Ogre Mesh utility, it fails to load the materials.
I've put all the textures, the material file and the mesh.xml and .mesh file into the same folder. I also tried to edit the material file generated by the Ogre Mesh utility by replacing all info with the info generated by the material exporter. Still no luck though.
Don't know if this helps, but here is (a part of) the output of the Ogre Mesh viewer and the material script.
Ogre Mesh viewer log:
My material script as generated by the ogre exporter:13:38:33: MeshSerializer export successful.
13:38:33: Destroying resource group MeshViewerGroup
13:38:33: Unloading resource group MeshViewerGroup
13:38:33: Finished unloading resource group MeshViewerGroup
13:38:33: Parsing material scripts
13:38:33: Creating resource group MeshViewerGroup
13:38:33: Added resource location 'C:\OgreSDK\building_test' of type 'FileSystem' to resource group 'MeshViewerGroup'
13:38:33: Initialising resource group MeshViewerGroup
13:38:33: Parsing scripts for resource group MeshViewerGroup
13:38:33: Parsing script buildingtestmaybedeleted.material
13:38:33: Finished parsing scripts for resource group MeshViewerGroup
13:38:33: End of material scripts parsing.
13:38:33: Mesh: Loading C:\OgreSDK\building_test\buildingtestmaybedeleted.mesh.
13:38:33: Can't assign material Material_#242/13_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/2_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/3_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/1_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/15_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/19_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/8_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/14_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/7_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: Can't assign material Material_#242/9_-_Default to SubEntity of C:\OgreSDK\building_test\buildingtestmaybedeleted because this Material does not exist. Have you forgotten to define it in a .material script?
13:38:33: MaterialSerializer : writing material Material_#242/13_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/2_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/3_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/1_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/15_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/19_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/8_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/14_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/7_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:33: MaterialSerializer : writing material Material_#242/9_-_Default to queue.
13:38:33: MaterialSerializer : done.
13:38:35: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:41:56: Added resource location 'C:\OgreSDK\building_test' of type 'FileSystem' to resource group 'MeshViewerGroup'
13:41:56: Initialising resource group MeshViewerGroup
Code: Select all
material Material #242/13_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture roof_tiles.jpg
}
}
}
}
material Material #242/2_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture concrete1.jpg
}
}
}
}
material Material #242/3_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture windows1.jpg
}
}
}
}
material Material #242/1_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture red_brick_wall.jpg
}
}
}
}
material Material #242/15_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture plastic_ridges.jpg
}
}
}
}
material Material #242/19_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture building1_3.jpg
}
}
}
}
material Material #242/8_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture concrete2.jpg
}
}
}
}
material Material #242/14_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture concrete3.JPG
}
}
}
}
material Material #242/7_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture windows3.jpg
}
}
}
}
material Material #242/9_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235
diffuse 0.588235 0.588235 0.588235
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture concrete2.jpg
}
}
}
}
- celic
- Gnome
- Posts: 363
- Joined: Wed Mar 23, 2005 11:05 am
- Location: Chisinau/Moldova
- Contact:
- jacmoe
- OGRE Retired Moderator

- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
You will get much better results if you in Max go to the material editor and use OGRE materials.DJ Trauma wrote:About the material exporter, it does export the material successfull, but when converting the mesh.xml file into a .mesh file with the Ogre Mesh utility, it fails to load the materials.
Remember to name your materials, otherwise you will get those weird default material names.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.