Worklog for Leon Drake
Csg Lib Bmax
Return to Worklogs
| ||
Fixed Clipping Issues. Depreciated Dynamic Flag. Now performs CSG fast and efficiently. get the module here http://www.vigilart.com/vas.csg.zip http://www.endsoflegend.com |
| ||
As you can see here i got successful boolean operations running, however i still have a few things to iron out. primarily, i think i may have made a typo when checking if the Face collides with another face. thus it seems to be turning true for everything and all the edges are getting split. see in the wire frame. Low poly convex meshes seem to work fine, however when i try to use something with a higher polycount, like this sphere i get some holes, which will suck for shadow systems. At anyrate i hopefully should have most of this ready soon enough. http://www.endsoflegend.com |
| ||
Tried testing it late last night. found a couple bugs i need to iron
out. nothing too major. But im tired and the weekend is over. may have
to wait. http://www.endsoflegend.com |
| ||
Made the methods to mark faces, i set it so you can request the list of
faces in a solid and set a Bool on request. this makes a quick an easy
way to switch a union solid to a intersection solid with no rerendering
of 3d maths. This can be useful for realtime provided that the solid you
are rebuilding isnt too horribly complex. Next onto Making methods for returning Visible Faces and occlude invisible ones. I should be able to show a screenshot after i get this part done. http://www.endsoflegend.com |
| ||
Down to the Point of Splitting Faces, Then its just a Matter of making a
function to return a list of Final Rendered Faces which occludes faces
that dont need to be drawn. the cool part is you could simply change the
bool of a Solid and re-request the Face list and get an entirely
different scene with no math changes. meaning it would be Quick to
change a Union Boolean to an Intersection Boolean and rebuild it in
realtime. Would be cool for like a wall you want to disappear or preset holes that can be blown out. http://www.endsoflegend.com |
| ||
Progress Report. I decided to make this a Module, since its pretty big so far and it uses nothing but types and methods to perform all CSG routines. This lib is not dependent on any 3d library, you simply have to pass the model info to the Solid type. Basically you create a World type which is a workspace for your solids. You have to add a solid to the main solid in the world. e.g. main:Solid.addsolid(newsolid:Solid,Flag=BOOL_SUB) this adds a new solid to the world in a stack with a boolean representing which action the solid needs to take after a solid is added, you will be able to access which solids the new solid affected, by going SolidList:Tlist = newsolid:Solid.Changedlist() you can then go through the list and rebuild a new mesh for each solid that was changed. If you need to move a previously added solid, all you have to do is do a World rebuild newlist:Tlist = Myworld:World.Rebuildall() which then returns a list of the Solids rebuilt. you can add multiple worlds so Solids from one world do not affect solids from another. Also you can Add a solid with Children solids to a World. this will allow you to utilize concave brushes to do Boolean routines to solids. this follows an order in which things were added. so a Subtraction brush will be ingnored if it Before a union brush was added. this way previous subtraction brushes wont carve newly added intersecting union brushes. http://www.endsoflegend.com |