gerds
01-08-2006 08:49:36
I've always had problems exporting my large scene's in oFusion, hopefully I'll get there on the new version but I'm still having problems.
The problem is related to instancing of thousands of objects in the scene. Within 3dsmax lots of the instances are set in groups (for example in a group called "Group02"). When I export the scene to an .osm file and open it in a text editor I see that hundreds of instances of trees have their "parent" set to "Group02" - great.
However there is no "Group02" entity in the .osm file at all, only lots of references to it as other objects parents.
I openned up the "select by name" dialog in 3dsmax and determined that "Group02" shows up as "[Group02]" in the dialog and is visible when I select the "Groups/Assemblies" check box.
How can I get this scene to export correctly if groups are not exported by oFusion?
I think this is the reason why there are thousands of missing bits and pieces throughout my entire scene, and a HUGE DUMP of objects around the origin. I think the oFusion loader for Ogre must offset instances from the origin if it can't find a parent for the object.
Lioric
02-08-2006 01:11:29
Groups are supported, that is why the group elements are exported with the group name as the parent, so in your application you can get the node "Group02" (in your example) and handle all the group
The group parent ("Group02") is created automatically when loading your scene in your application and all group elements are added as child nodes
What is the result if you ungroup the elements? are they displayed correctly?
gerds
02-08-2006 07:57:04
Hmmm... I dont think the groups are working correctly. I'm not a max expert but do the positions of objects within a group depend on the groups position (ie: they are relative to the group)?
If this is the case then how does it work in oFusion? I checked the .osm file and there is no creation of an object called "Group02". I understand that it can be automatically created if some other object requires it as a parent object, however those object positions are an offset from the parent, and the parent position is not known.
Also, I have had some success, I selected everything in the 3dsmax scene, "closed the group", "exploded the group", "renamed everything to a unique name" and then re-exported the file. This results in about 85% of the scene appearing correct. There lots of building walls and fences that just appear at "random" positions but I am making progress
Something else I need to handle now is performance. Performance is terrible. I get about 40 FPS at the start of the track in my scene, on the old "OpenGL Performer" terrible terrrible engine I get about 120 FPS at this point. What can I do to improve performance? It needs to be much much better - around 120 FPS for this basic test because there are a lot more objects and animations that we need to add to the blank track.
Maybe the 'static geometry' support will help this?
Is static geometry turned off in oFusion CE, but working in oFusion Pro?
If static geom does work how does it work?
Since my scene is huge I wanted to use one of the Octree scene managers in ogre, however its my understanding the Octree scene managers dont support static geometry!?
Does oFusion's static geometry only work with the BSP scene manager?
Lioric
02-08-2006 17:19:56
I will review the group export issues
You should test if the object(s) that are not displayed correctly when part of the group, work if they are not in the group
Static Geometry will help you here, but your scene objects needs certain conditions to benefit from this, for example most (if not all) of your objects will need to use the same material (atlas texture) so the smaller numer of batchs are created for your static geometry group
Any scene manager can use static geometry, the trick is to play with the region size values (in the exporter dialog) to best fit your scene manager partition scheme, and the visible frustum
This is available in Pro version only, to use it you select all your objects that you want to be part of a static geometry group and assign them the group name (in "Object Settings" panel), then in the export dialog you activate the "Static Geometry" options (i.e. shadows, region size), and thats all needed
In your application, static geometry will be automatically created, you can add a post process method to handle the static geometry creation and its elements (if you dont add this method, the default is to hide the entities that were used to create the static geometry group)
gerds
03-08-2006 02:16:57
Yes objects that are not displayed correct when part of the group, work if they are not in the group.
For example, I did not see any trees along the track when they were grouped. Once I expolded all the groups I saw trees along the track in the correct positions.