Class · inherits Instance
SurfaceAppearance
An object that allows developers to override the appearance of a MeshPart with advanced graphics options.
About SurfaceAppearance
SurfaceAppearance objects let you override the appearance of a
MeshPart with advanced graphics options. Most notably, it can apply a
set of Physically‑Based Rendering (PBR) texture images, or maps, on a
single object. Combining multiple texture maps can more accurately simulate
color, roughness, and reflectivity in any lighting environment and can enhance
the visual elements of your assets and environment; see
PBR Textures for more details.
Appearance of this object on a MeshPart depends on the user's device
and graphics quality level. For best results, you may want to preview your
content with different quality level settings.
Note that most SurfaceAppearance properties cannot be modified by
scripts, as the necessary pre-processing is usually too expensive during
runtime.
Properties 14
AlphaMode
: AlphaModeDetermines how the alpha channel of theSurfaceAppearance.ColorMapis used.This property determines how the alpha channel of the
SurfaceAppearance.ColorMapis used.When set to
Transparencyand theMeshPart.Transparencyis set to0, opaque pixels in theColorMapwill render as completely opaque in the 3D scene. This combination works better with depth-based effects and occlusion.When set to
Transparencyand theMeshPart.Transparencyis set to at least0.02, a different blending method is used that can better represent smooth transparency gradients and soft edges. This combination does not support all effects and occlusion may not be perfect.See here for more information.
Color
: Color3Applies a tint to your existing colormap. Set directly with color picker or programmatically withColor3.ColorMap
: ContentIdPluginDetermines the color and opacity of the surface.This property determines the color and opacity of the surface. This texture is sometimes called the albedo texture. The alpha channel of this texture controls its opacity, which behaves differently based on the
SurfaceAppearance.AlphaModesetting.See here for more information.
ColorMapContent
: ContentContentobject that determines the color and opacity of the surface.A
Contentthat determines the color and opacity of the surface (sometimes called the albedo texture). The content can hold an asset URI or a reference to anEditableImageobject.The alpha channel of the texture controls its opacity, which behaves differently based on the
SurfaceAppearance.AlphaModesetting. It defaults to an empty content, in which case no color map is applied. Assigning anEditableImageis useful for dynamically generating or modifying textures at runtime, such as in avatar customization and other in-experience content creation workflows.EmissiveMaskContent
: ContentDetermines the emissivity across the surface.This property determines the apparent emissivity across the surface. An emissive mask is a grayscale image where black pixels correspond to no emissivity, and white pixels correspond to full emissivity.
The emissive contribution gets added to total lighting contribution across the surface, and the sum gets multiplied by the albedo texture, which would be sampled from
ColorMapif provided.EmissiveStrength
: floatDetermines the strength of emissive contribution.This value is a multiplier to control how strong the emissive contribution is across the surface. If the final contribution of emissives goes beyond supported dynamic range, it will get clamped; this could result in emissive contribution appearing all white when using large emissive strength values. Since this value is a multiplier, the maximum value to prevent clamping depends on all of the other contributing values, including
EmissiveTint,ColorMapand combined lighting contribution.EmissiveTint
: Color3Determines the tinting color for emissive contribution.This value is an RGB color for tinting emissive contribution.
MetalnessMap
: ContentIdPluginDetermines which parts of the surface are metal or non-metal.This property determines which parts of the surface are metal or non-metal. The metalness map is a grayscale image where black pixels correspond to non-metals and white pixels correspond to metals.
Metals only reflect light the same color as the metal, and they reflect much more light than non-metals. Most pixels in a metalness map will be either pure black or pure white, while values in between can be used to simulate dirt or grunge on top of an underlying metal area.
When
Lighting.EnvironmentSpecularScaleis 0, metalness has no effect. For the most realistic reflections, it's recommended to setLighting.EnvironmentSpecularScaleandLighting.EnvironmentDiffuseScaleto 1, as well asLighting.AmbientandLighting.OutdoorAmbientto(0, 0, 0).See here for more information.
MetalnessMapContent
: ContentContentobject that determines which parts of the surface are metal or non-metal.A
Contentthat determines which parts of the surface are metal or non-metal. The metalness map is a grayscale image where black pixels correspond to non-metals and white pixels correspond to metals. The content can hold an asset URI or a reference to anEditableImageobject.Metals only reflect light the same color as the metal, and they reflect much more light than non-metals. Most pixels in a metalness map will be either pure black or pure white, while values in between can be used to simulate dirt or grunge on top of an underlying metal area.
When
Lighting.EnvironmentSpecularScaleis 0, metalness has no effect. Defaults to an empty content, in which case no metalness map is applied.NormalMap
: ContentIdPluginModifies the lighting of the surface by adding bumps, dents, cracks, and curves.This property modifies the lighting of the surface by adding bumps, dents, cracks, and curves, without adding more polygons. The normal map is an RGB image that modifies the surface's normal vector used for lighting calculations. Its R, G, and B channels correspond to the X, Y, and Z components of the local surface vector respectively, and byte values of 0 and 255 for each channel correspond linearly to normal vector components of -1 and 1.016 respectively. This range is stretched slightly from -1 to 1 so that a byte value of 127 maps to exactly 0.
The normal vector's Z axis is always defined as the direction of the underlying mesh's normal. A uniform
(127, 127, 255)image translates to a completely flat normal map where the normal is everywhere perpendicular to the mesh surface; this format is referred to as a "tangent space" normal map. Note that Roblox does not support world space or object space normal maps.Incorrectly flipped normal components can make bumps appear like indents. If you import a normal map and notice the lighting looks off, you may need to invert the G channel of the image. The X and Y axes of the tangent space frame correspond to the X and Y directions in the image after it's transformed by the mesh UVs. If you view your normal map in an image editor as if it were displayed on a surface, normals pointing towards the right side of the screen should appear more red, and normals pointing towards the top side of your screen should appear more green. The terms "DirectX format" and "OpenGL format" are sometimes used to describe whether the G channel of the normal map is inverted or not (Roblox expects the OpenGL format).
Roblox also expects imported meshes to include tangents. Modeling software may also refer to this as "tangent space" information. If you apply a normal map and it does not seem to make any visual difference, you may need to re-export your mesh along with its tangent information from the modeling software.
See here for more information.
NormalMapContent
: ContentContentobject that modifies the lighting of the surface by adding bumps, dents, cracks, and curves.A
Contentthat modifies the lighting of the surface by adding bumps, dents, cracks, and curves, without adding more polygons. The normal map is an RGB image that modifies the surface's normal vector used for lighting calculations, where the R, G, and B channels correspond to the X, Y, and Z components of the local surface vector respectively. The content can hold an asset URI or a reference to anEditableImageobject.Roblox expects tangent-space normal maps in the "OpenGL format" (the G channel is not inverted), and imported meshes must include tangent information. Defaults to an empty content, in which case no normal map is applied.
ResampleMode
: ResamplerModeSelects the texture resampling mode used for the surface's texture maps.Determines how the surface's texture maps look when they are scaled. When set to the default
ResamplerMode.Default, the textures smooth out using bilinear filtering when displayed larger or smaller than their size in texture memory. When set toPixelated, the textures preserve the sharp edges of pixels using nearest-neighbor filtering. Defaults toResamplerMode.Default.RoughnessMap
: ContentIdPluginDetermines the apparent roughness across the surface.This property determines the apparent roughness across the surface. The roughness map is a grayscale image where black pixels correspond to a maximally smooth surface, and white pixels correspond to a maximally rough surface.
Note that surface roughness works on a very small scale. Reflections on smooth surfaces are sharp and concentrated, while reflections on rough surfaces are more blurry and dispersed.
See here for more information.
RoughnessMapContent
: ContentContentobject that determines the apparent roughness across the surface.A
Contentthat determines the apparent roughness across the surface. The roughness map is a grayscale image where black pixels correspond to a maximally smooth surface, and white pixels correspond to a maximally rough surface. The content can hold an asset URI or a reference to anEditableImageobject.Surface roughness works on a very small scale. Reflections on smooth surfaces are sharp and concentrated, while reflections on rough surfaces are more blurry and dispersed. Defaults to an empty content, in which case no roughness map is applied.
SurfaceAppearance also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.