BspDemo way to load BSP is too slow for big world

Post Reply
labidus
Posts: 7
Joined: Sun Aug 25, 2013 12:40 am

BspDemo way to load BSP is too slow for big world

Post by labidus »

I have a map that contents 256000 brush sides (around 24000 brush), which mean a lot of vertices per hull static body. It take more then 2 minutes just to add the faces in bullet and after, its not usable, instead of having 500 FPS its drop to 6 FPS!

Is they are a way for the world to query static face needed for interaction with rigidbody? Lets say
I handle myself the BSP static world, just respond to bullet world for the needed normal for collision and physics? its possible?

That would resolve the loading time, since usually its take no time to load and the FPS will stay 500 FPS instead of 6 FPS!

6 FPS with no dynamic rigid body lol, its not really usefull
Sequence
Posts: 2
Joined: Tue Aug 27, 2013 9:46 pm

Re: BspDemo way to load BSP is too slow for big world

Post by Sequence »

I'm quite new, but I figure I'd try to help :D

Are you using AABB trees to split up the world? Are all of your colliders static? Forgive me if some of my suggestions are irrelevant, I don't know bullet too well at this point.
labidus
Posts: 7
Joined: Sun Aug 25, 2013 12:40 am

Re: BspDemo way to load BSP is too slow for big world

Post by labidus »

Yes all static

No i am using bt32BitAxisSweep3,
I need to use this one because to many bodies added or it crash with others.

I did not try the aabb one, I suppose I will get the same result. Anyway that not resolve the loading time (2 min)

Without that, just loading the map and I manage the BSP collision myself, it take 4 seconds to load (loading thread) and stay at 500 fps average...
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: BspDemo way to load BSP is too slow for big world

Post by MaxDZ8 »

Are you passing the correct world bounds? I had a similar problem in the past and it turned out a bug in my loader caused bullet to slow to a crawl like you describe.
labidus
Posts: 7
Joined: Sun Aug 25, 2013 12:40 am

Re: BspDemo way to load BSP is too slow for big world

Post by labidus »

yes,

i did not have problem at the beginning until i try a big map, i tested around 5 different maps but the one that is big is really pain.

right now, i stopped to use bullet for that reason, waiting 2 min is a no go first... Just handle the bsp myself, i wanted to use a physics engine but for bsp it is not working well, i found few bug with the convex hull body generated from a brush, which make some area of the map blocked, so basically the only way to have a 100% correct behavior is to use the real face or use the planes from the brush... but using the face can generate other issues that brush plane prevent to go, so you need to use the plane...

what is needed is some kind of brush shape with a aabbox, and when checking for collision, if a body touch a aabbox from a brush shape, check agains each planes from the shape (they are not triangle. just plane). its how a brush work
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: BspDemo way to load BSP is too slow for big world

Post by MaxDZ8 »

And this is how Bullet works - it makes AABBs out of everything in broadphase.
I suppose the BSP extraction is just brittle. I have dealt myself with brush extraction in the past and I can indeed understand it can be hard to get right. I always considered it a demo only, not for production uses.
In the end, I dropped BSPs altogether as the mangling involved produces brushes which are ill suited for collision purposes IMHO.
This is quite sad anyway!
Post Reply