Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com
Your Profile

+ Reply to Thread
Results 1 to 4 of 4

Thread: A Little Tutorial About Lighting

  1. #1

    A Little Tutorial About Lighting

    A Little Tutorial About Lighting

    Well, I use to think that lights are one of the most important aspect in a good pic. Even a crappy mesh if well lightened can be beautiful. Anyway, I have not chosen a bad mesh for illustrating my tut but a very nice and elegant one: one of the vase that Zhann made a long time ago, the dragon vase.



    First point that we'll study here is the light position. In each of the renders of the serie, there will be 1 infinite light with these settings:


    Xrot=-15
    Yrot=variable
    Zrot=0
    Intensity=1
    Color=white
    Shadows=on, raytraced (blur=3, bias=0.25)



    The only parameter that will change will be the Yrot, from 0 to 180 degrees. The camera will stay fixed and facing the vase. Now let the little show begin...



    Yrot=0
    This is a very flat render: no shadows clearly visible that may help to understand the volume of the mesh...

    Yrot=45
    It looks better but if the background were black there would be a problem of hidden silhouette...

    Yrot=90
    It's worse like this: too much shadows, flat shadows, no volume there... More: if the background were black there would be a problem of hidden silhouette...

    Yrot=135
    It could be interresting as a backlight but here it's simply wrong...



    Yrot=180
    No comment!

    OK, what does that mean?
    Light pointing in the same direction as camera are wrong.
    Light pointing in a perpendicular direction to camera are wrong if used alone.
    Light pointing from behind may be good only as additional lights to enhance the silhouette of the mesh.
    It has to be noted that one single light is not enough to reveal the volume of a mesh.

    Let try with 2 infinite lights now...




    1 light with Yrot=45 at 100% of intensity
    1 light with Yrot=-135 at 50% of intensity
    Not bad but the shadowed and lightened parts are still a bit too homogen: flat.





    1 light with Yrot=90 at 100% of intensity
    1 light with Yrot=-135 at 50% of intensity
    The shadows are too flat but the backlight looks better when there's more darkness around...

    Maybe a third light might help to soften the shadows and reveal more volume...




    1 light with Yrot=90 at 100% of intensity
    1 light with Yrot=-135 at 50% of intensity
    1 light with Yrot=45 at 50% of intensity
    Not bad.

    3 lights are enough to create a nice lighting and 3 lights are the minimum with classical light source (no IBL).
    The positions of the 3 lights have to be very wisely done.
    The Yrot can be change of course, but try to stay near those limits...
    Playing with different Xrot values will allow you to create very pleasing lightings too.
    If you use spot/point lights, you'll have to make them point to your main mesh and then modify the X,Y,Z values that determine their position in space.

    Applying different colors to these 3 lights will help you to simulate very interresting ambiance:
    Main light=yellow/white
    Softening ligh=red/yellow
    Backlight=blue
    for example...

    Now, we'll have a look at the differences betwin Infinte lights, Spot Lights and Point Lights...




    This is the infinte light.
    Notice that all the ground is lightened and the same way.
    Sadows are parallel.
    Of course!





    This is a Point Light
    Notice that all the ground is lightened and the same way.
    Shadows are NOT parallel.
    Of course!





    As the Infinite light have no particular settings, Point lights have an interresting feature: decay.
    This one was done with
    Start=3
    End=9
    Which means that the decay starts at 3 and ends at 9.
    No big deal.

    Note that it did not affect the shadows.




    This is a Spot Light.
    Angle start=0
    Angle end=30
    Note the the whole ground is NOT enlightened.
    Note that the shadows are NOT parallel.





    The same with 0-60




    The same with 0-90




    The same with 0-120




    The same with 0-150

    Now let's see how works the angle start...




    30-90




    60-90




    90-90




    120-90
    OK?
    Well, let's look at the decay now.





    60-90-0-6




    60-90-0-9




    60-90-3-6




    60-90-3-9




    60-90-6-3




    60-90-6-6




    60-90-6-9




    60-90-9-6
    OK? So,
    Angle Start < Angle End
    And
    Dist. Start < Dist. End

    Plus: the shadows are NOT affected by those parameters but the zone covered is. The fade of edge of this zone is controlled by the angle start/angle end ratio. The fade of the light in space is controlled by the dist start/dist end ratio.
    Next step will be the BIAS!




    Bias 40




    Bias 10




    Bias 1




    Bias 0.25




    Bias 0




    Bias 0 Shadow mapped 1024


    The bias parameter defines the realism or accuracy of the shadows. Lowest valuest are best except for very low ones using raytracing shadows: source of the classic artifacts.


    Note that the best low value will depend on the meshes.
    For example, dynamic clothes are very sensitive to these low values and tend to create artifacts...


    If your purpose is not realism renders, it's useless to use values lower than 1: this way, you'll save time render because the lower the bias is, the longer render time will be. Shadow maps accept 0 bias very well but sharp shadows require high shadow mapped size and thus much memory wich is not the case of raytracing lights...


    I forgot to say that the decay is linear. In nature this is not the case: the light tends to fade proportionnally to the inverse of the square of the distance. This is called a 1/r2 decay.This decay is due to the loss of energy of signals (light for instance) in a non empty environment...

  2. The Following 2 Users Say Thank You to olivier For This Useful Post:

    jan (08-28-2009), thunderstone (11-18-2009)

  3. #2

    thanks

    very helpful, thanks a lot

  4. #3
    This is ver useful - thanks for sharing

  5. #4
    I hjust had to print this for future use
    Thank you

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Get Social with RDNA:
Runtime DNA Inc 1-877-789-8849 (M-F 9A-5P EST)
Copyright © 2001-2010 All Rights Reserved