Game Development Community

dev|Pro Game Development Curriculum

Game Lighting for whiners.

by Eric Elwell · 01/07/2007 (7:15 pm) · 9 comments

    www.thetextureguy.com/screenies/LightHeader.jpgBasic Game Lighting Principles... check it out...




    Due to a lack of spare time, I am unable to give a proper "what's up?"
    post; but seriously, who cares? Useful information is much more worth
    while, anyway. (also, an apology, the Mighty Fist posts are missing the
    images. I will try to find them and re-upload.)

    This is a tutorial ripped right out of my site. Some basic
    stuff, but I think this may be useful to most if not all of you.



    This is a GX Adam deGrandis original model, the texture is
    covered in another tutorial (which I may or may not post in
    subsequent plans. For now, find it on the site.)


    www.thetextureguy.com/Tutorial/BasicLighting/001Unlit.jpgNow that we have our model completely textured, it's time to apply some
    proper lighting to it.

    With the model open in showtool, I will turn lights on. Let's have a look:
    www.thetextureguy.com/Tutorial/BasicLighting/002ShadedPlain.jpgThis is how Torque will light the geometry with the default settings. Not
    much of an improvement if you ask me.


    Let's have a look at the Synapse Lighting Kit:
    www.thetextureguy.com/Tutorial/BasicLighting/003Synapse.jpg

    The Lighting Kit does
    a great job of pushing
    the highlights on the
    texture, but we don't
    want this overblown
    look. We don't want to
    simply darken areas
    that need to be shaded,
    or lighten geometry
    facing our light source.
    What we want to do is
    create a lighting setup
    that will pull our
    characters into the scene
    and be an extra weapon
    in our arsenal to make
    this game visually
    appealing. We want our
    characters and
    environments to have a
    level of coherency that is
    convincing and interesting.
    The solution is actually
    pretty simple.
    www.thetextureguy.com/screenies/spacer.jpg



    The source of the problem:
    www.thetextureguy.com/Tutorial/BasicLighting/004Default.jpg





    The core problem is that
    objects in the real world
    recieve color and light
    differently than you might
    expect without looking
    into it. We tend to assume
    that shadows are black
    and that "shaded" areas
    are simply darker. The
    truth is, objects recieve
    light and color from their
    surroundings. If we assume
    that our object is fleshy,
    and that it recieves light
    reflected from the ground,
    we will choose a tinted
    reddish-brown color for our
    shaded areas or in the
    case of Torque, ambient
    light. Directional light
    (recieved from the sky)
    should be a blue-ish tint.




    www.thetextureguy.com/screenies/spacer.jpgWith these settings our untextured model might look something like this:
    www.thetextureguy.com/Tutorial/BasicLighting/005Correct.jpg


    Stock Torque lighting will darken the whole model when the texture
    is applied. The Lighting Kit won't make a difference on the untextured
    geometry preview, but when we add the texture, it should look like this:
    www.thetextureguy.com/Tutorial/BasicLighting/006CorrectTextured.jpg





    This lighting solution
    looks far fleshier and
    believable. It also
    causes an interesting
    color combination
    because of the
    application of color
    theory. (Look it up.)
    Now let's change our
    default middle gray
    background to one
    that better fits the
    type of environment
    we might find our
    character in.

    www.thetextureguy.com/screenies/spacer.jpgwww.thetextureguy.com/Tutorial/BasicLighting/007BG.jpg

    I've chosen a dark
    desaturated red
    with a hint of purple.
    This really helps the
    character to pop
    out of the "scene".
    Playing with lighting
    and backgrounds in
    this fashion is a quick
    way to get a good
    idea of what you can
    accomplish with the
    engine, since this is
    all rendered with
    Torque in Showtool. I
    would strongly
    discourage you from
    simply copying the
    values I am using. In
    no way do I intend to
    just "tell you what to
    do". Rather, I hope
    that you take the
    principle of light and
    color reflection/refraction,
    and apply color theory
    to come up with your
    own interesting lighting
    solutions for your
    characters and
    environments.

    www.thetextureguy.com/screenies/spacer.jpg
    Have fun!

#1
01/07/2007 (8:54 pm)
This is a very interesting read.

Thanks.

I'm heading over to your site now...
#2
01/07/2007 (9:33 pm)
Glad to see you follow through with the "post it on GG" idea. Nice job pal. :)
#3
01/07/2007 (9:46 pm)
Great stuff as always Eric. :)
#4
01/07/2007 (9:51 pm)
I like this better with the text to the right.

Oh and it's very well punctuated!
#5
01/08/2007 (5:15 am)
Nice read, and nice site. Thanks.

STef
#6
01/08/2007 (8:20 am)
very informative.
#7
01/08/2007 (8:23 am)
very interesting but are these lightning settings also exported into torque?
#8
01/08/2007 (9:49 am)
Thanks for the responses,


Florian, all of these images are screengrabs from Showtool. It is Torque. You can't edit your project directly with Showtool, simply inspect. You will have to set up your lights separately within your project.


Truth is, we have barely scratched the surface. We are only using two lights in this setup, you can take it so much farther than that in your own torque project. I'm not really suggesting exact settings, so much as a smarter approach to get more mileage out of the tech. No matter what tech you are using (ranging from no lighting to shader blingbling) , a poor artistic approach will give you poor results. Conversely, a wise artistic approach will take advantage of the technology available. Even in an unlit 2D game, you can apply these theories to get better results. It's simply untrue to think that if our game engine cannot calculate lighting/refraction/reflection/specular/normals/pick-your-poison perfectly then the look is unattainable. Not always, but many times, the problem is user error. We simply don't realise how much we could accomplish if we would just do it right.

I hope that helps explain a little better!