Exporting world space meshes

Romz

01-04-2008 00:14:43

Hi there,

I'm trying to use a nice tool called SLight (radiosity lightmapper) here : http://www.ogre3d.org/phpBB2/viewtopic.php?p=278502, but I got a few issues with the meshes.

I'm using oFusion to export my scene and lights, if you take a look at the few posts on my link above you'll see that the light mesh needs to be exported with it's world space position.

I mean, wherever I place my light plane, the produced .mesh file is always the same, and the object will always be in (0,0,0) with a default loading. So it doesn't work.

I don't know how others exporters work but the author is using the Blender exporter and hasn't my problem.


So, I understand the concept of exporting object in local space (I'd have done the same) but now how do I do with this tool? Of course loading a scene with a .osm file would be really nice but I'm not in charge of it and I would like to be able to generate light meshes that load at the proper position and orientation.

Hoping I'm not too confusing ...

Thanks a lot!

Evak

01-04-2008 01:16:22

hmmm having all meshes with their local pivot at 0,0,0 isn't really very efficient. Means that they will always have big bounding boxes that don't get culled.

I guess you can get around this somewhat with static geometry groups perhaps.

To export everything at 0,0,0 is pretty easy.

Select all the meshes you want lightmapped and go to the heirarchy tab on the main control panel. select the Effect pivot only button at the top. You can just type in 0,0,0 in the transform type ins in he taskbar x, y, z fields.

Or press F12 for the transform typeing dialogue, and enter 0,0.0.

This will set all your selected meshes local pivot to 0,0,0 for your lightmapper. When you load your OSM with the sceneloader all those meshes will still be at 0,0,0 :)

Lioric

01-04-2008 02:31:45

Select all of your scene object, on Hierarchy tab click on "Affect Pivots only"
Set all of your pivots to be at the scene center (0, 0, 0)
Reset the object XForm

This will transform your objects from local space to world space