Using this Postprocessing library I have found an easy use of the selective bloom effect.
I want to apply bloom to my lighting, so that it creates a bloom effect as you look upon the floor that receives the light. Initially I thought it would be easier to imitate this effect by adding the bloom effect directly to my floor/plane, but as I did that the bloom only occurred as I stood a 90* degree angle above it.
Through debugging, when I applied the bloom on all materials, there seem to be a different, as in, the bloom is actually applied to the light source itsself, because there is a difference, to how the bloom effects the floor. Look at the video attached.
I donāt know how to attach the bloom to my lighting, it doesnāt way as I do it.
To make bloom selective, you have to drive the brightness beyond the bloom thresholdā¦ and set the threshold above the brightness of the things you donāt want bloomed.
For instance you can set the bloom threshold to 1 or 2, and use the material.emissiveColor.set( 3,3,3 ) to make that object bloom.
I forgot to attach the video. I am aware of that, thatās not really my issue. See this:
So like, I can easily attach bloom to selected objects, but I cannot attach it to the light itself. I donāt know how to explain this in a way thatās easy to understand.
Yeah. Iām not understanding. Maybe ask chatGPT to translate?
My english is great, I wouldnāt even know how to explain it properly in my native language lol.
Okay so, what seems to be happening on the video is that the selective bloom works. It is only attached to the floor plane geometry. As I approach the spot where the light shines on the plane, it seems to be blooming, but only as I stand directly above it. When I invert the bloom, meaning everything, except the floor will bloom, suddenly the spot starts to bloom from a further distance (which is the effect that I want), but since there is no other material at that very specific place, my deductive thinking is, that the light itself is causing the bloom rather than the material.
This is confusing me, since I thought bloom was attached to materials, but from this āexperimentā it seems as if the bloom is applied to the light source itself. Therefore, if that is true, I wonder how I apply the bloom to the light source?
Bloom isnāt āattachedā to anything. Itās a post process.
It scans the frame buffer and looks for pixels that are > threshold in brightness, and does a gaussian blur.
How you make those pixels bright is up to youā¦ whether you do it by using an emissive materialā¦ or shining a bright light onto something to drive its reflected color brightness over the threshold.
Maybe mean attach bloom to pixels which lightied by spotLight
There is a lot of confusion about bloom since early versions of threejs (webGL1) didnāt support HDR framebuffers, so the max possible pixel brightness was 1. (255) Soā¦ you either had to underlight everything in your scene, and ONly light the ābloomedā objects to 1ā¦ OR, use āselectiveā bloom which was a separate pass that only included tagged objects. This is no longer the case, and we can āselectā bloom by simply lighting things normally, and for bloomed objects, making them emit light that is brighter than all other lights in the scene, thus triggering the bloom filter.
apologies if this is unhelpful. I still donāt understand the original question.
Donāt worry whatsoever, clearly Iām the one at issue, but itās quite difficult to explain. I iāll try to record another video for you. I always appreciate any help!
1 Like
Okay, so I hope this makes some sense:
I am sorta understanding. Is there perhaps fog in the scene? Maybe when further away the light levels go down below the threshold?
Also likeā¦ if an object is in the āselectionā listā¦ that might not be a guarantee that it will bloomā¦ since it still obeys the threshold?
I havenāt used the pmdrs/drei bloom muchā¦ Iāve mostly used the vanilla unreal bloom.
Nope, I should have removed the fog, so it didnāt confuse the example. Fog is disabled within the method, as well as the other methods, like the grid etc.
Yes, itās not a guarantee it will bloom, if it doesnāt obey threshold. I tested that out on other elements, like a test cube, and changed the emissiveness of it - so it seems like that still plays a role, however, I still donāt get why the floor seems to be emissive, but only at a 90 degree angle (right above it,) that makes me think that the light source itself is somehow blooming independently of the objects its interacting with.
Might seem like I should leave this, but Iām gonna keep the thread open in case, you or someone else comes up with something.
Thanks!