Sunday, January 9, 2011

How do I convert DirectX's .X from binary encoding to text encoding and back

As far as I know, .X format can be text encoded and binary-encoded.

I basically want to look into the model I'm playing with, get a better understanding of .X, possibly make some changes in it and convert back.

  • When the model was exported from the 3d modeling app, whoever exported it chose binary instead of ascii.

    One way to convert it would be to import the model into any 3d modeling app that supports .x (there are free ones out there) & re-export in ascii format.

    From Steve H
  • Well, apart from other's suggestion to use a modeling package that can read/write both formats (polytrans can do it but ain't free), your original post links to both formats so if all else fails you got everything needed to be able to read and write both formats....

    Ricket : "the suggestion above" doesn't apply to the Stack Exchange system, especially since your answer is now the most upvoted.
    Kaj : Thanks, yeah, that was kinda dumb of me. Edited.
    From Kaj
  • If it's so straight forward, why can't you solve it? No need to be rude.

    Anyway, the first hit on Google is the spec that tells you exactly how you can perform the conversion: http://msdn.microsoft.com/en-us/library/bb173014%28VS.85%29.aspx

    Alternatively, a Google for tools that will do this brings up plenty of hits.

    Straight-forward indeed.

    From Rushyo
  • If your goal is to get a better understanding of the X file format, it might be worthwhile to write a converter yourself. All of the information you would need to do this is on the MSDN link that Rushyo provided: http://msdn.microsoft.com/en-us/library/bb173014%28VS.85%29.aspx.

    From reverbb

0 comments:

Post a Comment