Glow Shader Only Affecting Individual Objects

Hi guys,

Basically, the usage of the Glow Effect image-effect, is needed for our project. We’re trying to give blocks a neon glow, and each block or tier thereof should be a different neon color, but the problem is with the Glow Effect affects the entire scene, and makes everything glow a color.

We need it to affect only blocks we assign it too, and some blocks for some levels have more than one color. Can you guys help me out with this, it’d be greatly appreciated.

Look at the shader replacement examples with its glow.

Fullscreen glow will not work for your purpose as it applies glow basing on the diffuse textures alpha value.

Alternatively, if its more like wireframe alike stuff glowing, I would seriouly consider to not use a glow shader but Vectrosity instead :slight_smile:

Well, I’m not a coder, but is there anyway i cna achieve what I’d like, having the script only effect certain object. Or no.

No if you use the glow postfx then there is nothing you can do, its global

Can’t I set the code to only affect the blocks, like not use the global variable…if not this is a big problem. Our game is set around neon lighting…

As mentioned: if you do it as done in the shader replacement examples then yes.

if you use glow fullscreen effect then no.

And just for leon lighting around I wouldn’t use glow at all but Vectrosity, runs significantly faster and looks better too. Did you give it a look yet?

Can you please link me, I think I found ti but it mentions nothing about glowing. I’m no coder, so shader replacement examples?

Would really like help, there’s got to be a way to change the code so it affects only the blocks, I made tags for them and am trying to figure this out. And Vectrosity has nothing to do with what I’m doing.

Bump.

I just did that and what you can do is setup another camera to render only those objects and put the glow script only there.

you can do that more or less in those steps:
create a new layer and give a name like, glowlayer
Create a new camera and in the culling mask option select only the layer you just created and deselect the others.
Go to your objects that are supposed to glow and set their layers(and maybe their children layers too depends on your needs) to this same glowlayer.

This is pretty much it, it wouldnt hurt to look at what all the camera options are in the unity reference documentation at: Unity - Manual: Camera component
so you can setup your cameras correctly.
I did just that for the glow and it does work, but I have to warn you, im talking about the glow script not the Bloom And Lens Flares. Bloom unfortunately affects the whole scene regardless, but thats not such an issue for me as much as the glow is.

Try it and give me a shout if you have any problems
GL

May be I dont get it right. My setup is
camera1(depth:0) : No Glow Layer, but all others. Clear with Solid Color: BLACK
camera2(depth:1) : Glow Layer, but nothing else. Clear: NONE

the result is that everything glows because the image effect of camera2 will also glow the rest of the pixels ignoring that these were rendered using NOGLOWLAYER. So how to solve it?

I tried to create a Tron-Like-Glow Effect. So the object should not glow, but some objects (or even better: some pixels) should glow.

It might be the camera order depth try setting the glow camera 1, non glow 0

Wow allot of these type of questions: you can do what you are trying to do with this method I describe in this thread, which is more or less what sendel is suggesting. You need to render things on different camera layers.

http://forum.unity3d.com/threads/104856-Image-Effect-per-object