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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.