Default 3D rendering material.
    public class SpatialMaterial : Material

This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.

Inheritance Chain


    public SpatialMaterial()


    public Color AlbedoColor { get; set; }

The material’s base color.

    public Texture AlbedoTexture { get; set; }

    public float Anisotropy { get; set; }

The strength of the anisotropy effect.

    public bool AnisotropyEnabled { get; set; }

If true, anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: false.

    public Texture AnisotropyFlowmap { get; set; }

    public bool AoEnabled { get; set; }

If true, ambient occlusion is enabled.

    public float AoLightAffect { get; set; }

    public bool AoOnUv2 { get; set; }

    public Texture AoTexture { get; set; }

    public TextureChannel AoTextureChannel { get; set; }

    public float Clearcoat { get; set; }

    public bool ClearcoatEnabled { get; set; }

If true, clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: false.

    public float ClearcoatGloss { get; set; }

    public Texture ClearcoatTexture { get; set; }

    public bool DepthDeepParallax { get; set; }

    public bool DepthEnabled { get; set; }

If true, Depth mapping is enabled. See also NormalEnabled.

    public bool DepthFlipBinormal { get; set; }

    public bool DepthFlipTangent { get; set; }

    public int DepthMaxLayers { get; set; }

    public int DepthMinLayers { get; set; }

    public float DepthScale { get; set; }

    public Texture DepthTexture { get; set; }

    public Texture DetailAlbedo { get; set; }

    public BlendMode DetailBlendMode { get; set; }

    public bool DetailEnabled { get; set; }

    public Texture DetailMask { get; set; }

    public Texture DetailNormal { get; set; }

    public DetailUV DetailUvLayer { get; set; }

    public float DistanceFadeMaxDistance { get; set; }

    public float DistanceFadeMinDistance { get; set; }

    public DistanceFadeModeEnum DistanceFadeMode { get; set; }

    public Color Emission { get; set; }

The emitted light’s color. See EmissionEnabled.

    public bool EmissionEnabled { get; set; }

If true, the body emits light.

    public float EmissionEnergy { get; set; }

The emitted light’s strength. See EmissionEnabled.

    public bool EmissionOnUv2 { get; set; }

    public EmissionOperatorEnum EmissionOperator { get; set; }

    public Texture EmissionTexture { get; set; }

    public bool FlagsAlbedoTexForceSrgb { get; set; }

    public bool FlagsDisableAmbientLight { get; set; }

If true, the object receives no ambient light. Default value: false.

    public bool FlagsDoNotReceiveShadows { get; set; }

If true, the object receives no shadow that would otherwise be cast onto it. Default value: false.

    public bool FlagsEnsureCorrectNormals { get; set; }

    public bool FlagsFixedSize { get; set; }

If true, the object is rendered at the same size regardless of distance. Default value: false.

    public bool FlagsNoDepthTest { get; set; }

If true, depth testing is disabled and the object will be drawn in render order.

    public bool FlagsTransparent { get; set; }

If true, transparency is enabled on the body. Default value: false. See also ParamsBlendMode.

    public bool FlagsUnshaded { get; set; }

If true, the object is unaffected by lighting. Default value: false.

    public bool FlagsUsePointSize { get; set; }

If true, render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also ParamsPointSize.

    public bool FlagsVertexLighting { get; set; }

If true, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: false.

    public bool FlagsWorldTriplanar { get; set; }

If true, triplanar mapping is calculated in world space rather than object local space. See also Uv1Triplanar. Default value: false.

    public float Metallic { get; set; }

The reflectivity of the object’s surface. The higher the value the more light is reflected.

    public float MetallicSpecular { get; set; }

General reflectivity amount. Note: unlike Metallic, this is not energy-conserving, so it should be left at 0.5 in most cases. See also Roughness.

    public Texture MetallicTexture { get; set; }

    public TextureChannel MetallicTextureChannel { get; set; }

    public bool NormalEnabled { get; set; }

If true, normal mapping is enabled.

    public float NormalScale { get; set; }

