Skip to main content

Creating 3D Surface Models

Surface models represent the boundary of segmented structures as triangle meshes. These meshes enable high-quality 3D visualization, export for 3D printing, CAD integration, and further geometric analysis. This tutorial covers the workflow from mask to polished surface model.

Estimated time: 25 minutes

Prerequisites:

  • Completed segmentation tutorials
  • A refined mask ready for surface generation
Medical Disclaimer

Surface models derived from medical imaging should be reviewed by qualified professionals before clinical or manufacturing use. The accuracy of derived models depends on image quality and segmentation precision.


Understanding Surface Meshes

A surface mesh consists of:

  • Vertices — Points in 3D space
  • Triangles (Faces) — Polygons connecting three vertices
  • Edges — Line segments connecting vertices
  • Normals — Vectors indicating face orientation

Surface quality is characterized by:

  • Triangle count — More triangles = finer detail but larger files
  • Triangle quality — Well-shaped triangles process better
  • Watertightness — Closed surfaces with no holes
  • Manifold topology — Each edge shared by exactly two faces

Generating Surfaces from Masks

Using Mask To Surface

The primary tool for converting segmentation masks into triangle mesh surfaces:

  1. Select the mask in the Object Browser (or it will process the active mask).
  2. Navigate to Segmentation → Convert → Mask To Surface.
  3. The Mask To Surface panel opens with configuration options.

Quality Presets

Choose a quality level that balances mesh quality and processing time:

PresetQualityUse Case
OptimalBest quality, full resolutionFinal publication-ready models
HighHigh quality with minimal optimizationHigh-fidelity visualization
MediumBalanced quality and performanceMost general-purpose applications
LowLower quality, faster processingQuick previews and real-time visualization
CustomManual parameter controlFine-tuned optimization

Select a preset or choose Custom for full control over individual parameters.

Configuration Options (Custom Quality)

When using Custom quality, you can configure:

Resolution Reduction (Optional)

Reduce mesh complexity before surface generation:

  • XY resolution — Reduction factor in XY plane (1× to 999999999×)
  • Z resolution — Reduction factor in Z direction (1× to 999999999×)

Useful for very large masks to improve performance.

Filter Shells (Optional)

Remove small disconnected components:

  • Number of largest shells — Retain only the largest N shells by area (1 to 999999999)

Helps eliminate noise and isolated fragments.

Smoothing (Optional)

Polish the surface mesh:

ParameterDescription
IterationsNumber of smoothing passes (10-9999, default: 20)
Smooth factorSmoothing strength where lower = more smoothing (0.000-1.000, default: 0.010)
Feature angle (°)Threshold for edge sharpness; small values preserve features, higher values smooth more (0°-90°, default: 85°)

Higher iterations and lower factor values produce smoother surfaces but may lose detail.

Triangle Reduction (Optional)

Reduce the polygon count for smaller file sizes:

  • Reduction percent (%) — Target reduction (1%-99%, default: 50%)

A 50% reduction removes half the triangles while maintaining overall geometry.

Target Objects

Select which masks to convert:

  • Active mask — The currently selected mask only
  • Selected masks — All masks selected in Object Browser
  • Visible masks — All masks currently visible in views
  • All masks — Every mask in the project
  • 3D preview of visible mask object(s) — Use pre-calculated 3D preview meshes (faster)

Step-by-Step Workflow

  1. Select target mask(s) in Object Browser or use the dropdown.
  2. Choose Quality:
    • For final output: Select Optimal or High
    • For quick preview: Select Low or Medium
    • For custom tuning: Select Custom
  3. If using Custom quality:
    • Enable Resolution Reduction if mask is very large
    • Enable Filter Shells to remove disconnected noise
    • Enable Smoothing to polish boundaries (typical: 20 iterations, 0.050 factor)
    • Enable Triangle Reduction to reduce file size (typical: 50%)
  4. Click Apply to generate the surface mesh.
  5. Review the result:
    • New surface object appears in Object Browser
    • 3D view shows the generated mesh
    • Rotate and inspect from multiple angles

