Jump to content
  • Advertisement

Archived

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

Using other 3D files then .x

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

Anyone know how to use a .map or even Halflifes type .bsp for a map and still be able to use D3DXIntersect? Or a program like HalfLife''s Hammer Editor to make a map?

Share this post


Link to post
Share on other sites
Advertisement
To use formats other than .x files, you''ll either need to write your own model loader or find a library on the net that loads the data for you into some array. You can then take all that data and copy it into vertex/index buffers to use when rendering.

As far as being able to use D3DXIntersect, unfortunately, this funciton requires the mesh data to be in an instance of ID3DXMesh. One way to be able to use D3DXIntersect is to load the model into some array and then create an object of type ID3DXMesh and fill in all the appropriate data. This includes things like vertex/index buffers, adjacency info, etc... You can then use D3DXIntersect with no problem.

Whether it''s worth going through all that work is up to you. Writing a ray-triangle intersection method isn''t all that hard and there are plenty of examples on the web anyway.

neneboricua

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!