The strength of the normal map’s effect.

    public Texture NormalTexture { get; set; }

    public float ParamsAlphaScissorThreshold { get; set; }

    public bool ParamsBillboardKeepScale { get; set; }

    public BillboardMode ParamsBillboardMode { get; set; }

Controls how the object faces the camera. See BillboardMode.

    public BlendMode ParamsBlendMode { get; set; }

The material’s blend mode. Note that values other than Mix force the object into the transparent pipeline. See BlendMode.

    public CullMode ParamsCullMode { get; set; }

Which side of the object is not drawn when backfaces are rendered. See CullMode.

    public DepthDrawMode ParamsDepthDrawMode { get; set; }

Determines when depth rendering takes place. See DepthDrawMode. See also FlagsTransparent.

    public DiffuseMode ParamsDiffuseMode { get; set; }

The algorithm used for diffuse light scattering. See DiffuseMode.

    public bool ParamsGrow { get; set; }

If true, enables the vertex grow setting. See ParamsGrowAmount.

    public float ParamsGrowAmount { get; set; }

Grows object vertices in the direction of their normals.

    public float ParamsLineWidth { get; set; }

    public float ParamsPointSize { get; set; }

The point size in pixels. See FlagsUsePointSize.

    public SpecularMode ParamsSpecularMode { get; set; }

The method for rendering the specular blob. See SpecularMode.

    public bool ParamsUseAlphaScissor { get; set; }

    public int ParticlesAnimHFrames { get; set; }

The number of horizontal frames in the particle spritesheet. Only enabled when using BillboardMode.BILLBOARD_PARTICLES. See ParamsBillboardMode.

    public bool ParticlesAnimLoop { get; set; }

If true, particle animations are looped. Only enabled when using BillboardMode.BILLBOARD_PARTICLES. See ParamsBillboardMode.

    public int ParticlesAnimVFrames { get; set; }

The number of vertical frames in the particle spritesheet. Only enabled when using BillboardMode.BILLBOARD_PARTICLES. See ParamsBillboardMode.

    public float ProximityFadeDistance { get; set; }

    public bool ProximityFadeEnable { get; set; }

If true, the proximity and distance fade effect is enabled. Default value: false.

    public bool RefractionEnabled { get; set; }

If true, the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: false.

    public float RefractionScale { get; set; }

The strength of the refraction effect.

    public Texture RefractionTexture { get; set; }

    public TextureChannel RefractionTextureChannel { get; set; }

    public float Rim { get; set; }

    public bool RimEnabled { get; set; }

If true, rim effect is enabled. Default value: false.

    public Texture RimTexture { get; set; }

    public float RimTint { get; set; }

The amount of to blend light and albedo color when rendering rim effect. If 0 the light color is used, while 1 means albedo color is used. An intermediate value generally works best.

    public float Roughness { get; set; }

Surface reflection. A value of 0 represents a perfect mirror while a value of 1 completely blurs the reflection. See also Metallic.

    public Texture RoughnessTexture { get; set; }

    public TextureChannel RoughnessTextureChannel { get; set; }

    public bool SubsurfScatterEnabled { get; set; }

If true, subsurface scattering is enabled. Emulates light that penetrates an object’s surface, is scattered, and then emerges.

    public float SubsurfScatterStrength { get; set; }

The strength of the subsurface scattering effect.

    public Texture SubsurfScatterTexture { get; set; }

    public Color Transmission { get; set; }

The color used by the transmission effect. Represents the light passing through an object.

    public bool TransmissionEnabled { get; set; }

If true, the transmission effect is enabled. Default value: false.

    public Texture TransmissionTexture { get; set; }

    public Vector3 Uv1Offset { get; set; }

    public Vector3 Uv1Scale { get; set; }

    public bool Uv1Triplanar { get; set; }

    public float Uv1TriplanarSharpness { get; set; }

    public Vector3 Uv2Offset { get; set; }

    public Vector3 Uv2Scale { get; set; }

    public bool Uv2Triplanar { get; set; }

    public float Uv2TriplanarSharpness { get; set; }

    public bool VertexColorIsSrgb { get; set; }

If true, the model’s vertex colors are processed as sRGB mode. Default value: false.

    public bool VertexColorUseAsAlbedo { get; set; }

