OgreMax Exporter 1.5 - With Material Editor/Viewer

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Fri Nov 23, 2007 8:00 pm

Mars wrote:...I found that render targets created during parsing scene file are not released when destructor of OgreMaxScene was called....So I wonder if you forget to do the whole cleaning work at destructor.
I'll take a closer look at the overall functionality of the OgreMax Scene Viewer to see about unreleased resources.

As for the OgreMaxScene class itself, I state pretty clearly in the class documentation that deleting the scene will not delete the scene resources (textures, materials, and so on). It's the job of the application to delete those resources, which I achieve in my own applications by destroying resource groups.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

randall
Halfling
Posts: 63
Joined: Sun Jan 23, 2005 1:04 pm
Location: Poland

Post by randall » Thu Nov 29, 2007 4:43 pm

Hi

It seems that mesh exporter does not regard Adjust Pivot options in 3ds Max 9. I want to move pivot ponit to the center of the box and then export the mesh.

Only solution I found is using Reset XForm modifier but then I loose information abou rotation.

Thanks
0 x

randall
Halfling
Posts: 63
Joined: Sun Jan 23, 2005 1:04 pm
Location: Poland

Post by randall » Thu Nov 29, 2007 6:04 pm

Also it would be very handy to have an option for setting material names for Entity objects. I have many boxes based on one mesh but I would like to assign them different materials.

Thanks for your hard work nedelman.
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Fri Nov 30, 2007 3:35 am

randall wrote: It seems that mesh exporter does not regard Adjust Pivot options in 3ds Max 9.
That's a feature/behavior I thought of adding. I'll see about getting that into the next release.
randall wrote: Also it would be very handy to have an option for setting material names for Entity objects. I have many boxes based on one mesh but I would like to assign them different materials.
You can assign different materials already.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Fri Nov 30, 2007 12:49 pm

The pivot point is now handled.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

randall
Halfling
Posts: 63
Joined: Sun Jan 23, 2005 1:04 pm
Location: Poland

Post by randall » Fri Nov 30, 2007 1:47 pm

Great, thanks.

How to assign different materials? It seems that all objects have the same material applied to orginal mesh. I would like to create 10 boxes based on one mesh and then change material used by each object. But after export all boxes use only one material and only one material is exported.
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Fri Nov 30, 2007 7:05 pm

Ah, I now understand what you're looking for. You want to be able to have a bunch of different entities use the same mesh but have different materials. I'll need to add support for that.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Mon Dec 03, 2007 2:20 pm

The newest release allows for mesh instances to have different materials.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

randall
Halfling
Posts: 63
Joined: Sun Jan 23, 2005 1:04 pm
Location: Poland

Post by randall » Mon Dec 03, 2007 5:33 pm

Thank you very much. Your exporter is great.
0 x

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Tue Dec 04, 2007 9:43 am

Hi, nedelman:
Will OgreMax support instancedGeometry?
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Tue Dec 04, 2007 2:01 pm

I'll take a look and see what I can do.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Tue Dec 04, 2007 2:49 pm

Hi, nedelman:
Thanks for your fast reply. I think that's quite eazy for you.
I am thinking about to integrate it with OgreMax scene parser, if you can deal with that, It will be very appreciated.
BTW, I think "modelInstance" should make more sense like "InstancedGeometry", at least by its name, IMO. :)
0 x

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Tue Dec 04, 2007 2:53 pm

Well, forgot another thing.
How can I achieve manual LOD through OgreMax? I think that's what many ogre user wanting for. :?
0 x

Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
Contact:

Post by Vectrex » Tue Dec 04, 2007 5:47 pm

Mars wrote:Well, forgot another thing.
How can I achieve manual LOD through OgreMax? I think that's what many ogre user wanting for. :?
Being able to click a button and then click on a max mesh as a manual lod would be cool.
I guess you'd have to have a automatically expanding list for each mesh you added with distances.
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Wed Dec 05, 2007 1:02 am

Yeah, I'll work something out. I'm not familiar enough at the moment with how manual LOD to say what I'll be doing. For example, I don't know how it deals with mesh animation (skeleton, pose, morph).

@Mars: The model instance feature is not the same as instanced geometry. An OgreMax "model" is like a mini scene within a scene. It's a collection of objects with a common root that can be instantiated multiple times. It doesn't use instanced geometry, though it may in a future release.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Wed Dec 05, 2007 1:37 am

@Vectrex
Yeah, that's cool. I think its just another list box in object setting board, and this is what oFusion looks like:
Image
[/img]
They're just independent objects. Easy, er? :)

@nedelman
Yeah, I know that, just imagination. Thanks for your patient explain.
0 x

.overlord.
Halfling
Posts: 52
Joined: Wed Jun 06, 2007 5:01 pm

Post by .overlord. » Wed Dec 05, 2007 9:27 pm

Hi,

I'm trying out the exportr with max 9 sp2
i'm just trying to export a single mesh. this works
fine but

