Jump to content
  • Advertisement
Sign in to follow this  
SuperFlanker

Ageia PhysX HeightField

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

I have got my paged terrain system working nicely and it looks real good visually but the problem is that its not interactive. So I'm trying to add some collision detection. I looked at PhysX because I heard the news that it got acquired by Nvidia so there must be something good there. I have tried 3 approaches to get my heightmaps working: 1) Derive a custom physic object from NxActor and NxHeightfield Didn't seem feasible because all NxActors seem to go through the NxPhysics and there seems to be no way for me to manage the bookeeping in the backend. 2) Create many small rectangular heightfield patches and update them accordingly. Unfortunately, I can't seem to find a way to dynamically update a heightfield object once it has been created. 3) Send the whole terrain to PhysX. I didn't invest too much time to this one to figure out it probably wouldn't work. I opened up the lesson 117 and increased the heightfield to 16k x16k CRASH. At 1024x1024 it works, but the FPS drops to < 1. So it appears I am going to have to do a lot more work to get this terrain "working." Right now I am seeing implementing my own terrain collision by reading back from PBO's and enumerating PhysX scene objects and applying forces. This sounds like a lot of work. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
The following thread on devsupport.ageia.com seems to answer your question:

Large outdoor terrains (You'll need to sign-in to view it)

It has been quite a while since I last used PhysX but I'd imagine any of the issues listed in that thread have since been ironed out in the newer SDKs.

Regards,
ViLiO

Share this post


Link to post
Share on other sites
Strange, the url itself is correct [dead]

Anyway, you should be able to locate the thread yourself by searching the ageia forums for "Large outdoor terrains".

On the subject of changing the heightfield lesson (I think it is lesson 118) so that it creates a heightfield of 1024x1024. You should indeed get pretty appalling performance doing that unless you'd also changed the size of the heightfield it creates to something much more large-scale on the XZ (1024x1024 in a 30x30 area is just ludicrous [smile]).

Even then 1024x1024 would probably not be a great size for a heightfield so you may want to split it up into smaller heightfield tiles so as they can be dismissed from collision during broadphase. This of course is a trade-off as the more tiles you create the more work you put on the broadphase so you will have to do some experimentation to find something that works well for your own scenes.

Not entirely sure what you mean by "dynamically update a heightfield object once it has been created". Are you referring to terrain deformation?

Regards,
ViLiO

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!