Author Topic: XML encoding for the G3D format  (Read 4000 times)

lancelet

  • Guest
XML encoding for the G3D format
« on: 11 June 2005, 16:51:37 »
Hi Everyone,

I have developed an XML encoding for the G3D format.  It is essentially a flat "ASCII dump" of the format.  The encoding is only for G3D version 4, not any earlier versions.

I have written two tools that convert to and from the XML format:
    g2xml - converts G3Dv4 to XML
    xml2g - converts XML to G3Dv4[/list]These can potentially make the task of a model exporter easier by allowing the exporter to use XML instead of the G3D binary format.  This may be especially useful for exporters that are not written in C/C++.

    My package (dubbed "GLEXEMEL") has a website here:
      http://http://grub.homelinux.org/g3d[/list]So far, I've tested it only under x86 Linux.

      I am very willing to include these tools in the official Open Source component of Glest, if the project admins agree.  If they advance any further than a quick experiment, I will probably re-write them in a higher-level language (Python or Ruby) to simplify them.

      Have fun. 8)

      Jonathan Merritt.
      « Last Edit: 1 January 1970, 00:00:00 by lancelet »

      Speedator

      • Guest
      (No subject)
      « Reply #1 on: 11 June 2005, 17:46:52 »
      Even though I haven't test it(I'm going to), it sounds really great. So we can use exporters from other projects.
      As seltsamuel told in the "G3Dv4 format spec"-thread, Ogre3D, for example, has a lot of good exporters  for many different 3d-modelling-tools.
      « Last Edit: 1 January 1970, 00:00:00 by Speedator »

      seltsamuel

      • Guest
      (No subject)
      « Reply #2 on: 12 June 2005, 09:12:23 »
      good work so far.

      i had a short look into your xml and recognized there is the overall meshcount missing inside the header below the g3d version.

      bad luck that the swordman is not animated :-)

      Seltsamuel
      « Last Edit: 1 January 1970, 00:00:00 by seltsamuel »

      lancelet

      • Guest
      (No subject)
      « Reply #3 on: 12 June 2005, 12:56:50 »
      Yes... I could add in a Mesh count (currently, the XML->G3D code just counts the number of meshes manually and sticks that number in).

      I originally started out thinking that I'd include the minimum number of attributes in the XML.  For example; why bother (in XML) putting in the number of meshes when you can just count them?  However, I later thought that having things like the expected number of vertices would be a good error-checking feature.

      Anyway, it's just an idea at this stage.  It remains to be seen whether it works on animated meshes.  :)

      Jonathan.
      « Last Edit: 1 January 1970, 00:00:00 by lancelet »

      seltsamuel

      • Guest
      (No subject)
      « Reply #4 on: 12 June 2005, 13:04:42 »
      yes it is not necessary to include it, but its in the filespec  :roll: )

      Seltsamuel
      « Last Edit: 1 January 1970, 00:00:00 by seltsamuel »

      martiño

      • Behemoth
      • *******
      • Posts: 1,095
        • View Profile
      (No subject)
      « Reply #5 on: 12 June 2005, 16:34:50 »
      Quote
      So far, I've tested it only under x86 Linux.

      I am very willing to include these tools in the official Open Source component of Glest, if the project admins agree. If they advance any further than a quick experiment, I will probably re-write them in a higher-level language (Python or Ruby) to simplify them.


      We still have to set up a way of integrating stuff sent by Glest contributors in the project. By now I've uploaded your tool the http://www.glest.org/files/additional/tools/ folder.
      « Last Edit: 1 January 1970, 00:00:00 by martiño »

       

      anything