Planetside Software Forums

General => Terragen Discussion => Topic started by: bigben on April 18, 2007, 04:44:26 PM

Title: Fill light WIP
Post by: bigben on April 18, 2007, 04:44:26 PM
<rewrite>
This post contains a series of lighting tests I'm doing to create better lighting of scenes with additional lights. They are not intended to replace the GI feature of TG2, and in fact they are complemented by GI.  GI, however, does greatly increase render times. Using additional lights will improve a scene without greatly adding to render times, as well as improving scenes rendered with GI turned on.

Also had some thoughts on a possible workaround to the GI problems. For cropped renders an option to calculate GI for the entire scene would keep all of the renders consistent. For animations... it may be possible (depending on how GI is calculated) to have a GI "blur" along the lines of camera blur... i.e. include adjacent frames in the GI calculation... with a sliding scale to allow how broad a frame selection to use.  Both of these would add a load to the render times however, like populating objects every frame, as it is a fairly significant component of an image it may be worth it(?)

The images below are sequentially rendered, adding additional lights at each stage. The test scene is a white terrain white white base colour (no additional surfaces at all). This is deliberatley done to see just the effect of the lighting on a scene with the interaction of coloured surfaces.  It is not a snow scene with exposed rocks... any dark areas are shadows. The images have been post-processed in Photoshop (levels were normalised) which has created some colour casts.  I've done this to concentrate on the "shaping" of the terrain in the shadows from the lighting... more ccurate colouring of lights and contrast will be sorted out later.
Title: Re: Fill light WIP
Post by: DeathTwister on April 18, 2007, 10:45:48 PM
Wow, now that is very cool, thanks for this, I can even use it somewhat for a reference if I need /smiles.WTG.

Are you going on more train trips? if so maybe make a whole chart you can post somewhare we can save page as and have it when needed like you did to the reg TG one you did, which by the way was awesome as well /smiles.

DT
Title: Re: Fill light WIP
Post by: bigben on April 18, 2007, 11:58:57 PM
Commuting by train... The first post was at home, the other idea struck me on the train (playing with a laptop to pass the time). It's certainly given me a greater appreciation of just what GI can do fo a scene.  I had another flash of inspiration over morning tea... rather than use fill lights with negative elevations,  I reversed their hue and set their strength to negative numbers and this works *much* better (as well as making more sense). The colours and strengths still need tweaking but this is looking much more promising and it works much better with GI.

3 positive fill lights
3 negative fill lights
Sample renders adjusted in Photoshop (levels normalised)
Images moved to initial post above

I've attached a clip although it still needs tweaking. Any improvements/suggestions gratefully accepted  ;)

All of the "reverse" lights have heading values relative to the heading of the sun.  The reverse sun has an inverse elevation of the sun. Top and bottom are fixed.
Title: Re: Fill light WIP
Post by: The Geostation on April 19, 2007, 03:39:26 AM
Very nice!   The rendering of shadows is often a tricky thing, and can result in the distortion of shadowed colours (sometimes turning them too green).

Yep, train journeys are very cool.   Shame it eats my battery ;) but it does last an hour.

Andrew
Title: Re: Fill light WIP
Post by: Oshyan on April 19, 2007, 03:54:31 AM
Interesting experiments Ben. Have you been recording render times as well? I would think doubling the number of lights would bump up render time as well, which may be undesirable.

- Oshyan
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 04:35:58 AM
The times weren't too long so I'll repeat them and record the times.
Title: Re: Fill light WIP
Post by: Oshyan on April 19, 2007, 01:37:07 PM
Thanks Ben, that would be very helpful. It was decided that GI should be the default setup for the Technology Preview based on the increased quality and realism coupled with a not-too-serious render time hit. However if a more complex fill light setup can provide good results without GI and with a lesser render time we may reconsider the defaults.

- Oshyan
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 04:02:25 PM
Good news.  ;D

[attachimg=#1]

The times for additional lights are quite small.  I ran a series of progressive renders adding one or two lights at a time based on their function. I'll replace the images in this post with the complete set.  The first two lights (top and reverse sun) provided most of the lighting with additional lights only providing minor tweaks.

Initial render time 19 '20". Each light added only 5-10" to the render time.

Adding GI (1,4) and all lights resulted in a 50% increase in time.  Most of this was taken up by calculating the GI although it also appeared to slow the rendering down as well. GI adds a degree of realism that you can't do with lights so it's still worth including.

I'm updating the initial post with the progressive series. Colour variations are partly due to normalising the levels.  Once I sort out a lighting strategy I'll have to sort out the intensities to produce a better raw render.  I'll also have to test this out on a scene with surfaces. The test TGD just has a white terrain and a white base colour... those aren't exposed rocks, they're shadows.  I'll finish updating the images when I get to work.
Title: Re: Fill light WIP
Post by: Oshyan on April 19, 2007, 04:23:51 PM
Certainly we won't be removing the GI functionality. ;) What I was referring to was the defaults that are setup in the scene that you start with. We decided to go with GI for the Technology Preview due to the increased realism and accuracy, however there is an obvious performance hit and most other renderers do not ship with GI on by default. If anyone were to make a direct comparison in a default scene they might be misled by the greater render time in TG2, especially in the default scnee where the GI will not make as big a difference.

In any case it's really about determing what sensible defaults are.

Thanks for the handy graph. :)

- Oshyan
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 04:51:05 PM
One thing I havn't looked at is the enviro light. It seems a bit odd having an enviro light and then getting such a marked improvement with just a top light (in this scenario).  What exactly does the enviro light do?  I'll have to play with this some more, especially with a real scene.
Title: Re: Fill light WIP
Post by: Matt on April 19, 2007, 05:01:36 PM
Hi Ben,