If true, the vertex color is used as albedo color. Default value: false.


    public Color GetAlbedo()

Getter for AlbedoColor

    public float GetAlphaScissorThreshold()

Getter for ParamsAlphaScissorThreshold

    public float GetAnisotropy()

Getter for Anisotropy

    public float GetAoLightAffect()

Getter for AoLightAffect

    public TextureChannel GetAoTextureChannel()

Getter for AoTextureChannel

    public BillboardMode GetBillboardMode()

Getter for ParamsBillboardMode

    public BlendMode GetBlendMode()

Getter for ParamsBlendMode

    public float GetClearcoat()

Getter for Clearcoat

    public float GetClearcoatGloss()

Getter for ClearcoatGloss

    public CullMode GetCullMode()

Getter for ParamsCullMode

    public bool GetDepthDeepParallaxFlipBinormal()

Getter for DepthFlipBinormal

    public bool GetDepthDeepParallaxFlipTangent()

Getter for DepthFlipTangent

    public int GetDepthDeepParallaxMaxLayers()

Getter for DepthMaxLayers

    public int GetDepthDeepParallaxMinLayers()

Getter for DepthMinLayers

    public DepthDrawMode GetDepthDrawMode()

Getter for ParamsDepthDrawMode

    public float GetDepthScale()

Getter for DepthScale

    public BlendMode GetDetailBlendMode()

Getter for DetailBlendMode

    public DetailUV GetDetailUv()

Getter for DetailUvLayer

    public DiffuseMode GetDiffuseMode()

Getter for ParamsDiffuseMode

    public DistanceFadeModeEnum GetDistanceFade()

Getter for DistanceFadeMode

    public float GetDistanceFadeMaxDistance()

Getter for DistanceFadeMaxDistance

    public float GetDistanceFadeMinDistance()

Getter for DistanceFadeMinDistance

    public Color GetEmission()

Getter for Emission

    public float GetEmissionEnergy()

Getter for EmissionEnergy

    public EmissionOperatorEnum GetEmissionOperator()

Getter for EmissionOperator

    public bool GetFeature(Feature feature)

    public bool GetFlag(Flags flag)

    public float GetGrow()

Getter for ParamsGrowAmount

    public float GetLineWidth()

Getter for ParamsLineWidth

    public float GetMetallic()

Getter for Metallic

    public TextureChannel GetMetallicTextureChannel()

Getter for MetallicTextureChannel

    public float GetNormalScale()

Getter for NormalScale

    public int GetParticlesAnimHFrames()

Getter for ParticlesAnimHFrames

    public bool GetParticlesAnimLoop()

Getter for ParticlesAnimLoop

    public int GetParticlesAnimVFrames()

Getter for ParticlesAnimVFrames

    public float GetPointSize()

Getter for ParamsPointSize

    public float GetProximityFadeDistance()

Getter for ProximityFadeDistance

    public float GetRefraction()

Getter for RefractionScale

    public TextureChannel GetRefractionTextureChannel()

Getter for RefractionTextureChannel

    public float GetRim()

Getter for Feature.Rim

    public float GetRimTint()

Getter for RimTint

    public float GetRoughness()

Getter for Roughness

    public TextureChannel GetRoughnessTextureChannel()

Getter for RoughnessTextureChannel

    public float GetSpecular()

Getter for MetallicSpecular

    public SpecularMode GetSpecularMode()

Getter for ParamsSpecularMode

    public float GetSubsurfaceScatteringStrength()

Getter for SubsurfScatterStrength

    public Texture GetTexture(TextureParam param)

    public Color GetTransmission()

Getter for Feature.Transmission

    public Vector3 GetUv1Offset()

Getter for Uv1Offset

    public Vector3 GetUv1Scale()

Getter for Uv1Scale

    public float GetUv1TriplanarBlendSharpness()

Getter for Uv1TriplanarSharpness

    public Vector3 GetUv2Offset()

Getter for Uv1Offset

    public Vector3 GetUv2Scale()

Getter for Uv1Scale

    public float GetUv2TriplanarBlendSharpness()

Getter for Uv1TriplanarSharpness

    public bool IsDepthDeepParallaxEnabled()

