Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: ION3 on August 06, 2010, 02:33:17 am

Title: Color of sun blinding effect
Post by: ION3 on August 06, 2010, 02:33:17 am
I noticed that the sun blinding effect is always white regardless of the sun color. Is there a reason this is so or was it just forgotten?
Title: Re: Color of sun blinding effect
Post by: General Battuta on August 06, 2010, 02:39:58 am
I'm guessing just because it's a bright light. Anything's white if it's bright enough!

(except lazors)
Title: Re: Color of sun blinding effect
Post by: ION3 on August 06, 2010, 03:16:16 am
Yes but the lensflares and sun glow are colored, too. it's because only a small portion of the sun's light forms flares, glow and the blinding effect. The color of blinding must match the glow and flares.
Title: Re: Color of sun blinding effect
Post by: Herra Tohtori on August 06, 2010, 03:32:03 am
Yes but the lensflares and sun glow are colored, too. it's because only a small portion of the sun's light forms flares, glow and the blinding effect. The color of blinding must match the glow and flares.

It's a result of how human eye work.

There are two types of visual receptor cells in the retina: cones, which there are three sub-types with sensitivity tuned to red, green and blue photons respectively, and rods, which sense all visual wave lengths about equally.

Cones are responsible of our colour vision, but there are very few of them compared to rods. That means humans can only see colour well in good lighting, and when it goes darker, things become closer to shades of grey.

In addition, cones are concentrated on the "yellow spot", or the area of sharp vision in the middle of the retina, while rods are spread more evenly to provide peripheral vision that mostly detects movement. The actual field of sharp vision is actually very small, but the visual cortex does this neat "auto-complete" -trick that is based on fast involuntary movements of the eye, and saves the field of view to the visual cortex, giving an illusion of even overall sharpness in the field of view. You can test this by holding your eyes in fixed position consciously (this is hard and takes a lot of effort and concentration); after some time, your field of view will start fading from the edges as there are no updates for the visual cortex to keep up the illusion. Normally, any movement in peripheral vision triggers a reaction where you normally glance there, which updates the movement. It's actually not too different to modern video codecs in some ways. But I digress.

As a result of the structure of the eye, a very bright light of any wavelength would be interpreted as (painfully) bright light, overflow from the rod cells dismissing the colour information sent by the cones.

There are other reasons why the blinding effect in FS2 is grossly inaccurate and simplified, though, but I won't go there now. :p
Title: Re: Color of sun blinding effect
Post by: ION3 on August 06, 2010, 04:48:41 am
OK, but that would only be the case if it's so bright that the entire screen whites out or at least one of the channels is clipped. But often the effect ingame is much weaker, with just a bit of brightening of the entire screen. Besides, I always thought that effect was meant to simulate the scattering of light in the human eye.

By the way: Human eyes don't produce any noticeable lensflares.
Title: Re: Color of sun blinding effect
Post by: T-LoW on August 06, 2010, 06:20:37 am
By the way: Human eyes don't produce any noticeable lensflares.

And spacecraft can't change course without side- and front-thrusters - so what? It looks cool, doesn't it? :p (the lenseflare of course)
Title: Re: Color of sun blinding effect
Post by: Kolgena on August 06, 2010, 09:16:57 am
subluminal lasers.
Title: Re: Color of sun blinding effect
Post by: Snail on August 06, 2010, 10:19:21 am
subluminal lasers.
Nice one. :yes:
Title: Re: Color of sun blinding effect
Post by: ION3 on August 06, 2010, 11:01:51 am
Quote
And spacecraft can't change course without side- and front-thrusters - so what? It looks cool, doesn't it?  (the lenseflare of course)

Yes i know, I'm OK with the flare. I just had the thought it would look even cooler if the blinding effect would match it's color, while at the same time beeing realistic and not costing any additional performance. + beeing easy to implement.
Title: Re: Color of sun blinding effect
Post by: Droid803 on August 06, 2010, 01:36:47 pm
Blinding not being OMFGWHITE could be cool.
Title: Re: Color of sun blinding effect
Post by: jr2 on August 06, 2010, 02:31:02 pm
How about the screen starting to be washed with the respective suns' color, then switching to white as it gets more intence?  You know, like how the upper end of the color selection, no matter what the color, is white in M$ Paint when you "define custom colors" and the low end is always black.

For example:

Blue, overloaded by white from glare:

Hue: 166
Sat: 240
Lum: 240
Red: 255
Green: 255
Blue 255

Blue, dark:

Hue: 166
Sat: 240
Lum: 80
Red: 26
Green: 0
Blue: 170

