No announcement yet.

Coloured shadows/Translucency.

  • Filter
  • Time
  • Show
Clear All
new posts

    Coloured shadows/Translucency.

    I am currently trying to work out how to do Translucent materials with coloured shadows as demonstrated here: shadows

    However unfortunately, no matter what I try, it doesn't seem to work.

    I will explain my set up, and then show you images of the set up.

    - New level, created a BSP surface and hollowed it out
    - Added staticmesh with translucent material on it.
    - Added PointLightToggleable so that it casts the shadow on a wall. (I also tried various other lights)

    My material setup has it's blend mode set to BLEND_Translucent, and lighting model set to MLM_Phong. Also, Opacity Mask Clip Value at 0.5 (although it doesn't seem to matter. I guess because i'm not using a mask).
    It is also Two-Sided.

    All options under Translucency are turned off, however has been tested with "Cast Translucency Shadow As Masked"

    In the Lightmass of the material, "Cast Shadow as masked" is turned off.

    I have a Texture Sample plugged into the Diffuse and Emissive.
    I have a Vector3 set to red (1,0,0) plugged into TransmissionColor
    In Transmission Mask, is a Lerp, connected to that Lerp to point A is a constant of 1, to B is the Diffuse (textureSample), and to Alpha, is the Alpha of the TextureSample.

    I also tried to follow this tutorial to no avail.

    This is the results I get no matter what I try.
    I can get as far as having a translucent shadow, but I can't make it coloured, no matter what I try, and I have a feeling that it's probably just one little thing.

    And here is the Material set up.

    Upon further investigation (now that I am awake and feeling fresh), I have found that I don't need to add LERP to the material at all.
    The documentation is just explaining that when Blend Mode is set to Translucent, it uses a LERP which gets the opacity and Diffuse to work out what light should pass through.

    So now, currently, all I have connected is A diffuse, and a constant of 1 connected to Opacity.

    Nothing should be connected to Transmission Mask or Transmission Colour, as they are not the same as the Transmission mentioned in the documentation.

    Unfortunately though, I still do not get any shadow colour, it is still desaturated.


      Aaaaaand, I found the problem.

      I was doing it all correctly, however the problem was that I was using a toggleable version of the light, rather than just a DirectionalLight, PointLight, or Spotlight.

      I will post pictures of the results soon. You will like what you see ....hopefully haha


        And here is the aforementioned images

        The map is for Chivalry: Medieval Warfare if anybody was wondering