3 Replies Latest reply on May 21, 2008 5:12 PM by Miha Kokalj

    Light range

    Miha Kokalj Level 1
      Hello.

      Is it possible to set the lighting ray distance of a spot light? By default lights have infinite range, meaning that the light intensity doesnt fall off with range. Any idea how to overcome that? Is it possible to use reach option available in Lux?

      Thanks
        • 1. Re: Light range
          Mylenium Most Valuable Participant
          Nope, not natively. To simulate lights with falloff you need Buena Depth Cue, which basically overwrites all 3D shading of AE itself.

          Mylenium
          • 2. Re: Light range
            A. Cobb Level 3
            If you are only using the one light, you could also tie the illuminated layers' material properties to the distance to the light using expressions.

            I gave it a quick try and came up with this:

            > mainLight = thisComp.layer("Light 1");

            > falloff = effect("Falloff")("Slider")/10000;

            > lightDistance = Math.max(length(mainLight.toWorld([0,0,0]), toWorld(anchorPoint))*falloff, .01);

            > value/(4*Math.PI*lightDistance*lightDistance)

            Add a slider control called "Falloff" to your layer and then apply the expression to the Diffuse and Specular material properties. You should be able to use the Falloff slider control to adjust the falloff. It's a work in progress, and needs much better controls to normalize the falloff layers to the illumination of any non-falloff layers, but it's a starting point.
            • 3. Re: Light range
              Miha Kokalj Level 1
              Unfortunately i'm using lots of layers and lights, so the Depth Cue would be the solution for me.

              Thanks guys.