Skip to content
On this page

class ChartAggregator

Computes new texture coordinates for a geometry with overlapping UV charts.

Properties

PropertyDescription
AutomaticTextureSizeMultiplierA texture dimension length multiplier for the automatic texture size.
ChartAggregatorModeDetermines which method to use when aggregating the UVs. TextureSizeProportions: Aggregated UV charts will be scaled to keep their relative pixel density relative to all other UV charts. The user can still set the size of the output texture maps. SurfaceArea: Aggregated UV charts will have their size set based on its actual geometrical size. OriginalPixelDensity: The combined atlas will be resized to fit each chart so that all charts retain the same amount of pixels as they originally had. This will override any manually set texture size. UVSizeProportions: Aggregated UV charts will have their size set based on its original UV size, disregarding the size of the texture they are used in.
ExpandZeroAreaUVsIf ExpandZeroAreaUVs is enabled then triangles that have zero area will be slightly expanded.
ForcePower2TextureIf UseAutomaticTextureSize is enabled, then force the texture sizes to be a power of 2.
GutterSpaceThe minimum number of pixels between charts.
InputMaterialCountThe number of input materials used in the original geometry for mapping to multiple output materials. This needs to be set before you can set any specific in-out material mapping. 0 signifies that no in-out material mapping is used, ie. the process will produce one resulting mapping image.
LockUVRotationIf LockUVRotation is enabled, only the original UV rotation will be used. Otherwise 4 rotations are used (90 degree rotations).
NameThe name of the ChartAggregator object. (Inherited from Object)
OriginalChartProportionsChannelSet OriginalChartProportionsChannel to an SG_MATERIAL_CHANNEL_[...]. This channel determines which texture channel to look at when determining which chart sizes to keep.
OutputMaterialCountThe number of output mapping images that are to be generated. The triangle field OutputMaterialIds also needs to be set, or the material IDs of the original geometry needs to be set to a specific output material in this setting object.
SurfaceAreaScaleIf multiple UV charts overlap and have the same material, SurfaceAreaScale specifies which of those instances determines the the output scale. It is only valid when the ChartAggregatorMode is SurfaceArea and SeparateOverlappingCharts is false.
TexCoordLevelWhich TexCoord level to get charts from during re-parameterization. If a TexCoordName is set, it will override the TexCoordLevel.
TexCoordNameWhich TexCoord name to get charts from during re-parameterization.
TextureHeightThe height of the texture to use.
TextureWidthThe width of the texture to use.
UseAutomaticTextureSizeThe automatic_texture_size flag. If true, then texture sizes will be computed for the reduced mesh depending on its pixel size on screen.
UseVertexWeightsThe UseVertexWeights flag to scale the charts according to their vertex weights.

Methods

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
GetClassGet the name of the ChartAggregator class. (Inherited from Object)
GetGutterSpaceForMaterialIndexThe minimum number of pixels between charts.
GetInputOutputMaterialMappingThe previously set material mapping for matId.
GetKeepOriginalChartSizesTextureHeightIf KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.
GetKeepOriginalChartSizesTextureHeightForMaterialIndexIf KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.
GetKeepOriginalChartSizesTextureWidthIf KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.
GetKeepOriginalChartSizesTextureWidthForMaterialIndexIf KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.
GetTextureHeightForMaterialIndexThe height of the texture to use.
GetTextureWidthForMaterialIndexThe width of the texture to use.
IsAReturns true if ChartAggregator is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the ChartAggregator object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the ChartAggregator object is valid. (Inherited from Object)
NonNullReturns true if the ChartAggregator object is valid. (Inherited from Object)
ParameterizeExecutes the parameterization of the geometry.
PrintInfoPrints the content/info of the ChartAggregator object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
SetGutterSpaceForMaterialIndexThe minimum number of pixels between charts.
SetInputOutputMaterialMappingThe material mapping for inMaterialId, meaning what material of the generated LOD inMaterialId will be baked into. Both InputMaterialCount and OutputMaterialCount need to be set for this mapping to work, and all original materials need to be mapped to an existing output id.
SetMaterialTableThe scene material table.
SetSeparateOverlappingChartsThe Separate Overlapping Charts flag. If charts are overlapping in the original texture coords, they will be separated.
SetTextureHeightForMaterialIndexThe height of the texture to use.
SetTextureTableThe scene texture table.
SetTextureWidthForMaterialIndexThe width of the texture to use.

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spChartAggregator, and if this is the case, returns the object cast into spChartAggregator. (Inherited from Object)

Properties details

AutomaticTextureSizeMultiplier

A texture dimension length multiplier for the automatic texture size.

ChartAggregatorMode

