Glow buffer and z order
by Kevin Johnson · in Torque Game Engine Advanced · 07/29/2005 (11:04 am) · 6 replies
Im having a little trouble with zorder on the glow buffer.
Basically we have a 2 stage material baseTex[0] is an gradient set to scrolling
and baseTex[1] is a frame we wish to overlay.
Here is without glow enabled

and this is the with glow enabled

The effect we are going for is for the glow to only emit through the holes like in the first pic.
Has anyone seen/ worked out something like this? If not where should i look first?
Basically we have a 2 stage material baseTex[0] is an gradient set to scrolling
and baseTex[1] is a frame we wish to overlay.
Here is without glow enabled
and this is the with glow enabled
The effect we are going for is for the glow to only emit through the holes like in the first pic.
Has anyone seen/ worked out something like this? If not where should i look first?
#2
07/29/2005 (5:16 pm)
Hmm.. that didnt seem to werk, im now only seeing the glow texture..
#3
When you are seeing just the glow texture, what's going on with the rest of the scene? Can you only see the glowing bits, and everything else is black?
Are any of these materials translucent?
07/31/2005 (10:46 am)
Stefan is correct, you should just be able to put the non-glowing bit on stage 0, and the glowing bit on stage 1.When you are seeing just the glow texture, what's going on with the rest of the scene? Can you only see the glowing bits, and everything else is black?
Are any of these materials translucent?
#4

The strut1 texture is a targa with alpha trans for the holes
Strut1_glow is png full alpha.
08/01/2005 (12:31 pm)
Ok, here is what im getting with the following declnew Material(Strut1)
{
baseTex[0] = "Strut1";
bumpTex[0] = "frame_n";
baseTex[1] = "strut1_glow";
glow[1] = true;
// animFlags[1] = $scroll;
// scrollDir[1] = "0.0 1.0";
// scrollSpeed[1] = 0.8;
};The strut1 texture is a targa with alpha trans for the holes
Strut1_glow is png full alpha.
#5
Here's the deal at the moment: you can't mask out glowing areas with other stages/textures unless you use a CustomMaterial. You CAN make bits of areas glow without masking though, just color everything in your second stage baseTex black that you don't want glowing.
This won't work if you want your glowing bits to scroll, but you can animate them (see the glowing green areas on the floor of the demo).
08/01/2005 (6:12 pm)
Argghh, I wrote nice post showing how this could be done and then realized that there is no blendOp override for Material stages. I'll have to add this to the list of things to be done for MS3.Here's the deal at the moment: you can't mask out glowing areas with other stages/textures unless you use a CustomMaterial. You CAN make bits of areas glow without masking though, just color everything in your second stage baseTex black that you don't want glowing.
This won't work if you want your glowing bits to scroll, but you can animate them (see the glowing green areas on the floor of the demo).
#6
08/02/2005 (9:38 pm)
Ok gotcha..i'll try custom material
Torque Owner Stefan Lundmark
That is, put the base frame on Material 1, and the glowing innerpart on Material 2.. then apply glow on the 2nd material.