Fill lighting (Final)

Started by bigben, May 05, 2007, 07:24:23 AM

Previous topic - Next topic

bigben

Clip file can be downloaded form the Files section: <http://forums.planetside.co.uk/index.php?topic=1921.msg18762#msg18762>

3DGuy's procedural canyon provided a good test subject for my fill lighting tests. Having been warned about problems with lights not casting shadows I had to see what exactly happens for myself.  Here's a tweak of my last fill light setup. You can see a distinct shadow caused by my zenith fill lights.  I've tried to keep the difference in intensity between these two lights relatively small so that the shadow is not too obvious... an interim compromise in the absence of diffuse light sources.  The side fill lights are too bright which has flattened some of the shadow detail a bit.

[attach=#1]

0 - Direct sunlight
1 - Both zenith fill lights
2 - Blue zenith light only
3 - Darkening by nadir light

I'm running a couple of animations to determine the levels for the side and nadir fill lights, but it's getting close.  The colour of the lights are taken from the atmosphere settings (Bluesky density and Redsky decay) which seems to be the most natural looking (not to mention the simplest to pick).

The renders are taking a while, but when they're done I'll post a clipfile... and then run some benchmarking tests to compare render times.

rcallicotte

Cool.  Keep us posted, please.  The more I see about the lighting, the more encompassing it's becoming.
So this is Disney World.  Can we live here?

bigben

#2
Getting closer.  One of the problems with tweaking shadows is that the changes are often very subtle and hard to see.  one of my tests involves using Photoshop Shadow/Highlight adjustment to lighten the shadows to an extreme degree to see what changes have occured and what "problems" remain. The most obvious problem that bugs me is having patches of over-saturated colour.  In the samples below you can see one remaining area in the lower right corner.  In the end I may have accept this as a limitation of my approach... and at some point in time I have to draw this to a close as it will become redundant when we get diffuse light sources.

Changes to previous tests (apart from tweaking intensities):

  • reduced saturation of some of the light sources.
  • added 3 extra negative lights below the horizon to expand the shading under overhangs

My tests turned out to be in the wrong order, so I have to repeat the tweaking of the horizontal fill lights with the new setup below the horizon, along with tweaking the angles of the new lights. The clip file is attached for those interested. The use of negative lights is proving to be quite fruitful to compensate for using fill lights without shadows.  With only one light casting shadows (as well as the sun) the impact on render times is not that great.

bigben

#3
At last... I'm finally happy to say this is good enough for what I set out to achieve  ;)

The light count got a bit higher than I was hoping for, but it could always be simplified if speed is an issue.  I've only done one comparison with GI and the render times were essentially identical... but then I wasn't looking for a replacement for GI on the basis of render time.  What I was looking for was a "fill in" for GI for tiled renders and animations. If it turned out to be faster to render then that would have been a bonus.  I also excluded any lighting that involved placement of lights relative to the sun which would require moving whenever the sun position was changed. As such, it's all a big compromise without trying to get too tricky.

I'll do some more definitive testing of render times, including some simplified versions of this setup.

The snow render shows the fill lighting from above, illustrating the shaping given to the terrain by changes in colour and lighting from the fill lights.

rcallicotte

This all looks very good and is educational.  I'm going to check it out...
So this is Disney World.  Can we live here?

bigben

It would be nice to hear back from people who have downloaded it to see how it stands up to different scenes/terrains.  If you have tweaked your atmosphere colours I'd recommend changing the hue of these fill lights to match (blue sky and red decay). This file uses the TG2 default.

bigben

#6
The first render time check is done....  This is definitely one case where the complexity of the terrain is more of an issue than lighting. I've left out the progresive totals of adding lights as they weren't really significant

Sunlight only: 37 minutes
All fill lights, no GI: 39 minutes
GI_only (1,2): 40 minutes
All fill lights + GI: 40 minutes

I'll have to re-run them on a simpler terrain (without clouds too).  I have a theory that using fill lights may also stabilise some GI issues as well (odd colours in shadows, large variations in animations), but I'll have to investigate this later.

moodflow

Thanks for putting this up.

So these tests were done to find ways to keep render times lower by avoiding GI, or does GI in TG2 just not work well yet?

http://www.moodflow.com
mood-inspiring images and music

bigben

#8
GI works, and is very different to using fill lights, providing very realistic results with a single set of settings. There are however a few issues remaining with some people getting odd colours in the shadows (I haven't seen this myself yet) and sudden jumps in the brightness of shadows between successive frames in animations (I have seen this... you can see the individual tiles in the shadows of my high res panorama test) or different crop regions of the same render.  My tests were mainly designed to provide a workaround for this last issue.

As my early experiments showed that the two lighting methods were very different in what they did, I included the obvious test of combining the two and the results were very promising. I think that part of the problem with GI in large areas of deep shadows is due to the fact that there is so much of nothing to fill in. Providing a small amount of detail via fill lighting provides a base for GI to build additional detail which may reduce the variations. If anyone has a TGD that experienced odd shadow colours from GI, it would be interesting to add fill lights to the TGD to see what happens.

Looking at the latest samples I posted (even if they are a bit small) I definitely prefer the combination.  Check my first post (http://forums.planetside.co.uk/index.php?topic=1368.0) and have a close look at the last two images. Note the shaping of the terrain in the shadows in the lower part of the image.... and the back fill of light onto the second peak in the top middle.  You can't do this across an entire terrain with just lights.

At some point there was some discussion about lighting defaults and render times and I ran a few tests that found that adding lights that did not cast shadows did not significantly increase render times, so there was some scope for improving performance but this was not a critical part of my experiments... more of a side benefit.  I stuck with a single light source casting shadows only because I found multiple shadows around trees to be very distracting (they looked like cricket players in a night time match surrounded by a star of shadows from the lights)

I'm not sure what other rendering programs have, but using lights that don't cast shadows below the horizon and the availability of negative lights has been *really* useful (7/9 lights are below the horizon, 4/9 lights have negative intensities!)

moodflow

Bigben,

Did you mean GI works "providing very realistic results with a single set of settings"?  or were you meaning Fill Light?  I would assume you meant GI.  I am still trying my own fill light tests as well, since this was the technique I used in Bryce (to make the images pop and stop looking like a flat plastic circus tent cornfield! ;-) )

Anyway, the GI settings I've used in TG2 seem to work well, but I think could still use some work.
http://www.moodflow.com
mood-inspiring images and music

bigben

#10
Quote from: moodflow on May 07, 2007, 06:06:49 PM
Bigben,

Did you mean GI works "providing very realistic results with a single set of settings"?  or were you meaning Fill Light?  I would assume you meant GI. 

Definitely GI... although technically there are two places where you change the GI settings (Render Quality and Enviro Light)... but this is still a lot easier than tweaking 9 fill lights (e.g. if I changed my atmosphere colours I would also adjust the hue of every fill light)

But as I said, the two (GI and fill lights) are different, and in all of my tests they seem to complement each other... especially this last batch where the addition of GI to fill lights didn't unduly lighten the image (they're all raw renders!).  I think I'll have to go back to my "white world" for render time benchmarking and see what happens when this fill light setup is combined with GI. 

In the samples above, GI on its own adds light and form to the terrain in the shadow but doesn't change the colour (as much) as you would expect in a narrow gorge/canyon (the colour temperature should be higher). The apparent "direction" of the light is different to my fill lights so combining the two adds extra form to the terrain and includes my hack of increasing colour temperature as you go deeper into the shade.  The biggest weakness to my lighting setup that I can see is that the upward facing surfaces immediately below an overhang are too light, but I can't think of a way to fix this without completely screwing up the normal surface lighting.

The shadow from my top light is a compromise, and something I'm prepared to live with for now (and it's nicely reduced by GI)


