Skip to content

class MappingImageSettings ​

Settings for the Simplygon mapping classes. These settings control the mapping image generated by the current simplification processor (reducer/remesher etc.), including its dimensions and the generation of output texture coordinates and tangent space on the processed geometry. The mapping image is used when casting new textures onto that geometry. TexCoordName and TexCoordLevel select the destination texture coordinate field; they do not select the original geometry fields used to evaluate the input materials. Input material interpretation is defined by the source MaterialTable, its materials and shading networks, and the referenced textures in the source TextureTable. For example, each source ShadingTextureNode selects its input UV field through its own TexCoordName or TexCoordLevel. ChartAggregatorSettings::OriginalTexCoordName and OriginalTexCoordLevel select charts to reuse for UV generation, not the fields used to evaluate the input materials.

Properties ​

PropertyDescription
AllowTransparencyMappingIf true, the remeshing processor will allow mapped transparency in the generated mapping image. This allows material casting where gaps filled by the remeshing processor will be cast as transparent.
ApplyNewMaterialIdsIf true, and also generating one or more mapping images for material casting, the material IDs in the process geometry will be updated to reflect the new, not yet cast output materials. This means the output scene will be temporarily invalid before the materialtable has been updated to reflect the new changes.
AutomaticTextureSizeMultiplierTexture dimension length multiplier for the automatic texture size.
ForcePower2TextureIf automatic_texture_size is enabled, then force the texture sizes to be a power of 2.
GenerateMappingImageIf set, the aggregation processor, reduction processor, or remeshing processor will create a mapping image that maps triangles on the reduced geometry back to triangles on the original geometry. The texture is insert into the MappingImage object. The image data will contain two fields: * RidArray, "TriangleIds", TupleSize:1, The id of the triangle * UnsignedShortArray, "BarycentricCoords", TupleSize:2, Items A & B of the barycentric coordinate on the triangle. The user can control the size of the mapped texture using the values MappingTextureWidth and MappingTextureHeight.
GenerateTangentsIf true, generates new tangent and bitangent fields based on the vertex normals and the texture coordinate field selected by TexCoordName, or by TexCoordLevel if TexCoordName is null or empty. The fields are stored at the same level as the selected texture coordinates and are retrieved with GeometryData::GetTangents(level) and GeometryData::GetBitangents(level). Their alternative names are null; TexCoordName is not assigned to them. If only the texture coordinate alternative name is known, first resolve its level with GeometryData::GetNamedTexCoordsIndex(name), check that the result is not -1, and use that level to retrieve both fields. Tangent space fields will always be created if missing, and GenerateMappingImage is enabled. If GenerateTexCoords is enabled, new tangents will always be generated.
GenerateTexCoordsIf true, generates new texture coordinates in the field selected by TexCoordName, or by TexCoordLevel if TexCoordName is null or empty. Will be ignored and always generate texcoords if none are available in the Geometry if GenerateMappingImage is enabled. Generated tangent and bitangent fields use the same level as the selected texture coordinate field, but do not inherit its alternative name. See GenerateTangents and TexCoordName.
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.
MaximumLayersThe maximum number of layers in the mapping image. If a remeshed geometry has a lot of transparent triangles, use a higher number to be able to find intersections on the inside of parts of the geometry. This setting only has effect in the remeshing, when running reduction the number of layers is always 1.
NameThe name of the MappingImageSettings object. (Inherited from Object)
OnlyParameterizeInvalidUVsIf enabled, will aggregate all the valid original UVs. If there are invalid original UVs, those parts will receive new parameterized UVs.
OutputMaterialCountThe number of output mapping images that are to be generated. If this is set to more than 1, the material mapping also needs to be set.
OverrideTangentCalculatorIf true, overrides the DefaultTangentCalculatorType and TangentCalculatorInvertV global setting, and uses the tangent calculator type defined by the TangentCalculatorType and TangentCalculatorInvertV settings in this object. If false, TangentCalculatorType is ignored and DefaultTangentCalculatorType is used to define the calculator type. Note that this setting is ignored unless GenerateTangents is set to true.
ReplaceMappingImagesWhether to replace already existing mapping images in the scene.
TangentCalculatorInvertVIf true, will invert the bitangent in the output. Note that this setting is ignored unless GenerateTangents and OverrideTangentCalculator are both set to true.
TangentCalculatorTypeThe tangent calculator type to use when generating tangents for the mapping image data. Note that this setting is ignored unless GenerateTangents and OverrideTangentCalculator are both set to true.
TexCoordGeneratorTypeDetermines which method to use when generating the texture coordinates. Parameterizer generate from scratch based on the geometry. ChartAggregator generate based on the original texture coordinates.
TexCoordLevelThe destination texture coordinate level used for mapping image and output texture generation. This selects the field on the processed geometry, not the original UV field used to sample input material textures; configure that separately in the source material's ShadingTextureNode. Generated tangent and bitangent fields use this same level. If TexCoordName is non-empty, TexCoordLevel is ignored, including for tangent generation. In that case, resolve the actual output level with GeometryData::GetNamedTexCoordsIndex(TexCoordName) rather than assuming it equals this setting.
TexCoordNameThe alternative name of the destination texture coordinate field used for mapping image and output texture generation. This selects the field on the processed geometry, not the original UV field used to sample input material textures; configure that separately in the source material's ShadingTextureNode. A non-empty name takes precedence over TexCoordLevel. If new UVs are created, they replace the coordinates in the field with this alternative name. If no such field exists, it is created at the first available texture coordinate level, not necessarily at TexCoordLevel. If TexCoordName is null or empty, TexCoordLevel is used instead. Generated tangent and bitangent fields use the actual level of this texture coordinate field, but their alternative names are null. To retrieve them by the texture coordinate name, call GeometryData::GetNamedTexCoordsIndex(name), check that the result is not -1, then call GetTangents(level) and GetBitangents(level). GetNamedTangents(name) and GetNamedBitangents(name) do not resolve a texture coordinate alternative name.
UseAutomaticTextureSizeThe UseAutomaticTextureSize flag. If true, then texture sizes will be computed for the reduced mesh depending on its pixel size on screen.
UseFullRetexturingIf set, all original texcoord sets are replaced by a single new one which will be used for the mapping image. This means the output scene will be temporarily invalid before the materialtable has been updated to reflect the new changes. This flag has no effect on the remeshing, which always does a full retexturing.

