14 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

MaterialVariant

Inherits from: Instance → Object

Using MaterialVariant objects can expand the variety of materials in an experience. MaterialVariant has properties that can define the appearance of a material. Its name can be set in MaterialService to globally override a built-in material, or set in the BasePart.MaterialVariant property to change certain Parts. MaterialVariant objects only work as descendants of MaterialService.

Inherits from: Instance

Memory category: Instances

Properties

NameType / ReturnsDescription
MaterialVariant.AlphaModeAlphaModeDetermines how the alpha channel of the MaterialVariant.ColorMap is used.
MaterialVariant.BaseMaterialMaterialCategory Material this variant belongs to.
MaterialVariant.ColorMapContentIdDetermines the color of the surface.
MaterialVariant.ColorMapContentContentDetermines the color of the surface. Only supports asset URIs as textures.
MaterialVariant.CustomPhysicalPropertiesPhysicalPropertiesDetermines the physical properties of parts whose material resolves to this variant.
MaterialVariant.EmissiveMaskContentContentDetermines the emissivity across the surface.
MaterialVariant.EmissiveStrengthfloatDetermines the strength of emissive contribution.
MaterialVariant.EmissiveTintColor3Determines the tinting color for emissive contribution.
MaterialVariant.MaterialPatternMaterialPatternDetermines texture tiling method.
MaterialVariant.MetalnessMapContentIdDetermines which parts of the surface are metal and are non-metal.
MaterialVariant.MetalnessMapContentContentDetermines which parts of the surface are metal and are non-metal. Only supports asset URIs as textures.
MaterialVariant.NormalMapContentIdModifies the lighting of the surface by adding bumps, dents, cracks, and curves without adding more polygons.
MaterialVariant.NormalMapContentContentModifies the lighting of the surface by adding bumps, dents, cracks, and curves without adding more polygons. Only supports asset URIs as textures.
MaterialVariant.RoughnessMapContentIdDetermines the apparent roughness across the surface.
MaterialVariant.RoughnessMapContentContentDetermines the apparent roughness across the surface. Only supports asset URIs as textures.
MaterialVariant.StudsPerTilefloatDetermines the scale of textures.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

MaterialVariant.AlphaMode

This property determines how the alpha channel of the MaterialVariant.ColorMap is used.

When set to Transparency and the MeshPart.Transparency is set to 0, opaque pixels in the ColorMap renders as completely opaque in the 3D scene. This combination works better with depth-based effects and occlusion.

When set to Transparency and the MeshPart.Transparency is set to at least 0.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.

For more information, see Alpha modes.

FieldValue
typeAlphaMode
tags["NotBrowsable"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.BaseMaterial

Category Material this variant belongs to.

FieldValue
typeMaterial
security{"read":"None","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.ColorMap

This property determines the color of the surface. This texture is sometimes called the albedo texture. The alpha channel is not used.

FieldValue
typeContentId
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.ColorMapContent

This property determines the color of the surface. This texture is sometimes called the albedo texture. The alpha channel is not used.

FieldValue
typeContent
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.CustomPhysicalProperties

Determines the physical properties, such as density, friction, and elasticity, of parts whose material resolves to this variant.

The assigned PhysicalProperties apply only when that value was constructed with explicit values. Otherwise the physical properties are inherited, falling back first to the base-material override configured on the parent MaterialService, and if none is set, to the default physical properties of the variant's BaseMaterial category.

The default value is a PhysicalProperties constructed without explicit values, so an unmodified variant inherits its base material's physical properties.

FieldValue
typePhysicalProperties
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryMaterial
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.EmissiveMaskContent

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 ColorMap if provided.

FieldValue
typeContent
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.EmissiveStrength

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, ColorMap and combined lighting contribution.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.EmissiveTint

This value is an RGB color for tinting emissive contribution.

FieldValue
typeColor3
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.MaterialPattern

Determines texture tiling method.

FieldValue
typeMaterialPattern
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.MetalnessMap

This property determines which parts of the surface are metal and are non-metal. A 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 materials in the real world can be categorized either metals or non-metals. For this reason, most pixels in a metalness map will be either pure black or pure white. Values in between are typically used to simulate dirt or grunge on top of an underlying metal area.

When Lighting.EnvironmentSpecularScale is 0, metalness has no effect. For the most realistic reflections, setting EnvironmentSpecularScale and Lighting.EnvironmentDiffuseScale to 1, and Lighting.Ambient and Lighting.OutdoorAmbient to (0,0,0) is recommended.

FieldValue
typeContentId
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.MetalnessMapContent

This property determines which parts of the surface are metal and are non-metal. A 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 materials in the real world can be categorized either metals or non-metals. For this reason, most pixels in a metalness map will be either pure black or pure white. Values in between are typically used to simulate dirt or grunge on top of an underlying metal area.

When Lighting.EnvironmentSpecularScale is 0, metalness has no effect. For the most realistic reflections, setting EnvironmentSpecularScale and Lighting.EnvironmentDiffuseScale to 1, and Lighting.Ambient and Lighting.OutdoorAmbient to (0,0,0) is recommended.

FieldValue
typeContent
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.NormalMap

This property modifies the lighting of the surface by adding bumps, dents, cracks, and curves without adding more polygons.

Normal maps are RGB images that modify the surface's normal vector used for lighting calculations. The R, G, and B channels of the NormalMap 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 called "tangent space" normal maps. 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 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 modeling software.

FieldValue
typeContentId
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.NormalMapContent

This property modifies the lighting of the surface by adding bumps, dents, cracks, and curves without adding more polygons.

Normal maps are RGB images that modify the surface's normal vector used for lighting calculations. The R, G, and B channels of the NormalMap 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 called "tangent space" normal maps. 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 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 modeling software.

FieldValue
typeContent
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.RoughnessMap

This property determines the apparent roughness across the surface. A roughness map is a grayscale image where black pixels correspond to a maximally smooth surface, and white pixels correspond to a maximally rough surface.

Roughness refers to how much variation the surface has on a very small scale. Reflections on smooth surfaces are sharp and concentrated. Reflections on rough surfaces are more blurry and dispersed.

FieldValue
typeContentId
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.RoughnessMapContent

This property determines the apparent roughness across the surface. A roughness map is a grayscale image where black pixels correspond to a maximally smooth surface, and white pixels correspond to a maximally rough surface.

Roughness refers to how much variation the surface has on a very small scale. Reflections on smooth surfaces are sharp and concentrated. Reflections on rough surfaces are more blurry and dispersed.

FieldValue
typeContent
security{"read":"PluginSecurity","write":"PluginSecurity"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

MaterialVariant.StudsPerTile

Determines the scale of textures. Larger values for this property will lead to the textures appearing larger, and repeating less frequently.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Material"]

Methods

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
Instance:Destroy()Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children.
Instance:destroy()
Instance:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns an array containing all descendants of the instance that match the selector string.
Instance:Remove()Sets the object's Parent to nil, and does the same for all its descendants.
Instance:remove()
Instance:RemoveTag()Removes a tag from the instance.
Instance:ResetPropertyToDefault()Resets a property to its default value.
Instance:SetAttribute()Sets the attribute with the given name to the given value.
Instance:WaitForChildInstanceReturns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does.

Inherited from Object

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

Events

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.