ParaShape

Materials

Entries of the document's materials lane.

16 methods: addMaterial, roughness, metallic, opacity, colorFactor, cutPattern, alphaCutout, emissive, transmission, clearcoat, sheen, normalMap, roughnessMap, metallicMap, ambientOcclusionMap, displacement.

addMaterial - Material

Surface appearance record, identified by its node key; PBR factors live on properties.

role step, type material, valid on materials, returns material, default key material.

ArgTypeDefaultMinMaxOptionsDescription
baseColorcolor'#ffffff'Surface color, #rrggbb.
textureurlBase color map address.
tileWidthlength10000Physical mm of one texture tile along U; the renderer repeats the texture at 1/tileWidth.
tileHeightlength10000Physical mm of one texture tile along V; the renderer repeats the texture at 1/tileHeight.

roughness - Roughness

Microfacet roughness, 0..1.

role step, type material, valid on materials, returns number, default key roughness.

ArgTypeDefaultMinMaxOptionsDescription
valuenumber0.95010 (mirror) to 1 (fully rough); absent on a material means this default.

metallic - Metallic

Metalness, 0..1.

role step, type material, valid on materials, returns number, default key metallic.

ArgTypeDefaultMinMaxOptionsDescription
valuenumber0010 (dielectric) to 1 (metal); absent on a material means this default.

opacity - Opacity

Surface opacity, 0..1.

role step, type material, valid on materials, returns number, default key opacity.

ArgTypeDefaultMinMaxOptionsDescription
valuenumber1010..1 factor; shared by opacity/colorFactor, each scaling what its own property name says.

colorFactor - Color factor

With a texture, the texture is tinted by white lerped toward baseColor by this factor (0 = untinted texture, 1 = full baseColor tint); without a texture it has no effect.

role step, type material, valid on materials, returns number, default key colorFactor.

ArgTypeDefaultMinMaxOptionsDescription
valuenumber1010..1 factor; shared by opacity/colorFactor, each scaling what its own property name says.

cutPattern - Cut pattern

patterns[] record key drawn where a section cuts this material.

role step, type material, valid on materials, returns string, default key cutPattern.

ArgTypeDefaultMinMaxOptionsDescription
valuepatternQuoted patterns[] key; absent fills the section cut with a solid color instead.

alphaCutout - Alpha cutout

Presence derives alphaMode MASK.

role step, type material, valid on materials, returns number, default key alphaCutout.

ArgTypeDefaultMinMaxOptionsDescription
valuenumber0.501Alpha threshold 0..1 below which a fragment is discarded; just authoring this property (any value) derives alphaMode MASK.

emissive - Emissive

Self-lit color + strength + map.

role step, type material, valid on materials, returns color, default key emissive.

ArgTypeDefaultMinMaxOptionsDescription
colorcolor'#rrggbb' self-lit color; absent means no emission.
intensitynumber10Multiplier on color; 1 is unamplified.
mapurlEmissive texture address, multiplied by color and intensity.

transmission - Transmission

Glass walls (KHR_materials_transmission).

role step, type material, valid on materials, returns number, default key transmission.

ArgTypeDefaultMinMaxOptionsDescription
amountnumber010..1 fraction of light transmitted through the surface; absent means opaque.
iornumber1.51Index of refraction; 1.5 is typical glass.
thicknesslengthVolume thickness in mm, for the attenuation the color/distance below describe.
attenuationColorcolor'#rrggbb' tint light takes on as it travels through the volume.
attenuationDistancelengthDistance in mm light travels through the volume before attenuationColor is fully applied.

clearcoat - Clearcoat

Varnish/gloss paint.

role step, type material, valid on materials, returns number, default key clearcoat.

ArgTypeDefaultMinMaxOptionsDescription
amountnumber010..1 strength of the clear-coat layer; absent means none.
roughnessnumber010..1 roughness of the clear-coat layer itself, independent of the base surface's roughness.

sheen - Sheen

Fabric/upholstery sheen.

role step, type material, valid on materials, returns color, default key sheen.

ArgTypeDefaultMinMaxOptionsDescription
colorcolor'#rrggbb' sheen tint; absent means none.
roughnessnumber010..1 roughness of the sheen layer.

normalMap - Normal map

Normal map address.

role step, type material, valid on materials, returns string, default key normalMap.

ArgTypeDefaultMinMaxOptionsDescription
valueurlNormal map texture address ('data:' or 'https:').

roughnessMap - Roughness map

Roughness map address.

role step, type material, valid on materials, returns string, default key roughnessMap.

ArgTypeDefaultMinMaxOptionsDescription
valueurlRoughness map texture address, multiplied by roughness.

metallicMap - Metallic map

Metallic map address.

role step, type material, valid on materials, returns string, default key metallicMap.

ArgTypeDefaultMinMaxOptionsDescription
valueurlMetallic map texture address, multiplied by metallic.

ambientOcclusionMap - AO map

Ambient-occlusion map address.

role step, type material, valid on materials, returns string, default key ambientOcclusionMap.

ArgTypeDefaultMinMaxOptionsDescription
valueurlAmbient-occlusion map texture address.

displacement - Displacement

Height map + amplitude, tessellated geometry only.

role step, type material, valid on materials, returns string, default key displacement.

ArgTypeDefaultMinMaxOptionsDescription
mapurlHeight map texture address; only affects tessellated geometry.
scalelength1Displacement amplitude in mm.

Edit on GitHub