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

Perfect Lighting

Started by Toyemann Apr 9, 2002 at 5:37 PM 13 replies 450+ views
Original Post
Toyemann
Toyemann
What is the idea ratio between Ambient, Diffusem and Specular for a perfect lighting?
Toyemann
Toyemann
How many pefect lightings do you know?
HanSoL0
HanSoL0
There''s no such thing as a formula for "perfect lighting". Like siaspete said, it depends entirely upon what you''re trying to light up. It''s like asking a painter to paint "the perfect picture" and when he asks "of what?" telling him to just paint "the perfect picture". You have to define what this is a picture of, before you ask how one could paint it in the "perfect" way.
Toyemann
Toyemann
Another word, you guys don''t KNOW any.
Toyemann
Toyemann
I only asked a simple question:

The "Formula"(HanSoL0) for the perfect lighting?

In return, I was more hoping people will post their ideal formula for their own lighting experience, if any.

So do anyone has the perfect formula for their lighting or lightings?


[edit]If anyone really really worked with lighting issue in their project, they understand what I'm asking.




[edited by - toyemann on April 9, 2002 9:47:56 PM]
Tron3k
Tron3k
What the hell is perfect lighting? Ambient depends on how much ambient light there is in the scene. Diffuse and specular tell you how an object reflects light. It all depends on the scene and the object. Do you mean you want lighting that "looks good" or realistic?
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
CobraMantis
CobraMantis
Hmmm...Toyemann, you don''t seem to understand...there is no such thing as a "perfect lighting formula", as HanSoL0 described perfectly with his reference to painting a "perfect painting". Trust the people who''ve responded...what you''re asking will get you nothing unless you elaborate on what you want.

Toyemann
Toyemann
LOL, okay, let''s see who can answer these:

What are the Ambient, Diffusem and Specular ratios for:

Sunlight (clear day):

Moonlight (clear night):

Regular Light-Bult Light:

Regular Fluorescent Light:

Regular Candlelight:

and so on and so on....
Neff
Neff
Yah, I know what you''re askin, I just don''t have enough experience
siaspete
siaspete
And so on? You want us to explain every single possible configuration of lighting that exists on this planet?

Do some work and think about the actual light sources involved in those cases. Also get into the D3D/OpenGL docs and RTFM on materials & lighting.


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Drilian
Drilian
For "perfect" lighting, there''s no such thing as "ambient light." Ambient light is actually light bouncing from one object to another. You''d have to calculate all that to get true perfect lighting (which is impractical, so the ambient light value is used as an approximation).

And specularity very much depends on the object(s) that you''re lighting. For instance, you get very different specular lighting on pavement from what you see on leather.

So for a sunny day, keep in mind that the sun is white light (or perceived as such by the human eye). So your lighting colors should be white. And the ambient light brightness (which should be a grey - I wouldn''t mix any color into it) depends on the type of scenario you''re displaying.

For a moonlit night, the lighting is (obviously) going to be darker. As an interesting twist, make the light a bit blue-ish. That seems to look better for nighttime than just darkening all of the colors.

As for the rest of the categories, the values depend on the type of light (regular lightbulb. Is it yellow filtered? Greenish? Clear filtered? White?) and the overall brightness of the room (A room with white walls will have a greater "ambient light" than a room with dark blue walls, because the white walls will reflect more light).

The trick is, as has been said multiple times in this post, the light source isn''t the only factor in what values you need to use for lighting. You also must consider the materials of the objects in the scene, what type of feel you''re going for (you can shoot the same room with two types of film and they''ll have different brightness/darkness ratios. Different films are used for different looks, much as different lighting values are used for different looks).

To sum up, in one simple word: EXPERIMENT!

Play around with your lighting, try to find that which works best.

No textbook or formula will give you the answer to what makes the best lighting.

Josh
Heretik
Heretik
There are some tutorial on "light radiosity" somewhere in this site, you should check it out !

Light radiosity is an advanced topic in lightning and is a bit complicated I believe, but can dramatically improve the realism of your scene.

note that in my opinion, what most games lack most is not a good lightning, but a good shadowing algorithm, personnaly, shadows in "Severance" rocks, they certainly used shadow volumes with the stencil buffer.
Unless you are already aware of that, there''s a recent paper on nvidia.com,issued after the GDC2002, called "robust and practical shadow volumes".
Heretik at bender77@caramail.com
russian-bear
russian-bear
Well... Perfect lightning for me is when 3d scenes look Photorealistic... but you can forget photorealistic in a game enviroment...its just wouldnt work...

Sunlight: A verry bright direct light... but to make a sunlit scene you have to considder all bouncing light. You can fake all the bouncing light if you are clever but you can also use some global ilumination algorithm to calculate it (not in a game).

Moonlight: works exactly as the sunlight but its darker and slightly blue. The bouncing light problem is the same as above.

Lightbulb: Point light wich is slightly yellow. Inversed square falloff if you want it to be realistic. The same lightbouncing problem as above.

Candlelight: Slightly orange with inverse squared fallof. The same lightbouncing problem as above.

So... if you meen a perfectly lit scene you have to concider all the above....

But you cant ask for a perfect light...in that case you have to specify a litle more about your light.. For example if you want a good sunlight you have to specify how dence is the athmosphere what time a day (sunlight can have different colors you no). Then i can give you a good sunlight value.

It would be nice to know what you are making then maybe we can help you a litle more specific.




< There are no stupid questions, only stupid answers! >

Topic Locked

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

Sign in to reply to this topic.