Home Technical Talk

Maya ramp texture mapped to shadow colour of direction light, how to?

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
When I put a ramp node into the shadow colour of a directional light, the result is a tiling ramp. Is there any way to clamp the range so the texture is always displayed 0-1 relative to the shadows with a directional light.

Replies

  • Scruples
    Offline / Send Message
    Scruples polycounter lvl 10
    I assume you want to do this to get a cheap fake soft-shadow effect on your dmap shadows.
    Unfortunately it has no way of knowing how long the shadow would be so this is alot harder than it would seem at first.
    You could create four to six directional lights and offset them slightly from eachother, (less than a degree) to get a dmap based softshadow. It can be rather heavy though....if that's even what you want to do ^_^.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Actually I was looking at ways to fake subsurface scatter and I wanted to have the shadow have a red edge and be black in the center.
  • Illusions
    Offline / Send Message
    Illusions polycounter lvl 20
    (Color Utilities) Surface Luminance -> (Color Utilities) Clamp -> Ramp

    Add as a layer to the shader you want it to affect. The layer can either be a layer in a layered texture or layered shader.

    This doesn't solve your request in the OP but can be used to solve faking SSS.
Sign In or Register to comment.