MaterialVariant
MaterialVariant : Instance
Overview
The MaterialVariant class is designed to enhance the visual customization of materials. By using MaterialVariant, developers can redefine how materials look without altering their physical behaviors, such as friction or density. This makes it a powerful tool for creating immersive and visually distinct environments.
Description
The MaterialVariant class is a feature that allows developers to create custom materials by overriding the visual properties of existing base materials. It provides flexibility for creators to define unique textures, colors, and appearances for parts and terrain while retaining the physical properties of the base material. MaterialVariant instances are managed through the MaterialService and can be applied to parts or globally override base materials.
Properties
BaseMaterial
Enum.Material
BaseMaterial is commonly defined through enumerations (e.g., Enum.Material) with pre-defined options for different materials like plastic, metal, wood, etc
Code Samples
ColorMap
Content
ColorMap is texture that determines the color of a surface.
Code Samples
MetalnessMap
Content
MetalnessMap is texture that determines the metalness of a surface.
Metalness refers to the ability of a surface to reflect light like metal, with higher values representing more metallic appearances while lower values suggest non-metallic appearances.
Code Samples
NormalMap
Content
NormalMap is texture that determines the normal vectors of a surface.
NormalMap represents a normal map texture, which is used to add detail and enhance the realism of surfaces by simulating bumps, dents, cracks, and curves without significantly increasing the number of polygons
Code Samples
RoughnessMap
Content
Determines the apparent roughness across the surface
Code Samples
CustomPhysicalProperties
PhysicalProperties
Determine the physical properties of the material (density, friction, elasticity, etc.).
Code Samples
MetersPerTile
number
This property determines scale of texture(how meters are displayed per tile).
Code Samples
Color
Color3
Determines the color of the surface.
Code Samples
Metalness
number
Determines the metalness of the surface.
Code Samples
Roughness
number
Determines the roughness of the surface.
Code Samples
EmissiveMap
Content
EmissiveMap is a texture that determines the emission characteristics of a surface. This texture allows specific parts of the material to emit light, creating glowing effects. Using an EmissiveMap, developers can simulate features like neon signs, glowing screens, or ambient lighting on surfaces.
Code Samples
Emissive
Color3
Determines the emissive color of the material. Emissive property controls the color of light emitted by a material, enabling effects like glowing objects or surfaces. Use this to define the specific light color emitted by the material.
Code Samples
EmissiveIntensity
number
EmissiveIntensity determines the intensity of the emissive effect on the material. A higher intensity value will result in a brighter glow, while a lower value will create a subtler effect. Use this property to control how much light the material emits visually.