Hi, i'm posting here because the newton forums are restricted to non-free email addresses.
I've just about now added 340±10 newton bodies to my scene. They concist of compund collisions that are built of 5±3 collision primitives.
It's a scene where there are a lot of tables, chairs, forks/knifes, plates, books and pencils. In short a school resturant/cafeteria, with most of the stuff lying on tables, or otherwise stacked. A side note is that everything weights 10 and has these material settings:
0.15 ;Softness
0.05 ;Elasticity
0.75 ;Static Friction
0.5 ;Dynamic Friction
I don't really know what settings would be good, those are practically random values.
What framerates would you expect that this scene produces? I'm sitting on a core2duo@2.2 ghz, and i'm having around... 1 fps, sometimes 3.
I haven't worked with many bodies in newton before, so if anyone has any tips i'd greatly appreciate it. I'm thinking of things like changing the freeze threshold depending on fps and active bodies, or using some kind of collision LOD system, if that's possible.
Changing solver and friction modes is no option. If i do, things start to bounce out of control for no apparent reason.
Well, i hope i've made myself clear enough, otherwise i'll explain more =)
Lots of bodies in newton, performance<=ROUNDING_ERROR_64
Lots of bodies in newton, performance<=ROUNDING_ERROR_64
If you don't have anything nice to say, don't say anything at all.
Out of curiosity, what's the frame rate like if you don't render the objects?
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Since most of the scene starts static with object's bounding shapes are slightly intersecting each other newton isnt hibernating any of the objects even if you set a very extreme freeze threshold. Having all your objects so close to each other will make newton do the collsion checks for all of them every frame, hence without the fritcion everything flys every where because of the collsions happening all the time. If i were you i would start the whole scene with no physics then only switch on physics if the object needs to move(the object is approcahed by camera or other objects).
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Without friction? If you'r reffering to the material properties, what could be a good value?
If i only turn the objects on when something interacts with them(ie. starts as frozen bodies) things may look strange and behave like mines; when you tuch them, they'll 'explode' ;P Thanks for the hint though, i'll think more about this.
If i only turn the objects on when something interacts with them(ie. starts as frozen bodies) things may look strange and behave like mines; when you tuch them, they'll 'explode' ;P Thanks for the hint though, i'll think more about this.
If you don't have anything nice to say, don't say anything at all.
The problem is your scene is ready to explode!(most physics engine use this hack where if two objects intersect each other the bouance in oppsoite directions so they dont look weird, its to do with how the time steps for collsion are too slow compared to the positions calculated by the basic equations of motion) The friction you are adding just glues the scene together. It a problem of object placement rather than anything else.
Place stuff so their BBboxes dont intesect, let gravity pull the forks down etc... that way things wont explode. If you look in games they always spawn objects above ground do prevent this explosion from happening.
Place stuff so their BBboxes dont intesect, let gravity pull the forks down etc... that way things wont explode. If you look in games they always spawn objects above ground do prevent this explosion from happening.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
I've been messing around all day trying to do something about it. Even when i freexe objects on creation and activate them when they are interacted with the framerates are way to low. Now the code is messed up and even uglier than before, and the project seems to be beyond all hope of salvation.
At least for now. I'll check again tomorrow and see if i can fix it somehow.
At least for now. I'll check again tomorrow and see if i can fix it somehow.
If you don't have anything nice to say, don't say anything at all.
Are you sure objects aren't starting off interpenetrating? Newton will make lots of callbacks which, if you don't resolve at the first callback, will just happen again next frame.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
How do you mean, resolve at first callback?
I remade my compund collisions. They are now much simpler, the average primitive count for on cc is now around 1.3. I also don't make compund collisions from just one collision anylonger, and that things improved a lot.
I also freeze my objects on creation now. And i won't reposition my nodes, at least not in the .irr, that'd take years.
I remade my compund collisions. They are now much simpler, the average primitive count for on cc is now around 1.3. I also don't make compund collisions from just one collision anylonger, and that things improved a lot.
I also freeze my objects on creation now. And i won't reposition my nodes, at least not in the .irr, that'd take years.
If you don't have anything nice to say, don't say anything at all.