DeleD 3D + DxsToJme FormatConverter

Hey folks! I’m a fairly new user to JMonkeyEngine, although I’ve done more lurking than posting. So, hi! I’m posting this in the tools board because I’m also advertising a very nice little modeling tool geared towards game asset creation, it may not be Maya or 3DS but it’s a very nice low-cost solution that’s easy to use. There’s also an unrestricted free version as well, you can find out more here:



www.delgine.com



Since DeleD has official plugins for other engines/platforms such as Multiverse, Torque, and Ogre3D, as well as 3rd party loading routines for Irrlicht, I was inspired to write a FormatConverter for DeleD’s file format, .dxs, which is XML-based.



The reason for this was because I’m using JME for a project of mine, and found the art pipeline from DeleD to be lacking some. The easiest way to go from DeleD to JME however was through the obj loader, which I found a bit lacking (DeleD’s obj exporter, not the loading routine). There’s still a lot more features to go, but the basic stuff is in.



I thought it would be cool to take it a step further and implement a fully featured GUI (and maybe expand, and have a generic GUI tool that converts ALL the supported formats and saves them). At the moment this is partially realized (both accounts actually, very primitive and not good for a release yet though). So far I took a shot at implementing that GUI using the engine (and the Jme desktop), since I can also include instant feedback by displaying the model that was just exported to the .jme file. To top it off, I’m also planning on allowing for batch conversions…specifying a intermediate working folder and checking off all the files you want to convert so you can convert everything in one click.



Anyways, for now I’m posting the DxsToJme.java file. This is the first time I ever wrote something like this, plus the first time using XML-based files, so the code may not be all that optimized, so be gentle! I had very little information to go on how to do this, and the other format converters were not exactly well documented. I’ll still be working on the converter, so I welcome criticisms or suggestions to improve it. I hope some folks find it to be useful!



Two caveats must be maintained currently to export a dxs file to jme:

  1. Your model MUST be in triangles – if you work in quads, DeleD has a triangulation feature which works well. I use TriMesh rather than CompositeMesh as I found more reference to the former.
  2. Each primitive/object in the scene MUST have exactly one texture map.



    http://www.pyrogames.net/downloads/JME/DxsToJme.java



    There aren’t a whole lot of java users on the delgine website, hopefully this will help stimulate interest in the modeler and change that  :D. Enjoy!



    Edit: I’ve written this with using JME 1.0, I don’t know if its JME 2.0 compliant. I’d bet it would be, but I have yet to upgrade to JME 2.0

I know it is quite a time past now, but is it possible to provide this code again?



Thx a lot, ToM

ttrocha said:

I know it is quite a time past now, but is it possible to provide this code again?

Thx a lot, ToM


I've since revamped this code, you can find it here:

http://code.google.com/p/deledimporter/

The DXS Importer doesn't follow JME's built in importers anymore. I made an attempt at making the importer more customizable, where you can define extensions that will grab and parse custom entities from the deled XML file. Look through the example code in the JmeExtension folder on how to use it (I have both a basic example, and extension examples).

Also the project thread I posted a while back:

http://www.jmonkeyengine.com/forum/index.php?topic=11980.0

Let me know how it works out. I haven't touched this in a while due to some other projects, but I believe importing lights are still a little wonky. All other functionality is comparable/better than the old code though (e.g. you don't need to follow the caveats I mentioned in the original post). It probably could use a lot of user testing too. Good luck!

Edit: It also looks like converting the dxs layers to their jme counterparts could use some work too (in the standard JME2Format). You won't run into problems unless if you try to multi-texture though...