Skip to main content
GameDev.net gamedev.net
🔒 Locked

Night Time

Started by Mr_Ridd Jan 27, 2004 at 5:54 AM 8 replies 1.1k views
Original Post
Mr_Ridd
Mr_Ridd
Howzit How do I give the effect that it is night time. I''ve put lighting in and then I just change the colour but it looks more grey. It does look like night time but it doesn''t look as good as it''s done in Warcraft III. Shot
The ability to succeed is the ability to adapt
Nik02
Nik02
The night lighting tends to be bluish because sky color's relative weight to the total light is much bigger compared to daytime, as the sun "steals the show" with some 10000x (not at all exactly ) intensity compared to the sky.

-Nik

EDIT: Our eyes tend to balance the color values automatically, so the night lighting doesn't seem so blue as it really is. It's worth taking this to account, and desaturate the physically low levels a bit if used in computer graphics.


[edited by - Nik02 on January 27, 2004 9:52:15 AM]
Niko Suni
Mr_Ridd
Mr_Ridd
Thats cool

Just one more thing.

In glColor4f, what is dark blue?
The ability to succeed is the ability to adapt
Ademan555
Ademan555
i know what a hex dark blue would be (assuming argb) 0xff000040

a = 255 r = 0 g = 0 b = 64 (64 = (1/4)*256 that should be a pretty dark blue, you can play with it)
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out hi
Nik02
Nik02
I would recommend something like 0xff182c40 (aarrggbb) as the ambient color, instead of straight blue.

Why, you ask?

Because it has some desaturation applied, so it will not filter other colors than blue entirely away, and because our eyes somewhat desaturate natural colors in the dark.
When watched through the monitor, this "automatic" processing in the eyes and brains doesn't work so well (although it does work), partly because monitors have a fixed gamut of color (as opposed to nature).

Isn't color theory fun

-Nik

EDIT: The color in decimals is as follows: r=24, g=44, b=64.

[edited by - Nik02 on January 28, 2004 3:09:14 AM]
Niko Suni
OrangyTang
OrangyTang
quote:
Original post by Mr_Ridd
In glColor4f, what is dark blue?

Colours for openGL (and most graphics) are in the range of 0 to 1 if in floating point (and typically 0-255 if integer). glColor4f takes them in the order RGBA, so a dark blue would be glColor4f(0f, 0f, 0.5f, 1f) although you don''t really need the final alpha parameter here.
Lithic
Lithic
For sky lighting you might want to take a look at one of the several good lighting papers in the FAQ. Also take into account that light pollution causes a night sky to be brighter lower towards the horizon.

--===LITHIC===--
--===WWW.Decimation.TK===--
stephanh
stephanh
You might want to check out the night counterpart to the recently pretty famous "Practical Analytic Model for Daylight".
A Physically-Based Night Sky Model

Although not neccessarily suitable for realtime graphics.

regards,
Stephan

Dmytry
Dmytry
At dark,cones don''t work and you don''t see any color - image are black-and-white.
And rods still works normally, and because rods receives in green..depblue region, it may looks like blue...

So,summary:if you set blue portions to 0.25,and all other portions to 0 , image becomes black-and-white(actually black and blue , except that self-luminating objects still have other color. So 0,0,0.25 or so(not necessary zeroes,you could use 0.05,0.05,0.25 or so,everything you want) are more or less right model.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.