Max sphere density in a certain area
Max sphere density in a certain area
What is the maximum sphere density that will cause the game to lag? In building a rideable parking deck, it's gonna have about 680,000 spheres of radius .5. The structure is 200ft LxWxH. I made collision for only the bottom portion of about 16,000 spheres and it led to an unplayable framerate. There could be a chance that I had spheres overlapping as I did it kind of quickly, but I'd just like to know what kind of a limit there is. Thanks
Re: Max sphere density in a certain area
Ive had lag at 10000 spheres. Depends on the computer really.
You will never get 618000 spheres to work, unless you are really patient. That is why we need mesh collisions
You will never get 618000 spheres to work, unless you are really patient. That is why we need mesh collisions
Re: Max sphere density in a certain area
There is one bounding sphere for each object, which shares the same center as the object. Once a bike is inside the bounding sphere, all the spheres for that object are tested against the bike on each step. If you want to speed it up, break the object up into several objects. For example, if you have a 100x100 square, it will have to test against 10000 spheres per step when inside the bounds test. If you broke it up into a 10x10 grid of 10x10 sphere objects, it would only have to test against the 100 bounding spheres and then the 100 spheres for the object itself when inside the bounding sphere.
I probably should do the mesh collisions for ramps and bridges, but for most stuff the spheres are good enough and way more efficient. The torus vs triangle test for the wheels is pretty slow.
I probably should do the mesh collisions for ramps and bridges, but for most stuff the spheres are good enough and way more efficient. The torus vs triangle test for the wheels is pretty slow.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.