1
$\begingroup$

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: enter image description here

3b: enter image description here

3a: enter image description here

2: enter image description here

1a: enter image description here

1b: enter image description here

$\endgroup$
13
  • 1
    $\begingroup$ 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). $\endgroup$
    – Hexbob6
    Aug 16, 2018 at 21:26
  • $\begingroup$ 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. $\endgroup$
    – Dmitri
    Aug 17, 2018 at 8:45
  • $\begingroup$ 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? $\endgroup$
    – Hexbob6
    Aug 17, 2018 at 12:08
  • $\begingroup$ 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. $\endgroup$
    – Dmitri
    Aug 17, 2018 at 12:29
  • $\begingroup$ 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) $\endgroup$
    – Dmitri
    Aug 17, 2018 at 13:14

1 Answer 1

0
$\begingroup$

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:

Final Result Montage

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:

Glass Shader

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:

Render and Scene Settings

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.

Step 1

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.

Step 2

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.

Step 3

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.

Step 4

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!

Step 5


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.

Final Setup

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


$\endgroup$
10
  • $\begingroup$ 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? $\endgroup$
    – Dmitri
    Aug 19, 2018 at 5:03
  • $\begingroup$ 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? $\endgroup$
    – Dmitri
    Aug 19, 2018 at 16:07
  • $\begingroup$ 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. $\endgroup$
    – Dmitri
    Aug 19, 2018 at 17:39
  • $\begingroup$ 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? $\endgroup$
    – Dmitri
    Aug 19, 2018 at 18:18
  • $\begingroup$ @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.) $\endgroup$
    – Hexbob6
    Aug 19, 2018 at 23:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .