Making an Object Glow
-
Prerequisite
Description
Many objects around us emit lights. You can update the color emitted by an object using the update color block. You can also make that object glow in that color. Note that the emission color is used as the glowing color, not the diffusion color.
Here is a glowing ceiling light:
To make an object glow, we need to take 2 steps:
- First, we need to create a “glow layer”
- Second, we need to add that object to this glow layer.
Note that this is similar to the steps for highlighting an object. However, when you highlight an object, only the outer contour of the object lights up; but if an object is glowing, itself will be covered by that color.
Create a Glow Layer
To create a glow layer, you can use this block:
Intensity
The intensity controls how bright the color is. Here are 3 examples with intensities of 200, 100 and 50:
Blur Size
This input controls how much the halo extends out around the object. Usually you want to keep it no more than 100. When the blur size is large, it will take longer to draw. Here is a comparison of different blur size at the same intensity of 100:
Name
If you are using multiple glow layers, then you need to name them, so that you can refer to them later when you add objects to each layer.
Add an Object to a Glow Layer
You can add an object to a glow layer using this block:
If there is only one glow layer, then you do not need to specify its name. All objects added to the same glow layer will share the same intensity and blur size. Therefore, if you want to have different glow intensities or blur sizes for different objects, then they need to be added to different layers.
Add an Object to a Glow Layer
You can add an object to a glow layer using this block:
If there is only one glow layer, then you do not need to specify its name. All objects added to the same glow layer will share the same intensity and blur size. Therefore, if you want to have different glow intensities or blur sizes for different objects, then they need to be added to different layers.
Remove an Object from a Glow Layer
To turn off the glowing effect, you can also remove an object from a glow layer using this block:
If there is only one glow layer, then you do not need to specify the name of that layer.
What if an object does not have any emission color?
An object would only glow lights if it has emission colors. If it does not have any emissive color, we can update it to add the color.
For example, this light object does not have emission colors, so when we add it to a glow layer, it does not glow any lights:
To fix the issue, we can update the bottom part (its “main” component) to add the emission color (and keep the diffusion color black). Note that if you should only update the bottom part of the light object, otherwise the entire object would be glowing lights. -