Page 1 of 1

Creating .x files for Irrlicht.

Posted: Tue May 09, 2006 1:15 am
by Dirtbiker
I need help creating .x files for Irrlicht.
I created a model in Game Space. My IDE gives me an error "Unhandled Exception:Attempt to access field or method of Null object".
My code loads the earth model from the demo.

Does anyone have any suggestions for exporting valid .x files?

I'll post my model on here.
http://www.freewebs.com/conflict-games/ ... dia/Ship.X

Posted: Tue May 09, 2006 8:31 am
by hybrid
The null pointer exception is due to a problem with loading the mesh. If you don't check whether the mesh is not correctly loaded you can easily dereference a null pointer.
Since error messages given by Irrlicht are usually not very eloquent it is hard to judge which problem occurs. But I guess it is due to binary .x format. You cann add the binaryX.patch to enable the binary file format. I think you can also use the mview tool from the DirectX SDK to convert to ascii .x format (better change the options of your exporter, though)