Author Topic: Don't use _sun_ambient! (use _sun_surface)  (Read 9516 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Don't use _sun_ambient! (use _sun_surface)
« on: March 07, 2015, 10:50:47 PM »
It's been kind of standard procedure to use _sun_light and _sun_ambient for lighting outdoor maps, but _sun_ambient leads to incorrect and bland lighting.

Here's a screenshot of some geometry lit with _sun_light 300, _sun_ambient 60:



Note how all the shadowed area is uniformly lit, and the reflected light of the ground is actually making the sides of the rocks look lighter when they should be darker.  _sun_ambient simply applies the same value to all surfaces exposed to the sky.  This isn't accurate, as some areas are going to be exposed to more sky than others and should be lighter, while areas with just a hint of sky exposure should be darker.

I spent a while working on writing a new lighting utility that had more accurate sun lighting and ended up with:



Only to be informed that ArghRad already had effectively the same feature: _sun_surface.  If set to 1, it will use the surface value and color of the texture you have on the sky brushes, or you can just use RGB values.

The following screenshot is using "_sun_light" "300" and "_sun_surface" "38 42 51" (to match the blue-ish tint of the sky atmosphere):



Note the darker areas around the barrels and where the rocks meet in the corners, and the fact that it just looks more natural in general.

Rockyar_96

  • 68 Carbine
  • Posts: 370
Re: Don't use _sun_ambient! (use _sun_surface)
« Reply #1 on: March 08, 2015, 05:52:04 AM »
Thanks a lot!

JMR

  • Map Committee
  • Autococker
  • Posts: 574
Re: Don't use _sun_ambient! (use _sun_surface)
« Reply #2 on: March 09, 2015, 10:05:10 AM »
Thanks for sharing this, jitspoe!

cusoman

  • Autococker
  • Posts: 524
Re: Don't use _sun_ambient! (use _sun_surface)
« Reply #3 on: October 21, 2016, 12:54:18 AM »
Wow this is awesome. I used to try really hard to create that effect using _sun_ambient and _sun_diffuse. Here are 2 screenshots of Zephyrus with _sun_light 200, _sun_ambient 40, _sun_diffuse 60, (which are the values I released it with) and then one with _sun_light 200 and _sun_surface with the values you provided in your post. Holy excrement its awesome.

- Cusoman