Blue, made black by lack of light:

Hue: 166
Sat: 240
Lum: 0
Red: 0
Green: 0
Blue: 0
Title: Re: Color of sun blinding effect
Post by: castor on August 06, 2010, 02:33:13 pm
The good thing with white effect is it doesn't look particularly stupid. Certain other colours probably would (possibly creating annoying surprises).
Title: Re: Color of sun blinding effect
Post by: Rodo on August 06, 2010, 02:43:52 pm
yeah, bright purple screen = not cool
Title: Re: Color of sun blinding effect
Post by: Aardwolf on August 07, 2010, 12:21:11 am
I say it should stay white. But (if any more work eventually gets put into post-processing) it could be a more sophisticated effect than what we've got now.
Title: Re: Color of sun blinding effect
Post by: Klaustrophobia on August 07, 2010, 02:25:13 am
this may not be the appropriate place to put this, but everyone seems to prefer existing threads to new ones. 

can the blinding effect be turned down or off?  honestly it's about to make me punch my monitor.  there is a sun in EVERY mission, and as it turns out, many of them right behind/next to the objective, or whatever you end up facing for the majority of the mission.  it also doesn't seem to matter how far away the "sun" is, it ALWAYS completely blinds, even if it is seemingly pluto-distanced.  i find it rather irritating and occasionally physically painful.
Title: Re: Color of sun blinding effect
Post by: headdie on August 07, 2010, 03:19:20 am
this may not be the appropriate place to put this, but everyone seems to prefer existing threads to new ones. 

can the blinding effect be turned down or off?  honestly it's about to make me punch my monitor.  there is a sun in EVERY mission, and as it turns out, many of them right behind/next to the objective, or whatever you end up facing for the majority of the mission.  it also doesn't seem to matter how far away the "sun" is, it ALWAYS completely blinds, even if it is seemingly pluto-distanced.  i find it rather irritating and occasionally physically painful.

being able to scale the intensity and cone of effect from fred would be useful to simulate distance.  I would also like see an option to be able to turn the effect down from a players perspective even if it just enough to take the painful edge off a total white out.
Title: Re: Color of sun blinding effect
Post by: Galemp on August 07, 2010, 03:44:56 am
I, for one, desperately want to see sun blindness have a maximum upper limit (based on looking directly at a single sun in retail) and have scaling down based on sun size. This way if you're simulating the orbit of, say, Neptune, you aren't blinded by a star that's only slightly bigger than the ones in the background; and when there's multiple suns in the field of view (as in most MediaVPs missions), you aren't totally blinded.
Title: Re: Color of sun blinding effect
Post by: Klaustrophobia on August 07, 2010, 03:47:36 am
so this can't be currently done using the lighting tags or whatever currently? i REALLY want to not be blinded any longer.  at this point i'd rather have it not glare at all than blind me.
Title: Re: Color of sun blinding effect
Post by: FreeSpaceFreak on August 07, 2010, 05:48:18 am
so this can't be currently done using the lighting tags or whatever currently? i REALLY want to not be blinded any longer.  at this point i'd rather have it not glare at all than blind me.
You can always overwrite any existing stars.tbl and add $NoGlare: to the end of each star entry. It'll get rid of the glare completely.
Title: Re: Color of sun blinding effect
Post by: Mongoose on August 07, 2010, 09:15:31 pm
can the blinding effect be turned down or off?  honestly it's about to make me punch my monitor.  there is a sun in EVERY mission, and as it turns out, many of them right behind/next to the objective, or whatever you end up facing for the majority of the mission.  it also doesn't seem to matter how far away the "sun" is, it ALWAYS completely blinds, even if it is seemingly pluto-distanced.  i find it rather irritating and occasionally physically painful.
I hope for your sake you didn't play Just Another Day. :p
Title: Re: Color of sun blinding effect
Post by: Kolgena on August 08, 2010, 10:38:44 am
+1 for non-colored blinding. Think about what happens if you have multiple different colored suns on screen at the same time.
Title: Re: Color of sun blinding effect
Post by: Commander Zane on August 08, 2010, 11:21:49 am
RAVE!!!
Title: Re: Color of sun blinding effect
Post by: sigtau on August 08, 2010, 12:30:42 pm
+1 for non-colored blinding. Think about what happens if you have multiple different colored suns on screen at the same time.
Title: Re: Color of sun blinding effect
Post by: chief1983 on August 08, 2010, 12:36:12 pm
Apparent size of a sun has nothing to do with the intensity of its light.  It has to do with what type of star it actually is.  It would need to be some combination of the size plus it's actual brightness which I don't even think we can define can we?  I know we can adjust color, but maybe there's something there we can use to adjust the source intensity.
Title: Re: Color of sun blinding effect
Post by: Klaustrophobia on August 08, 2010, 01:27:37 pm
sure it does.  a further away sun has a smaller apparant size, and is much less bright.  our sun isn't much brighter than a star when viewed from pluto.
Title: Re: Color of sun blinding effect
Post by: ION3 on August 09, 2010, 10:10:51 am
Quote
I know we can adjust color, but maybe there's something there we can use to adjust the source intensity.

