Confused by all the different types of 'lights'

Diffuse, ambient, specular, area, directional, point, spot, volume. It seems the more I read about lights, the worse it gets. "Make it up as you go along" it almost seems. I think the mix between game and non-interactie editors' lights are confusing me. Here's what I understand:

Ambient = isotropoic. Same from any direction. The stuff that lights up a the OpenGL lesson 1 - "triangle". So far so good.

Diffuse = Essentially 'vertex lighting'. When you fire up a dynamic light like a rocket trail, this is what lights up surrounding the environment.

Specular = Shiny. Direction dependent. But isn't this a material attribute rather than a light attribute? As in, wheter something is specular really depends on the surface rather than the light. Why then is specular often regarded as a 'light' attribute?

To my mind, it seems light attributes should be its intensity, direction and colour whereas material attributes determine reflectance, hence its diffuse and specular.

And what's a static light vs. a dynamic light? Does the static light only have use in lightmap generation while the dynamic light is used for vertex/diffuse lighting?

What's the difference between specular lighting for metal and anisotropic lighting for hair?

And a totally wacked question: Our best lighting models based are essentially based on mapping photons. But this is the 'particle' model of the physics of light. Does this mean, using the photon model for lighting equations, we won't be able to simulate the effects of light when they behave like waves? Ie. interference?

Had to get all that off my chest.
Thanks in advance. :)
 
JF_Aidan_Pryde said:
Diffuse = Essentially 'vertex lighting'. When you fire up a dynamic light like a rocket trail, this is what lights up surrounding the environment.
All of these lights can be applied in a number of ways, they don't have to be "vertex lighting." Diffuse lights can be used with bump maps just like any other. They key with diffuse lights is that their brightness is dependent upon distance and angle in a specific way, such that the surface looks dull.

Specular = Shiny. Direction dependent. But isn't this a material attribute rather than a light attribute? As in, wheter something is specular really depends on the surface rather than the light. Why then is specular often regarded as a 'light' attribute?
It's both.

What's a static light vs. a dynamic light? Does the static light only have use in lightmap generation while the dynamic light is used for vertex/diffuse lighting?
A static light is lighting that is pre-computed, and does not change from frame to frame. This was more typical of older-style lightmap lighting. A dynamic light is one that is recalculated each frame, and so can move.

What's the difference between specular lighting for metal and anisotropic lighting for hair?
Hair has length, and thus a preferred direction. Thus the anisotropic lighting. All anisotropic means is that there is a preferred direction, such that the calculations are done differently in one direction than another (side note: it's a pretty general term, too. Materials scientists use the same term to describe, for instance, that a material likes to have its magnetic moments pointed "up" instead of to the side).

And a totally wacked question: Our best lighting models based are essentially based on mapping photons. But this is the 'particle' model of the physics of light. Does this mean, using the photon model for lighting equations, we won't be able to simulate the effects of light when they behave like waves? Ie. interference?
Interference of light is a pretty small effect. The longest-wavelength visible light has a wavelength of about 0.1 microns or so, so unless your scene includes structures that are about 0.1 microns in size, there's no reason to bother with interference. It's also important to note that interference of light will only occur within a coherent beam of light, i.e. a laser. Lasers aren't all that common in games, and even then they're never passed through 0.1 micron size objects.

So no, interference would be uncessary to model.
 
Sounds like you are getting "light types", lighting models, and surface properties a bit confused.

Diffuse (aka Lambert shading) and specular are really properties of the material.
 
Last point first: if the equations are used at the macro level, the difference between the wave and particle theories of light can be considered negligible. How often do you see interference in real life? :)

As you say, specular reflections are a property of the material. However, they can depend on properties of the light as well.

A static light is generally precomputed and 'baked in' to the environment. Dynamic lights have all (or most) associated calculations performed every frame. Some objects in the game may only be lit by dynamic lights, where a dynamic factor is added to simulate static lighting.

Specular lighting for metal and anisotropic lighting for hair may have things in common; metal that is not highly polished will tend to retain the grain of the last cut. Anisotropic lighting is an attempt to add these kinds of grain to lighting.

Game lighting is as you say a very mix and match process. People use whatever gives good results quickly...
 
First of all, ambience, diffuse, specularity and such are not types of lights, they're surface properties.

Ambient lighting is the light that's there even when a surface is not directly lit by a light source (i.e. it's in shadow).

Diffuse lighting is the 'constant' term. Whenever light interacts with matter, a small amount of that light is scattered in every direction, such that no matter which direction you look at the surface you will see some light. This view-independent lighting is the diffuse component. Cloth is a decent example of mostly diffuse surface.

Specular lighting is the variable term. No surface in nature is 100% diffuse (nor is any surface 100% specular), so there's always going to be some angle you can look at a surface that will make it appear to be brighter. Plastic, metal, etc are all good examples of heavily specular surfaces.


All of the above are based around the micro-geometry of a surface, not the light. Area, directional, point, spot, volume, etc lights are just types of light sources. Area lights are 2D lights (such as a monitor screen), directional lights are those where every light ray emited by the source is parallel to the other (the sun is a decent example of this), point lights are where light is emited from a single, 0-D pt in space, and volume lights are 3D sources.

