TransparentMaterials

From Space Engineers Wiki
< Modding‎ | Reference‎ | SBC
Jump to navigation Jump to search

TransparentMaterials are a subcategory of normal Space Engineers materials. Their definitions contain additional parameters to enable finer control over aspects of how the material is displayed ingame.

In order to assign a TransparentMaterial definition to a “normal” material, the TransparentMaterial’s SubtypeId and the material’s Name must match.

Wrapper & Entry Example

<?xml version="1.0"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <TransparentMaterials>
        <!-- One or more TransparentMaterial entries are placed here. -->
    </TransparentMaterials>
</Definitions>
A typical TransparentMaterials.sbc entry
      <TransparentMaterial>
        <Id>
            <TypeId>TransparentMaterialDefinition</TypeId>
            <SubtypeId>GlassInside</SubtypeId>
        </Id>      
        <AlphaMistingEnable>false</AlphaMistingEnable>
        <AlphaSaturation>1</AlphaSaturation>
        <CanBeAffectedByOtherLights>true</CanBeAffectedByOtherLights>
        <IgnoreDepth>false</IgnoreDepth>
        <SoftParticleDistanceScale>1</SoftParticleDistanceScale>
        <Texture>Textures\Particles\SquareWindowDirtInside_ca.dds</Texture>
        <GlossTexture>Textures\Models\Cubes\Chrome_ng.dds</GlossTexture>
        <UseAtlas>false</UseAtlas>
        <NeedSort>true</NeedSort>
        <UVOffset>
            <X>0</X>
            <Y>0</Y>
        </UVOffset>
        <UVSize>
            <X>1</X>
            <Y>1</Y>
        </UVSize>
        <Color>
            <X>0.73</X>
            <Y>0.73</Y>
            <Z>0.73</Z>
            <W>0.8</W>
        </Color>
        <ColorAdd>
          <X>0.0</X>
          <Y>0.0</Y>
          <Z>0.0</Z>
          <W>0.0</W>
        </ColorAdd>
        <ShadowMultiplier>
          <X>0</X>
          <Y>0</Y>
          <Z>0</Z>
          <W>4.0</W>
        </ShadowMultiplier>
        <LightMultiplier>
          <X>0.055</X>
          <Y>0.055</Y>
          <Z>0.055</Z>
          <W>0.055</W>
        </LightMultiplier>
        <Reflectivity>0.06</Reflectivity>
        <Fresnel>0.25</Fresnel>
        <ReflectionShadow>0.4</ReflectionShadow>
        <Gloss>0.4</Gloss>
        <GlossTextureAdd>0.55</GlossTextureAdd>
        <SpecularColorFactor>3</SpecularColorFactor>
      </TransparentMaterial>
This is the entry for the TransparentMaterial GlassInside, corresponding to the Material GlassInside.

Elements

Most TransparentMaterial entries in the current TransparentMaterials.sbc contain old elements, which are not in use anymore. As a result, they will not be covered by this reference.
Element Description

AlphaMistingEnable

Boolean: true / false

Start and end values determine the distance in meters at which a material's transparency is rendered.
Only works on billboards spawned by code, not on models.

AlphaMistingStart

Float

The distance at which the material starts to fade in.

AlphaMistingEnd

Float

The distance at which the material finishes fading in.

CanBeAffectedByOtherLights

Boolean: true / false

Whether or not other lights will cast light onto this texture.
Only works on billboards spawned by code, not on models.

SoftParticleDistanceScale

Float: 0.0 - n

Changes the way normals are applied to a transparent surface, making it appear to have smoother transitions between hard surfaces.
Only works on billboards spawned by code, not on models.

Texture

String: Path

Path to the CA (Color Alpha) texture defined for the entry.
Color Alpha textures are different from the usual CM textures in that their alpha channel does denote transparency and not metalness.

Color

FloatVector4:

X (Red)

Y (Green)

Z (Blue)

W (Alpha)

Overrides the color of the CA texture.
Values over 1.0 will result in the material gaining bloom in that color.

ColorAdd

FloatVector4:

X (Red)

Y (Green)

Z (Blue)

W (Alpha)

This color is added on top of the color of the Texture.
Values over 1.0 will result in the material becoming emissive in that color.

ShadowMultiplier

FloatVector4:

X (Red)

Y (Green)

Z (Blue)

W (Alpha)

Controls the contribution of the color in shadowed areas.

SHIELD-Technique:

  • X: UV Scale - Multiplies the scale of the UV Map
  • Y: Speed - Controls the speed at which the UV Map moves.

LightMultiplier

FloatVector4:

X (Red)

Y (Green)

Z (Blue)

W (Alpha)

Controls the contribution of the sun to the lighting.

SHIELD-Technique:

  • X: Emissivity Strength - Controls the strength of the emissivity.
  • Y: Backlight Falloff - Controls how quickly the backlight disappears at distance.
  • Z: Backlight Strength - Controls the strength of the backlight.
  • W: Unknown -

Reflectivity

Float: 0.0 - 1.0

If Fresnel and Reflectivity are greater than 0, there can be a reflection. Increase Reflectivity if you want reflections at all angles.

Fresnel

Float

If Fresnel and Reflectivity are greater than 0, there can be a reflection. Increase Fresnel if you want reflections at glancing angles.

ReflectionShadow

Float: 0.0 - 1.0

Controls how intense the reflection is in the shadowed part of the block. Intensity is always 1 in the unshadowed part.

SHIELD-Technique:

It likely affects the strength of the gloss map in some way.

GlossTextureAdd

Float: 0.0 - 1.0

Increases the gloss defined by the NG texture of the material. If both are zero, the reflection devolves into ambient color.

GlossTexture

String: Path

Path to the NG-texture defined for the entry.

Gloss

Float: 0.0 - 1.0

How clearly the reflected sun can be seen on the material.

SpecularColorFactor

Float

Increases the specularity of the color (the size of the sun glare).

IsFlareOccluder

Boolean: true / false

Whether sprite flares of the sun, lights, thrusters, etc. can be seen through the Transparent Material.