Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stereotypical

multiple x files or one big one?

This topic is 5278 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

Hi there, im planning to make a scene in a house where i''ll be able to walk around and click stuff in the house. Im using a 3d package to model the objects....... the thing is should i create the whole thing in one single scene and import that one big x file into directx or should i create separate objects and import each of the x files eg:- lamps.x table.x and so on? which way would be better? if i were to import one big x file would it be possible to implement the clicking functions to the objects or is it gonna be a pain? thanks

Share this post


Link to post
Share on other sites
Advertisement
If you export everything into one X file, then when you load it with D3DX, it''s only going to create on mesh out of it. That means implementing your clicking is going to very difficult, since everything is fused into one mesh.

Exporting into multiple files and loading into multiple meshes would be much easier to implement.


Dustin Franklin
Mircrosoft DirectX MVP

Share this post


Link to post
Share on other sites
Depending on how you export it, you can get away with one x file. Namely, if you use a Frame hierarchy and put all the objects in separate frames. You get a separate mesh for each when you load, and you can store their initial transforms (position/orientation) in the frame data in the xfile. This way you can make each object have a central (0,0,0) point, and still place it initially in the scene.

I like pie.

Share this post


Link to post
Share on other sites
Check out D3DXLoadMeshHierarchyFromX(), and the MultiAnimation SDK sample first.

In a nutshell, frames are just tree nodes. Each can contain a mesh, and other data. They''re hierarchical, so you can have a parent frame, with child frames, some of which might have meshes, and some which might have children, and so on. You can traverse the frame hierarchy, drawing meshes as you go.

I like pie.

Share this post


Link to post
Share on other sites

  • 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!