Determines which method to use when aggregating the UVs. TextureSizeProportions: Aggregated UV charts will be scaled to keep their relative pixel density relative to all other UV charts. The user can still set the size of the output texture maps. SurfaceArea: Aggregated UV charts will have their size set based on its actual geometrical size. OriginalPixelDensity: The combined atlas will be resized to fit each chart so that all charts retain the same amount of pixels as they originally had. This will override any manually set texture size. UVSizeProportions: Aggregated UV charts will have their size set based on its original UV size, disregarding the size of the texture they are used in.

ExpandZeroAreaUVs

If ExpandZeroAreaUVs is enabled then triangles that have zero area will be slightly expanded.

ForcePower2Texture

If UseAutomaticTextureSize is enabled, then force the texture sizes to be a power of 2.

GutterSpace

The minimum number of pixels between charts.

InputMaterialCount

The number of input materials used in the original geometry for mapping to multiple output materials. This needs to be set before you can set any specific in-out material mapping. 0 signifies that no in-out material mapping is used, ie. the process will produce one resulting mapping image.

LockUVRotation

If LockUVRotation is enabled, only the original UV rotation will be used. Otherwise 4 rotations are used (90 degree rotations).

Name

The name of the ChartAggregator object. (Inherited from Object)

OriginalChartProportionsChannel

Set OriginalChartProportionsChannel to an SG_MATERIAL_CHANNEL_[...]. This channel determines which texture channel to look at when determining which chart sizes to keep.

OutputMaterialCount

The number of output mapping images that are to be generated. The triangle field OutputMaterialIds also needs to be set, or the material IDs of the original geometry needs to be set to a specific output material in this setting object.

SurfaceAreaScale

If multiple UV charts overlap and have the same material, SurfaceAreaScale specifies which of those instances determines the the output scale. It is only valid when the ChartAggregatorMode is SurfaceArea and SeparateOverlappingCharts is false.

TexCoordLevel

Which TexCoord level to get charts from during re-parameterization. If a TexCoordName is set, it will override the TexCoordLevel.

TexCoordName

Which TexCoord name to get charts from during re-parameterization.

TextureHeight

The height of the texture to use.

TextureWidth

The width of the texture to use.

UseAutomaticTextureSize

The automatic_texture_size flag. If true, then texture sizes will be computed for the reduced mesh depending on its pixel size on screen.

UseVertexWeights

The UseVertexWeights flag to scale the charts according to their vertex weights.

Methods details

AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

GetClass

Get the name of the ChartAggregator class. (Inherited from Object)

GetGutterSpaceForMaterialIndex

The minimum number of pixels between charts.

GetInputOutputMaterialMapping

The previously set material mapping for matId.

GetKeepOriginalChartSizesTextureHeight

If KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.

GetKeepOriginalChartSizesTextureHeightForMaterialIndex

If KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.

GetKeepOriginalChartSizesTextureWidth

If KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.

GetKeepOriginalChartSizesTextureWidthForMaterialIndex

If KeepOriginalChartSizes is enabled: calling GetKeepOriginalChartSizesTextureWidth and GetKeepOriginalChartSizesTextureHeight after parameterization will return the final texture sizes.

GetTextureHeightForMaterialIndex

The height of the texture to use.

GetTextureWidthForMaterialIndex

The width of the texture to use.

IsA

Returns true if ChartAggregator is a or is a descendant of the class named as the type parameter. (Inherited from Object)

IsNull

Returns true if the ChartAggregator object is invalid. (Inherited from Object)

IsSameObjectAs

Returns true if the ChartAggregator object is valid. (Inherited from Object)

NonNull

Returns true if the ChartAggregator object is valid. (Inherited from Object)

Parameterize

Executes the parameterization of the geometry.

PrintInfo

Prints the content/info of the ChartAggregator object to the log. (Inherited from Object)

RemoveObserver

Removes a previously added observer object. (Inherited from Object)

SetGutterSpaceForMaterialIndex

The minimum number of pixels between charts.

SetInputOutputMaterialMapping

The material mapping for inMaterialId, meaning what material of the generated LOD inMaterialId will be baked into. Both InputMaterialCount and OutputMaterialCount need to be set for this mapping to work, and all original materials need to be mapped to an existing output id.

SetMaterialTable

The scene material table.

SetSeparateOverlappingCharts

The Separate Overlapping Charts flag. If charts are overlapping in the original texture coords, they will be separated.

SetTextureHeightForMaterialIndex

The height of the texture to use.

SetTextureTable

The scene texture table.

SetTextureWidthForMaterialIndex

The width of the texture to use.

Static methods details

IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

SafeCast

SafeCast makes sure the input object is of a class that can be cast into spChartAggregator, and if this is the case, returns the object cast into spChartAggregator. (Inherited from Object)