Editing Lighting

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 7: Line 7:
 
BRL-CAD supports a wide variety of light types including the ability to represent directional lights, point light sources, colored lights, area lights, and more.  Lights are visible by default but may be marked invisible for situations where you want to more heavily/specifically illuminate a portion of a scene without seeing the light object itself.
 
BRL-CAD supports a wide variety of light types including the ability to represent directional lights, point light sources, colored lights, area lights, and more.  Lights are visible by default but may be marked invisible for situations where you want to more heavily/specifically illuminate a portion of a scene without seeing the light object itself.
  
== A Simple Example ==
+
= A Simple Example =
  
 
Consider a simple scene comprised of a box with three colored lights positioned above the box:
 
Consider a simple scene comprised of a box with three colored lights positioned above the box:
Line 27: Line 27:
 
Note that there is so much overlap between the lights at that point, so you see  blue for the farthest light, a pinkish magenta color in the middle where blue and red are cross, and white where all three colors are overlapping.
 
Note that there is so much overlap between the lights at that point, so you see  blue for the farthest light, a pinkish magenta color in the middle where blue and red are cross, and white where all three colors are overlapping.
  
== The Phong "Plastic" Shader ==
+
= The Phong "Plastic" Shader =
  
 
Now, at first thought, you may think that the lights are facing forward but they are in face facing straight downward (with a 180 degree angle).  Or you may ask why the lights aren't evenly blending together with a white bloom near the center and under the red light.  The reason has to do with the material properties (the shader) of the box itself.  It's using a default ''plastic'' shader.  That shader controls how light interacts with the box including how light is reflected, refracted, absorbed, etc.
 
Now, at first thought, you may think that the lights are facing forward but they are in face facing straight downward (with a 180 degree angle).  Or you may ask why the lights aren't evenly blending together with a white bloom near the center and under the red light.  The reason has to do with the material properties (the shader) of the box itself.  It's using a default ''plastic'' shader.  That shader controls how light interacts with the box including how light is reflected, refracted, absorbed, etc.
Line 37: Line 37:
 
[[Image:Phong.png]]
 
[[Image:Phong.png]]
  
== Tweaking the Box ==
+
= Tweaking the Box =
  
 
If we move the spherical light sources a little bit closer to the box's surface, we can emphasize the effects of diffuse and specular reflectivity:
 
If we move the spherical light sources a little bit closer to the box's surface, we can emphasize the effects of diffuse and specular reflectivity:
Line 55: Line 55:
 
[[Image:Light8.png]]
 
[[Image:Light8.png]]
  
==  Topping it all off ==
+
=  Topping it all off =
  
 
In the simple example scene we are using, if we look at the scene from directly above the three spheres, specular reflectance is no longer a concern and we can see that the lights indeed do reflect straight down.  Here they are seen with a default 1.0 fraction and no ambient lighting:
 
In the simple example scene we are using, if we look at the scene from directly above the three spheres, specular reflectance is no longer a concern and we can see that the lights indeed do reflect straight down.  Here they are seen with a default 1.0 fraction and no ambient lighting:
Line 70: Line 70:
  
 
[[Image:Light_brg20.png]]
 
[[Image:Light_brg20.png]]
[[category:tutorials]]
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)