Planetside Software Forums

General => Terragen Discussion => Topic started by: moodflow on January 03, 2008, 12:41:10 AM

Title: Scene Lighting via Global Illumination Only (no light sources)
Post by: moodflow on January 03, 2008, 12:41:10 AM
I've been trying to dial in lighting a scene via global illumination only with no other light sources, including the sun.  The scene is illuminated by the sky ONLY, for hopefully more realistic results.  So far, the results have been very impressive, and with reasonable render times.

Here is a test render I did using this method.  This is 100% procedural with no image maps (though image maps could be used as well). 

For postwork:  I did blur the sky somewhat in Photoshop, as the power fractal I used was way too sharp for the "stratus sky" effect I was going for.  Didn't feel like rendering it again.  Additionally, I noticed some black chunk artifacts in the texture shadows, which I believe may be due to a known bug in the renderer ( ? )

More images and tests to come featuring this technique.

Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: j meyer on January 03, 2008, 09:03:01 AM
Interesting approach.I'm eager to see what you'll come
up with.
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: dhavalmistry on January 03, 2008, 09:11:43 AM
nice technique....how did you do this??...increase GI??
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: Tangled-Universe on January 03, 2008, 09:34:09 AM
Very interesting, this looks very good as if indeed the light is coming from all directions, quite realisitics. However I do mis some shadow features, but maybe your update will show even better results. So yes, how did u do it? ;D
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: rcallicotte on January 03, 2008, 09:46:09 AM
Good idea.  A lot more experimentation exists to see what lighting can do in TG2.
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: moodflow on January 03, 2008, 10:11:47 AM
Quote from: Tangled-Universe on January 03, 2008, 09:34:09 AM
However I do mis some shadow features, but maybe your update will show even better results.

Keep in mind, that shadows will be lit up when light is coming from nearly all directions.  Except for the clearest sunny days, most shadows are semi filled in by "global illumination" in the real world.  I am hoping that by emulating this, scenes will become more realistic.  Thats why soft shadows were such a big deal as well.

As usual, I am still dialing this technique in.  It doesn't always seem to give the best results in all cases, so I am trying to find out why and fix this.

How I did it was to make the background object illuminate the scene, and turn the sun off.  This is done by giving the background itself a shader (to project color), then turning the luminosity up to atleast 2.  I've used even higher luminosity depending upon the scene.
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: dhavalmistry on January 03, 2008, 10:57:09 AM
so what you are saying here is to use a default shader??..
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: moodflow on January 03, 2008, 11:40:02 AM
Quote from: dhavalmistry on January 03, 2008, 10:57:09 AM
so what you are saying here is to use a default shader??..

yes - I should have stated this, heheh.  I am getting ahead of myself here.
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: Oshyan on January 03, 2008, 01:45:48 PM
Remember that in the real world the sun *is* essentially the only light source (in most cases - certainly the most powerful one anyway) so turning it off won't create very useful results. You've essentially replaced the sun as primary light source with the background object as a light source, but this is not particularly more realistic technically speaking (although the rendered results may look more realistic). I think the most "correct" way to approach it would be to leave the sunlight on and put in a heavy cloud layer to get an overcast look. Then you get a similar appearance but using the normal illumination. The results would probably be similar with tuning. But this is a cool experiment regardless and the results do look nice!

- Oshyan
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: moodflow on January 03, 2008, 05:18:55 PM
This is essentially also a way to use HDR images (or use standard images with luminosity bumped up) to light a scene.  Definitely glad TGTP has this option.
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: moodflow on January 03, 2008, 05:42:00 PM
Quote from: Oshyan on January 03, 2008, 01:45:48 PM
Remember that in the real world the sun *is* essentially the only light source (in most cases - certainly the most powerful one anyway) so turning it off won't create very useful results. You've essentially replaced the sun as primary light source with the background object as a light source, but this is not particularly more realistic technically speaking (although the rendered results may look more realistic). I think the most "correct" way to approach it would be to leave the sunlight on and put in a heavy cloud layer to get an overcast look. Then you get a similar appearance but using the normal illumination. The results would probably be similar with tuning. But this is a cool experiment regardless and the results do look nice!

- Oshyan

I think setting up the same scene with a real sun, and setting up stratus style clouds would yield very similar, and possibly better results.  Definitely not discounting the "true" method.   

The method above just demonstrates that a scene can be lit using the background object, whether it be procedural or image based, which gives a different type of control.  This opens up some doors, for example, the film industry.  One could use this method to incorporate TG2 generated terrain into their scenes already shot on film.  Or someone could capture a lighting situation via a light probe and apply it directly to their TG2 scene, rather than trying to build it manually via sun location, atmosphere tweaks, and cloud placements.

Definitely exciting stuff for sure.   8)


Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: Oshyan on January 03, 2008, 06:43:25 PM
You are definitely right, there are genuine, interesting uses for this. Just making sure you and others knew it wasn't necessarily a "better" or more realistic technique. But as another tool in the toolbox it's a good one and it just demonstrates TG2's flexiblity IMO. :)

- Oshyan
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: Will on January 03, 2008, 06:49:13 PM
 :D I really like your foreground there oh and the GI thing is cool too.  :D
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: dhavalmistry on January 03, 2008, 08:38:41 PM
Quote from: moodflow on January 03, 2008, 05:18:55 PM
This is essentially also a way to use HDR images (or use standard images with luminosity bumped up) to light a scene.  Definitely glad TGTP has this option.

TG doesnt use HDR does it??....
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: moodflow on January 03, 2008, 10:12:25 PM
Quote from: dhavalmistry on January 03, 2008, 08:38:41 PM
Quote from: moodflow on January 03, 2008, 05:18:55 PM
This is essentially also a way to use HDR images (or use standard images with luminosity bumped up) to light a scene.  Definitely glad TGTP has this option.

TG doesnt use HDR does it??....

I don't know myself (maybe Oshyan knows?), but I've successfully used standard images, with the luminosity cranked up.  I don't think it will be as accurate as an HDR for dynamics, but it still works.
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: dhavalmistry on January 03, 2008, 10:53:14 PM
what is the best TG2 compatible format to convert HDR to??....

options are:

JPG
TIFF
RGB, SGI
EXR
Title: Re: Scene Lighting via Global Illumination Only (no light sources)
Post by: Oshyan on January 04, 2008, 01:45:59 AM
EXR is the only one that supports HDR in that list, but I don't think TG2 supports it for image *loading* yet (although it supports it for saving). Loading of HDR images will be supported in the future however.

- Oshyan