3D building (portal based occlusion culling + bsp)

4,282
0
Published 2022-03-25
Controls are in the project
"make new" button is interesting. try it
If you are using turbowarp create 20x20x20 worlds or bigger. Default is 10x10x10 because on scratch lists can't have more than 200000 elements

This project has:
- adjacent squares merging in efficient way
- binary space partitioning (it uses bruteforce method to find the most optimal division planes and bsp is only recalculated when something changes)
- portal based occlusion culling (it can efficiently determine what polygons are visible and draws only them. Press R to see how it works)

This project isn't a simple grid traversal algorithm. It can handle large rooms without lag since it (mostly) doesn't need to process empty space.

Search keywords:
portal based occlusion culling portal occlusion culling portal culling portal frustum culling bsp binary space partitioning 3D engine 3D demo