Q: Is there any freeware Lens Flare plug-in on the Web?


A: This is the look of ULF Beta 0.21:

This is the third part of the Tutorial. Some flare behaviour problems from Beta 0.2 have been fixed. All expressions have been rewritten.


Click here if you want to go to the 2nd TUTORIAL - Obsolete! (ULF Beta 0.2)

Click here if you want to go to the BASIC TUTORIAL (ULF Beta 0.1)

Click here if you want to go to the ULF MAIN PAGE


Fixed/Changed in Beta 0.21:

  • The way the Flare is calculated in 3D coordinates changed. Now it behaves better (but still not perfectly). The flare position in world space has no influence on its appearance anymore.
  • The Grouping caused problems and has been removed. Now the only link between flare elements are the expression controllers - no linking, no grouping.
  • A Look-At controller has been used for each flare element separately. The Looking Dummy from Beta 0.2 is still there, but has no function (just in case you need it someday for something else.... :o)
  • The User Scale Control has been partially removed -. you can set (or animate) the size of the Flare elements, but not the whole flare (Beta 0.3 will add separate animatable control fields for the distance of a secondary to the flare which will fix this)
  • Using the above scaling method, you can simulate Occlusion.
  • Additional control fields for Rays, Streaks and Secondaries rotation velocity were included.

    HERE IS HOW ULF Beta 0.21 WORKS...

    (You will need the scene from the 2nd Tutorial to do what is described here)

    Let's change all controllers:

  • Ungroup the Flare.
  • Copy the Star shape used for scale control 3 times to have 4 controls.
  • Select every single flare element, select the Transformation track in the Motion menu and add a "Look At" controller.
  • Select the Camera position as the object to look at.
  • Add an Expression Controller to all 3 tracks.
  • Enter these Expressions:

    Position Expression (Secondaries only!):

    [ Light.x+(Multi*(CTarget.x-Light.x)),
    Light.y+(Multi*(CTarget.y-Light.y)),
    ( Light.z+Multi*(CTarget.z-Light.z)) ]

    The Constant Multi controls the distance of the secondary to the flare when tha camera moves. You have to enter a float constant for each secondary like 0.8, 1.2, 1.5 etc. You can add controls (like the scale control in Beta 0.2) in order to be able to set/change/animate these multipliers. This will be part of Beta 0.3

    Roll Expression: (Secondaries, Rays)

    length(CTarget-Light)*(Speed-3)/500

    length returns the distance between Camera.Target and the Flare, Speed is a variable derived from the new velocity controls. When the number of star points is set to 3, the expression returns 0 and no rotation occurs. Any other value lets the element rotate. You can add different roll controls for Secondaries, Rays, and Streaks. (using the 3 new control shapes)

    Scale:

    [ length(Light-Camera)/10000*Scaler,
    length(Light-Camera)/10000*Scaler,
    length(Light-Camera)/10000*Scaler ]

    This will make the size of each element fixed as you zoom in/out and let you set the size of the elements, but will not scale the whole flare as in Beta 0.2
    You can add the Scaler variable to the Position expression of the secondaries if you wish to have the same effect as in Beta 0.2, or wait for Beta 0.3...
    One positive aspect of the new scaling method is that you can simulate Occlusion now! When an object moves in the space between the Camera and the Flare, you can animate the scale settings manually and let the flare fade out and almost disappear behind it...


    Click here to download the .MAX scene with ULF Beta 0.21.


    Bobo's Unreal Lens Flare (ULF)
    Copyrigh (c) 1997 by Borislav Petrov.
    Feel free to change, improve and distribute.