# Hot element's glare in a colored lamp in rotational animation?

The problem was acceptably solved by using ideas from Hexbob6's reply, plus the ideas from the link he gave me in discussion of his reply (the link is in the discussion of his reply).

Problem's very gist: Need to maintain the glow of a colored lamp's hot element (the glow remains visible even in rotation, when the hot element of the green lamp disappears from sight but a part of the lamp is still seen), plus to have the element's color be close in color to its blackbody temperature all the time (and the glow be affected by it).

Tried to add glare to hot element before Z combine - didn't work (no glare visible at all). Only worked if whole scene uses glare [2.png]. Plus if the scene is rotated such that the hot element is not seen on screen directly [1b.png], the light is not giving out the glare or shine from the lamp. Tried to Alpha-Over the glare-added colored glass (without the hot element) in the compositor onto the whole scene [4.png], but the solid case around the colored glass wrongly looked transparent.

If I could also have an advice on how to make a very/even more realistic light like this, it would be really nice. Thank you!

Edit: If anyone could help with a custom node setup to control the length of light falloff such that the non-compositor "glare" fades out right after leaving surface of the colored glass (and before it leaves the volume scattering enabled cube around it which otherwise makes the glare to have a square shape), it would be really nice. Thanks a lot!

4:

3b:

3a:

2:

1a:

1b:

• The issue stems from the fact that the Glare node in the compositor is a post-production effect, and doesn't take into account actual cycles emission materials. Instead, it bases how much glow to give the image based on how bright the rendered pixels are (hence the brighter green receives glow, because it is brighter). You could try increasing the Threshold value of the Glare node to see if you can capture all of the green pixels (viewable by setting the Mix value to 1), or you could use a different method entirely (material/object IDs or volumetric materials to simulate fog). – Hexbob6 Aug 16 '18 at 21:26
• Tried material ID, didn't work out well for some reason - the color of the hot elements gets changed to purple, etc.: snag.gy/ux7IlD.jpg. As for volumetric scattering, I don't know how to make the rays shoot a shorter distance from the lamp, plus it renders too slow. – Dmitri Aug 17 '18 at 8:45
• interesting, I can't see what would be causing that purple colour! Are you rendering using the Filmic colour management settings? I know not all mix nodes support it (possibly neither Alpha Over?) and you can get weird artefacts such as those? – Hexbob6 Aug 17 '18 at 12:08
• No, not the Filmic c/m was used for the renders. It was fine and then it became like that when I kept on tweaking. – Dmitri Aug 17 '18 at 12:29
• Any idea how I can control light fall off using ray length to make volume scatter rays be so short they fade almost right away after leaving lamps surface (which produces a sort of a small glow) ? (Can't figure out the node set-up) – Dmitri Aug 17 '18 at 13:14

# How to Create a Glow Effect in Cycles

Okay so although you suggested that you'd prefer this not to be a compositing-based solution, as mentioned in the comments I'll put this together regardless as it is a very useful and adaptable effect.

Here's the end result of what we'll be creating:

The bulb itself is fairly simple, with a coloured-glass, domed bulb and an inner filament object. The materials are also fairly simple. The glass bulb simply uses the Principled BSDF shader with the following settings:

It is also important to set the Pass Index to 1 in the Settings dropdown of the Material tab in the Properties panel, as this will create an ID mask of the bulb object visible to the camera, which we will use in the compositing step. The final part of this process is to adjust the render and scene settings. Rendering glass with a thickness is always a bit process-intensive and can cause fireflies and noise, so I used the Branched Path Tracing method with the following settings to help reduce it:

Now, once that is rendered out, on to the compositor! The first step is adding a Glare node and adjusting the threshold and size. This step will require tweaking on a per-scene basis, but it will add a centralised glow at the heart of the bulb, wherever the filament is visible.

Next, the outer-glow effect can be developed. Remember that material Pass Index that we set earlier? We'll access that with an ID Mask node, giving us a b/w mask of only the bulb.

Using this mask, we'll now add a Blur node and set it to Fast Gaussian. This node will act as the 'spread', or light falloff control, of our lamp; the greater the blur, the larger the width of the glow.

The penultimate step of the compositing process is adding a Color Ramp to act as our light intensity controller. The left side of the ramp should be set to pure black, however the right side should have a dark-grey value. How dark this right side is, defines how intense, or bright, the final glow will be, and should be adjusted accordingly.

Finally, this edited mask can be used as the Fac input of an Add node to mix between the original image and a glow colour. This glow colour should technically be the colour of the bulb's glass shader, however you can be artistic with it!

And there we go, a compositing node setup that adds a realistic yet entirely customisable glow to the render! Here's the final node setup in its entirety, and I've also added my .blend file to you to play about with as well.

Hope this is of some help to you, and don't forget to upvote/mark as the right answer if it is! :)

• That worked really well (snag.gy/I0bBoW.jpg, snag.gy/HtAJRa.jpg)! Composer CAN be used for this kind of thing afterall! I couldn't get the core to yellow-out when I tilt the lamp toward's the scene's back though. The effect gets layed on top of the picture like this: snag.gy/WBqv1Q.jpg. I guess I would need Z combine and renderlayers for the element material? – Dmitri Aug 19 '18 at 5:03
• In particular, the following set-up is troublesome to me in this regard: snag.gy/ZYE0Km.jpg. I want to make an animation, and to be able to tilt the lamp without loosing the yellow effect. Any idea whether I should use alpha-over or the math-add (neither works as the summing node), or somethign else here? – Dmitri Aug 19 '18 at 16:07
• Your tutorial is an eye opener in many a regard. You are a very good teacher! Thank you very much. And I am sorry if I seem like a never-happy idiot with all my after-questions. – Dmitri Aug 19 '18 at 17:39
• At the top (i.stack.imgur.com/K2O9H.png) your result had a yellow core, and possibly the same set-up didn't exhibit the yellow glow overlaying when the model is tilted (i.stack.imgur.com/K2O9H.png). How did you connect things in the composer for that if so? – Dmitri Aug 19 '18 at 18:18
• @Dmitri the yellow core is a secondary glow effect added manually around the filament object. Your original question wasn't related to animation so the solution is tailored to suit a static rendered image. Technically, I believe, you wouldn't get the orange glow if the filament object isn't in direct view of the camera, as the bulb itself is green... (cont.) – Hexbob6 Aug 19 '18 at 23:48