Game Development Community

T3D 1.1 beta 2 - Bad Terrain Ambient Shadowing (too much) - LOGGED

by Steve Acaster · in Torque 3D Professional · 08/04/2010 (2:33 pm) · 2 replies

Build:
Torque 1.1beta 2

Platform:
Windows 7 32bit

Target:
Editors/gfx(?)

Issue:
Ambient lighting on terrain is too strong / the falloff of light is too weak. Terrain which is in direct view of sunlight becomes fully shadowed too quickly.

a.imageshack.us/img819/9867/terrainambientbug.jpg
Steps to Repeat:
Make a terrain with undulation (noise) and fairly wide squareSize (8).
Easier to test issue with a Basic Sun, height 45 or lower (not real high like 80 or something). Helps to locate sun if it has a corona.
Move player object from sunlight into a "naturally" shadowed area of the terrain, see his shadow disappear but he is still fully lit.
Place camera on terrain nearby (in shadow) and look at sun. Sun and terrain are in line of sight - but terrain is FULLY ambient.

Suggested Solution:
This issue only started in 1.1alpha. Originally reported here in 1.1b1.
Tweak or rollback terrain ambient shadowing algorithm so it isn't so strong.

#1
08/04/2010 (8:12 pm)
I'm still certain the issue is that the lighting is somehow ignoring the squareSize and just treating any terrain as unscaled geometry. The excessively sharp lighting it produces makes perfect sense when you take the same terrain and set the squareSize to 1. To see the issue taken to an obviously-broken extreme, take the same terrain and go to squareSize 30. You'll see nearly perfectly flat terrain with extreme light/dark slope shading.

Conversely, when you make a soft, sloping terrain at squareSize 1, this "extreme" lighting/shading doesn't appear.

I originally made some half-hearted attempts to scan the code in WinMerge looking for changes to the terrain rendering that might account for it, but I have to admit a lot of that code is confusing at best to me... I eventually gave up, hoping someone who knew the code would be able to spot the issue.

Kind of an odd request, but is there any way to download a clean copy of some of the older 1.1 releases that are now gone from the "My Products" links? Specifically I'd like to get a clean 1.1a to run compares vs clean 1.0.1, since this was the first jump that actually introduced the issue.
#2
08/30/2010 (10:02 pm)
Looks like it'll be fixed for 1.1beta3

Fix here

@Henry, and it looks like your suspicions about squaresize were correct.