Game Development Community

TGEA 1.7.0 - Specular bug?

by Fyodor -bank- Osokin · in Torque Game Engine Advanced · 04/08/2008 (8:40 am) · 7 replies

Description: specular works only if the surface facing horizontal and down. If the poly surface facing "the sky" - no effect.
Screenshot:
my.afterworld.ru/~bank/gg/tgea170_shaderbug.jpgHow to reproduce:
Create file: TGEDemoAdvanced\game\scriptsAndAssets\data\interiors\materials.cs
with the following content:
new Material(E7BEAM02)
{
   baseTex[0] = "E7BEAM02";
   pixelSpecular[0] = true;
   specular[0] = "0.55 0.5 0.5 0.4";
   specularPower[0] = 16.0;
};
Load mission/demo and you will see that on some faces the effect is not applied.
This can be reproduced with any texture.
I've tried applying bumpTex[0] (normalmap) - no difference.

#1
04/08/2008 (8:45 am)
Tried to set "glow"
glow[0] = true;
and found that it renders differently at different view angles:
my.afterworld.ru/~bank/gg/tgea170_shaderbug_cam1.jpg
my.afterworld.ru/~bank/gg/tgea170_shaderbug_cam2.jpg
At some angles it disappears almost totally.

PC: GF8600 GT 512VRAM / WXP SP2 / DX: Nov2007

Edit: images to url
#2
04/08/2008 (8:54 am)
Sorry, the "glow" bug only in editor, in "normal" view - it works fine.
#3
04/08/2008 (8:57 am)
Hmm, specularity *is* a view-point dependent property. You sure this is erroneous behavior?
#4
04/08/2008 (9:06 am)
I was not able to make specularity to work on surfaces that facing "up" (non-vertical and non-down).
If I want to set the spec. to the floor - should it work?
And another stuff just discovered:
my.afterworld.ru/~bank/gg/tgea170_shaderbug_glow1.jpg
my.afterworld.ru/~bank/gg/tgea170_shaderbug_glow2.jpg
With the different "view" the glow is not visible.
Though on this texture there IS a specular, but it's not visible. If I rotate the dif, so it's facing a bit down, the spec is now VISIBLE, and - same problem with glow:
my.afterworld.ru/~bank/gg/tgea170_shaderbug_glow3.jpg
my.afterworld.ru/~bank/gg/tgea170_shaderbug_glow4.jpg

Edit: url's
#5
04/08/2008 (9:18 am)
Think of specularity as reflection. This means that it is dependent on your viewpoint relative to the light that is shining on the surface. I assume the light in your shots is the sunlight, so how much shininess you get depends on the amount of light the surface can bounce at you (edit: the angle the surface has to the sunlight and the angle you are looking at it).

This doesn't mean that it isn't potentially an issue. Honestly, I've not taken a closer look as I am not yet familiar with TGEA's material system. Just some general stuff about specularity.
#6
04/08/2008 (10:32 am)
The problem is that if I make a cube and set the texture to be with specular - at the bottom part (where no sun light should be) - it's "reflective", and on the top of it (where the it should be visible) - nothing.
#7
06/21/2008 (7:00 am)
This one is fixed here

edit: url