TerrainDetail | Documentation - Roblox Creator Hub (2024)

Show Deprecated

TerrainDetail has to be a child of a MaterialVariant object. TheMaterialVariant.BaseMaterial property of the parent MaterialVariantobject need to be one of the supported terrain Material, for example, it canbe Basalt but not Plastic.

Terrain renders with different textures for it's top(+y), bottom(-y), andside(horizontal to y axis) faces. If a MaterialVariant has no TerrainDetailchildren, all faces are rendered as MaterialVariant specified. At most 3TerrainDetail objects can be added to MaterialVariant, one for each face.TerrainDetail overrides the terrain appearance of a certain face.

For example, it can achieve this kind of effect: the top surface of Grass haslots of grass. On side surfaces, there are less grass. On bottom surfacesthere are no grass.

Summary

Properties

View all inherited from Instance

Methods

View all inherited from Instance

Events

View all inherited from Instance

Properties

ColorMap

Content

Read Parallel

Plugin Security

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

Face

Enum.TerrainFace

Read Parallel

Face that this TerrainDetail overrides. When more than one TerrainDetailobjects with the same face exist under a MaterialVariant, only one of themworks.

MaterialPattern

Enum.MaterialPattern

Read Parallel

Determines texture tiling method.

MetalnessMap

Content

Read Parallel

Plugin Security

This property determines which parts of the surface are metal and arenon-metal. A metalness map is a grayscale image where black pixelscorrespond to non-metals and white pixels correspond to metals.

Metals only reflect light the same color as the metal, and they reflectmuch more light than non-metals. Most materials in the real world can becategorized either metals or non-metals. For this reason, most pixels in ametalness map will be either pure black or pure white. Values in betweenare typically used to simulate dirt or grunge on top of an underlyingmetal area.

When Lighting.EnvironmentSpecularScale is 0, metalness has noeffect. For the most realistic reflections, settingEnvironmentSpecularScale and Lighting.EnvironmentDiffuseScale to1, and Lighting.Ambient and Lighting.OutdoorAmbient to(0,0,0) is recommended.

NormalMap

Content

Read Parallel

Plugin Security

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 usedfor lighting calculations. The R, G, and B channels of the NormalMapcorrespond to the X, Y, and Z components of the local surface vectorrespectively, and byte values of 0 and 255 for each channel correspondlinearly to normal vector components of -1 and 1.016 respectively. Thisrange is stretched slightly from -1 to 1 so that a byte value of 127 mapsto exactly 0. The normal vector's Z axis is always defined as thedirection of the underlying mesh's normal. A uniform (127,127,255) imagetranslates to a completely flat normal map where the normal is everywhereperpendicular to the mesh surface. This format is called "tangent space"normal maps. Roblox does not support world space or object space normalmaps.

Incorrectly flipped normal components can make bumps appear like indents.If you import a normal map and notice the lighting looks off, you may needto invert the G channel of the image. The X and Y axes of the tangentspace frame correspond to the X and Y directions in the image after it'stransformed by the mesh UVs. If you view your normal map in an imageeditor as if it were displayed on a surface, normals pointing towards theright side of the screen should appear more red, and normals pointingtowards the top side of your screen should appear more green.

The terms "DirectX format" and "OpenGL format" are sometimes used todescribe 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 mayalso refer to this as "tangent space" information. If you apply a normalmap and it does not seem to make any visual difference, you may need tore-export your mesh along with its tangent information from modelingsoftware.

RoughnessMap

Content

Read Parallel

Plugin Security

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

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

StudsPerTile

number

Read Parallel

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

View all inherited from Instance

Methods

View all inherited from Instance

Events

View all inherited from Instance

TerrainDetail | Documentation - Roblox Creator Hub (2024)
Top Articles
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 6007

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.