Axolotl 2.0

Axolotl 2.0: much faster meshing, conformal lattices, any Rhino geometry, new components and more

Axolotl 2.0, the next release of the SDF / implicit modelling plugin, is now available through the package manager. Here’s what changed.

Performance

  • Parallel, batched sampling. The grid is evaluated in 8×8×8 blocks across all cores. A union of 200 spheres on a 120³ grid went from 3.4 s to 10 ms, and a diamond lattice from 10 s to 0.3 s.
  • Interval arithmetic and pruning, following Matt Keeter’s work on libfive, MPR and Fidget [1–3]. Empty regions are skipped, and in each region the tree drops operands that can’t affect the result. A gyroid clipped by a small box is meshed while evaluating only 6% of the grid.
  • Sparse sampling for adaptive dual contouring: only blocks near the surface are stored. A 513³ gyroid takes 1.2 GB and 3.5 s instead of 3.5 GB and 7.7 s, and 1025³ grids are now possible.
  • Exact gradients through automatic differentiation, plus a bounding-box hierarchy for large unions, Voronoi and lattices.

New features

Meshing

  • Dual Contouring Adaptive places vertices with a QEF fit and simplifies with an octree [4], so the sharp edges and corners of CSG parts come out exact. The old version is now Dual Contouring Smooth, which is faster for organic shapes.
  • Manifold mesh option for both dual contouring components [5, 6]. On a thin gyroid shell, non-manifold edges dropped significantly and holes are reduced (examples to follow)
  • Marching cubes now outputs closed, welded meshes directly without calling CombineIdentical (much faster)

Rhino geometry

  • Distance Wrapper takes any geometry: points, curves, surfaces, Breps, SubDs, meshes or blocks. Spheres, boxes, cylinders and tori become exact primitives, 50–700× faster. Curves are exact. Everything else is meshed and signed with fast winding numbers [7], so leaky meshes still get a correct inside and outside. Open sheets such as terrain can be signed by side.
  • Sweep is now a path extrusion of a 2D profile. It can morph to an end profile and twist along the rail. The distance is exact, and it’s about 6× faster than before.

Blending

  • Fillet: a round or chamfered edge of constant size, whatever the angle between the two surfaces [19].
  • Gradient Blend: a bulge-free blend after Gourmel et al. [8]. Two crossing cylinders get a clean fillet and no bulge on top.
  • Smooth Union List has a new “Limit node bulge” option, which reduces the extra material at lattice nodes.

Lattices

  • Conformal lattices: the new Cylindrical, Spherical, Graded, Surface Shell, Two-Surface and Curve Tube maps, used through Mapped, wrap any TPMS or lattice around a body without seams [9–11]. Background reading is in [12–14].
  • 45 TPMS types, up from 14. The new ones include complementary, double and tubular variants and the Bionic Bone surfaces, ported from @corax with formulas after Jürgen Meier [15]. All of them support pruning and exact normals.
  • Graph Lattice: turns any set of lines or curves into a strut lattice with tapered struts and smooth nodes. Feed it a Ramp for a graded lattice.

Modelling

  • 25 new primitives and modifiers from Inigo Quilez [16]: Box Frame, Link, Pyramid, 2D profiles with Extrude and Revolve, Elongate, Mirror, Bend, XOR and more. Cone and Ellipsoid get exact distances [17].
  • Fields as inputs: Shell, Smooth Union, Lattice, Add, Mult and the new Div accept a number or a field. They pair with the new Remap and Ramp components.
  • Distance objects now have a BoundingBox: used to make parsing faster, but can also be used as input to all meshing components to only query the part of space actually containing objects. In combination with VoxelSize it can be used to determine NX, NY and NZ for equal voxel edge lengths.

Scripting

  • An Sdf class with operators in the style of Michael Fogleman’s sdf library [18], e.g. ((sphere(10) & box(15)) - c).k(1.5), for Python 3 and C# scripting components.
  • An Expression component in 6 Math that builds a field from text (e.g. panel input). It also takes plain formulas in x, y, z, such as sin(x) + cos(y) + sin(z) or 0.8 * sphere(10) + sin(z). Your own signed distance function becomes an Axolotl DistanceObject to work with and combine with any other.

Fixes

  • Blur is a real 3D Gaussian now; it used to be about 19× too large.
  • Arrays take all neighbouring copies into account, so shapes no longer get cut off at cell borders.
  • Marching Tetrahedra respects the isovalue.
  • An endless loop in Ray is fixed, and Levelset is correct inside objects.
  • No more NaN or crashes for zero radii or empty inputs; you get clear error messages instead.

Usability

  • Typed parameters and rewritten descriptions (tool tips and help) for all ~125 components. With this, you (and your agents) understand better what the components need, do and return.
  • Inputs are renamed to A/B, some typos fixed, some new and some placeholder icons.
  • Redundant components are hidden but still open in old files: TPMS P/S/D, Polar Lattice, Polarize, Sum, the old Sweep and Wrapper, and others.
  • For plugin authors working with or building on top of Axolotl, the next post in this thread documents the new interfaces and APIs.

Breaking changes

  • Array Limited makes exactly N copies (it used to make N+1). Array and ArrayPolar now also check neighboring cells (exact mode) to avoid clipping at the cell border
  • Gradient Vector points outward.
  • Blur values are different.

Feedback and test files are very welcome! I will post more screenshots with example files in the coming weeks. Make sure automatic updates are enabled in your Rhino package manager to always have the latest version (food4rhino is updated more sporadically).


