dual ambient or dual sun?


(damocles) #1

I’m pretty sure this is impossible, but it doesn’t hurt to ask:

I need to seperate my level into two areas of ambient lighting. I need lighter areas outside and darker inside. At the moment, the shadows are either too bright indoors or too dark outdoors.

I tried making a second thin brush with a fake skyshader and a sun that points in the opposite direction to the regular sky, but no dice, it just says there’s only one sun in the map.

I can’t think of any way at all of dividing up the level into seperate ambient light zones :banghead:

Any suggestions?


(ydnar) #2

Ambient light is, well, sucky. :slight_smile: Try the following:

q3map_skyLight

Replace the “surfacelight” bit in your sky shader with “q3map_skylight.” The format is a bit different, but the brightness number can translate over cleanly. For example:

q3map_skylight 60 3

Means 60 brightness units, 3 iterations, meaning the sky hemisphere (cube, actually) will be subdivided 3 times per side, for a total of 9 lights (technically, lights @ or below the horizon are discarded).

For better sky light at the expense of compile time, use more iterations (4 to 6 or so).

Increase the brightness (60) value to have more general light coming from the sky.

RTCW lighting model workaround

By default, the RTCW lighting model uses linear attenuation on point lights. This is crap (unrealistic, poo-looking, general malaise, needing ambient light to crutch). Hit the “nonlinear” checkbox on the light entity and the lights will be Q3-style 1/dist^2 attenuated.

Also, don’t forget to nuke the ambient/color keys from worldspawn.

You can also tweak the brightness scaling of point lights, shader lights, sky /sun lights and radiosity with the -pointscale, -areascale, -skyscale, and scale all with -scale.

Give radiosity (-bounce N) a shot too. Let the light bounce around a bit.

y


(damocles) #3

Thanks ydnar, that worked a treat. The only thing that threw me at first was the remove the surfacelight part. I didn’t have surfacelight, only a q3map_sun, which I removed figuring it’d be the same deal. For anyone wanting to use this feature, you need the q3map_sun line in the sky shader along with the q3map_skylight line.

It’s a great feature though, now my interior shadows are nice and dark and my exterior ones well lit from a variety of angles :clap: It also made some great scenes where the sky light comes in through windows and skylights at varying angles, making softer edges. And my terrain looks 10x better now too. Nice work ydnar.