Using Colored Translucent Shadows

In this How-to, we intend to show you how you can setup and use Translucent Shadow Color to create a material that can cast a colored shadow. There are many applications where this could be useful to inject some color into your scene, but a common use would be for something like a stained glass window.

Example:

translucent_T.JPG

Translucent Shadow Color

Translucent Shadow Color is the term used to describe how shadows will pick up colors of objects that they pass through also known as Transmission. The amount of light that passes through the material is determined by its opacity value between 0 and 1 and how much light is being cast onto the material. For example, if the opacity was set to 0, the light transmission for a colored shadow from the material would be none. If the opacity value were set to 1, then it would be fully opaque.

Material Setup

  • For the following examples these will be using Translucent as the Blend Mode of choice.

  • Lit and Unlit Blend Modes that can be used: Translucent, Additive, and Modulate

Notes

  • Indirect lighting will sometimes wash out the translucent shadows and make them less saturated than the emissive or diffuse of the translucent materials.

  • Normal map intensity can be artificially adjust by increasing the Translucency Directional Light Intensity

  • Using Blend Mode Modulate will require you to disable Separate Translucency in the Material Inputs panel.

Lit Material

Alpha Channel for Mask

TCS_Lit_Masked.PNG

  1. Select the Material Attributes node and change the following in its Details panel:

    • Blend Mode: Translucent

    • (Optional) Two Sided: Checked

    • Translucency Lighting Model: Surface Translucency Volume

  2. Plug the Alpha channel of the Texture Sample into Opacity slot to mask parts of material.

Custom Opacity

TCS_Lit_CustomOpacity.PNG

  1. Select the Material Attributes and change the following in its Details panel:

    • Blend Mode: Translucent

    • (Optional) Two Sided: Checked

    • Translucency Lighting Model: TLM_Surface

  2. Create a Multiply node and plug into Opacity on the Material Attriubutes node.

  3. Plug the Alpha of the Texture Sample into pin A.

  4. Create a Constant value and set the value to anything below 1. With 0 being fully transparent and 1 being fully opaque. TCS_LIT_CO_constantValue.PNG

  • Two Sided is a good choice to use if you intend the player to see both sides of the mesh with the material.

  • When not using Two Sided, the light must cast onto the visible side of the mesh with the material.

  • To mask part of the image, you will need to have an Alpha channel with your texture.

Unlit Material

TCS_Unlit_Mat.PNG

  1. Select the Material Attributes node and change the following in its Details panel:

    • Blend Mode: Translucent

    • Shading Model: Unlit

    • (Optional) Two Sided: Checked

    • Translucency Lighting Model: TLM_Surface

  2. Plug the Texture Sample into Emissive.

Colored Translucent Shadows in Action

Alpha Channel for Mask

  • Blend Mode: Translucent

  • Shading Model: Lit or Unlit

Logo_LIT_Masked.PNG

Custom Opacity

  • Blend Mode: Translucent

  • Shading Model: Lit or Unlit

TCS_Lit_CO_Result.PNG

Shadow Sharpness

Shadow sharpness can be affected by several different factors, including the lightmap resolution of the mesh receiving the transmitted shadow color, the source angle of the light, and the quality of the texture sample.

Lightmap Resolution

Lightmap Resolution 64

Lightmap Resolution 1024

Limitations

  • Translucent Shadow Color is only supported by Static Lights

Conclusion

The most important thing to remember about colored shadows is that it ONLY supports Static Lights. Also, you will want to make sure that you are selecting the best blending mode (Translucent, Additive, and Modulate) that fits your needs for your design. There are a number of applications for colored shadows and each blend mode can be used to work within your needs for your projects.

Tags