Jump to content
  • Advertisement
Sign in to follow this  
EmptyVoid

PhisX and Hight Mapping

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

So my problem is that with PhysX you have to cook your data and it takes to long to do on the fly. I would like to have my collision data and my mesh data packed into one file what is my best option?

Share this post


Link to post
Share on other sites
Advertisement
I'm not going to recommend COLLADA. Hmmm, just in case you don't even know what that is...COLLADA is a standardized file format, based on XML, that can store both graphics information and physics information. And there is a way to get COLLADA info into PhysX...Ageia I believe has been heavily involved in the development of the physics side of COLLADA. But, I'm not going to recommend it because I do not believe XML should be used as a format for game runtime assets. Reading/parsing the XML is just too slow and takes too much disk space.

So, my recommended solution is to have your one file be a *.zip or *.rar archive that embeds two files. The two files within the archive will be your graphics/mesh data and the separate PhysX pre-cooked collision data. I'm not aware of any other single file solution that would not cause you a headache and time. There might be one, but I'm not aware of one....given that you're wanting to store that PhysX specific pre-cooked data. Without going this route, you might have to write your own custom binary format.

The *.zip file approach is nice because you can password protect it (even though it can be easily broken) and have fewer files to distribute. And, many graphics engines (such as Ogre and OpenSceneGraph) have built-in facilities for extracting resources directly out of zip files, e.g., you might not have to save the two embedded files to disk....just read their binary contents into memory from the *.zip and attach the binary data to a stream that you feed to Ogre/OpenSceneGraph/some other engine and to PhysX. Make sense?

Share this post


Link to post
Share on other sites
Sign in to follow this  

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