Found a bug in the scene lighting...
by John Kabus (BobTheCBuilder) · in Torque Game Engine · 09/21/2003 (12:40 pm) · 4 replies
Found a bug in the scene lighting in:
void InteriorProxy::light(LightInfo * light)
The following lines are reversed (aproximatly line 1845 (originally wrong line number, sorry for the confusion)):
transform.mulP(start);
start.convolve(scale);
Should be:
start.convolve(scale);
transform.mulP(start);
The lighting will currently work fine for a scaled interior or translated/rotated interior, but not both. The current code prevents Torque from finding the correct illuminated area per lexel. This change will resolve the issue.
John Kabus.
void InteriorProxy::light(LightInfo * light)
The following lines are reversed (aproximatly line 1845 (originally wrong line number, sorry for the confusion)):
transform.mulP(start);
start.convolve(scale);
Should be:
start.convolve(scale);
transform.mulP(start);
The lighting will currently work fine for a scaled interior or translated/rotated interior, but not both. The current code prevents Torque from finding the correct illuminated area per lexel. This change will resolve the issue.
John Kabus.
#2
John Kabus.
09/21/2003 (7:40 pm)
By the way, you can test for the problem by creating an interior that's a box with a small door. When scene lighting adds in the sun's lighting all walls facing the sun are lit regardless of what other objects/walls/interiors/terrain maybe around to cast shadows.John Kabus.
#3
** *** WARNING WARNING WARNING *** **
*** ** WARNING WARNING WARNING ** ***
Errors exists in this interior. Please use the debug rendering modes
to find and correct the following problems:
* Ambiguous brushes: 0
* Orphaned Polygons: 88
*** ** WARNING WARNING WARNING ** ***
** *** WARNING WARNING WARNING *** **
I inspected the interior in orphaned debug mode and found nothing; all of the brushes were bright white. Could this even be causing the lighting issues?
Oh and I verified the bug (or interior problem) on a Realm Wars build (same interior). Any ideas would be appreciated.
Thanks...
John Kabus.
09/22/2003 (7:59 pm)
Ok I'm actually getting the funky lighting even with lighting scale set to 32, but only at the brush edges. I'm also getting the following warnings from map2dif:** *** WARNING WARNING WARNING *** **
*** ** WARNING WARNING WARNING ** ***
Errors exists in this interior. Please use the debug rendering modes
to find and correct the following problems:
* Ambiguous brushes: 0
* Orphaned Polygons: 88
*** ** WARNING WARNING WARNING ** ***
** *** WARNING WARNING WARNING *** **
I inspected the interior in orphaned debug mode and found nothing; all of the brushes were bright white. Could this even be causing the lighting issues?
Oh and I verified the bug (or interior problem) on a Realm Wars build (same interior). Any ideas would be appreciated.
Thanks...
John Kabus.
Torque Owner John Kabus (BobTheCBuilder)
It looks like either map2dif is messing up the texture transform/vector info (unlikely seeing how the map2dif light maps look fine) or scene lighting is not taking the scale into effect properly.
I was wondering if anyone could verify this and/or has run across this before.
John Kabus.