## Static models, few or many?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

### Static models, few or many?

Because of the way I load the maps in my new engine I can choose either to have many static mesh bodies or just few. Would it make a difference in terms of speed if I use 500 static mesh bodies on a map or just 10? Both alternatives will represent the same geometry. If there is a difference, how much?

Also is it faster to have 10 static bodies with one collision-shape each or 1 static body with a compound collision-shape built up of 10 collision-shapes?

Yezide

Posts: 173
Joined: Tue Oct 18, 2005 4:31 am

### Re: Static models, few or many?

Because of the way I load the maps in my new engine I can choose either to have many static mesh bodies or just few. Would it make a difference in terms of speed if I use 500 static mesh bodies on a map or just 10? Both alternatives will represent the same geometry. If there is a difference, how much?

Yes sure it have surely a difference, but the difference don't depending only from newton.

I can choose either to have many static mesh bodies or just few

If the 3d system can do the same tricking you can surely gain some ressources and speed.
It remember me a mesh Exemple 3ds save in multiple object or in only one,
the 3ds saved in multiple object normally cost more to render and consuming more ressources.
If you have 500 object it's sure that the system have 500 object in a list and you have 500 intances.
If you render 500 object it is surely more slow that render only 10.
It surely depending on the object sorting method too, from both engine.

About the other question i'm not so sure.
You search a nice physics solution, if you can read this message you're at the good place
OrionX3D Projects & Demos:

Dave Gravel

Posts: 725
Joined: Sat Apr 01, 2006 9:31 pm

### Re: Static models, few or many?

koom:
The number of physical bodies is not connected to the number of graphical objects. In fact I go to great lengths to combine objects to be able to batch as much as possible
The questions is now to what lengths I need to go when it comes to combining static physical bodies.

Yezide

Posts: 173
Joined: Tue Oct 18, 2005 4:31 am

### Re: Static models, few or many?

500 hunder object will sue more memory and will make teh engien do a lot of scen management work, for no reall payoff sinc eth bodies static.
The cost per static body is marginal but tryong to waster jsut because you can will not make mak eteh engioen any better.

I would use some kind of lose Grid to group then into a smallet set by proximity
Julio Jerez
Moderator

Posts: 11154
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

### Re: Static models, few or many?

I will do some combining then

Yezide

Posts: 173
Joined: Tue Oct 18, 2005 4:31 am