# MaterialVariant

MaterialVariant : `Instance`

## Overview

MaterialVariant is a custom material object used to expand or replace existing Materials. With this object, you can implement a variety of visual characteristics including unique surface texture, color, and reflection across the entire world or in specific parts.

MaterialVariant needs to be placed in the hierarchy under MaterialService to function properly; as MaterialVariant will not work outside this hierarchy, caution is required during setup.

## Properties

### BaseMaterial

`Enum.Material`

Classification information indicating which basic material group the MaterialVariant belongs to.

Based on this value, it determines which Material family the variant extends, which is referenced during rendering or property application.

#### Code Samples

```lua
local MaterialVariant = Instance.new("MaterialVariant")

MaterialVariant.BaseMaterial = Enum.Material.Plastic
```

### ColorMap

`Content`

The base color map (albedo texture) that specifies the color to display. Combined with light source and shadowing effect, this forms the base color palette of the surface. The alpha channel of this texture is not referenced during the rendering process, so this is not used to control opacity.

#### Code Samples

### CustomPhysicalProperties

`PhysicalProperties`

Currently not supported.

#### Code Samples

### Emissive

`Color3`

Currently not supported.

#### Code Samples

### EmissiveIntensity

`number`

Currently not supported.

#### Code Samples

### EmissiveMap

`Content`

Currently not supported.

#### Code Samples

### Metalness

`number`

A scalar value that defines the degree to which the surface reflects light like metal.

If this value is 0.0, it indicates non-metallic properties. If this value is closer to 1.0, it has stronger reflective property typical of metal surfaces.

This value is used as a key element in determining the visual characteristics of a material in PBR-based rendering.

#### Code Samples

### MetalnessMap

`Content`

A grayscale texture that specifies which part of surface should have metallic properties.

Areas closer to black are rendered as non-metallic, areas closer to white as metallic, and mid-tones are used to express variations such as dirt or wear on metal surfaces.

#### Code Samples

### MetersPerTile

`number`

A property used to specify how large a texture is mapped onto the surface.

Increasing the value enlarges the texture, reducing repetition frequency, while decreasing it displays the texture more densely, increasing the number of repetitions.

#### Code Samples

### NormalMap

`Content`

A texture that expresses fine bumps, patterns, or curves by adjusting lighting responses without changing the actual geometry of the surface.

The RGB channel represents the surface normal direction, and an incorrect channel composition may reverse the effect of surface convexity and concavity. If the NormalMap effect is not visible, check whether the mesh contains tangent information.

#### Code Samples

### Roughness

`number`

A scalar value that defines how roughly the surface diffuses light.

If this value is 0.0, it means surface is considered smooth and the light is reflected clearly and strongly. If the value is closer to 1.0, it means surface is considered rough and the light is diffused widely.

This value is used as an important element in determining reflection quality and surface texture in PBR-based rendering.

#### Code Samples

### RoughnessMap

`Content`

A grayscale texture that defines how smooth or rough the surface appears at a fine scale.

A darker value means the surface is smooth and reflection is strong. A lighter value means the surface is rough and the light is scattered widely for blurred reflection.

#### Code Samples

### UseCustomPhysicsProperties

`boolean`

Not currently supported.

#### Code Samples

## Methods

## Events

## See also


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/classes/materialvariant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
