top of page
Search

Week 5: Lights

  • Writer: Karinne Lorig
    Karinne Lorig
  • Jun 21, 2019
  • 1 min read

My goal for this week was to both to build up a lighting system and to implement planes to complement the existing spheres. I chose to implement the Oren-Nayar model of reflectance due to it giving relatively good results while also being quite simple. The end product should be able to render lighting in different colors---taking into account both the base albedo of the object and the color of the light---as well as the various colors of light bouncing off of objects around it.


I started out by just getting light falling on a sphere working, without worrying about light reflecting off it or the influence of the object or light’s color. After a few kerfuffles with a backwards light vector, I managed to get an image like this:


With that working, I started to add in both the effects of albedo and light bouncing off of other surfaces. This was built off the back of the previous system for reflections, usurping its system for bouncing rays off of surfaces. These additional lights were then calculated in the same way previous lights were. Which resulted in:


Comments


© 2018 by Karinne Lorig

bottom of page