Blitz Solid CSG

Archives Forums/Blitz3D SDK Programming/Blitz Solid CSG

Leon Drake(Posted 2007) [#1]
after a week of studying CSG operations i got it until i was trying to figure out how to do it with concave objects. I really couldn't figure it out. I was about to give up until it just clicked to use BSP CSG method and simply record brushes together whether they are union or intersection brushes, then just simply calculate the intersections and rebuild the mesh based upon the tree of union and intersection objects.

So in conclusion im working on a SolidCsg library using the BSP CSG method the unreal engine uses. I'll be posting up the source once its finished.


Leon Drake(Posted 2007) [#2]
forgot to mention ill make it so you can cut using concave brushes but it will be a tree of convex solids.

basically i perform Union on all Intersection nodes, but only perform intersection on all Previous Union Nodes. this way by placing a union brush on a intersection it wont get cut by a previous intersection brush.

I'll make it so you can move brushes and recarve it so if you didnt like the position of something you can recarve the scene so you dont have to do a bunch of undos to fix something.


Leon Drake(Posted 2007) [#3]
i'm posting progress reports to the worklogs area now.


Leon Drake(Posted 2007) [#4]
my worklog

http://www.blitzbasic.com/logs/userlog.php?log=1525&user=9295


Leon Drake(Posted 2007) [#5]
BTW the WIP module is ready, you can get it here


http://www.vigilart.com/vas.csg.zip

comes with a Blitz3dsdk example as well as a minib3d one.


Barnabius(Posted 2007) [#6]
Interesting. Will check it later. Thanks for sharing.

Barney