Real-Time Rendering An Introduction PDF
Real-Time Rendering An Introduction PDF
Real-Time Rendering An Introduction PDF
The purpose of a graphics card is to create a Although many optimizations have been
2D image that can be shown on a screen, and made over the years and processors power
that of course as fast as possible. Over the years, has increased tremendously, raytracing is
two major techniques have been established: still too performance intense to create 60 or
Raytracing and Rasterization. The former is more frames per second from a scene that
primarily used in movie production or anywhere constantly changes.
To make matters worse, what we know as Lighting computation in Ventuz is done per pixel,
shadows in the real world is not a simple “light is not per vertex. It requires each vertex to have
blocked or not blocked” question but the result a so called normal, a vector that is orthogonal
of light bouncing of surfaces multiple times, on the surface and of unit length. Most
reaching areas which are not directly visible 3D modeling program calculate these
from the light source. This is what Raytracing tries automatically during creation of an object.
to simulate and what makes it so complex. It is Instead of calculating the lighting value per
also a far stretch from splatting triangles to the vertex and then interpolating it, the normals
screen the way Rasterization does it. are interpolated and then the lighting model is
applied to each pixel filled by the triangle.
Engineers have thought of several ways to solve
these issues. One of them is using an Ambient Lighting Models
Light that applies a certain Color to every
Triangle’s face no matter its position, rotation or The other information required is the position
the light sources. This way, when a source’s light and type of one or more light sources. The most
does not reach a triangle, it is not completely common light sources are point lights (the light
black, but still has a small amount of brightness emits from infinite small “lamps” at a specific
simulating the indirect rays reflected from other position in 3D space) and directional lights
objects. Another newer approach is using (without a position but a constant direction as
Global Illumination algorithms. from a far away light source like the sun).
In the left configuration, the red glass doesn’t In the right configuration, depth testing has been
look transparent at all. Why is that so? The render re-enabled but the rendering order has been
order of the objects is red then green then blue. changed to back to front: First blue then green
When red is rendered, the Z-values in the depth then red. When red is rendered, it takes 50% of
buffer are set and no fragment from another itself and 50% of the already rendered objects
triangle with a farther away Z-value will be which creates the correct effect.
Mirror reflection describes effects which mimic If you cannot see it, there is no need to render
a perfect mirror. In general this is only possible it. That is the motto of culling techniques which
for a planar surface, otherwise it would require try to avoid having to render an object or
raytracing. The idea to fake this effect is to triangle at all. For example, all triangles that
render the scene twice, once mirrored along are completely outside of the camera viewing
the reflection plane and once correctly. Think area do not have to be rendered as they will
of a pool in a hotel. The hotel can be seen as not contribute to the final image. This technique
expected everywhere except in the pool. In the is called Frustum Culling and is something
pool, the hotel can be seen upside down. that has to be done by the user or on the
application level and therefore will not be
further discussed here.
Reduce Complexity
info@ventuz.com
www.ventuz.com