Surface Quality vs. Performance

ConsiderationImpact
Triangle countAffects file size and rendering speed
Smoothing iterationsHigher = smoother surface, slower generation
Decimation (reduction)Higher % = smaller files, less detail
Resolution reductionLower resolution = faster processing
Quality Guidance

For 3D printing: Use Optimal quality with minimal decimation. For web visualization: Use Medium with 50-75% decimation. For real-time VR: Use Low with 75-90% decimation.

Post-Processing Surfaces

After initial generation, consider applying additional surface operations:

  1. Smooth (Surface → Smooth) — Additional smoothing iterations
  2. Reduce (Surface → Reduce) — Further polygon reduction
  3. Remesh (Surface → Remesh) — Improve triangle quality
  4. Fill Holes (Surface → Fill Holes) — Close any remaining gaps
  5. Diagnostics and Fixes (Surface → Diagnostics and Fixes) — Check and repair mesh integrity

These tools are available in the Surface tab of the ribbon.


Surface Optimization

After generation, surfaces often benefit from additional processing.

Smoothing Surfaces

Reduce surface noise and improve appearance:

  1. Select the surface.
  2. Navigate to Surface → Edit → Smooth.
  3. Configure:
    • Smoothing method — Basic (Laplacian) or Smart (Windowed Sinc)
    • Iterations — Number of smoothing passes
    • Relaxation factor — Smoothing strength
  4. Click Apply.
AlgorithmCharacteristics
BasicFast, may cause shrinkage
Windowed SincHigh-quality, preserves features

Reducing Triangle Count (Decimation)

Reduce file size while preserving shape:

  1. Navigate to Surface → Edit → Reduce.
  2. Configure:
    • Target reduction — Percentage to remove
    • Feature angle — Preserve edges sharper than this angle
  3. Click Apply.

Remeshing

Improve triangle quality and uniformity:

  1. Navigate to Surface → Edit → Remesh.
  2. Configure:
    • Method — Adaptive or regular
    • Quality — Mesh optimization level
    • Density — Target density of the remeshed surface relative to the input
  3. Click Apply.

Remeshing creates more uniform triangles, which improves downstream processing and simulation.


Surface Repair

Ensure mesh quality for export and 3D printing.

Diagnostics and Fixes

Analyze and repair common issues:

  1. Navigate to Surface → Edit → Diagnostics and Fixes.
  2. Run diagnostics to identify:
    • Non-manifold edges
    • Holes in the surface
    • Degenerate triangles
    • Inconsistent normals
  3. Select issues to fix.
  4. Click Apply Fixes.

Fill Holes

Close gaps in the surface:

  1. Navigate to Surface → Edit → Fill Holes.
  2. Configure:
    • Maximum hole size — Only fill holes smaller than this
  3. Click Apply.
3D Printing Requirements

Most 3D printers require watertight, manifold meshes. Always run diagnostics and fix issues before exporting for printing.


Surface Visualization

Render Properties

Customize surface appearance:

  1. Select the surface.
  2. Navigate to Surface → General → Render Properties.
  3. Configure:
    • Color — Surface color
    • Opacity — Transparency (0-1)
    • Representation — Solid, wireframe, points
    • Material — Ambient, diffuse, specular properties

Representation Modes

Switch display modes from the View tab or keyboard:

ModeKeyDescription
SolidSFilled surface
Solid EdgesEFilled with visible edges
WireframeWEdges only
PointsQVertices only

Multi-Surface Visualization

When working with multiple surfaces:

  1. Assign distinct colors to each surface for clarity.
  2. Adjust opacity to see through overlapping structures.
  3. Use visibility toggles in Object Browser to show/hide surfaces.

Exporting Surfaces

Export Formats

FormatExtensionUse Case
STL.stl3D printing, CAD import
OBJ.obj3D graphics software
PLY.plyScientific visualization
3MF.3mfAdvanced 3D printing
IGES/STEP.igs, .stpCAD applications
U3D.u3dPDF embedding
VRML/WRL.wrlWeb and presentations

