Lagrange
Loading...
Searching...
No Matches
ChartOptions Struct Reference

Chart computation options. More...

#include <lagrange/xatlas/Options.h>

Public Attributes

float max_chart_area = 0.f
 Maximum chart area, in input units squared. Set to 0 (default) to disable the limit.
 
float max_boundary_length = 0.f
 Maximum chart boundary length, in input units. Set to 0 (default) to disable the limit.
 
float normal_deviation_weight = 2.f
 Weight applied to normal deviation when growing charts.
 
float roundness_weight = 0.01f
 Weight applied to chart roundness. Higher values prefer compact (disk-like) charts.
 
float straightness_weight = 6.f
 Weight applied to chart boundary straightness. Higher values prefer straight cuts.
 
float normal_seam_weight = 4.f
 Weight applied to crossing input normal seams.
 
float texture_seam_weight = 0.5f
 Weight applied to crossing input UV seams (when use_input_mesh_uvs is true).
 
float max_cost = 2.f
 Maximum allowed chart cost. Faces whose addition would exceed this cost are not merged.
 
uint32_t max_iterations = 1
 Maximum number of segmentation iterations.
 
bool use_input_mesh_uvs = false
 If true, treat the input UV attribute as the chart layout (faces with the same UV island belong to the same chart).
 
bool fix_winding = true
 If true, fix triangle winding so all charts have a consistent orientation.
 

Detailed Description

Chart computation options.

Maps 1-to-1 onto xatlas::ChartOptions.

Charts are extracted by greedily growing seed faces while a cost function is below max_cost. The cost is a weighted sum of normal deviation, roundness, straightness, and seam terms; tuning the weights tunes the chart shapes.

Member Data Documentation

◆ normal_deviation_weight

float normal_deviation_weight = 2.f

Weight applied to normal deviation when growing charts.

Higher values produce flatter charts.

◆ normal_seam_weight

float normal_seam_weight = 4.f

Weight applied to crossing input normal seams.

Values > 1000 effectively forbid crossing normal seams.

◆ max_iterations

uint32_t max_iterations = 1

Maximum number of segmentation iterations.

Higher values may produce better charts but cost more time.


The documentation for this struct was generated from the following file: