Exporting User-Defined Mesh Data in Max 9 & oFusion1.8.6

mr_burns

07-02-2008 04:30:38

Hi all,

Max 9, Ogre3D 1.4.5, oFusion 1.8.6 CE, OgreMax 1.5.6.

I am trying to add some user-defined object properties to my mesh, e.g. (Mass=10.0).

When I use oFusion 1.8.6 CE, it does not give me any options (unless I have missed something) to export out the custom / user-defined data.

OgreMax allows me to specify under "Object Properties" "User Data", and I can untick "Export as XML CData", so that my custom data is embedded in the .scene file.

Can anyone tell me how to do this with oFusion?

oFusion .osm File

<oe_scene>
<sceneManager type="0" />
<bkgcolor r="0" g="0" b="0" />
<lightColor r="0.5" g="0.5" b="0.5" />
<shadowTechnique type="0" tex_size="512" tex_count="1">
<color r="0" g="0" b="0" />
</shadowTechnique>
<entities>
<entity name="Cube03" hidden="false" filename="Cube03.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="0" y="46.271523" z="30.562603" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
</entity>
</entities>
</oe_scene>


OgreMax .Scene File

<scene formatVersion="1.0" upAxis="y" minOgreVersion="1.4" author="OgreMax Scene Exporter by Derek Nedelman (www.gameprojects.com)">
<environment>
<colourAmbient r="0" g="0" b="0" />
<colourBackground r="0" g="0" b="0" />
</environment>
<nodes>
<node name="Cube03" id="01" isTarget="false">
<scale x="1" y="1" z="1" />
<position x="0" y="46.2715" z="30.5626" />
<rotation qx="0" qy="0" qz="0" qw="1" />

<userDataReference id="Mass" />
<userData>mass=10</userData>

<entity name="Cube03" id="01" meshFile="Cube03.mesh" castShadows="true" receiveShadows="true" />
</node>
</nodes>
</scene>





Thanks,
B.

Evak

07-02-2008 06:55:21

You probably need ofusion pro. I just tested it in my version of Pro and it works fine.

mr_burns

07-02-2008 08:38:53

Hi Evak,

Can you post the contents of your sample oFusion pro scene file. just something simple, like a cube, with a user defined value, like I have below, "Mass=10" or equivalent.

Would like to see the file format, etc.

Do I need oFusion Pro to embed/export the information AND to read the pro-version scene file into my application?

I might not have made myself clear. If I contract the export process out to someone who has a pro license, is that enough or will I need a pro version of the oFusion library to load/access the custom data?

Does that make sense?

Thanks,
B.

Evak

07-02-2008 17:44:28

here's the test OSM I did yesterday to check that it works. The Pro Version of Ofusion sceneloader is an extended version of the CE one, for compatibility between the two obviously.

<oe_scene>
<locations auto="yes">
<subDir path="meshes/" />
<subDir path="materials/" />
<subDir path="textures/" />
<subDir path="textures/" />
</locations>
<sceneManager type="0" />
<bkgcolor r="0.0392157" g="0.0431373" b="0.0784314" />
<lightColor r="0.5" g="0.5" b="0.5" />
<shadowTechnique type="18" tex_size="512" tex_count="1">
<color r="0.262745" g="0.286275" b="0.329412" />
</shadowTechnique>
<entities>
<entity name="FloorL" hidden="false" filename="FloorL.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="-60.000023" y="-9.5367432e-006" z="-3.4332275e-005" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<properties>
<property pug="4" />
</properties>
</entity>
</entities>
</oe_scene>


The only other difference in mine is that I have autoregistering subdirs and the user defined properties of the mesh I exported in the test I did for you.

We don't use the CE edition of ofusion. We're a 3 man team with me as the only artist. So havent had a need to test that. I guess that might be a problem. Our OSM based scene editor that we will be releasing to the oge community when we launch Flow would get around that problem to some extent.

xadh00m

22-02-2008 12:11:59

Hi!

How do export these properties?

I use the Pro version of OFusion.
When I simply add a new attribute to a box (e.g. Mass) I can see it in Max 2008 in the "Custom Attribute" panel.
But how do I export this attribute? I checked the "Export properties" checkbox in the OFusion export dialog, but there is no entry in the resulting osm file...

Evak

22-02-2008 15:24:30

you select your object in the viewport right click on it and pick preferences from the right click menu, like you would for setting cast and recieve shadows.

You will see a user defined preferences tab, and in there is an edit box you can type your info in.

when you export your scene you will also have to check the export properties checkbox in the list of things you want to export. That should enable you to read your properties (simple scripts) in Ogre and code actions for them.

Were using them for our game framework for things like Newton physics settings, and particle type and timing so we can rig multiple Ogre particle cluster sequences for explosions. As well as simple Hit point, armour and collateral damage values.

Oh, I for pro users, I requested the user defined properties to be added to the serializer saver lib. So we can include simple scripting in our game editor :).