Export Workflow

  1. Select the surface(s) to export.
  2. Navigate to File → Export → Surface Model.
  3. Choose the format.
  4. Configure format-specific options:
    • Binary vs ASCII — Binary files are smaller
  5. Choose destination and click Export.

3D Printing Checklist

Before exporting for 3D printing:

  • Surface is watertight (no holes)
  • No non-manifold edges
  • Normals are consistent (all pointing outward)
  • Triangle count is reasonable (< 1-2 million for most printers)
  • Dimensions are correct (check scale and units)
  • Wall thickness is sufficient for printing

Creating Primitive Surfaces

Generate geometric primitives for reference or modeling:

  1. Navigate to Surface → General → Create.
  2. Select primitive type:
PrimitiveParameters
BoxDimensions, center position
SphereRadius, center position
CylinderRadius, height, orientation
ConeRadius, height, apex position
PlaneDimensions, orientation
TorusMajor/minor radius
  1. Configure parameters.
  2. Click Create.

Primitives are useful for:

  • Reference geometry
  • Boolean operations with extracted surfaces
  • Implant planning and design

Boolean Operations on Surfaces

Combine surfaces using set operations:

  1. Navigate to Surface → Edit → Boolean.
  2. Select two input surfaces.
  3. Choose operation:
OperationResult
UnionCombined outer boundary
IntersectionOnly overlapping regions
DifferenceFirst minus second
  1. Click Apply.

For complex intersections that fail with standard Boolean:

  1. Navigate to Surface → Edit → Voxel Boolean.
  2. This method converts surfaces to voxels, performs the operation, and converts back.
  3. More robust but may lose fine detail.

Practical Exercise: Complete Surface Workflow

Part 1: Generate Initial Surface

  1. Open a project with a refined mask (e.g., bone segmentation).
  2. Navigate to Segmentation → Convert → Mask To Surface.
  3. Configure:
    • Quality: Optimal
    • Smoothing iterations: 20
    • Smooth factor: 0.06
    • Reduction percentage: 50
  4. Click Apply.
  5. View the result in the 3D view.

Part 2: Optimize the Surface

  1. Select the generated surface.
  2. Navigate to Surface → Edit → Smooth.
  3. Apply Smart smoothing with 20 iterations.
  4. Navigate to Surface → Edit → Reduce.
  5. Reduce by 50% (Reduction percent = 50).

Part 3: Verify and Repair

  1. Navigate to Surface → Edit → Diagnostics and Fixes.
  2. Run diagnostics.
  3. Fix any identified issues.
  4. Verify the surface is watertight.

Part 4: Export for 3D Printing

  1. Navigate to File → Export → Surface Model.
  2. Select STL format.
  3. Choose Binary mode for smaller file size.
  4. Export to your desired location.

Best Practices

Surface Quality

  • Generate from well-refined masks
  • Use adequate smoothing to eliminate voxel artifacts
  • Verify watertightness before export
  • Check triangle count is appropriate for use case

Performance

  • Decimate large surfaces for faster rendering
  • Use lower-quality previews during exploration
  • Generate final quality only for export

Workflow Efficiency

  • Save projects before generating surfaces
  • Name surfaces descriptively
  • Keep original masks for re-generation if needed

Troubleshooting

Surface has holes

  • Mask may have gaps—check and fill in Edit Mask
  • Use Fill Holes tool on the surface
  • Re-generate with different settings

Surface is too coarse/smooth

  • Adjust smoothing parameters
  • Reduce decimation for more detail
  • Use Remesh for uniform triangle distribution

Export fails

  • Check for non-manifold geometry
  • Verify surface is watertight
  • Try a different export format

Slow generation

  • Crop the mask to region of interest first
  • Use Flying Edges method for large data
  • Increase decimation ratio

Next Steps

Continue your learning with:


See Also