Gestalt on 30/11/2005 at 04:23
My god, it's full of crates.
I wait patiently for the day when my FM idea "The Battle for Crate Mountain" will be feasible. I guess this means there's no hardcoded limit for how many physics objects can be used in a level?
Komag on 30/11/2005 at 04:37
There probably is some limit, but it might be crazy high like a million or something, or perhaps as low as 4k or 16k or something.
Komag on 30/11/2005 at 05:18
Okay, I tried on my home desktop and it ran about the same, 1 fps, so it seems it's mostly processor dependent (or perhaps engine dependent, but I hope not) because my desktop processor is only marginally better than the laptop, an AMD Ahtlon XP 2500+ 1.84 ghz, with 1gig RAM.
Then, I doubled the boxes to 2400, and it still ran without any crash, but completely brought my computer with it's Geforce 6800 to it's knees. It was quite literally a slideshow, about 5-10 seconds per frame. It took about 20 minutes for the crates to fall down. But hey, it still works!
One of the interesting variables is that before I started the tumble, if I looked away from the crates toward the other blank wall, I got great fps. But during the tumble, if I looked at the wall I still got bad fps (this was during the 1200 crates run), and after the tumble I still got bad fps. So apparantly the engine is still calculating all the boxes that are lying on each other all crooked and trying to settle.
OR, the engine just plain doesn't calculate any physics for objects until they get disturbed at least once. And that may be the way it is, because I've noticed other objects at times slightly shifting or something after I move something near it or on top of it, etc.
Bardic on 30/11/2005 at 06:31
I like. but then you've probably seen my tests using 1600 chairs in T3ed and my 2000 chairs in the Doom editor.
There was some talk over on the doom forums, that physics are only calculated from the bottom object, so if you grab the box at the bottom of a stack, the one above it starts to fall, then the next one up, and so on. rather than picking up the box and the whole stack drops as 1.
Now you might also try it with all the crates, but with ambient turned up rather than a big light.
ProjectX on 30/11/2005 at 07:34
Quote Posted by Komag
OR, the engine just plain doesn't calculate any physics for objects until they get disturbed at least once. And that may be the way it is, because I've noticed other objects at times slightly shifting or something after I move something near it or on top of it, etc.
That's how it works, there's a setting in the properties that will make the engine CONSTANTLY check the physics of an object as well.
Bardic on 30/11/2005 at 07:50
Could you toggle that setting with a trigger script so that as the player walked away it could turn the physics back off?
Komag on 30/11/2005 at 14:41
I tried it after removing all lights and turning up the level properties ambient light. Before touching any crates, this helps TREMENDOUSLY! Before, I would get about 2-3 fps from the corner looking at all the stacks, now I get about 20 fps.
But triggering the tumble brings it down again to 1 fps!
After the tumble I used to get about 2-3 fps looking over the whole pile from the corner. After removing the lights I get 4-5 fps.
So I would say that if you have few or no shadowcasting lights, you can have a LOT of meshes on screen, so long as they don't have any physics :)
I'm going to try to see how far I can push it...
OrbWeaver on 30/11/2005 at 15:02
Meshes are cheap.
Shadowvolumes are expensive (CPU and GPU).
Additional lightvolumes/overdraw is expensive (GPU).
Physics is expensive (CPU).
Komag on 30/11/2005 at 15:45
Okay, I managed to crank it up to 10800 crates (three groups of 3600), still works fine, no crashes. With no lights, just ambient, I could look toward all 10k crates and I got about 2-3 fps. Then I start the tumble and the fps tanks as low as 1 frame per 30 seconds (I timed it with my watch). The whole thing took about 40 minutes to finish falling down.
So, to get 30 fps on that run I'd have to have a cpu that is rougly 900 times faster than current! And that's without any lighting!
I guess it will be a long time before we are playing Final Fantasy Spirits Within in real-time on our laptops (10-15 years?)