Jump to content
  • Advertisement
Sign in to follow this  
wall

OpenGL Using the .X model format

This topic is 4700 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been programming using the OpenGl API for a few years now but recently decided to learn Direct3D aswell. In the experiment project I'm working on now I will use the .X model format to draw meshes. Are there any drawbacks on using that format opposed to rolling my own format or using some other standard format(.obj, .3ds etc..)? I thought it was a very convenient way to draw meshes since you get all these helping functions in the D3DX library, and it was developed to especially suit game development (right?). But I don't think I've seen any commercialy released game that uses this format, only demos and tutorials I've found on the net, that's why I'm asking. I don't really know anything about the file format, so excuse me if I'm asking sbout something obvious.

Share this post


Link to post
Share on other sites
Advertisement
Hi there wall,
How are you doing?

The Problem
Using .x files

The Solution
They are awesome and you should think of using them for as long as you can until you run into it's limits and the moving onto your own file formats or using other file formats such as quake/doom BSP's and such or exporting your own from 3d modelling packages. You should use them if they suite your needs and as far as the helpful functions that come with the SDK go, they are awesome aren't they? :). The reason you might run into snags are the added goodies that you have with other formats or creating your own is the fact that that you can add if you desire shaders, lights, etc.. and then export them using your own exporter from a package like 3dstudio max.

I really love using them and they suite my needs for almost everything. Obviously everything has it's limits.

I hope this helps,
Welcome to the world of DirectX :) We hope you enjoy your stay.

Share this post


Link to post
Share on other sites
i made a program a while ago that loaded the "old style" direct x meshes into opengl.

iut was my first and only attempt at three D, never got around to loading animation data.

but the point is that with the .x file( and other ) format you can load in the meshes and texture data, etc and then arrange them in memory anyway you like

Share this post


Link to post
Share on other sites
Thanks for the response, both of you!

Quote:
Original post by Armadon
The reason you might run into snags are the added goodies that you have with other formats or creating your own is the fact that that you can add if you desire shaders, lights, etc.. and then export them using your own exporter from a package like 3dstudio max.


Ok, so I can't get shaders embedded in the model file..But if I want shaders it works just fine to use external CG/HLSL shaders when rendering the model, right? Isn't that the best way to do things even if I can get shaders into the file? To save space when models share shaders and to speed up rendering by sorting by shader. Thoughts?

Share this post


Link to post
Share on other sites
Quote:
Original post by wall
Ok, so I can't get shaders embedded in the model file..But if I want shaders it works just fine to use external CG/HLSL shaders when rendering the model, right? Isn't that the best way to do things even if I can get shaders into the file? To save space when models share shaders and to speed up rendering by sorting by shader. Thoughts?

Well, the model itself doesn't have to store the shader. It just needs to specify which shader to use. Your engine would see that it uses some particular shader and would then load it up. If a second model uses that same shader, your engine *should* see that this shader has already been loaded and would not try to load it again.

neneboricua

Share this post


Link to post
Share on other sites
Sorry for the off topic, but Armadon is cool, I'm gonna rate him up (I love his way of posting).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!