bigben

#11
OK. This post will contain the "white world" benchmark test. TGD with a single surface (neutral colour, 0.75). Added a few extra combos just for the hell of it... like turning off the sun... Remember there are no "rock" surfaces... only shadows.

Detail = 1
AA = 3

GI
==========
Detail = 2
Quality = 4

GI All
==========
Detail = 2
Quality = 4
Surface details ON

Enviro Light
==========
Strengths = 1
Colour = 0.5

This is very promising from a performance point of view :) Adding extra lights that don't cast shadows doesn't add much to render times. I'd already found this out earlier but I hadn't added this many lights before.  Using negative light sources below the horizon rather than lights casting shadows has produced a fill lighting hack that (IMO) looks pretty good and is pretty efficient.  ;D



Sun   GI   GI Surface detail   Top light (+shadow)   Extra lights   Pre Render   Full Render   Image #
- -    -    +    8   0    52' 37"    000
- +    +    -    0   18' 30"    117' 17"    00
+ +    +    -    0   45' 32"    150' 07"    01
+ +    -    -    0   48' 02"    132' 13"    02
+ -    -    -    0   0    61' 15"    03
+ -    -    -    1   0    58' 53"    04
+ -    -    +    1   0    60' 33"    05
+ -    -    +    2   0    61' 03"    06
+ -    -    +    5   0    61' 20"    07
+ -    -    +    8   0    61' 43"    08
+ +    -    +    8   50' 32"    138' 36"    09
+ +    +    +    8   49' 31"    149' 53"    10

I've left out some of the test images because their appearance is not really relevant from this test and are best judged from a more realistic scene. The main thing I look at in this test is the "shaping" of the terrain from the lighting, and the potential impact on render times. The render times should also be taken into consideration with the tests in the earlier post above. There are many factors influencing the total render time and it is possible that using GI or any lighting combination will have only a small impact on the total time.

bigben

Just giving this post a nudge now that the render time testing has completed ;)


old_blaggard

Wow, Ben, these are some pretty comprehensive tests.  It really shows how completely different moods can be achieved just by adjusting the lighting.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

Arandil

A fascinating study!  Thanks so much for the effort!  8)