Is there a selective bloom pass other than the threejs example? The original selective bloom pass is too hard to use, I have to change all materials every frame.
Is there a better way to realize selective bloom effect?
you don’t need to do anything at all, bloom is selective by default. that example you refer to is very complicated for no reason, probably also slower because you don’t need extra passes, copy passes, traverse the scene every frame, etc.
all you need to do is put bloom threshold to 1, so nothing blooms. now every color that has RGB higher than that treshold will glow, that is what the threshold is there for.
someMesh.material.color.set(100, 0, 0) // glowing bright red
someMesh.material.color.set(0, 100, 0) // glowing bright green
someMesh.material.color.set("hotpink") // normal color, won't glow
this example is a proof of concept for both pmndrs/postprocessing (imo the best composer for threejs by far) and jsm/effectcomposer, both work the same way. it’s react but that doesn’t change a thing, the principle remains the same:
i wouldn’t focus too much on these examples. both don’t use hdr workflow. you can set the threshold higher than 1 if light makes things glow still.
Thank you, I still don’t understand the threshold for unreal bloom pass, could you write some native threejs code, not in react. I tried several times, but the threshold works not as what I want. How to use that as a real switch for selective bloom.
Thank you very much. I really appreciate your help sincerely.
Maybe this will be helpful: Glowing effect on emissive map and not on color map - #9 by prisoner849
That would take me a day unfortunately, I don’t touch vanilla. but it’s only about the hdr principle. the threshold really is just brightness filter. All colours you normally use are between 0 and 1, red for instance is RBG 1 0 0. If you go higher than the bloom threshold materials will start to glow, that’s fundamentally how the effect is supposed to work.
If you make me a codesandbox with vanilla code and everything already set up I’ll fix the composer for you.