Implicit Surface
Introduction
Implicit surfaces define shapes as level-sets of a scalar field: the surface is formed where the mathematical function $f(x,y,z) = 0$. Unlike parametric surfaces which map a 2D grid to 3D, implicit surfaces define a volume where different shapes can naturally blend together, producing liquid-like or organic forms (metaballs).
Purpose of this guide: Help users understand the UI options, common usage patterns, and performance pitfalls for creating polished renders.
Interface Overview
Controls are organized into four main panels in the Inspector (right sidebar):
- Geometry: Define the implicit function $f(x,y,z)$ and spatial transform.
- Parameters: Define custom constants (e.g.,
r,t) to control the shape dynamically. - Settings: Configure the sampling domain (bounds), resolution (voxels), and rendering style.
- Appearance: Control visual style (dots, lines, colors).
Configuration Details
1. Geometry (Shape Definition)
- Equations:
f(x,y,z): The scalar field expression. The surface is drawn where this value equals 0.- Supports standard math functions (
sin,cos,sqrt, etc.). - Example (Sphere):
x*x + y*y + z*z - r*r
- Transform:
scale_x/y/z: Multipliers for the final coordinates.offset_x/y/z: Translation of the entire surface.
2. Parameters
- Define custom variables here.
- Use these variables inside your
f(x,y,z)equation. Changing values here updates the shape in real-time.
3. Settings (Domain & Resolution)
- Bounds (Sampling Region):
x_min,x_max,y_min,y_max,z_min,z_max: Defines the 3D box in which the function is evaluated. Parts of the surface outside this box will be cut off.
- Resolution:
x_seg,y_seg,z_seg: The number of voxels (grid cells) along each axis.- Performance Warning: The total number of voxels is $x \times y \times z$. Doubling all three dimensions increases the workload by $8\times$. Start low (e.g., 60) and increase for final quality.
- Render Mode:
- PREVIEW: Renders a cloud of points on the surface. Fast and good for adjusting the shape.
- WIREFRAME: Renders the polygon mesh edges. Useful for seeing the topology.
- SOLID: Renders a solid surface with lighting. Best for final output.
- Threshold:
iso_threshold: The tolerance for the surface definition. In some algorithms (like Marching Cubes), this defines the "thickness" or sensitivity of the zero-crossing detection.
4. Appearance
- Style:
dot_size: Size of the points in PREVIEW mode.line_weight: Thickness of the lines in WIREFRAME mode.
- Palette:
- Manage colors for the surface. In PREVIEW mode, points are colored based on their position or index.
- Note: Trails are not supported for Implicit Surfaces as the topology changes dynamically.
Performance & Best Practices
| Goal | Recommended Settings |
|---|---|
| Quick Editing | PREVIEW mode. segments ~40-60. |
| High Quality Render | SOLID mode. segments 100-150. |
| Organic Blending | Ensure the Bounds cover all interacting objects. |
| Sharp Details | Increase segments (resolution) but watch memory usage. |
Troubleshooting:
- Empty Scene:
- Check Bounds: Is your shape inside the
min/maxrange? - Check Equation: Does $f(x,y,z)=0$ have a solution? (e.g.,
x*x + 1is never 0).
- Check Bounds: Is your shape inside the
- Slow Performance:
- Reduce
x/y/z_seg. A resolution of 200x200x200 creates 8 million voxels, which is very heavy.
- Reduce
- Clipped Shape: Expand the
x/y/z_minormaxvalues.
