ScratchData LogoScratchData
Back to Coolaction's profile

3D Binary Space Partitioning

COCoolaction•Created February 13, 2024
3D Binary Space Partitioning
42
29
535 views
View on Scratch

Description

edit: https://scratch.mit.edu/projects/969488331/ is a massively improved version (bsp is faster, way fewer triangles means much better performance, bug fixes, basically just better in every way) obligatory credit to @tsf70 and @Kryptoscratcher for the triangle filler, @TheGreenFlash for the rotation matrix, and also everyone in 3DGaS i harassed by violently screwing up the code in General lol Completely identical to 2D BSP except for the fact it's in 3 dimensions (mind blown) - basically just an equation to find which side of a plane something's on (as opposed to a line) and splitting another plane accordingly. I also switched from quads to tris because I hate quads and tris were (apparently) much easier and less redundant. Unfortunately that means this thing runs at like half speed bc of how many extra splits there are with tris ideally i will make n-gonal (consolidate all triangles on a plane for maximum rendering efficiency, pretty much, the best way to do basic BSP) next then maybe start on a game using it there's also a glitch that for the life of me i cannot figure out the cause, i'm 99% sure that it's when inexplicably a triangle is created with all three of the same points and azex draws a line from that point to 0,0 for some reason i'm extremely confused and unable to replicate it

Project Details

Project ID965644684
CreatedFebruary 13, 2024
Last ModifiedMarch 7, 2024
SharedFebruary 13, 2024
Visibilityvisible
CommentsAllowed