Appearance.roughnessTexture Property

Parent Object: Appearance
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

Gets and sets the path of a grayscale roughness map used as a texture for the appearance's surface_roughness slot. Setting a path connects a new texture and setting an empty string disconnects the existing texture and falls back to the roughness value. Getting this property returns the filename of the connected texture or an empty string if there isn't one connected.

Setting this property resets roughness to 1.0 so the texture's grayscale values are used directly, where 0 is mirror-smooth and 1 is fully matte. To attenuate the texture, set roughness afterwards, for example setting it to 0.7 caps the roughness at 70 percent.

The order in which colorTexture, normalTexture, and roughnessTexture are set matters, as described for colorTexture. As with colorTexture, the image is saved within the document but the path returned by the getter after the document has been saved and reopened can differ from the path that was set.

This property can only be set for appearances in a Design or the favorites list, and setting it fails if the appearance doesn't have a surface_roughness slot. Appearances created using Appearances.add always support this property.

Syntax

"appearance_var" is a variable referencing an Appearance object.
# Get the value of the property.
propertyValue = appearance_var.roughnessTexture

# Set the value of the property.
appearance_var.roughnessTexture = propertyValue
"appearance_var" Is a variable referencing an Appearance Object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
string propertyValue = appearance_var->roughnessTexture();

// Set the value of the property, where value_var is a string.
bool returnValue = appearance_var->roughnessTexture(value_var);
"appearance_var" Is a variable referencing an Appearance Object.
// Get the value of the property.
propertyValue = appearance_var.roughnessTexture;

// Set the value of the property.
appearance_var.roughnessTexture = propertyValue;

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2026