Technically, every lightsource in nature is a volume source, but volume light sources are the most expensive computationally and hence approximations are made. Any volume light source that is sufficiently small, or where you are sufficiently far away will start acting approximately like a point light source. Any volume light source that has very little width to it will start acting like an area light source. And the further away a volume light source is, the more parallel the light rays will appear (hence directional lights are a decent approximation of the sun). And so on..
 
Ilfirin said:
First of all, ambience, diffuse, specularity and such are not types of lights, they're surface properties.
At least in OpenGL, they're also properties that can be applied to the lights themselves. I'm not entirely sure why you'd want to, but it is possible.

Oh, and you missed directional lights:

A directional light is, in essence, a flashlight. It's a point light source that has a direction in which it points, plus a cutoff angle. They are quite expensive computationally.
 
Chalnoth said:
Oh, and you missed directional lights:

A directional light is, in essence, a flashlight. It's a point light source that has a direction in which it points, plus a cutoff angle. They are quite expensive computationally.
Nope. What you described is called a 'spotlight', at least in OpenGL and Direct3d and any graphics textbooks I have seen.

Directional light is light where every light ray from the light source is parallel, as if the light source is infinitely far away (which is a good approximation to use with e.g. sunlight). Directional lights are generally not very computationally intensive either.
 
Dio said:
Last point first: if the equations are used at the macro level, the difference between the wave and particle theories of light can be considered negligible. How often do you see interference in real life? :)
Just about every day, actually, whenever i look at the data-side of a CD or DVD :p (not to mention oily puddles, chromaflair paints [those weird cars that change colour depending on viewing angle], etc...).

You could probably approximate those effects without having to go to the trouble of modelling interference precisely, however...
 
arhra said:
You could probably approximate those effects without having to go to the trouble of modelling interference precisely, however...
Errr? Reflection map!
 
arhra said:
Just about every day, actually, whenever i look at the data-side of a CD or DVD :p (not to mention oily puddles, chromaflair paints [those weird cars that change colour depending on viewing angle], etc...).

Mmmmmm Diffraction. :)
 
JF_Aidan_Pryde said:
And a totally wacked question: Our best lighting models based are essentially based on mapping photons. But this is the 'particle' model of the physics of light. Does this mean, using the photon model for lighting equations, we won't be able to simulate the effects of light when they behave like waves? Ie. interference?

It's all in the modelisation.
Reflection, Refraction, Descartes/Snell law, fresnel effect are results of the wave nature of light. Of course most of the time you simplify the equations where phase is in effect, but sometime you cannot because the effect you want to model is linked to this phase.

LeGreg
 
computer graphics is about hacks
nobody has enough processing power to calculate interactions of all atoms and photons in the scene

so they simplify, hack, chop and butcher, integrate over space and time, all in the name of getting pretty pictures ;-)
they use triangle meshes to describe surfaces instead of storing coordinates of every atom/particle in the scene
they use textures to describe surface colors instead of using more triangles
they use per vertex lighting instead of per pixel and interpolate to save on per pixel calculations

there is only simple photon/atom interaction but they use diffuse, specular and whatever ligthing models to quickly approximate lighting

they use point, volume, directional, spot and other lights to describe our light properties instead of treating their light source as a bunch of atoms emiting photons in various directions
and so on
they precalculate as much as we can and store data in memory so they will have less work to do at runtime
they use stencils or shadow maps for shadows and then sometimes they paint the shadows, but the shadow is the absence of light, so they paint the absence ;-) instead of finding out if the atom receives any photons.

so they take a set of very simple rules that govern the universe, and they approximate them using all kinds of complicated algorithms.
and then they get academic degrees for that.
and their peers from physics departments weep.
 
dominikbehr said:
so they take a set of very simple rules that govern the universe, and they approximate them using all kinds of complicated algorithms.
and then they get academic degrees for that.
and their peers from physics departments weep.

Hey now not so fast. I perused a book at B&N the other day regarding Fractal Equations that dealt with the wave-particle duality of light for computer renders. It was WAAAAAAAAAY over my head, but the synopsis was easy to read. It was basically a quick and dirty way to do complex light renders without actually doing brute force computations. Maybe you write off the physics people too quickly. ;)
 
arjan de lumens said:
Nope. What you described is called a 'spotlight', at least in OpenGL and Direct3d and any graphics textbooks I have seen.

Directional light is light where every light ray from the light source is parallel, as if the light source is infinitely far away (which is a good approximation to use with e.g. sunlight). Directional lights are generally not very computationally intensive either.
Eh, sorry, screwed up my notation. Should have gotten that, since I was pulling it right out of the GL spec.
 
Chalnoth said:
dominikbehr said:
Chalnoth said:
Lasers aren't all that common in games

:oops:

games are about lasers
Is that a joke?

Because if not, it's blatantly false.

well, it is a joke
but lasers are absolutely required in any sci-fi game and movie
and they of course have to be visible in space
and the light can travel slow enough that you can deflect it with your lightsabre ;-)
which is really a sword because sabre has to be curved ;-)
 
Back
Top