Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / .X files

Author
Message
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 9th Sep 2003 11:57
Hi there,

I would like to support .x files in my 3d editor but I'm having a hard time finding info about it. As I understand it, there are two types of .x files, text and binary. Is that correct? And what is a good site for finding info about the .x file format(s)?

Bye,
Jeroen

Use DeleD to get skilled in 3d editing! Visit http://www.gamefortress.com/delgine for more info.
actarus
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 9th Sep 2003 14:59
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/programmingguide/advancedtopics/xfiles/xfiles.asp

Everyobdy wants to be loved,But no one loves everybody...

HEY!!! I'm the one who had 'Cyberspace' in his location on the older black forums,shame on you Rich j/k
JAT
22
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 12th Sep 2003 04:58
There's also a third form using compression, which they don't explicitly document, but it uses some standard compression scheme I've forgotten the name of. I suppose they expect you to only use the Direct3DX library to read and write it.

There are also the DirectX 7 extensions demonstrated in the DirectX SknnedMesh sample, as contrasted with the older DirectX Retained mode segmented frame format. Fortunately they are documented now in the above MSDN links under the X File reference, which is more than I had when I wrote the MilkShape DirectX JT exporter and JTEdit.

Brave man writing a 3D editor!

John Thompson
http://www.jtgame.com/jtedit
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 12th Sep 2003 12:56 Edited at: 12th Sep 2003 13:54
Indeed, I think they expect us to use Direct3D code only. At least, some examples i've seen only use Direct3d code+objects. As I use OpenGL and Delphi, I have no use for Microsoft examples I think.

I only want .X ascii files right now (start easy, work my way up from there) so if anyone has a good description of such files, please let me know! A few good examples of ascii .X files would be great too.

Use DeleD to get skilled in 3d editing! Visit http://www.gamefortress.com/delgine for more info.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Sep 2003 14:02
Good luck mate, .X is a bitch, even .X Ascii is extremely difficult to get your head round - check out the link below, but I strongly suggest making some text .X ascii models in a modeller and studying them closely as well.

http://astronomy.swin.edu.au/~pbourke/geomformats/directx/


Van-B

My cats breath smells of cat food.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Sep 2003 14:10 Edited at: 12th Sep 2003 14:11
I have to say that the .3DS format looks a little more logical.

EXTREME POPUP WARNING
http://www.spacesimulator.net/tut4_3dsloader.html

Most people would'nt mind a missing .X export as long as there was .3DS export - .3DS to .X converters are a dime a dozen.


Van-B

My cats breath smells of cat food.
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 12th Sep 2003 15:16
Thanks for the tip Van B! I'm only thinking about an .X importer, not an exporter. Being able to import various kinds of formats would be cool, I think. Exporting to 3DS would be very great indeed! I'll check out the links you gave now.

Use DeleD to get skilled in 3d editing! Visit http://www.gamefortress.com/delgine for more info.
Dr OcCuLt
22
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 12th Sep 2003 16:29
Quote: ".X importer, not an exporter."


that not very ues full. a .low importer is ues full becos that a good editer to editer file but X is a bit to end-uesed? .X are not that hard to exporter if you do`t what animation. then it become a pig.
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 12th Sep 2003 16:58
I actually don't quite understand what you mean, Dr OcCult. Can you explain yourself?

I do think that an importer can be very usefull. Just think about all the .x files you can immidiately use in your own scenes. Now why wouldn't that be usefull?

Use DeleD to get skilled in 3d editing! Visit http://www.gamefortress.com/delgine for more info.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Sep 2003 19:10
I think he's saying that you should write an .X exporter too - which makes sense considering us poor DB'ers only have .X file support :/.


Van-B

My cats breath smells of cat food.
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 12th Sep 2003 20:16
Ah yes, that I DO understand. Well, if I succeed at writing an importer, then writing an exporter shouldn't be too hard. I'll give it a shot for sure! That 3DS link you posted is excellent material, VanB, so thanks again!

Use DeleD to get skilled in 3d editing! Visit http://www.gamefortress.com/delgine for more info.
JAT
22
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 12th Sep 2003 21:46
VanB,

Quote: "I have to say that the .3DS format looks a little more logical."


Really? My reaction to it from writing my .3ds importer/exporter is that it's the most convoluted file format for anything (except for maybe a flattened object format which is not intended to be parsed outside of object streaming functions) that I've ever seen. The fact that it's not officially documented but reverse-engineered makes it worse.

Also, it doesn't support skinned mesh models, and from what I could tell, nor vertex normals either. No two exporters I tried output the same record types. Most, including Milkshape and trueSpace don't output animation at all. I regret that it becams something of a defacto standard by virtue of its having been around the longest.

Yeah, the DirectX format is not the best fit for raw 3D geometry data, and can be pretty innefficient, especially the ASCII form. The thing that I really like about it is how it can be a generic means of formating structured data, and by virtue of the template mechanism can be self-documenting (at least to loader software) and extensible.

For this reason I made it the basis for my game engine framework, such that I can stream in or out whole object hierarchies. (However, I just remembered I added some extensions to it to support class inheritence and some alternative readable forms.)

For example, I have a CGameFrame class that can map to the DirectX Frame object. By deriving custom model classes from it I can add new fields for stuff like health, behavior options, and other stuff you might want to associate with game characters. Because of the template mechanism I can design the underlying object mechanism such that the objects can be self-describing and implement a streaming mechanism such that I can implement an object inspector (called a monitor or parameter palette in JTEdit) to view and edit individual field values, as well as polymorphically stream out the object hierarchies.

But, I digress. It's also no wonder JTEdit is so complicated and hard to debug. I don't particularly like Microsoft's template definitions for 3D content, but I do like the basic format language itself.

-John

John Thompson
http://www.jtgame.com/jtedit

Login to post a reply

Server time is: 2025-06-26 17:39:32
Your offset time is: 2025-06-26 17:39:32