Getter for DepthDeepParallax

    public bool IsGrowEnabled()

Getter for ParamsGrow

    public bool IsProximityFadeEnabled()

Getter for ProximityFadeEnable

    public void SetAlbedo(Color albedo)

Setter for AlbedoColor

    public void SetAlphaScissorThreshold(float threshold)

Setter for ParamsAlphaScissorThreshold

    public void SetAnisotropy(float anisotropy)

Setter for Anisotropy

    public void SetAoLightAffect(float amount)

Setter for AoLightAffect

    public void SetAoTextureChannel(TextureChannel channel)

Setter for AoTextureChannel

    public void SetBillboardMode(BillboardMode mode)

Setter for ParamsBillboardMode

    public void SetBlendMode(BlendMode blendMode)

Setter for ParamsBlendMode

    public void SetClearcoat(float clearcoat)

Setter for Clearcoat

    public void SetClearcoatGloss(float clearcoatGloss)

Setter for ClearcoatGloss

    public void SetCullMode(CullMode cullMode)

Setter for ParamsCullMode

    public void SetDepthDeepParallax(bool enable)

Setter for DepthDeepParallax

    public void SetDepthDeepParallaxFlipBinormal(bool flip)

Setter for DepthFlipBinormal

    public void SetDepthDeepParallaxFlipTangent(bool flip)

Setter for DepthFlipTangent

    public void SetDepthDeepParallaxMaxLayers(int layer)

Setter for DepthMaxLayers

    public void SetDepthDeepParallaxMinLayers(int layer)

Setter for DepthMinLayers

    public void SetDepthDrawMode(DepthDrawMode depthDrawMode)

Setter for ParamsDepthDrawMode

    public void SetDepthScale(float depthScale)

Setter for DepthScale

    public void SetDetailBlendMode(BlendMode detailBlendMode)

Setter for DetailBlendMode

    public void SetDetailUv(DetailUV detailUv)

Setter for DetailUvLayer

    public void SetDiffuseMode(DiffuseMode diffuseMode)

Setter for ParamsDiffuseMode

    public void SetDistanceFade(DistanceFadeModeEnum mode)

Setter for DistanceFadeMode

    public void SetDistanceFadeMaxDistance(float distance)

Setter for DistanceFadeMaxDistance

    public void SetDistanceFadeMinDistance(float distance)

Setter for DistanceFadeMinDistance

    public void SetEmission(Color emission)

Setter for Emission

    public void SetEmissionEnergy(float emissionEnergy)

Setter for EmissionEnergy

    public void SetEmissionOperator(EmissionOperatorEnum @operator)

Setter for EmissionOperator

    public void SetFeature(Feature feature, bool enable)

    public void SetFlag(Flags flag, bool enable)

    public void SetGrow(float amount)

Setter for ParamsGrowAmount

    public void SetGrowEnabled(bool enable)

Setter for ParamsGrow

    public void SetLineWidth(float lineWidth)

Setter for ParamsLineWidth

    public void SetMetallic(float metallic)

Setter for Metallic

    public void SetMetallicTextureChannel(TextureChannel channel)

Setter for MetallicTextureChannel

    public void SetNormalScale(float normalScale)

Setter for NormalScale

    public void SetParticlesAnimHFrames(int frames)

Setter for ParticlesAnimHFrames

    public void SetParticlesAnimLoop(bool loop)

Setter for ParticlesAnimLoop

    public void SetParticlesAnimVFrames(int frames)

Setter for ParticlesAnimVFrames

    public void SetPointSize(float pointSize)

Setter for ParamsPointSize

    public void SetProximityFade(bool enabled)

Setter for ProximityFadeEnable

    public void SetProximityFadeDistance(float distance)

Setter for ProximityFadeDistance

    public void SetRefraction(float refraction)

Setter for RefractionScale

    public void SetRefractionTextureChannel(TextureChannel channel)

Setter for RefractionTextureChannel

    public void SetRim(float rim)

Setter for Feature.Rim

    public void SetRimTint(float rimTint)

Setter for RimTint

    public void SetRoughness(float roughness)

