# Organic vs HardSurface Model Types in AutoRemesher: Complete Technical Guide

> Learn the differences between Organic and HardSurface model types in AutoRemesher. Understand how to preserve sharp edges with the sharpEdgeDegrees parameter for optimal results.

- Repository: [Jeremy HU/autoremesher](https://github.com/huxingyi/autoremesher)
- Tags: deep-dive
- Published: 2026-07-11

---

**AutoRemesher defines two distinct `ModelType` modes—`Organic` for smooth free-form geometry and `HardSurface` for preserving sharp mechanical edges—with the latter applying stricter edge preservation thresholds controlled via the `sharpEdgeDegrees` parameter.**

The `huxingyi/autoremesher` library provides automatic quad remeshing through the `AutoRemesher` class, which exposes two model types that fundamentally alter how the algorithm interprets input geometry. Understanding the **differences between Organic and HardSurface model types** is essential for optimizing results on smooth characters versus mechanical CAD models.

## What Are Organic and HardSurface Model Types?

The `ModelType` enumeration defined in [`src/AutoRemesher/autoremesher.h`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.h) declares the two available modes:

```cpp
enum class ModelType {
    Organic,
    HardSurface
};

```

**Organic** mode prioritizes isotropic edge lengths and smooth curvature flow, making it ideal for free-form surfaces like characters or creatures where uniform triangle distribution matters more than preserving sharp feature lines. **HardSurface** mode modifies the remeshing process to respect sharp edge boundaries, using angular thresholds to detect and preserve mechanical edges that would otherwise be smoothed away.

## Key Differences Between Organic and HardSurface Modes

**Intended geometry**: Organic targets smooth, free-form meshes such as sculptures and skin, while HardSurface targets mechanical parts with distinct planar regions and crisp edges.

**Edge handling strategy**: In [`src/AutoRemesher/autoremesher.h`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.h), the internal member `m_modelType` defaults to `ModelType::Organic`, causing the algorithm to favor uniform triangle sizes over feature preservation. When switched to `HardSurface`, the remesher applies aggressive sharp-edge detection using the `sharpEdgeDegrees` parameter to maintain angular features.

**Parameter sensitivity**: The `sharpEdgeDegrees` and `smoothNormalDegrees` settings affect both modes, but they are critical for HardSurface workflows. Organic mode largely ignores these thresholds, whereas HardSurface mode uses them to classify edges as sharp or smooth, directly influencing the final topology.

**UI availability**: As noted in [`src/mainwindow.cpp`](https://github.com/huxingyi/autoremesher/blob/main/src/mainwindow.cpp) and [`src/mainwindow.h`](https://github.com/huxingyi/autoremesher/blob/main/src/mainwindow.h), the HardSurface option exists in the codebase but remains experimental—the model type selector is currently commented out in the GUI, requiring programmatic access via `setModelType()`.

## How to Configure Model Types in Your Code

You control the remeshing behavior by instantiating the `AutoRemesher` class and calling `setModelType()` before processing. The following examples demonstrate both modes using the actual API from [`src/AutoRemesher/autoremesher.h`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.h):

```cpp
#include <AutoRemesher/autoremesher.h>
#include <vector>

// Prepare input geometry
std::vector<AutoRemesher::Vector3> vertices = { /* ... */ };
std::vector<std::vector<size_t>> triangles = { /* ... */ };

// Initialize remesher
AutoRemesher::AutoRemesher remesher(vertices, triangles);
remesher.setTargetTriangleCount(5000);
remesher.setScaling(1.0);

```

**Organic mode (default)**:

```cpp
// Explicitly set Organic mode (optional, as this is the default)
remesher.setModelType(AutoRemesher::ModelType::Organic);
remesher.remesh();  // Produces smooth, uniform mesh

```

**HardSurface mode**:

```cpp
// Switch to HardSurface and configure edge preservation
remesher.setModelType(AutoRemesher::ModelType::HardSurface);
remesher.setSharpEdgeDegrees(30.0);      // Preserve edges above 30 degrees
remesher.setSmoothNormalDegrees(5.0);    // Smooth normals below this threshold
remesher.remesh();  // Preserves mechanical edges

```

The `setSharpEdgeDegrees()` method directly influences how the `HardSurface` algorithm classifies geometric features, as implemented in the underlying remeshing pipeline.

## Source File Implementation Details

| File | Purpose | Key Contribution |
|------|---------|------------------|
| [`src/AutoRemesher/autoremesher.h`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.h) | Core class definition | Declares `ModelType` enum, `m_modelType` member (default `Organic`), and `setModelType()` setter. |
| [`src/AutoRemesher/autoremesher.cpp`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.cpp) | Implementation | Contains the remeshing logic that branches based on `m_modelType` handling. |
| [`src/mainwindow.h`](https://github.com/huxingyi/autoremesher/blob/main/src/mainwindow.h) / [`src/mainwindow.cpp`](https://github.com/huxingyi/autoremesher/blob/main/src/mainwindow.cpp) | GUI layer | Defines `m_modelType` variable and (commented-out) UI controls for switching between Organic and HardSurface. |
| [`src/quadmeshgenerator.h`](https://github.com/huxingyi/autoremesher/blob/main/src/quadmeshgenerator.h) / [`src/quadmeshgenerator.cpp`](https://github.com/huxingyi/autoremesher/blob/main/src/quadmeshgenerator.cpp) | Parameter bridge | Passes `m_parameters.modelType` to the `AutoRemesher` instance during mesh generation. |

These files collectively implement the distinction between smooth organic remeshing and feature-preserving hard-surface processing.

## Summary

- **AutoRemesher** defines two model types in [`src/AutoRemesher/autoremesher.h`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.h): `Organic` and `HardSurface`.
- **Organic** mode (default) produces uniform, smooth meshes ideal for characters and free-form geometry.
- **HardSurface** mode preserves sharp edges using `sharpEdgeDegrees` and `smoothNormalDegrees` parameters, suitable for mechanical models.
- The `setModelType()` method controls the mode programmatically, while GUI controls exist in the codebase but remain commented out.
- Both modes share the same underlying voxel pipeline, but HardSurface applies stricter edge detection thresholds during the remeshing phase.

## Frequently Asked Questions

### What is the default model type in AutoRemesher?

The default model type is `Organic`, as initialized by the `m_modelType` member variable in [`src/AutoRemesher/autoremesher.h`](https://github.com/huxingyi/autoremesher/blob/main/src/AutoRemesher/autoremesher.h). This ensures that out-of-the-box behavior favors smooth, uniform mesh generation without requiring explicit configuration.

### How does HardSurface mode affect sharp edge detection?

HardSurface mode activates stricter interpretation of the `sharpEdgeDegrees` parameter. While Organic mode largely ignores angular thresholds to maintain isotropic flow, HardSurface mode uses these degrees to classify and preserve geometric edges, preventing the smoothing of mechanical features.

### Is the HardSurface model type fully exposed in the GUI?

No. Although the underlying `ModelType` enum and `setModelType()` API are fully implemented, the UI controls in [`src/mainwindow.cpp`](https://github.com/huxingyi/autoremesher/blob/main/src/mainwindow.cpp) remain commented out. Users must currently invoke `setModelType(ModelType::HardSurface)` programmatically to access hard-surface remeshing capabilities.

### Can I switch model types after initializing the AutoRemesher instance?

Yes. You can call `setModelType()` at any point before invoking `remesh()`. The model type is not fixed during construction, allowing you to toggle between Organic and HardSurface processing for the same input geometry by adjusting the parameter and re-running the remesher.