PDA

View Full Version : loading .x meshes (dx9)


VprMatrix89
04-08-2008, 04:12 AM
Does dx load with standard c++ i/o streams?

For terrain, should I load from a heightmap file?

Also, is .x files the only available standard for directx?

Reedbeta
04-08-2008, 08:35 AM
DirectX probably uses the Windows API directly for file I/O. But why do you care what it uses?

For terrain, a heightmap is likely the most efficient way to store it, so probably yes.

.x is the only 3D model file format that DirectX has build-in support for. You can of course use any format you want but for others you will have to find a third-party library for loading them (or write your own loader).

VprMatrix89
04-08-2008, 09:28 AM
Reed, thank you for your comprehensible reply.

I care about what it uses cause I wanted to know if theres other, faster ways.
Or if it could be compared to c++ I/O.

ALso, At first I thought that you would have to specify ways to read object files, but then I learned directx could auto read x files, and im assuming this is the standard and sufficient for any modern game?

Reedbeta
04-08-2008, 09:46 AM
I think most professional / high-quality indy game engines use a custom-designed file format, and have their own tools for reading and writing it.

VprMatrix89
04-08-2008, 09:53 AM
Perhaps reading, not so sure about writing

The whole question for me was, many of these companies have pro modelers, and they use applications for this, like maya
But the one similarity between all is vertex data.. so

Would a game company design their own modeling program too? I doubt it
I've seen the power of advanced modeling programs, and just seems unlikely to me

Reedbeta
04-08-2008, 12:43 PM
You're right that they don't build their own modeling programs. They just write a Maya plugin that lets them export the data from Maya into their own format.