🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Open X file (DirectX) change texture paths and save again, in VB.Net

Started by
2 comments, last by Pipo2020 4 years, 3 months ago

Hi everyone

Using VS 2015 and Windows 10 64bits.

I'm developing a tool than implies to change texture paths in several X files, I Had readed a lot of info about directX programing aven some example like the tiger one, but all them are in C++, and I'm just starting with Visual basic.Net.

I'm quite sure most of you already know X file format, anyway I'm going to add 2 blocks of both file formats:

X file format

xof 0303bzip0032¨±? €$'CKœWy\UÕö¿Šš

hâTjjΙ¡ôÔ'?ûìkÎ?(bRNÈì€>œxf¦Ÿœµr?Ä~h8䐄‚9rÎ?/9p¹"?’ù|*C¤/rè§æøÎ:ðÝm®ò‡ï¿/ßû=k¯µ×úî¥-,U,u-?ËX¿©?‘ÃCf…?

?‰ªm©nqDÜî½àÙ¾~?ôû_L>?u½ƒ!}͐F??Œ&õû!?aá³gù†D ‰š??ÝÀBŠF/T??

)û½?ýÞwFdȬ??WK‹ò˜e?úÍ™9-"(pvÄŒÈÁ‘Á?A!³(ÁþyGÎ\Ü4xå9¿=»“½

Þ2¾©IQÊ5

TXT format - after conversion I'm looking for

xof 0303txt 0032

template Frame {

<3d82ab46-62da-11cf-ab39-0020af71e433>

[...]

}

template Matrix4x4 {

<f6f23f45-7686-11cf-8f52-0040333594a3>

array FLOAT matrix[16];

}

template FrameTransformMatrix {

<f6f23f41-7686-11cf-8f52-0040333594a3>

Matrix4x4 frameMatrix;

}

If get that txt file so I can to locate texture paths>change them for the new paths>and save again as X file.

Or maybe is there another way allowing me open X file>change texture paths directly>and save again, without convert X file to txt format?

Any help would be appreciate.

Advertisement

The usual approach to changing such things is to edit the source, and re-generate the compiled version with the cghanged paths.

Since you take the hard way instead, I assume you don't actually have the source files and whoever supplied you with the compiled version didn't give them. That in turn leads to the question whether you have permission to change such files.

@ Alberth

I'm 3d modeler and work with a game engine,, I generate that's X files with my models because game engine use it, althought is a deprecate file format.

I don't like engine work sistem having all those files spreaded in different folders each one, and I want to make a project-based system, that means all the files together in folder named “your name project”, I already achieve this, but what's the problem?

Problem is X files textures pointing to the ald paths (original one) rather than the new one (project folder).

So I need to open several X files and change paths to match the project folder, thats all the mistery.

There are a lot 3d soft out there changing X file format to txt file format but I want to write my own tool, and make it public when done, so every user can use it to make their own project-based sistem. As you can see is not just for me, and has nothing to do with ilegal stuff.

I use 3ds max with pluging to export mersh to X file, even fbx, max, etc.

So now, can you help me about?

This topic is closed to new replies.

Advertisement