## Newton physics in a huge world, performance/memory?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

### Newton physics in a huge world, performance/memory?

Hi,

I'm making the physics module for my engine with Newton now, and I need your help with some decisions.

The game I'm making possibly gets 1 large world, instead being divided into small chunks/levels. To make things worse, other characters on the other side of the world should be able to use physics as well. The good news is that there won't be much objects/physics active at the same time. Yet this brings a couple of performance/memory questions. First of all, is it possible to create a world of, let's say 5x5 km, with a couple of million polygons for the static world? The static world is a giant mesh like a Halflife world (not a heightMap terrain). Could anyone roughly indicate how much memory I would need for such a big world? And does it bring performane issues?

Second, this world also gets lots of dynamic objects of course. Bottles, barrels, tables, etc. Many of them can do with simple collision volumes (box/cylinder), but there are also more complex shapes that might require joints, compounds or convex hulls. I could simply create a Newton body for all objects in the entire world, and set them asleep until something hits them. How much memory would 1 million box objects take? And how about 1 million convex hull objects that have ~300 points? And again, does it bring additional problems, having so many physics objects activated?

Instead of creating a body for each and every object, I could also assign physics only when needed. I mean, 99,9% of the objects will sleep and might never get touched at all. On the other hand, I'm afraid its not so easy to assign physics when needed. First of all I would need a second collision detection system detects when 2 objects come close to each other. Second, is it difficult to (re)activate a complex body such as a ragdoll? And last but not least, assigning and deleting Newton bodies the whole time might take some time as well...

Anyone experience with a big object count? I wonder for example how they manage physics in a game such as Crysis or Farcry2 where thousands of palmtrees can get physics when being shot or collide with another object...

Greetings,
Rick
Spek

Posts: 66
Joined: Sat Oct 04, 2008 8:54 am