Bloom Exclude

Is there a way to exclude specific objects from the bloom render pass?



I’ve got a scene which is using bloom without any trouble. I added a simple square (box with almost no depth) to the scene that is transparent, except for the corners, that shows the object the player has selected. This box is included in the bloom effect, but I don’t want it to be. I used SimpleTextured.j3md as the texture because I want it to be fully lit no matter what the lighting in the scene around it is. I realize this would normally be something you would have as part of the GUI, but figuring out where to place the selection square on the GUI layer so that it properly surrounds the selected object is much harder than my current approach.

well…i’m afraid you can’t.



I tried to attach it to another viewport, but the filter being a full screen quad, it simply mask the rendered scene.

I need to think about this…

I’ll come up with a solution.

Got it, thanks for taking a look. I appreciate it!



Please let me know if you figure something out. In the meantime, I’ll see if I can figure out a different way to do it.

You could set a 1 pixel white glowmap to all objects that should use bloom, and none to the objects that should not. Feels a bit like a dirty hack however

EmpirePhoenix said:
You could set a 1 pixel white glowmap to all objects that should use bloom, and none to the objects that should not. Feels a bit like a dirty hack however


I thought about that, but to do that I have to use Lighting.j3md instead of SimpleTextured.j3md, and Lighting.j3md is lit based on the lighting in the scene. I need this object to be 100% lit all the time, since it's basically selection brackets.

I did notice, however, that there was a small tutorial on the bloom and glow wiki page explaining how to make a custom material compatible with bloom ("Making your home brewed material definition support Glow"). Is there a way to do the opposite? To make a custom version of SimpleTextured that is always ambient lit but doesn't use bloom?

No you are mixing things bloom has 2 ways of working : classic scene bloom, with light extraction or glow of an object via glow map or glow color.

You are using classic bloom, using glow maps for everything but the selection bracket won’t yield the same result.

Actually I think more of another filter solution.

This filter would have to be after the bloom in the filter stack. it would render another (pre) viewport containing your bracket object to a frame buffer, and just mix the result via shader to a full screen quad with the previously rendered bloomy scene.



But…it’s hacky too…the thing is for now using filters just disable the possibility to have multiple viewports… and there might be a better way around this.