References

  1. libfive, M. Keeter: https://libfive.com/
  2. Keeter 2020, Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces: Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces
  3. Fidget, M. Keeter: Fidget
  4. Ju, Losasso, Schaefer, Warren 2002, Dual Contouring of Hermite Data: https://doi.org/10.1145/566654.566586
  5. Schaefer, Ju, Warren 2007, Manifold Dual Contouring: https://doi.org/10.1109/TVCG.2007.1012
  6. Nielson 2004, Dual Marching Cubes: https://doi.org/10.1109/VISUAL.2004.28
  7. Barill, Dickson, Schmidt, Levin, Jacobson 2018, Fast Winding Numbers for Soups and Clouds: Fast Winding Numbers for Soups and Clouds
  8. Gourmel, Barthe, Cani, Wyvill et al. 2013, A Gradient-Based Implicit Blend: https://hal-univ-tlse3.archives-ouvertes.fr/hal-00753246
  9. Wang, Jüttler, Zheng, Liu 2008, Computation of Rotation Minimizing Frames: https://doi.org/10.1145/1330511.1330513
  10. Taubin 1994, Distance Approximations for Rasterizing Implicit Curves: https://doi.org/10.1145/174462.174531
  11. Bernhard et al. 2021, Performative Porosity (IASS): https://psl.design.upenn.edu/wp-content/uploads/2021/08/BERNHARD_IASS_2021_Performative-Porosity.pdf
  12. Hong, Antolin, Elber, Kim 2024, implicit graded conforming microstructures: https://doi.org/10.1111/cgf.15224
  13. Groen, Stutz, Aage, Bærentzen, Sigmund 2020, de-homogenisation: https://doi.org/10.1016/j.cma.2020.112979
  14. Tricard et al. 2020, Freely Orientable Microstructures: https://doi.org/10.1145/3414685.3417790
  15. Jürgen Meier, minimal surfaces: http://3d-meier.de/
  16. Inigo Quilez, distance functions: Inigo Quilez :: computer graphics, maths, shaders, fractals, demoscene and Inigo Quilez :: computer graphics, maths, shaders, fractals, demoscene
  17. D. Eberly, Distance from a Point to an Ellipse, an Ellipsoid, or a Hyperellipsoid: https://www.geometrictools.com/Documentation/DistancePointEllipseEllipsoid.pdf
  18. Michael Fogleman, sdf: GitHub - fogleman/sdf: Simple SDF mesh generation in Python · GitHub and Michael Fogleman: SDF Modeling
  19. Blake Courter: Blake Courter on X: "Following up from yesterday here's how to make a constant-width chamfer using implicit modeling. Images are from @nTopology. (1/n)" / X

it is only tested on mac so far, runs in both rhino 8 and beta. tests on windows systems are underway, let me know if you find any bugs or problems. a port to grasshopper2 will probably also eventually follow, no timeline yet

Axolotl for plugin developers

As promised in my previous post, here is the README: worbit.github.io/Axolotl/dev

Showcase

I tested the AI functionality in Rhino 9[1] and asked it to create some showcases for Axolotl. I asked for an architectural structure (pavilion), a consumer product (speaker) and a vehicle (pedal boat). The results look a bit gimmicky but quite impressive, as they take a single (short) prompt and are completely modelled with Axolotl components, using almost all of them, sometimes in ways I never even imagined. The results are composed of several million triangles and take only a few seconds to generate.
The definitions are attached below. They give a good overview of what Axolotl can do and how the components can be combined. With several hundred components, they can be a bit overwhelming at first. I will post more focused definitions, that hightlight specific functionalities.

Axolotl2_Showcase_Pavilion.gh (69.1 KB)
Axolotl2_Showcase_PedalBoat.gh (41.8 KB)
Axolotl2_Showcase_Speaker.gh (49.8 KB)


  1. ↩︎

Expression Component


Here is an example use of the Expression component from the Math tab (still awaiting a proper icon). It parses text text input from the panel on the left and constructs the SDF objects and CSG tree. Instead of objects (cylinder, box, etc.), you can also write your own signed distance function. It accepts a variety of math expressions. Hover over the component to see a full list and description. If you write e.g. cos(x)+cos(y)+cos(z), you will get a Schwarz P triply periodic minimal surface (TPMS). You can also add more input variables to the component (zoom in and click the +), then use them in the expression. An example for this is contained in the .gh definition below.
The component and the example are heavily inspired by Michael Fogleman’s sdf project. I love the simplicity of his notation, and it shows how – with a very lightweight notation – shapes can be calculated instead of constructed.

Axolotl_Expression.gh (17.3 KB)

Rhino Geometry to Axolotl Distance Object


Turn a Rhino or Grasshopper mesh with holes (left, blue) into a solid Axolotl distance object (right, pink) using the Distance Wrapper component in the 2 Geometry tab.
The mesh in the example only has holes (17%), not a real messy triangle soup with self-intersections, non-manifold edges and whatnot. For open meshes, Axolotl tries to figure out inside/outside using the winding number. If this fails, it will still give a valid distance object, 0 at the mesh surface, positive distance everywhere else. By subtracting half the desired thickness, this can still be turned into a solid shell and used in a CSG tree with all the other Axolotl objects. :squid:

Axolotl_Rhino2SDF.gh (11.0 KB)

Conformal Lattices


One big new thing in Axolotl is all the new (and old) ways to make a custom – Mapped – coordinate system, especially for lattices like trusses and TPMS. These can be cylindrical, spherical, along a surface (banner image of this post) or the often-requested conformal mapping between two NURBS-surfaces.
Left shows the conformal lattice (Diamond TPMS) where the doubly curved surface cuts through the TPMS at the straight diagonals everywhere. Right shows the same volume intersecting a regular, undistorted TPMS.

Axolotl_ConformalLattice.gh (19.2 KB)