Dynamic Mesh (X File) Creation

Started by
0 comments, last by jollyjeffers 19 years ago
I've created an application using DirectX, that allows the users to draw 2D trace 2D floor diagrams and then it goes through the x,y points and produces a 3D mesh (.X) file (complete with wall width and height, etc). I would like to include 3rd party mesh files in the floor plan. So say they drop a sweet chair into the 2D floor plan (represented as some type of 2D icon) I want to incorporate that into the 3D floor plan - correctly situated on the plan. Is DirectX the correct API to be using for this type of application? Are there other, better, scene graph api's available? I'm new to the whole 3D thing and have no training. I do have the math background, but I'm still lost when it comes the whole low-level api's vs. scene graph api's vs game engines, etc. Any help with this would be greatly appreciated. Thank you
Advertisement
Quote:Is DirectX the correct API to be using for this type of application? Are there other, better, scene graph api's available?

DirectX is more than capable of doing what you want, but whether it is "correct" is not so clear.

DirectX, natively, doesn't really do scene graphs for you - thats the "level up" from the actual API; something that an engine programmer might implement as part of a graphics library.

If you particularly want scene graph support (for trivial representations this might not be useful, but a definite plus for any large-scale plans/diagrams) then, as I see it, you have two choices:
1. Write it in yourself as some form of ADT in your language of choice (C#/C/C++ etc..)
2. Use a 3rd party engine to handle it for you. There are various free engines around, as well as a large number of professional-grade engines available for a licence fee.

Quote:I'm still lost when it comes the whole low-level api's vs. scene graph api's vs game engines

As a simplification...

You could think of the "low-level api's" as the piece(s) of code that directly communicate with the hardware. They do little more than configure the hardware and then throw texture/vertex/index data at it. This is blurred slightly by the API's often having helper libraries (e.g. D3DX for D3D) that can save you re-creating the wheel each time.

The "Scene Graph api's" would sit on top of the actual triangle-pushing low level API's. They have knowledge about what you're doing (e.g. architectural representation) so can optimize the way the system works. Basically, if it knows how your 3D "world" fits together then it can efficiently represent and manipulate the data that it contains.

From where I look "game engines" and "graphics engines" are not quite the same thing. A "graphics engine" would be generic (probably containing scene graph technologies) whereas a "game engine" would possibly be specific to a particular type (e.g. First Person Shooter) and might not map very easily to a different rendering format. Either way you look at them, they will usually sit just below the actual application, and often mask as much of the internal workings from the application developer as possible.

There are big fat books that'll give you a lot better information than what I've just babbled though [grin]

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement