Can't find a good tut on how to import an XML file. The specific file I want to import is a map made in FreeWorld3D 2.0. Any idea how I could effectively do this, or any advice on an easier way to map is greatly appreciated… it's still the most confusing part of my game.
try to export to .3ds or .obj in Freeworld3d and then import the model just like any other model in jME.
Tried, but it looks like crap. The textures that were on the .3ds file don't appear in the import, the import is really small, so totally unfit for an actual world, and the water that was in Freeworld 3D doesn't appear. Any ideas?
You'll either have to get Freeworld 3D to export in a format jME can read, or create a new importer for jME that can load the XML file Freeworld 3D produces.
Trussell said:
Tried, but it looks like crap. The textures that were on the .3ds file don't appear in the import, the import is really small, so totally unfit for an actual world, and the water that was in Freeworld 3D doesn't appear. Any ideas?
The scale shouldn't matter much, either try to scale it up in Freeworld or scale it up after importing in jme.
Did you add the Textures to your jme project and set up the Resourcelocator so that it can find them?
It's pretty easy to import XML as Java provides a really nice interface for it. Check the X3D importer in jME source for an example.
Momoko_Fan said:
It's pretty easy to import XML as Java provides a really nice interface for it. Check the X3D importer in jME source for an example.
Such as com.jmex.model.XMLparser.XMLtoBinary? Found in the jME API
That's actually not one of the best examples of how to parse XML. It is far too complex to use it for a starting point or example of what to do with XML data.
I get the feeling from what you write that you think of XML as a data format such as MS3D or 3DS. That is not the case!
If I am right you should go find some basic XML introductions, maybe a book.
XML merely defines the way in which data is stored, not what data actually gets stored in the xml data structures.
So you cannot just "load an XML file" and see something on your screen. You have to know what data your XML file contains and load it accordingly. XML is more a medium than what you might know as a "file format".