How Raytracing Works
Categories: Articles, Featured
Written By: Chris
Chances are you have seen the cool effects of ray tracing. You may have even had your computer crash due to overuse of this advanced technique. But what exactly is going on when a ray trace solution is occurring? There is no doubt that ray tracing is a rendering technique used in 3d software that creates photorealistic images. The reason ray tracing creates such realistic images is because it literally calculates every ray of light and follows each and every one of them until they hit the camera. That means for each pixel, there is a calculation going on, tracing, the ray, hence the name, ray trace.

What is a ray?
In 3d terms, a ray is a line that travels through 3 dimensions and collects data to be rendered. As this ray travels though space, it bounces off various objects, collecting more data as it reaches its end goal, the camera. It mimics how real light behaves as it hits our eyes. You can think of our eyes as the camera, and light as the rays. Because the amount of rays in any given scene is quite numerous, the ray tracing calculation is reversed to that of real light. Only light that hits the camera is calculated backwards to the light source.
Three Controls
Ray tracing has three main controls, depth, pixel count, and number of light sources. Essentially, the more you have of these, the longer the render time will be.
Ray tracing depth refers to the amount of times a ray is allowed to come in contact with various objects in the scene. Most programs have slightly different ways of calculating depth. Reflection rays bounce off objects in a manner that will reflect the environment. A shadow ray is calculated once a ray hits a target. A refraction ray is generated anytime an object is defined as transparent.
Since ray tracing works in a backwards manner, the amount of lights will directly effect the amount of times a ray must be trace. Therefore, if you have 10 lights in your scene, the amount of render time is going to much greater than if you had 2 or 3 lights in your scene.
In the same regards, the more objects you have in your scene, the higher the amount of pixels to be rendered will be. Since rays must traced through every pixel, you can see how having more objects would naturally take more time to render.










February 11th, 2008 at 9:08 am
very nice article u wrote here. the basicks of raytracing. i had some ideas on advanced raytracing, mightbe u would be interested to read, or drop your opinion, if u whish to do so.
here u describe how the rays are being casted, and i have an alternative idea, on the matter. non raytracer has been writen to my knowelage which does what i whant it to do. i think u have lots of understanding in this so i would value your opinin.
here is a link to my indea in wordpress:
http://3dideas.wordpress.com
well, good luck, and i keap an eye on your blog.
February 14th, 2008 at 5:18 pm
I will definitely check it out. Thanks for stopping by! I will be doing a wiring parameters tutorial for animating a car. The y position value of a car will determine the rotation the tire.
March 11th, 2009 at 8:53 am
hey it very good
March 31st, 2010 at 5:43 pm
I don’t agree with everything in this blog, but you do make some very good points. Im very interested in this subject matter and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.
April 22nd, 2010 at 5:56 pm
This is a good summary, I was wondering if I could use this write-up on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.
May 13th, 2010 at 12:51 am
EMF & Cell Radiation Is Damaging Your Brain and Skin.
June 8th, 2010 at 12:23 pm
Very good site, where did you come up with the knowledge in this posting? Im glad I found it though, ill be checking back soon to see what other articles you have.