Would you care to repeat those timing tests with shadows enabled on the fill lights? Of course this will only be effective for fill lights that are above the horizon, otherwise they will always cast a shadow.

Before GI was implemented in TG2 we had a default fill light setup that consisted of three fill lights above the horizon. They were set to cast shadows from surfaces but not from atmosphere. Shadows were enabled so that they would not illuminate underneath rocks and in deep crevices in the terrain. Because of the shadows, the increase in render time was comparable to the now-default GI setup for simple scenes, so we decided that the advantages of GI were enough to make that the default. I acknowledge that there are some problems with GI currently, which makes our choice of defaults questionable, but we should be able to fix those. Until then, fill lights are a useful alternative, but as you know they're also good for tweaking the lighting of a scene when GI doesn't give you what you want.

Matt
Title: Re: Fill light WIP
Post by: Matt on April 19, 2007, 05:02:57 PM
Quote from: bigben on April 19, 2007, 04:51:05 PM
One thing I havn't looked at is the enviro light. It seems a bit odd having an enviro light and then getting such a marked improvement with just a top light (in this scenario).  What exactly does the enviro light do?  I'll have to play with this some more, especially with a real scene.

The Enviro Light *is* the GI or Ambient Occlusion (depending on which mode you choose). Its quality is affected by the GI settings in the Renderer.
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 06:32:04 PM
ahhhh...  that's the control I was looking for  ;)

I'm running a timing test on a previous TGD with a longer render time to see if the increase is related to the total render time or if it's just a one off penalty of a few seconds.  Found a few problems with my lights, but these point towards a possibly simpler setup.
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 07:01:00 PM
And scrolling further up  ;)
Quote from: Matt on April 19, 2007, 05:01:36 PM
Hi Ben,

Would you care to repeat those timing tests with shadows enabled on the fill lights? Of course this will only be effective for fill lights that are above the horizon, otherwise they will always cast a shadow.

Matt


No problem.  I'd also be interested to see the results of some of the lights I use for a possible basic simplification.  Having lots of lights is one thing, but moving those that are "linked" to the sun's position is a bit annoying (self-inflicted ;)).

I had thought about crevices and the under side of tree branches which is mainly why I started using some negative lights. My initial lighting setup is flawed, but the approach has some merit for my purposes.  I'll try some tests in a canyon with some overhangs soon as this will help me sort out some of the issues I've found.
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 07:23:13 PM
The surfacing renders have just finished...

Time is definitely linked to surface complexity.
With all fill lights on (and no GI) the increase was 11% compared to the 4% in the test with no surfacing.
Raw renders below.  There are shadows under the rocks, but they're bad. I have a fix in mind.

Tried this with a single top light with shadows on and it took practically the same time as the render with no fill lights (both 45 minutes). Still leaves a nasty shadow under the rocks.

Added a GI render... this only took 46 minutes, while the render with all fill lights (shadows off) took 50 minutes ??? Looking more closely at the image, it appears that GI hasn't worked on the fake stones. Adjusting the levels shows that their shadows are a solid colour.
Title: Re: Fill light WIP
Post by: bigben on April 19, 2007, 09:09:01 PM
Here are the render times for the first test scene:

With shadows set on all lights the time was close enought to the GI only render

Lighting    GI off    GI on 
Sun only  19'29"  27'46"
All lights,shadows on  27'16"
All lights,shadows off  20'14"  30'11"


Lighting    shadows off    shadows on 
Sun + top light  19'38"  21'51"

Additional renders with shadows on below.
Title: Re: Fill light WIP
Post by: dhavalmistry on April 20, 2007, 11:25:04 PM
hey bigben....since you are a pro at lighting things up :D ....can you help me light up this terrain please??

I need to light up the terrain marked in yellow

please let me know....I will PM you with tgd attached

thanx

DL
Title: Re: Fill light WIP
Post by: bigben on April 22, 2007, 04:46:49 PM
Quote from: dhavalmistry on April 20, 2007, 11:25:04 PM
hey bigben....since you are a pro at lighting things up :D ....can you help me light up this terrain please??

I need to light up the terrain marked in yellow

please let me know....I will PM you with tgd attached

thanx

DL

Try a light
heading 0
elevation -90,
Hue,Sat,Lum: 150,100,120 (windows colour picker)
Strength will depend on your sunlight strength, but probably somewhere a bit less than 0.1
Do not cast shadows

It's simple, yet relatively effective

If you're using GI as well, then the strength could be dropped further as the GI will lighten the area further.  All you need is a little extra light in there to give GI something to work with...

You could also try a copy of that light, but with an elevation of +90 degrees and see what you think.  This is just a simplified version of the fill lights posted by Oshyan, and as has been pointed out... with shadows turned off it will also light surfaces deep down in gorges.  Whether this is a bad thing or not is up to you.  If you use both lights, the top light should be stronger than the bottom light... tweak to taste  ;)

I have many more tests lined up to look at different situations. The main reason I started this was because of the shadows around trees when using the three fill lights.  It also turns out that GI does not currently get applied to fake stones (but that will get fixed).  The biggest problem I'm having at the moment is that all of the different settings I have tried all act as point light sources. I tried adding a large light source, and a sun with a large disc, but the shadows on my tree still looked sharp, so it's a trade off between adding light under the tree and having strong shadows of the tree where they shouldn't really be.

I'm using the animated version to try out a number of different lighting settings/combinations and will post back later when I have something more concrete to show.