Sign in to follow this  
EmptyVoid

PhisX and Hight Mapping

Recommended Posts

EmptyVoid    102
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
grhodes_at_work    1385
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this