Methods ​

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
GetBoolParameterGet a named parameter boolean value. (Inherited from SettingsObject)
GetChartAggregatorSettingsThe settings for the chart aggregator.
GetClassGet the name of the MappingImageSettings class. (Inherited from Object)
GetDoubleParameterGet a named parameter floating point value. (Inherited from SettingsObject)
GetErrorStringReturns a string describing the error that was found the last time ValidateSettings was performed. (Inherited from SettingsObject)
GetInputMaterialSettingsGet the input material settings for the given index.
GetIntParameterGet a named parameter integer value. (Inherited from SettingsObject)
GetOutputMaterialSettingsGet the output material settings for the given index.
GetParameterizerSettingsThe settings for the parameterizer.
GetStringParameterGet a named parameter string value. (Inherited from SettingsObject)
GetUIntParameterGet a named parameter unsigned integer value. (Inherited from SettingsObject)
IsAReturns true if MappingImageSettings is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the MappingImageSettings object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the MappingImageSettings object is valid. (Inherited from Object)
NonNullReturns true if the MappingImageSettings object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the MappingImageSettings object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
SetBoolParameterSet a named parameter boolean value. (Inherited from SettingsObject)
SetDoubleParameterSet a named parameter floating point value. (Inherited from SettingsObject)
SetIntParameterSet a named parameter integer value. (Inherited from SettingsObject)
SetStringParameterSet a named parameter string value. (Inherited from SettingsObject)
SetUIntParameterSet a named parameter unsigned integer value. (Inherited from SettingsObject)
SetValidateParameterNamesSet if parameter names should be validated or not. Parameters that previously do not exist will generate and error if validation is enabled and be allowed if validation is disabled. (Inherited from SettingsObject)
ToJSONGet settings as JSON for debugging purposes. (Inherited from SettingsObject)
ValidateSettingsValidates the current settings values. (Inherited from SettingsObject)

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 spMappingImageSettings, and if this is the case, returns the object cast into spMappingImageSettings. (Inherited from Object)

Properties details ​

AllowTransparencyMapping ​

If true, the remeshing processor will allow mapped transparency in the generated mapping image. This allows material casting where gaps filled by the remeshing processor will be cast as transparent.

ApplyNewMaterialIds ​

If true, and also generating one or more mapping images for material casting, the material IDs in the process geometry will be updated to reflect the new, not yet cast output materials. This means the output scene will be temporarily invalid before the materialtable has been updated to reflect the new changes.

AutomaticTextureSizeMultiplier ​

Texture dimension length multiplier for the automatic texture size.

ForcePower2Texture ​

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

GenerateMappingImage ​

If set, the aggregation processor, reduction processor, or remeshing processor will create a mapping image that maps triangles on the reduced geometry back to triangles on the original geometry. The texture is insert into the MappingImage object. The image data will contain two fields: * RidArray, "TriangleIds", TupleSize:1, The id of the triangle * UnsignedShortArray, "BarycentricCoords", TupleSize:2, Items A & B of the barycentric coordinate on the triangle. The user can control the size of the mapped texture using the values MappingTextureWidth and MappingTextureHeight.

GenerateTangents ​

If true, generates new tangent and bitangent fields based on the vertex normals and the texture coordinate field selected by TexCoordName, or by TexCoordLevel if TexCoordName is null or empty. The fields are stored at the same level as the selected texture coordinates and are retrieved with GeometryData::GetTangents(level) and GeometryData::GetBitangents(level). Their alternative names are null; TexCoordName is not assigned to them. If only the texture coordinate alternative name is known, first resolve its level with GeometryData::GetNamedTexCoordsIndex(name), check that the result is not -1, and use that level to retrieve both fields. Tangent space fields will always be created if missing, and GenerateMappingImage is enabled. If GenerateTexCoords is enabled, new tangents will always be generated.

GenerateTexCoords ​

