The importance of generating realistic images from electronically stored scenes has significantly inreased during the last few years. For this reason a number of methods have been introduced to simulate various effects which increase the realism of computer generated images. Among these effects are specular reflection and refraction, diffuse interreflection, spectral effects, and various others. They are mostly due to the interaction of light with the surfaces of various objects, and are in general very costly to simulate.
The two most popular methods for calculating realistic images are radiosity and ray tracing. The difference in the simulation is the starting point: Ray tracing follows all rays from the eye of the viewer back to the light sources. Radiosity simulates the diffuse propagation of light starting at the light sources.
The raytracing method is very good at simulating specular reflections and transparency, since the rays that are traced through the scenes can be easily bounced at mirrors and refracted by transparent objects. The following scenes were generated with ray tracers developed at our institute.
Calculating the overall light propagation within a scene, for short global illumination is a very difficult problem. With a standard ray tracing algorithm, this is a very time consuming task, since a huge number of rays have to be shot. For this reason, the radiosity method was invented. The main idea of the method is to store illumination values on the surfaces of the objects, as the light is propagated starting at the light sources.
Deterministic radiosity algorithms, which have been used for radiosity for quite some time, are too slow for calculating global illumination for very complex scenes. For this reason, stochastic methods were invented, that simulate the photon propagation using a Monte Carlo type algorithm.
At our institute we improved the speed of this type of stochastic method by introducing a new algorithm called Stochastic Ray Method. Using the same amount of CPU time, our new algorithm (right image) performs visibly better than the standard Monte Carlo radiosity (left image).
The term raytracing just means that the renderer calculates the path of a ray of light. This can be used in several ways: to calculate an accurate sharp shadow from a light source or to calculate accurate reflections and refractions as light bounces off or passes through an object.
Blender itself uses both the above methods. When people refer to “raytracing” they normally just mean these two things: in other words it generally doesn’t have anything to do with soft shadows.
They follow rays of light from a point source, can account for reflection and transmission. Even if a point is visible, it will not be lit unless we can see a light source from that point. Ray tracing particularly suits perfectly reflecting and transmitting surfaces. Must follow the cast ray from surface to surface until it hits a light source or goes to infinity. The process is recursive and account for absorption. Light from source is partially absorbed and contributes towards the diffuse reflection. The rest is transmitted ray + the reflected ray. From the perspective of the cast ray, if a light source is visible at a point of intersection, we must
1. Calculate contribution of the light source at the point
2. Cast a ray in the direction of perfect reflection
3. Cast a ray in the direction of the transmitted ray
Theoretically the scattering at each point of intersection generates an infinite number of new rays that should be traced. In practice, we only trace the transmitted and reflected rays but use the Phong model to compute shade at point of intersection. Radiosity works best for perfectly diffused surfaces.
The term radiosity is often used to refer to any algorithmn which tries to calculate the way diffuse light bounces off surfaces and illuminates other surfaces: for example light coming through a window, bouncing off the walls in the room and illuminating the reverse side of an object. “Global illumination” or (GI) is probably a better term, since “radiosity” is a specific algorithmn. Ambient Occlusion could be thought of as a type of GI.
Radiosity solves the rendering equation for perfectly diffuse surfaces. Consider objects to be broken up into flat patches (which may correspond to the polygons in the model). Assume that patches are perfectly diffuse reflectors
• Radiosity = flux = energy/unit area/ unit time, leaving patch (watts per square metre)
So, basically, raytracing is for reflections, refraction and sharp accurate shadows, radiosity is for diffuse light bouncing off objects.
Global lighting can be determined through the rendering equation, rendering equation cannot be solved in general so numerical methods are often used to approximate solution. They perfectly specular and perfectly diffuse surfaces simplify the rendering equation. Ray tracing is suitable when the surfaces are perfectly specular. Radiosity approach is suitable when the surfaces are perfectly diffuse. Unfortunately both methods are expensive and massively memory consuming if you trying to implement them for your game.