N00b alert! - few q

Genie

06-03-2006 17:11:30

hi :)

sorry for stupid questions but after 3 hours of looking I have to ask :)

I have one nice mesh in 3ds that is made of many little objects and when I export that (grouped or assembled) mesh I get all those objects exported...

all I want is a way to group (or merge..or.. ) all those objects to one and to export that ONE mesh and to get just one mesh file..

Probably there is some command in 3dstudio max for merging all parts in one mesh but it was soo long ago that I have worked with it...

thank you

Genie

06-03-2006 21:21:05

found it!

choose one of parts -> edit mesh modifier -> "attach list" -> choose all other parts that you need

btw.

when working in tutorial 2 - part one afer step 2, you need to add Edit Mesh modifier and with that do step 3

(in max 8 if you don't add "edit mesh" modifier you can work with "editable mesh" modifier of xform but flip then desn't work well)

Lioric

06-03-2006 21:48:38

Great you solved it :D

I will review the tutorial 2, thanks for the info, and welcome :D

JohnShields

07-03-2006 02:22:44

What if we want to export several items like head, hands, eyes, etc. which are separate items for the purposes of skeleton animations but we want to export them all as one mesh for ease of loading?

Genie

07-03-2006 08:36:08

Great you solved it :D

I will review the tutorial 2, thanks for the info, and welcome :D


no prob! thank you for such a great program! it really helps in working with ogre

Lioric

07-03-2006 16:05:34

John: A mesh object is a collection of data structures and information needed for representing a single geometry on screen, the mesh can contain sub-meshes, but they are not separated parts of of the mesh, they are created to properly sort and organize the rendering process based on its materials

If you want to work with multiple meshes as a single object, you should make them all child of a parent objet, so you can work with this parent node (move, rotate, scale) and it will affect all attached entities/meshes, like a single mesh, but do this if you have a reason to do it, i.e. you will need to attach or detach sub-parts differently from each other in your application or you need culling for separate parts, but its better if you have your geometry with the most polygon count in a single mesh

Its better if you have a single mesh (skin) for skeletal animated characters, you can have separated meshes in a single skeleton, but that is not good for the performance, you will waste resources, and separate meshes on a single skeleton will give you some visual artifacts

If you want to work with parts of the skinned mesh, you can use the bone manipulation methods, i.e. you get the arm bone and work with it, not with the arm mesh

If you need to do some in particular, post here and we will recommend you the best way to do it

ealis2001

10-03-2006 10:44:27

I have an object made by multiple sub-object, each one with it's one texture or material. I used the method described in this post to export that object to a single mesh. The object name is blade. The program exports a pack of materials in a file called blade.material. How can I import this file in Ogre with all the materials assigned and applied corectly on it?

I don't know exactly what "Per Object Material File" option should do when checked, but when I try to export the scene using this object I get an unknown error. I'm using 3DSMax 6. So, Lioric, please take a look at that. Also, thanks for doing all this. It's real helpful.

Lioric

10-03-2006 15:45:39

Just put the osm file, the .mesh and the .material files (and all the needed textures) in any relevant folder of the resource path of your application, when an entity that references that mesh is created all materials will be loaded and assigned correctly

Use the scene loader lib to automatically load and setup the osm scene in your application exactly as exported from max

The Per-Object material creates a separate material file for each exported object with all of its materials

Can you send me that file or any file that can reproduce the issue, to review it?

ealis2001

10-03-2006 21:32:45

I would like to send you that file, but right now I can't think of a method of how to do this. I don't see any upload link, I don't know your e-mail adress(maybe you will sent it to me in a PM). Give me a sugestion and I'll do it.

As for the question I've asked before, thanks for the answer. But let's supose I'm using oFusion just for exporting the .mesh and .material file. I'm not interested in using huge scenes right now. I am using the default scene manager to upload my .mesh file and now I want to apply those textures. Give me a sample code on how can I do this. Or you can do this after I send you the file, because everything is about that .3ds sword file. Thanks again!

Lioric

10-03-2006 22:31:26

See the "Contacts" page for the information you need

For the materials and the meshes that you export, its automatically handled, you just create the entity based on the exported mesh and the materials are assigned correctly to the mesh

sceneManager->createEntity("entityName", "mesh filename");

If the entity is displayed blank or untextured in your application, its because the materials and the texture images are not in the resource path that your application uses, see the resource.cfg file in your application folder and see the ogre.log file in your application folder for more hints if you dont see the materials

Or if your question was about setting or changing the materials at runtime, you can use the "setMaterialName" methods of the entity or the subEntity depending if you want to change the material of all subentities or just a part

JohnShields

13-03-2006 08:42:44

Lioric--

Explain how I make an object a child in max (I used the schematic view) and then export it into Ogre so that the hands animate along with the body. Will the parent+child be one .mesh file or will I have a bunch of little .mesh files that somehow know how to move together in ogre? Please give as much detail as you can, thank you!

- John

Lioric

13-03-2006 16:42:33

John: To link an object in max, you can use the "Select and Link" button in your max main toolbar, select the child object and then drag to create the link to the parent object, you can view the effect inmediatly in the oFusion viewport, if you move the parent object, all of its child objects will move too

You only need to move or animate the parent object, and all of its child with move too, but they will be in different .mesh files, a mesh file can contain just a single mesh object

The osm scene loader will manage to recreate the hierarchy of the different objects

But this is "rigid animation", if you want to move a skinned character with a skeleton, its better if you make all of the character parts a single mesh, and then apply the skeleton, you can have separate object parts influenced by a single skeleton, and export it, but its not efficient, you will end with separate skeleton files with segments and you will need to merge them manually in your application if you want to control a single skeleton

See some character studio or bones tutorials

Lioric

16-03-2006 22:45:39

Today i tested the sword.3ds file that was sent, and the issue with the "Per-Object material file" is fixed, it will be in the next update

For the sword object, it should be made a single mesh, attaching all the objects to a single object (i.e. to the object named "handle") and use the default settings for the attach options, so a Multi/Sub-material is created

The result should be similar to this image, see that the sword is a single mesh, so you can use it in your application as a single object



Click the image to see it bigger

Just put the .mesh file and the .material file in the resource path of your application and create an entity from the mesh

cire1285

23-03-2006 23:03:05

Hello. Total oFusion noob here. I made a box with a material applied that I want to export to .mesh and .material, but I've been looking all over for the Exporter dialog that is talked about in the .chm file. I don't know how to open it.

Could anyone fill me in on this little detail?

IFASS

23-03-2006 23:43:42

Hello. Total oFusion noob here. I made a box with a material applied that I want to export to .mesh and .material, but I've been looking all over for the Exporter dialog that is talked about in the .chm file. I don't know how to open it.

Could anyone fill me in on this little detail?


File --> export --> select OSM file --> export :)