xsi exporter bug: material scripts

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Phlebas
Gnoblar
Posts: 3
Joined: Tue Jun 07, 2005 11:00 pm
Location: Ontario, Canada
Contact:

xsi exporter bug: material scripts

Post by Phlebas »

Hi:

I'd like to report two problems that we've been having with the XSi exporter. We have been working around the problems in the exporter by converting the mesh that the exporter produces into XML and removing the rotten bits, then converting back into a .mesh file, but this approach has limitations.

The first bug is so trivial it's hardly even worth mentioning: material prefixes are applied to the material names in the .material file, but not in the .mesh file, so that our .material file is full of "mat1Material", "mat1Material2", etc., but the .mesh file crashes OGRE on load because it's looking for "Material" and "Material2" (the prefix here being of course "mat1"). The mesh gets exported on lines 436 and 447 in OgreXSIExport.cpp, and then the materials (with the relevant material prefix) on line 466; I was hesitant to actually write the patch myself and diff it to this forum.

Secondly, it's fairly easy to accidentally select a piece of geometry in the XSi scene that has no associated skeleton weights; it then gets dumped fine to the OGRE mesh file along with the rest of the model, but Ogre will crash when trying to get the vertex positions the first time (null pointer exception on line 1483 in OgreMesh.cpp). It would be nice if getting the blend indices buffer was protected by an assert that checked the pointer value first so that an error message could be logged; it would also be nice if the XSi exporter checked that all parts of the model have "envelopes", but I have no idea as to how difficult this would be to implement.

Other than that, many thanks to Sinbad for making a great tool.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Thanks, I'll put these on my list. Glad you liked the exporter except for these minor niggles ;)
tommie
Gnoblar
Posts: 10
Joined: Fri Dec 09, 2005 12:07 pm
Location: Amsterdam, The Netherlands

Post by tommie »

Hi,

It appears there still is a problem with prefixes in v1.0.6a of the XSI 4.2 exporter: they are prefixed twice in the .material file but only once in the .mesh file. So with a prefix "test" you will get "testMaterial1" in the .mesh file, but "testtestMaterial1" in the .material file...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Darn. Simple fix, I'll commit it.
Post Reply