vas.csg CSG mod for Bmax (WIP Release)

BlitzMax Forums/BlitzMax Programming/vas.csg CSG mod for Bmax (WIP Release)

Leon Drake(Posted 2007) [#1]
***********************************************************
UPDATED

v0.63b

Depreciated Dynamic flag. it's still there but wont change anything. Now it cuts more efficiently and Quickly
Performed 4 Brush cuts in 569 milliseconds
Average 142 milliseconds per brush. Not too shabby i think.

that was with 3 cubes and one 8 sided cylinder.


download it here
http://www.vigilart.com/vas.csg.zip


klepto2(Posted 2007) [#2]
To be honest. I have problems converting it to miniB3D. Unfortunatly your mod uses the same types as miniB3D (TSurface and TBrush), well I have renamed them but now I have a problem
to extract what is a real b3d Surface and what is a CSG Surface or brush. Maybe you could document it a bit more or change your Types to something like TCSGBrush and TCSGSurface?

thx for sharing this niche piece of code.


Leon Drake(Posted 2007) [#3]
oy i had no idea, i haven't actually downloaded MiniB3d yet. this is still a WIP so I'll finish documenting it and stuff and get an update thats compatible with MiniB3d


Leon Drake(Posted 2007) [#4]
Ok i just uploaded an update to the same url

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

Now Modified it to be completely compadible with MiniB3d

Fully Documented the Commands. And added a Minib3d Example.


Leon Drake(Posted 2007) [#5]
here is a shot of the module at work in Minib3d




Leon Drake(Posted 2007) [#6]
crap i got some issues if you add a sub prior to an Union and its coplanar it kills the triangles of the sub, ergh.

oh well this is a WIP, i also need to get the speed issues out. But i did get it to cut fine with high poly brushes now but i need to get it to speed the process up a bit.


_33(Posted 2007) [#7]
Inline assembler, SSE instructions :P

But personally, I don't have those skills yet.


Leon Drake(Posted 2007) [#8]
Ok just fixed some issues where brushes were not being clipped properly in some situations, just so you know Difference brushes are currently disabled. Until i'm able to integrate it in properly. Also Shared Faces are not clipped, so if you wish them to be you may need to carve a hole through it or move the brush over just enough so it gets clipped.

Also i got it to speed up, not much but a bit, using CreateSphere(8) on Minib3d or B3dsdk do not cause gaps, however high poly brushes run a bit slow, especially if they intersect more than one brush. you can get the update here

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


Leon Drake(Posted 2007) [#9]
I goofed on a Variable, now stuff is getting clipped properly. already updated the file on the link above.

Here is my module in action in my editor im developing.




Leon Drake(Posted 2007) [#10]
updated see first post.


_33(Posted 2007) [#11]
Big thumbs up!


Leon Drake(Posted 2007) [#12]
Ok got another release i should be uploading tonight. this one has commands for vertex color light mapping. Nothing spectacular just maps the vertex colors based on lights you can add to the World type. Also fixed some issues using multisurfaced brushes.


JA2(Posted 2008) [#13]
What became of this? Does anyone still have the files? :-)