MaxCollisions too high?
by Demolishun · in Torque Game Engine · 10/06/2006 (3:17 pm) · 10 replies
I am all for accuracy but 64 collisions I think is a bit high. If you get two objects intersecting too much the collision resolving bogs the engine to a crawl. Is there a specific reason it is so high? I am going to try testing with just 4 deep and see what happens.
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67
#2
10/06/2006 (4:15 pm)
I am talking about all objects that use CollisionList::MaxCollisions out of collision.h.
#3
10/06/2006 (4:30 pm)
How on earth can you make the engine crawl because of too many collisions? You gotta have a looooaaad of objects for that. Vehicles are a different story, they slow down for a bunch of other reasons.
#4
On the point of vehicles, why on earth does anybody need to handle 64 simulatneous collisions in one object? That is the point I am trying to understand. I mean how can 64 impulses be accurate?
10/06/2006 (7:46 pm)
If I put two objects into the engine without any physics so I can just place them in space the collisions go to max (64) for each object and the things get really slow. If I drop 50 objects from the air simulaneously with physics without checking if they are being spawned inside another object (kind of dumb, but illustrates the point) it gets really slow. I am going to modify the max collisions so that they remain where they are at, but allow a subclass to modify the max without breaking any other code. I will post my changes later. Also, I plan on having looooaaadsss of objects, so this is kind of important to me.On the point of vehicles, why on earth does anybody need to handle 64 simulatneous collisions in one object? That is the point I am trying to understand. I mean how can 64 impulses be accurate?
#5
Edit: That's alot of stuff. Stuff, stuffie stuff.
10/07/2006 (2:32 pm)
I'm going to back out of the discussion as I do not have enough experience with this kind of stuff :) Good luck with your stuff.Edit: That's alot of stuff. Stuff, stuffie stuff.
#6
Thanks
10/07/2006 (3:57 pm)
Ya, I reduced the number of collisions and it still slows to a crawl. So the number of collisions may have been so high because it really did not hurt the performance. Evidently there is something else slowing it down. Until I can get the profiler working I am just guessing.Thanks
#7
Wish I could help you with the profiler stuff. It just works here, perhaps there's something funky with the Linux version.
10/07/2006 (4:14 pm)
That's what I thought.Wish I could help you with the profiler stuff. It just works here, perhaps there's something funky with the Linux version.
#8
I just figured out the issue with the profiler. It was me trying to call profileDump before any data had been collected. It crashes the engine. Was able to reproduce under a clean copy of 1.4.2.
10/07/2006 (9:42 pm)
Stefan,I just figured out the issue with the profiler. It was me trying to call profileDump before any data had been collected. It crashes the engine. Was able to reproduce under a clean copy of 1.4.2.
#9
Thanks
10/08/2006 (9:31 pm)
Reducing max collisions will significantly speed up collision detection/response, but this is turning out to not be fast enough for me for the number of objects I want.Thanks
#10
10/09/2006 (9:37 am)
Too bad it was not enough. Thanks for the update on your issues with the profiler, I will put an if statement in our build to make sure that never happens. Good one.
Torque Owner Stefan Lundmark