Home Technical Talk

Light source attributing to opacity?

polycounter lvl 9
Offline / Send Message
omar_0007 polycounter lvl 9
I would like to try and set up a material in maya so the opacity is controlled by the contribution of a single light, is there a simple way to do this or will it be a stretch to get it done?

Replies

  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    I tried some fun tricks, but I can't find a way to sample lighting info "live" on a surface and pipe that into transparency.

    However, you can bake lighting to a texture and then use that as a transparency map.
  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    Oh, I found a new thing! Here's a shader network if you want this live in renders. For some reason i expected this to work in the viewport, but it doesn't.



    surfaceLuminance samples whatever object is using the material, no need to worry about using a separate material per object.
    The remapValue does two things: I inverted the value ramp for transparency. It also acts as a Levels for the light input so you can adjust the amount of transparency you're getting from the light.
  • omar_0007
    Offline / Send Message
    omar_0007 polycounter lvl 9
    Oh, I found a new thing! Here's a shader network if you want this live in renders. For some reason i expected this to work in the viewport, but it doesn't.



    surfaceLuminance samples whatever object is using the material, no need to worry about using a separate material per object.
    The remapValue does two things: I inverted the value ramp for transparency. It also acts as a Levels for the light input so you can adjust the amount of transparency you're getting from the light.
    Sorry for the late response, thank you very much c: really helped me out. I just need to try it in vray now
Sign In or Register to comment.