Luduvo Contents
Theme
On this page

MaterialSpec

the textures, pipeline class, and physical terms one material renders with

Fields

11 members

Emission: table?

emissive texture, and the tint and intensity it radiates at

Footsteps: table?

clips a character plays walking on the surfaces, and the gain and pitch spread they play at

Id: string

id the material is defined and looked up under

Impacts: table?

clips a contact plays against the surfaces, and the gain and pitch spread they play at

Model: string

surface model the shader samples with: UV, Triplanar, or Stud

Name: string?

name the material can be looked up under, in place of the id

Physics: table?

density, friction, and restitution the solver gives the surfaces

Pipeline: string

pipeline class the surfaces draw in: Opaque, Cutout, Transparent, Water, or Decal

Studs: table?

top and bottom stud textures the Stud surface model draws

Surface: table

base color, normal, and ORM textures, with the tint, tiling, and multipliers applied to them

Water: table?

absorption, refraction, foam, and wave terms the Water pipeline class solves

Emission

emissive texture, and the tint and intensity it radiates at

FieldType
Intensitynumber?
Texturestring?
Tint{r: number, g: number, b: number}?

Footsteps

clips a character plays walking on the surfaces, and the gain and pitch spread they play at

FieldType
Clips{string}
Gainnumber?
PitchSpreadnumber?

Impacts

clips a contact plays against the surfaces, and the gain and pitch spread they play at

FieldType
Clips{string}
Gainnumber?
PitchSpreadnumber?

Physics

density, friction, and restitution the solver gives the surfaces

FieldType
Densitynumber?
Frictionnumber?
Restitutionnumber?

Studs

top and bottom stud textures the Stud surface model draws

FieldType
ColorBottomstring?
ColorTopstring?
NormalBottomstring?
NormalTopstring?
StudsPerTilenumber?

Surface

base color, normal, and ORM textures, with the tint, tiling, and multipliers applied to them

FieldType
AlphaCutoffnumber?
BaseColorstring?
MetallicMultnumber?
Neonboolean?
Normalstring?
NormalStrengthnumber?
Ormstring?
RoughnessMultnumber?
TileSizenumber?
Tint{r: number, g: number, b: number, a: number}?
TintVertexboolean?

Water

absorption, refraction, foam, and wave terms the Water pipeline class solves

FieldType
Absorption{r: number, g: number, b: number}?
DepthScalenumber?
FlowMapstring?
FlowScalenumber?
FlowSpeednumber?
Foamstring?
FoamDepthnumber?
FoamScalenumber?
Refractionnumber?
WaveAmplitudenumber?
WaveScalenumber?
WaveSpeednumber?

Defining a Material

Lifecycle: Server

Id, Pipeline, and Model define the material on their own; each grouped table below them is optional.

Luau
local id = game.Materials.DefineMaterial({	Id = "dungeon_stone",	Pipeline = "Opaque",	Model = "Triplanar",	Surface = { TileSize = 4, RoughnessMult = 0.8 },	Physics = { Friction = 0.7, Restitution = 0.1 }})print("Defined material:", id)
Output: Defined material: dungeon_stone