Tuesday, 10 November 2015

Branch Joints - part 1

Branching joints is a topic I've been interested in for a while. In researching this area I've read a variety of techniques, each having interesting ideas in their own right but not altogether robust solutions for my needs.

Recently I came across a great article which presents a pro/cons and comparison of the various techniques, then presents a different and more robust branch joint solution. Basically the key realisation is that the problem can be boiled down to 2 main areas convex hull construction and subdivision loop method.

Procedural Tree Generation: Modelling Branching Structures as Subdivision Surfaces

The following proof of concept demonstrates a trivial case for performing branching joints

In order to test the join process, firstly copying Tubes of various size and resolution to Tetrahedron points resulting in the above geometry

The tubes are Mesh geometry not polygons, this allows to carve off the end edge loops
Number simply illustrate that each has different point counts

 Tetrahedralize SOP is used to generate a convex hull geometry

The convex hull creates geometry superfluous to need, which can be rectified by taking the dot product of the primitive normals of the convex hull source geometry and convex hull itself
Geometry can be removed where it satisfies certain criteria produced by the dot product

Merging tubes with convex hull, perform cleaning with PolyDoctor SOP correct winding of polygons and creating vertex normals

Finally a Subdivision SOP using the method of OpenSubDiv Loop generates the best results, others cause rippling effects