If true, generates new texture coordinates in the field selected by TexCoordName, or by TexCoordLevel if TexCoordName is null or empty. Will be ignored and always generate texcoords if none are available in the Geometry if GenerateMappingImage is enabled. Generated tangent and bitangent fields use the same level as the selected texture coordinate field, but do not inherit its alternative name. See GenerateTangents and TexCoordName.

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.

MaximumLayers ​

The maximum number of layers in the mapping image. If a remeshed geometry has a lot of transparent triangles, use a higher number to be able to find intersections on the inside of parts of the geometry. This setting only has effect in the remeshing, when running reduction the number of layers is always 1.

Name ​

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

OnlyParameterizeInvalidUVs ​

If enabled, will aggregate all the valid original UVs. If there are invalid original UVs, those parts will receive new parameterized UVs.

OutputMaterialCount ​

The number of output mapping images that are to be generated. If this is set to more than 1, the material mapping also needs to be set.

OverrideTangentCalculator ​

If true, overrides the DefaultTangentCalculatorType and TangentCalculatorInvertV global setting, and uses the tangent calculator type defined by the TangentCalculatorType and TangentCalculatorInvertV settings in this object. If false, TangentCalculatorType is ignored and DefaultTangentCalculatorType is used to define the calculator type. Note that this setting is ignored unless GenerateTangents is set to true.

ReplaceMappingImages ​

Whether to replace already existing mapping images in the scene.

TangentCalculatorInvertV ​

If true, will invert the bitangent in the output. Note that this setting is ignored unless GenerateTangents and OverrideTangentCalculator are both set to true.

TangentCalculatorType ​

The tangent calculator type to use when generating tangents for the mapping image data. Note that this setting is ignored unless GenerateTangents and OverrideTangentCalculator are both set to true.

TexCoordGeneratorType ​

Determines which method to use when generating the texture coordinates. Parameterizer generate from scratch based on the geometry. ChartAggregator generate based on the original texture coordinates.

TexCoordLevel ​

The destination texture coordinate level used for mapping image and output texture generation. This selects the field on the processed geometry, not the original UV field used to sample input material textures; configure that separately in the source material's ShadingTextureNode. Generated tangent and bitangent fields use this same level. If TexCoordName is non-empty, TexCoordLevel is ignored, including for tangent generation. In that case, resolve the actual output level with GeometryData::GetNamedTexCoordsIndex(TexCoordName) rather than assuming it equals this setting.

TexCoordName ​

The alternative name of the destination texture coordinate field used for mapping image and output texture generation. This selects the field on the processed geometry, not the original UV field used to sample input material textures; configure that separately in the source material's ShadingTextureNode. A non-empty name takes precedence over TexCoordLevel. If new UVs are created, they replace the coordinates in the field with this alternative name. If no such field exists, it is created at the first available texture coordinate level, not necessarily at TexCoordLevel. If TexCoordName is null or empty, TexCoordLevel is used instead. Generated tangent and bitangent fields use the actual level of this texture coordinate field, but their alternative names are null. To retrieve them by the texture coordinate name, call GeometryData::GetNamedTexCoordsIndex(name), check that the result is not -1, then call GetTangents(level) and GetBitangents(level). GetNamedTangents(name) and GetNamedBitangents(name) do not resolve a texture coordinate alternative name.

UseAutomaticTextureSize ​

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

UseFullRetexturing ​

If set, all original texcoord sets are replaced by a single new one which will be used for the mapping image. This means the output scene will be temporarily invalid before the materialtable has been updated to reflect the new changes. This flag has no effect on the remeshing, which always does a full retexturing.

Methods details ​

AddObserver ​

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

GetBoolParameter ​

Get a named parameter boolean value.

GetChartAggregatorSettings ​

The settings for the chart aggregator.

GetClass ​

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

GetDoubleParameter ​

Get a named parameter floating point value.

GetErrorString ​

Returns a string describing the error that was found the last time ValidateSettings was performed.

GetInputMaterialSettings ​

Get the input material settings for the given index.

GetIntParameter ​

Get a named parameter integer value.

GetOutputMaterialSettings ​

Get the output material settings for the given index.

GetParameterizerSettings ​

The settings for the parameterizer.

GetStringParameter ​

Get a named parameter string value.

GetUIntParameter ​

Get a named parameter unsigned integer value.

IsA ​

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

IsNull ​

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

IsSameObjectAs ​

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

NonNull ​

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

PrintInfo ​

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

RemoveObserver ​

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

SetBoolParameter ​

Set a named parameter boolean value.

SetDoubleParameter ​

Set a named parameter floating point value.

SetIntParameter ​

Set a named parameter integer value.

SetStringParameter ​

Set a named parameter string value.

SetUIntParameter ​

Set a named parameter unsigned integer value.

SetValidateParameterNames ​

Set if parameter names should be validated or not. Parameters that previously do not exist will generate and error if validation is enabled and be allowed if validation is disabled.

ToJSON ​

Get settings as JSON for debugging purposes.

ValidateSettings ​

Validates the current settings values.

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 spMappingImageSettings, and if this is the case, returns the object cast into spMappingImageSettings. (Inherited from Object)