How to have only certain objects react to bloom

I need to add bloom to just one object in a scene, problem is most examples of this either only do the whole scene or use the selective bloom example in the threejs docs. I want a lightbulb to be always on, not to change when its clicked, because of this I’m finding the selective bloom example not the easiest to read so I’m wondering if there’s an easier way that just has bloom always on for that object. I also made the lightbulb as a separate glTF file as I thought that might help.

1 Like

The selective bloom example is a bit out of date.

The trick now is to set the bloom threshold to something higher than the rest of the light in the scene (so nothing is blooming) and then for your lightbulb material, set an emissive color with a value Higher than the bloom threshold…

so for instance bloom threshold = 1.;
And THREE.Color( 3,0,0 ) to get a bright red bloom…

edit: I use bloom like this in this simulation/toy I made: logic lab simulator by thrax

The bloom stuff is set up in here: logiclab/js/three-viewer.js at c0bc279d9a9c220f4241d337ee6b0105c87b6847 · manthrax/logiclab · GitHub

1 Like

Wow thank you! I didn’t really understand what you meant but I tried the bloom threshold = 1 and because I had already set the emissive colour in blender, it worked straight away!
One more question if you don’t mind, if I rendered only the lightbulb with bloom in a seperate file would the bloom still affect objects rendered in another file?

1 Like

Yeah it will apply to everything in the scene…
But as long as you keep the Light intensities below the bloom threshold you can control what blooms and what doesn’t. So basically you only use “emissive” color on the things you want to bloom, and then adjust the threshold so the regular lit objects don’t get brighter than the threshold.

In that example I linked ^ you can open the options panel on the right and change the threshold…
And notice if you make the threshold close to 0, everything starts to bloom.

Try messing with those sliders to get a feel for how they interact with the emissive LEDs…