Setter for Roughness

    public void SetRoughnessTextureChannel(TextureChannel channel)

Setter for RoughnessTextureChannel

    public void SetSpecular(float specular)

Setter for MetallicSpecular

    public void SetSpecularMode(SpecularMode specularMode)

Setter for ParamsSpecularMode

    public void SetSubsurfaceScatteringStrength(float strength)

Setter for SubsurfScatterStrength

    public void SetTexture(TextureParam param, Texture texture)

    public void SetTransmission(Color transmission)

Setter for Feature.Transmission

    public void SetUv1Offset(Vector3 offset)

Setter for Uv1Offset

    public void SetUv1Scale(Vector3 scale)

Setter for Uv1Scale

    public void SetUv1TriplanarBlendSharpness(float sharpness)

Setter for Uv1TriplanarSharpness

    public void SetUv2Offset(Vector3 offset)

Setter for Uv1Offset

    public void SetUv2Scale(Vector3 scale)

Setter for Uv1Scale

    public void SetUv2TriplanarBlendSharpness(float sharpness)

Setter for Uv1TriplanarSharpness

Inner Types


Name Value Description
Disabled 0 Default value.
Enabled 1 The object’s z-axis will always face the camera.
FixedY 2 The object’s x-axis will always face the camera.
Particles 3 Used for particle systems. Enables particle animation options.


Name Value Description
Mix 0 Default blend mode.
Add 1  
Sub 2  
Mul 3  


Name Value Description
Back 0 Default cull mode. The back of the object is culled when not visible.
Front 1 The front of the object is culled when not visible.
Disabled 2 No culling is performed.


Name Value Description
OpaqueOnly 0 Default depth draw mode. Depth is drawn only for opaque objects.
Always 1 Depth draw is calculated for both opaque and transparent objects.
Disabled 2 No depth draw.
AlphaOpaquePrepass 3 For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn.


Name Value Description


Name Value Description
Burley 0 Default diffuse scattering algorithm.
Lambert 1 Diffuse scattering ignores roughness.
LambertWrap 2 Extends Lambert to cover more than 90 degrees when roughness increases.
OrenNayar 3 Attempts to use roughness to emulate microsurfacing.
Toon 4 Uses a hard cut for lighting, with smoothing affected by roughness.


Name Value Description
Disabled 0  
PixelAlpha 1  
PixelDither 2  
ObjectDither 3  


Name Value Description
Add 0  
Multiply 1  


Name Value Description
Transparent 0  
Emission 1  
NormalMapping 2  
Rim 3  
Clearcoat 4  
Anisotropy 5  
AmbientOcclusion 6  
DepthMapping 7  
SubsuraceScattering 8  
Transmission 9  
Refraction 10  
Detail 11  
Max 12  


Name Value Description
Unshaded 0  
UseVertexLighting 1  
DisableDepthTest 2  
AlbedoFromVertexColor 3  
SrgbVertexColor 4  
UsePointSize 5  
FixedSize 6  
BillboardKeepScale 7  
Uv1UseTriplanar 8  
Uv2UseTriplanar 9  
AoOnUv2 11  
EmissionOnUv2 12  
UseAlphaScissor 13  
TriplanarUseWorld 10  
AlbedoTextureForceSrgb 14  
DontReceiveShadows 15  
DisableAmbientLight 17  
EnsureCorrectNormals 16  
Max 18  


Name Value Description
SchlickGgx 0 Default specular blob.
Blinn 1 Older specular algorithm, included for compatibility.
Phong 2 Older specular algorithm, included for compatibility.
Toon 3 Toon blob which changes size based on roughness.
Disabled 4 No specular blob.


Name Value Description
Red 0  
Green 1  
Blue 2  
Alpha 3  
Grayscale 4  


Name Value Description
Albedo 0  
Metallic 1  
Roughness 2  
Emission 3  
Normal 4  
Rim 5  
Clearcoat 6  
Flowmap 7  
AmbientOcclusion 8  
Depth 9  
SubsurfaceScattering 10  
Transmission 11  
Refraction 12  
DetailMask 13  
DetailAlbedo 14  
DetailNormal 15  
Max 16