4 years, 3 months, 16 days

I got out of the rhythm of blogging and was always waiting for my current little batch of tasks to be done with.

So for the last month, I have been focusing on creating a polyhedral previewer of the actual robust modelling kernel. Using the intermediate data generated from the robust plane and fixed point math to give the previewer some good data to work with and be able to give a good view of what each operation will actually do to the geometry.

After putting all my triangles in an AABVH, I do a broad-sweep collision to collect all of the possible colliding triangles. The narrow phase relies on a library called the libfbi that is based on a rather efficient way of finding intersection pairs of boxes with segment and interval trees. Every intersection in that phase is then tested with an actual triangle to triangle intersection test to narrow down the collision group to only the parts that are touching.

The results of the test I store in an integer buffer the size of the triangle count of both models, and prime it with -2. Which I chose to mean, outside of other test model. -1 is for a part that was part of the initial broad-phase but failed the triangle intersection test. A positive number would mean that there was an intersection between triangles, and the index will point to a result set of other integers that store the overlapping triangle indices.

With that data set I can then easily throw the -1 triangle classifications into the bsp trees to classify if it is in or outside of the model, slice up the rest of the polygons that are intersecting and testing the center of each against the bsp tree to get the in and out classification and be able to collect the in and out bits into their boolean parts.

This is allowing me to preview the boolean operation between two 4196 triangle models in interactive frame rates. 20 – 50 fps on my local machine.

Trying to clean this up now and turn it into a usable API to plug into my editor.

My Trello board has a few tasks to focus on after that. Bugs, adding a couple of commands into my builder and adding some nominal support for iso surfaces with marching cubes libraries and then focusing on application features.

Vubb Vubb.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s