1) its completely black
if i edit the material manually and set the ambient/emmisives to
1 1 1 i can see it
2) i have several bone animations but they don't seem to export
when i play the mesh in lexiviewer (for example) it only
has 1 animation which takes up all the frames even when i
specify them in the object settings tab

any ideas?
0 x

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Thu Dec 06, 2007 1:00 am

Hi, I've noticed those problem too.
1) try to add a light. It seems the default light doesnt work.
2) animation doesnt work in my viewer neither.
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Thu Dec 06, 2007 1:14 am

When you add the animation, make sure you're adding it to the Entity Animation tab, not the Node Animation tab (if you don't have these tabs then you're using an old version of the exporter).

If you're adding a skeleton animation, the animation "Track" that you select when adding a new animation is the "Skin" or "Physique" track (depending on the type skinning modifier used). The "Object" track is for creating morph animations.

As for the blackness, it sounds like you have no lights in your scene and you're using an older version of OgreMax. The newest version of the viewer creates a default light if there are no scene lights.

If you want to use the OgreMax viewer for mesh animation playback, you'll need to create a Lua script to control which animations are played. This is pretty easy, as you can basically copy/paste the Lua file used in the MeshAnimation sample scene and modify the entity/animation name pairs in the Activating() function.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Thu Dec 06, 2007 2:35 am

As for the blackness, it sounds like you have no lights in your scene and you're using an older version of OgreMax. The newest version of the viewer creates a default light if there are no scene lights.
And add
OgreMax::OgreMaxScene::SET_DEFAULT_LIGHTING
to your loading function.

If you want to use the OgreMax viewer for mesh animation playback, you'll need to create a Lua script to control which animations are played. This is pretty easy, as you can basically copy/paste the Lua file used in the MeshAnimation sample scene and modify the entity/animation name pairs in the Activating() function.
I am using my own viewer. Although lua script can make something easier, but I dont like adding more dependences to my project. I've found in your viewer, the lua part keeps updating animations, and there is really lack of documentation around here. I think that's what may eazily keep developers away from using animation part of your exporter.
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Thu Dec 06, 2007 3:20 am

It's all a matter of taste. Some people really like using the viewer with the Lua functionality to customize their scenes for flythroughs or playing particular mesh animations. Other people, like you, skip the viewer entirely and use the scene loading code in their own projects. I've tried to make either use as simple and as flexible as possible.

Better documentation is always nice, but the MeshAnimation sample covers the most common case for mesh animation playback, which is why I always direct people to it.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Thu Dec 06, 2007 9:20 am

It's all a matter of taste. Some people really like using the viewer with the Lua functionality to customize their scenes for flythroughs or playing particular mesh animations. Other people, like you, skip the viewer entirely and use the scene loading code in their own projects. I've tried to make either use as simple and as flexible as possible.
Yeah, agree, and thanks for your efforts. :)
But I think the infomation containing animation should be in the scene file. Then anyone want to write their parser without lua can dealt with that easily.
I'll try to digest the animation part later, and see how to integrate it into my project. It will be very appreciated if you can give me some clue, for I am really new to lua script.
0 x

User avatar
nedelman
Gnome
Posts: 315
Joined: Wed Feb 21, 2007 6:03 am
Location: San Francisco, California
Contact:

Post by nedelman » Thu Dec 06, 2007 12:55 pm

Mesh animations are not stored in the scene file, they're stored in the mesh files themselves.

The Lua feature in the viewer is intended to provide simple control over the scene, which is convenient if you don't want to write your own program. It sounds like you're already doing pretty well with integrating the OgreMax scene code into your own project. All you have to do to control the mesh animations is get the appropriate entities, then the particular animation state you want, and then you can start and stop the animation as necessary. The MeshAnimation Lua file looks intimidating at first, but that's all it's really doing.
0 x
http://www.ogremax.com - Ogre3D Scene Exporter for 3DS Max, Maya, and Softimage
http://www.linkedin.com/in/dereknedelman - My LinkedIn Profile

Mars
Halfling
Posts: 42
Joined: Thu Mar 29, 2007 1:31 am

Post by Mars » Fri Dec 07, 2007 1:32 am

All you have to do to control the mesh animations is get the appropriate entities, then the particular animation state you want
That's the problem. I think the infomation of which-entity-have-what-animation-state might better recorded into scene file, like this

Code: Select all

        {
        ['Cylinder01'] = 'Bend',
        ['Cylinder02'] = 'ArmBend',
        ['Body'] = 'Springy',
        ['Body01'] = 'SlowWalk',
        ['Box01'] = 'Box01'
        }
in the .lua file.
Then I can start and stop the particular animation without trying to find enough info.
I haven't read that part though yet, so anything wrong here spotted are welcomed.
0 x

User avatar
AlphaWolf
Halfling
Posts: 70
Joined: Wed Jun 13, 2007 11:12 pm

Post by AlphaWolf » Wed Dec 12, 2007 5:09 pm

It seems that I am blind but I can't find the dotscene loader which I can use to load the exported .scene file.

Please help me.
0 x

Post Reply