If color is an rgb value you could try somethning like 32/32/32 if you want it dark.

Why does everyone prefer white blinding? Didn`t you ever play a game with colored blinding? For my eyes colored is much more beautiful. Seeing a red sun blinding white pulls me out of immersion. It's like a red sun having blue flare. It just doesn't make sense. Apart from that most suns are not like 255/0/0 but more like 255/230/230.


edit:

Quote
it also doesn't seem to matter how far away the "sun" is, it ALWAYS completely blinds, even if it is seemingly pluto-distanced.

for the coders: Why doen't the effect scale with the size of the sun?
Title: Re: Color of sun blinding effect
Post by: chief1983 on August 09, 2010, 10:45:47 am
I would think that most suns are bright enough that you're going to get a white blinding effect no matter what color it is, unless you're sufficiently far away that the sun's light won't be overloading your eyes in the first place, which would mean you probably wouldn't be blinded at all.
Title: Re: Color of sun blinding effect
Post by: Kolgena on August 09, 2010, 11:40:17 am
To be fair, a blinding effect looks nothing like a white-out at all. Your iris would contract, so the sun's halo would shrink somewhat, your eyes would be in less pain, and anything that isn't the sun will appear far far darker. Don't believe me? Go outside, stare at the sun for about 3 seconds.

You'd need an HDR + eye adaptation system to make that work though, and that doesn't seem easy to code.

Basically, the current blinding effect doesn't reflect any phenomena that exists in real life (except maybe glare off the helmet/cockpit glass, which wouldn't be nearly as intense as it is right now, and would respond differently to angle-to-star), so adapting it to make it "more realistic" doesn't actually make that much sense. If anything, the unrealistic version we have now is more practical. With the new explosion blinding effects, things could start to look real ****ty with multiple technicolored glares competing for screen space.

That said, if someone that really wants to see colored blinding will go out and make a build that can do that, and it actually does look better, I don't see how that's a bad thing. Of course, that requires that someone in favor of the idea to actually do that.
Title: Re: Color of sun blinding effect
Post by: ION3 on August 09, 2010, 11:46:09 am
Quote
overloading your eyes

You confuse me. Are we talking about the same thing? Could you give me a wiki link or something where the effect you ar talking of is explained?

Here's a link of what I think  the blinding represents:

http://www.prime-junta.net/pont/How_to/ha_Testing_lenses/a_How_to_test_a_lens.html?page=9

The picture shows flare all over the image. Note how the flare adopts the orange color of the sunlight.

http://diglloyd.com/articles/UnderstandingOptics/understanding-flare.html

Look at the third picture in the section about veiling flare. Note again the flare color.


Now these are photography related sites, but this effect occurs in about all optics, that means in the human eye, too.


edit:

Quote
Basically, the current blinding effect doesn't reflect any phenomena that exists in real life

I think it represents the scattering of light in the lens of the eye.
Title: Re: Color of sun blinding effect
Post by: Kolgena on August 09, 2010, 11:57:49 am
Right, but if it's bright enough to scatter enough to cover the screen by the time it's passed the iris, that light's going to be bleaching your retina, which is going to be white in color (and fairly long-lasting--think flashbang)

Otherwise, I'm guessing the scatter would be minimal, and would show up as coronas around bright lights. Like this: http://en.wikipedia.org/wiki/File:Flashlight_effect_Sumo_Jan08.jpg
I don't think you'd get subtle shades of veil glare, either because your iris would shrink to get rid of it, or your brain would auto-correct for color constancy.
Title: Re: Color of sun blinding effect
Post by: ION3 on August 09, 2010, 12:45:36 pm
Quote
Right, but if it's bright enough to scatter enough to cover the screen by the time it's passed the iris, that light's going to be bleaching your retina, which is going to be white in color (and fairly long-lasting--think flashbang)

I think the human eye scatters the light more that a photographic lens. From personal experience.

*doing flashbang research*