Yet another major bug

#4
I did not spend much time calibrating this lighting because basically I just hardcoded the calibration into the software and had to rebuild (compile/link) the library every time I made an adjustment (and of course close/run som_db.exe every time)

I only played with the attenuation basically. Som had it set for a constant attenuation factor of 1 and quadratic of 1. It may be all of the lights are setup with those settings. But anyway even the treasure chest in the picture right under the light was receiving virtually no light from the lamp. The ground around it was blue as it is, but the treasure chest was pitch red (the ambient light colour)

The attenuation in this screenshot is 0 constant, 0.25 linear, and 0.125 quadratic. I don't know if those settings would be good for all Som's lights or not. But it's clear this is a radical improvement / and superior approximation of the map piece lighting. The curve could be better maybe but as you can see the blue light peters out somewhere around the NPC. If you sample the colour of the NPC you'll see some blue contribution which must be coming from the lamp because the red ambient light is incapable of reproducing the blue hues in the NPCs texture. The suit of armor in the back is untouched as is the ground around him. And the treasure chest looks pretty appropriate... maybe the blue is a little less than should be or maybe the brown of the wooden chest just doesn't reflect blue as well as the white stones beneath it.

The skeleton is clearly half/half, blue on the side facing the light. Because the light is in the middle of the treasure chests right side, the front and back surfaces of the bottom part of the chest technically receive no light from the lamp. That presented an extremely sharp contrast which seemed unnatural. So I set the ambient contribution of the light to a fraction of the diffuse contribution to smooth things out. Light naturally bounces around the place even when shiny surfaces are not present. So Som's diffuse only lighting seems really inappropriate. The ambient light also helps smooth out the artifacts caused by per vertex (approximate) lighting. Unfortunately it may not be possible to add a little ambience to the map colours without processing the map files themselves... so you do get unnatural lights I think for instance bouncing off the grass pieces, though I have a feeling that could be fixed by smoothing out the surface normals in those files.

I don't myself have a natural feel for lighting / know if those numbers are natural, but they're clearly very different from Som's numbers and look a hell of a lot better in this case anyway. One thing is for sure, just being able to set numbers in an ini file won't cut it for authors or players. I gotta admit though the map editor is pretty shit for light setup. I don't even know if you can see the effects of your lamps at all in the editor.
Reply



Messages In This Thread
Yet another major bug - by HolyDiver - 2010-09-10, 08:01 AM
Re: Yet another major bug - by HolyDiver - 2010-09-10, 08:30 AM
Re: Yet another major bug - by HolyDiver - 2010-09-10, 11:02 AM
Re: Yet another major bug - by HolyDiver - 2010-09-10, 12:25 PM
Re: Yet another major bug - by HolyDiver - 2010-09-10, 12:39 PM
Re: Yet another major bug - by HolyDiver - 2010-09-12, 01:30 PM
Re: Yet another major bug - by HolyDiver - 2010-09-16, 01:06 PM



Users browsing this thread:
1 Guest(s)