This is only the first part of the Tutorial. The Flare is going to work just in one plane (Front Construction Plane), and depends only on the relative position of the Camera.Target to the Light Source.
Click here if you want to go to the 2nd TUTORIAL (ULF Beta 0.2)
Click here if you want to go to the ULF MAIN PAGE
Implemented in Beta 0.1:
Rays of any count and size, animatable.
Rays rotate when the camera moves
Rays can glow (using M-buffer in Video Post)
Secondaries of any count (7 implemented), and any form (implemented as N-gons from triangle to circle.- any shape is possible).
Secondaries move and rotate when the camera moves.
Colors and Radial Transparency are freely customizeable and animatable.
Two Glow zones of any color and size.
Optional Noise function
HERE IS HOW ULF Beta 0.1 WORKS...
Let us create the geometry first:
Create an Omni Light.
Create a Star Shape at the same point in the Front Viewport. You can set the number of peaks to 8, 10, or even animate it...
Create some N-gon Shapes at the same point. You can check the "Rounded" anytime if you want circles for Secondaries.
Create a Target Camera in the Top Viewport.
Add an Extrude modifier to every shape.
Add a Planar UVW modifier to every shape.
Now we are going to set the Expressions to control the position of the Secondaries.
Open TrackView and select the Position Track of the first Secondary
Add an Expression Controller to the Position Track.
Click on Properties (or right-click and select Properties)
Create two Vectors: "TCamera" and "Light"
Assign the Position of the Camera.Target to "TCamera"
Assign the Position of the Omni Light to "Light"
Enter the Expression for the Position of the Secondary:
[ Light.x-(2*(Light.x-TCamera.x)), Light.y, Light.z-(2*(Light.z-TCamera.z)) ]
Evaluate the Expression.
Repeat the same steps for all Secondaries - the only difference will be the Multiplier in the Expression: Instead of 2 use other values like 0.7, 1.2, 1.5, 1.8 etc. to place the Secondaries on the screen when the Camera.Target moves relatively to the Light.
If you animate the Camera.Target now, the Secondaries will behave as desired.
To move the Rays with the Light, you can either link them to the OmniLight, or add an Expression Controller for Position, create the Vector "Light" and place it as an Expression.
To let the Rays rotate, add an Euler Controller to the Rotation Track of the Star shape.
Select the Y Track of the Euler Controller and add an Expression Controller.
Create the Vecors "TCamera" and "Light" again.
Enter the Expression
(TCamera.x-Light.x )/ 100
You can do the same for every Secondary with a minus sign:
-(TCamera.x-Light.x)/100
if you use poligonal secondaries, they will rotate now...
Now it is time to create many Materials for the Secondaries and Rays.
Set Self-Illum. to 100%
Click on Diffuse Map, select Gradient.
Set the Radio Button to "Radial".
Set 3 different colors, or even further Radial Gradients as Sub-Textures.
Copy this Texture to the Opacity Slot of the Material, or create a similar Gradient map.
Assign to an Object.
Repeat for the next material using slightly different colors.
Now for the Flare Glow:
Open the Environment Settings
Add 2 Volume Light effects.
Add the Omni Light to the effect list of both.
Set the effects to create glows. The Glows should be smaller than the Rays. Set the color of the bigger one to pure red, for the smaller one to red-white.
If you wish, you can set the M-Channel of the Ray color to a number greater than 0. In Video Post, you can add a Glow Filter to affect the Rays only. (The pictures above do not use Glow for the Rays.)
Click here to download the .MAX scene with ULF Beta 0.1.
Bobo's Unreal Lens Flare (ULF)
Copyrigh (c) 1997 by Borislav Petrov.
Feel free to change, improve and distribute.