Light Effects panel
The Light Effects panel lets you create advanced light effects that are applied on top of your base color animation dynamically.
Light effects are parametrized and they are not baked in as color keyframes, so it is very easy to adjust them if the timing of the animation changes — you only need to adjust the start frame and the duration of the light effect. However, this means that Blender calculates the light effects on-the-fly when you change frames, thus it comes with a slight performance cost.
Anatomy of a light effect
Every light effect builds on a user-defined color ramp, consisting of an arbitrary number of color stops at arbitrary positions on the color ramp, and a given interpolation method between the defined color stops on the ramp. Essentially, the color ramp is a function that takes a number between 0 and 1 and returns a color. The light effect that you define in the panel produces a number between 0 and 1 for each drone, and the color ramp turns this number into the color that gets applied to the drone.
Colors on the color ramp may have an alpha component. When the alpha component is 1, the color is opaque — it will replace the original color of the drone. When the alpha component is 0, the color is completely transparent and the original color of the drone will not be modified. Values in between 0 and 1 produce transparency effects — for instance, an alpha component of 0.5 mixes the original color of the drone with the color from the color ramp in equal proportions.
Light effects may be (and usually are) limited in space and time. Time-wise, the light effect affects the drones only from its designated start frame through its end frame. Space-wise, the light effect may affect all drones or only a subset of drones that are within the boundaries of an associated mesh. The mesh may be animated to produce dynamic light effects; for instance, you can "sweep" a cone of light on the drones by creating a light effect that sets the color of the drones to white, and then limiting it to the interior of an invisible sphere that is then swept through the scene.
The light effect stack
You may have noticed that the upper part of the light effects panel is occupied by a list. This list contains the effects themselves. In each frame all the effects are processed in a top-down manner, and for each effect, Blender decides whether the effect is going to affect the current frame or not, depending on its temporal and spatial properties. In any given frame, multiple effects may be active, and in this case the original color of each drone (defined by the keyframes of its material) is modified by each active effect in the order defined by the list of effects. This becomes important when the colors of the effects have alpha channels as the output may be a mixture of the original color of the drone as well as one or more active effects.
Use the + button next to the light effect list to add a new light effect to the end of the list. You can remove effects from the list by pressing the - button. You can duplicate previously created light effects with the Duplicate Light Effect button. To rearrange light effects, use the ▲ and ▼ buttons.
Individual light effects can be enabled or disabled by clicking on the check box in front of the light effect. You can also give a descriptive name to each light effect by double-clicking on its slot to edit the name.
The color ramp
Below the list of light effects there are standard Blender widgets to set up the color ramp associated to the currently selected effect in the light effect stack. These widgets work just like any other color ramp editor in Blender, but here is a short summary for sake of completeness:
The + button below the light effect list adds a new color stop to the color ramp.
The - button below the light effect list removes the selected color stop from the color ramp.
The v button reveals additional, less common (but nevertheless very useful) operators that can be applied to the entire color ramp:
Flip Color Ramp
Distribute Color Stops from Left
Distribute Color Stops evenly
Eyedropper tool for color selection
Reset Color Ramp
The "Color mode" dropdown list selects the color space in which the interpolation of the color ramp takes place. You can choose between RGB (red, green, blue), HSV (hue, saturation, value) and HSL (hue, saturation, lightness) color spaces.
The "Interpolation" dropdown list selects the interpolation mode used for the color ramp.
Refer to the documentation of the Color ramp widget in Blender’s own documentation for more details.
The next group of widgets below the color ramp specify the temporal constraints of the light effect, i.e. when the light effect should be applied. The two hard limits are the start frame and the duration: the light effect will be completely inactive outside this time interval. The fade in and fade out widgets specify the duration of the fade-in and the fade-out periods at the beginning and the end of the time interval of the light effect. During the fade-in period, the intensity of the light effect grows gradually from zero (inactive) to 1 (fully active). Similarly, the fade-out period animates the intensity of the light effect from 1 (fully active) to 0 (inactive). You can turn both of these off by setting their duration to zero.
Light effects may also be limited in space such that it affects only a subset of the drones. This is achieved by selecting a mesh in the Mesh picker widget and then setting the Target dropdown to one of the following options (instead of "All drones", which does not create a spatial constraint):
- Inside the mesh
Blender will test in each frame which drones are inside the selected mesh, and the effect will be applied only to those that are inisde. Note that containment checks are a relatively expensive operation, especially for complex meshes.
- Front side of plane
This setting is suitable if your mesh is a plane. Imagine that the plane is infinite and it separates the space into a "front" and a "back" half. Blender will select those drones that are in the "front" half of the 3D space. If your mesh is not a plane, Blender will pick the first face of the mesh and extend that into infinity. This test is computationally less expensive than a full containment test, so for simple cases you should use this instead of the more expensive containment test that you can achieve with the Inside the mesh option.
The Output dropdown determines how the color of a drone is picked from the color ramp. Recall that each light effect essentially produces a number between 0 and 1 for each drone, and then passes this number through the color ramp to calculate the final color that the effect will apply on the drone. The Output dropdown provides options for picking this number:
- First color of color ramp
The first color of the color ramp will be used by all drones during the whole light effect; in other words, each drone picks 0, which represents the start of the color ramp.
- Last color of color ramp
The last color of the color ramp will be used by all drones during the whole light effect; in other words, each drone picks 1, which represents the end of the color ramp.
All the drones are sorted according to the order they appear in the
Dronescollection, and they are then distributed evenly along the color ramp. For instance, if you have five drones, the first drone gets 0 (the left edge of the ramp), the second drone gets 0.25 (25% between the left and the right edge of the ramp), the third drone gets 0.5 (50% between the left and the right edge) and so on.
- Gradient (XYZ)
Drones are sorted according to their coordinates along the X, Y and Z axes (in this order), and they are then distribued evenly along the color ramp. This option has six variants with different axis order.
- Distance from mesh
The single static color picked for each drone will be calculated by mapping the normalized distances between the drones and the selected mesh (see the Mesh widget) to the color ramp (i.e. the closest drone to the mesh will pick the leftmost color in the ramp, the farthest will pick the rightmost color, all the rest will get a value in between, distributed evenly along the color ramp.
All drones will cycle through the color ramp simultaneously throughout the total duration of the light effect, starting from the left and ending at the right edge.
Some output mode types (such as Distance from mesh and Gradient-based types) support two mapping modes between the drones and the color ramp:
In ordered mode, drones are sorted first based on their coordinates or distances, and then they are distributed evenly along the color ramp.
In proportional mode, the drones are distributed along the color ramp in a way that their distances on the color ramp are proportional to their distances or coordinates in the scene itself.
The Influence parameter sets the overall transparency of the light effect. 1 means that the light effect completely overwrites the base color animation, 0 means no effect at all.
|The influence parameter can be animated with keyframes, which is a simple way to create flashes, for example.|
The Randomness parameter can be used to add a bit of randomness to the numbers picked by the drones according to the Output dropdown. Each drone is associated with a unique random number between -0.5 and 0.5, this number is multiplied by the randomness parameter, wrapping around the edges of the color ramp as needed, and the result is added to the number that was calculated based on the setting of the Output dropdown. This final number is then used to pick the color of the drone from the color ramp. Note that the default value of the randomness parameter is zero, which means that the value derived from the Output setting is used as is.