D3DXMESH and LOD / multiple sub-meshes

Started by
2 comments, last by dacrisxp 22 years, 6 months ago
Simple question: I have an X file with the following meshes in it: H -> High level of detail L -> Low level of detail HLIGHT -> Head light TLIGHT -> Tail light WHL0 -> front-left wheel WHL1 -> front-right wheel WHL2 -> back-left wheel WHL3 -> back-right wheel BOUND -> this should only be used for collision detection How do I display ONLY the H, and WHL# meshes using D3DXMESH? The normal Xfile loading code displays all of those meshes. NOTE: Each mesh is stored in a x3ds_(mesh-name) frame. Your help is greatly appreciated.
Advertisement
Since no one else has replied yet, I will at least
try. Sorry, I just started looking at X-Files.
I did not know they could support LOD, but there is a
DrawSubset function.
Sorry, but I wanted to at least get in on the conversation.
A little more info, and bad news.
I have been doing research on loading and
displaying animation from an XFile (I started another
thread about this also). But basing all my knowledge
so far on the one example that came with the SDK
(since nothing else exists that I have found, yet),
it looks like you must make all the custom code to handle
it. This leaves me only to believe you must do the same
for LOD also. You can enumerate through the objects in
the file, and based on their ID, you will know what they
are. And from there you should be able to load the indivdual
objects from the xfile like normal, and calculate which
LOD to draw as normally done.
I am sad to say that there is not an easier solution.
I am starting think (as I did before) Xfile is not an easy solution, just a file type. Well, at least it is becoming a semi-standard though.
Thanks everyone. I''m going to use multiple X files (one for each LOD), now that I know it''s not supported in the D3DX API, but thanks anyway. BTW, would multiple X files be a big performance hit?

This topic is closed to new replies.

Advertisement