MaterialVariant
Overrides the surface shading of a base material.
- Creatable
Instance.new("MaterialVariant")- Inherits
- Instance
- Replication
- Standard
Behavior
MaterialVariant overrides the surface shading of a base material.
Summary
The strength of direction-dependent specular reflection.
The orientation of anisotropic surface reflections.
The engine material overridden by this MaterialVariant.
The strength of the additional clearcoat reflection layer.
The roughness of the clearcoat reflection layer.
The color emitted by the surface.
The intensity multiplier for surface emission.
The surface's index of refraction.
The material-set identifier used when resolving material appearance.
The metallic contribution of the surface shading model.
The apparent depth used for parallax mapping.
The roughness of the surface's specular reflection.
The SurfaceShader used to shade this material.
Serialized values for the shader's parameter slots.
The contribution of the surface's sheen layer.
The tint of the sheen reflection.
The roughness of the sheen reflection.
The tint applied to specular reflection.
The world-space size of one texture repetition, in studs.
The contribution of subsurface scattering.
The tint of subsurface-scattered light.
The source text of the custom surface shader.
The latest surface-shader compilation error, or nil when no error is available.
The thickness of the stroke or shell.
The strength of texture variation used to reduce visible repetition.
The fraction of light transmitted through the surface.
Returns this instance if it is an ExecutionGroup.
Returns the four numeric components stored in a shader parameter slot.
SetShaderParameter(index: number, value: number | boolean | Vector2 | Vector3 | Color3 | { number }): ()serial onlyWrites a shader parameter slot from a scalar, boolean, vector, color, or numeric array.
Properties
Anisotropy
MaterialVariant.Anisotropy: number = 0The strength of direction-dependent specular reflection.
AnisotropyDirection
MaterialVariant.AnisotropyDirection: number = 0The orientation of anisotropic surface reflections.
BaseMaterial
MaterialVariant.BaseMaterial: Enum.Material = Enum.Material.PlasticThe engine material overridden by this MaterialVariant.
Clearcoat
MaterialVariant.Clearcoat: number = 0The strength of the additional clearcoat reflection layer.
ClearcoatRoughness
MaterialVariant.ClearcoatRoughness: number = 0.05The roughness of the clearcoat reflection layer.
EmissiveColor
MaterialVariant.EmissiveColor: Color3 = Color3.new(1, 1, 1)The color emitted by the surface.
EmissiveStrength
MaterialVariant.EmissiveStrength: number = 0The intensity multiplier for surface emission.
IOR
MaterialVariant.IOR: number = 1.5The surface's index of refraction.
MaterialSet
MaterialVariant.MaterialSet: string = ""The material-set identifier used when resolving material appearance.
Metalness
MaterialVariant.Metalness: number = -1The metallic contribution of the surface shading model.
ParallaxDepth
MaterialVariant.ParallaxDepth: number = 0The apparent depth used for parallax mapping.
Roughness
MaterialVariant.Roughness: number = -1The roughness of the surface's specular reflection.
Shader
MaterialVariant.Shader: SurfaceShader? = nilThe SurfaceShader used to shade this material.
ShaderParameters
MaterialVariant.ShaderParameters: string = "[]"Serialized values for the shader's parameter slots.
Sheen
MaterialVariant.Sheen: number = 0The contribution of the surface's sheen layer.
SheenColor
MaterialVariant.SheenColor: Color3 = Color3.new(1, 1, 1)The tint of the sheen reflection.
SheenRoughness
MaterialVariant.SheenRoughness: number = 0.5The roughness of the sheen reflection.
SpecularTint
MaterialVariant.SpecularTint: Color3 = Color3.new(1, 1, 1)The tint applied to specular reflection.
StudsPerTile
MaterialVariant.StudsPerTile: number = 0The world-space size of one texture repetition, in studs.
Subsurface
MaterialVariant.Subsurface: number = 0The contribution of subsurface scattering.
SubsurfaceColor
MaterialVariant.SubsurfaceColor: Color3 = Color3.new(1, 0.35, 0.25)The tint of subsurface-scattered light.
SurfaceShader
MaterialVariant.SurfaceShader: string = ""The source text of the custom surface shader.
SurfaceShaderError
MaterialVariant.SurfaceShaderError: string? = ""The latest surface-shader compilation error, or nil when no error is available.
Thickness
MaterialVariant.Thickness: number = 0.2The thickness of the stroke or shell.
TilingBreak
MaterialVariant.TilingBreak: number = 0The strength of texture variation used to reduce visible repetition.
Transmission
MaterialVariant.Transmission: number = 0The fraction of light transmitted through the surface.
Methods
GetExecutionGroup
MaterialVariant:GetExecutionGroup(): ExecutionGroup?Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.
GetShaderParameter
MaterialVariant:GetShaderParameter(index: number): (number, number, number, number)Returns the four numeric components stored in a shader parameter slot.
SetShaderParameter
MaterialVariant:SetShaderParameter(index: number, value: number | boolean | Vector2 | Vector3 | Color3 | { number }): ()Writes a shader parameter slot from a scalar, boolean, vector, color, or numeric array.
Inherited members
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying