Search Unity

Pinball playfield lighting

Discussion in 'Editor & General Support' started by Geo-Ego, Jul 15, 2013.

  1. Geo-Ego

    Geo-Ego

    Joined:
    Sep 25, 2012
    Posts:
    12
    I'm wondering how to achieve the effect of having backlit translucent plastic. I'm specifically working on a pinball playfield, and I'm not sure how to get the extremely vibrant lights on the playfield to look right. I've attached on and off states from a light on a Pinball FX2 playfield as reference.

    $playfieldLight_on.png $playfieldLight_off.png

    I had initially tried using a transparent shader on a plane, and simply illuminating the transparent area from underneath, but of course the light doesn't go through the plane, so I tried to fake it by putting another plane underneath so that the light was seen reflecting off of that through the transparency. It kind of works, but it doesn't give me the sharpness and vibrancy that the attached images have.

    I also tried faking it by lighting it from above, but of course that doesn't work properly because the black outlines are equally illuminated, which sort of washes it out and ruins the effect.

    I thought this would be pretty simple but now I'm stumped. I'm thinking I need a specific shader to get the proper effect, but I just don't know what to try at this point. Any help is greatly appreciated.
     
  2. BIG-BUG

    BIG-BUG

    Joined:
    Mar 29, 2009
    Posts:
    457
    Your conclusion is correct, regular lights are a dead end here.
    Just place a simple quad which shows the lit element over the dark background. You may want to use additional blending (e.g. Particles/Additive shader), so you could add some glow around the element.
    All you have to do then is to enable/disable your quad like a light.
     
  3. Balint

    Balint

    Joined:
    Sep 24, 2013
    Posts:
    10
    In ZenPinball, And PFX, the sollution is this: The playfield artwork contains the unlit lights. Then thera are transparent planes on each lamp, wich has a texture showing the lit lamp. It has self illumination. When the lamp is on, the object is rendered, else not. You can play with the value of self illumination too.