Game Development Community

Glow

by Viren Thambidorai · in Torque Game Engine Advanced · 09/26/2007 (2:54 am) · 13 replies

Hi all,

how to change the intensity of Glow i.e in TorqueScript for any material we say glow[0] = true. is there any way by which we can control intensity of this glow?? so far every material to which i say,

emissive[0] = true;
glow[0] = true;

glows perfectly fine, wht if i want diferent amt of glow to each material???

Thanks in advance.

#1
09/26/2007 (5:53 am)
My error, removed.

Was thinking of the bloom based glow effect instead of pure (and currently heavily broken) glow.
Glow has no editor based settings to be altered.
#2
09/26/2007 (6:09 am)
He's talking about the glow in the materials which has no relation to lighting at all. Glow basically has one fixed intensity, if you look at the shader. However, removing the emissive flag might lower how bright it looks.
#3
09/26/2007 (6:29 am)
Okies am aware about that, but wht am interested in is varying glow intensity like 10% - 20% -n so on....

Quote: Glow basically has one fixed intensity, if you look at the shader.

am srry but am still searching the way Glow is implemented , i mean i traced into engine,
in material.cpp i found few lines dealing with glow, but nthing implementation specific...
as per shader i dnt even i have idea which shader TGEA has used ( probably blur ) for glow since i have failed to find any reference to glow!

ofcrse am missing out smthing vry important, but am quite a noob. can i get to know how exactly glow is implemented in TGEA so that i can atleast play with it!

Thanks once again guys :)
#4
09/26/2007 (6:37 am)
From my own findings the intensity of glow seems to be dependent on how light the rgb channels are.
It doesnt seem to work of alpha channels like you would expect. It seems to get its glow value from how bright the picture itself is.

Basically lowering/highering the brightness or the saturation seems to help.
#5
09/26/2007 (7:00 am)
@Viren
For glow specifics, try looking in .\engine\renderInstance\renderGlowMgr.h\.cpp and for specific rendering of the glow buffer itself look in .\engine\gfx\glowBuffer.cpp.

Off of the top of my head, (most simply) it looks like if you exposed the kernel in glowBuffer to script you could influence the "perceived" amount of glow.
#6
09/26/2007 (12:48 pm)
Quote:
From my own findings the intensity of glow seems to be dependent on how light the rgb channels are.
It doesnt seem to work of alpha channels like you would expect. It seems to get its glow value from how bright the picture itself is.

Basically lowering/highering the brightness or the saturation seems to help.
This, to my understanding, is exactly how the Glow was intended to work in TGEA. Adding an extra "intensity" or "brightness" parameter would require extra changes. However, it's probably not difficult to add an extra field that just acts as a "multiplier" to the glow. But, since I haven't looked at the code, I can't really say for sure.
#7
09/27/2007 (1:53 am)
As Barry mentioned above, at the moment the glow is controlled by the RGB value of the texture material? so the lighter the image the higher intensity glow the item will out put, & vice verser for low intensity.

Personally I would like to see support of a independent alpha channel that could be applied on a per material bases, and wouldn't effect any of the surface texturing, rather than having everything combined.
#8
09/27/2007 (5:38 am)
Yes it is controlled by the Color. The brighter the texture the more glow.

Traslucent/transparent things don't glow, without changes in code.
In short the Glow implementaion is very basic (crap).

Request: I would also like have a glow mask to have one surface have glow on different areas.
#9
10/20/2007 (2:52 pm)
Can any body say how to pass custom constants to vertex shaders?

thanks
#10
10/21/2007 (5:37 am)
Could you apply the glow in second pass on material and use another texture?
#11
10/21/2007 (8:54 am)
PuG,

I've done the second-pass glow thing. I believe the floor texture in the TGEA demo does that as well (and is animated).
#12
10/21/2007 (1:38 pm)
You can apply glow to whatever pass you want, and have it only affect masked areas.
#13
10/21/2007 (2:15 pm)
Would it be possible if you could post an example please? had ago myself though must be doing something wrong.

Regards,