An Introduction to SDL
SDL is the Alias System Scene Description Language. It is specified in the form of ASCII text files and is processed by the renderer to produce images or wireframe preview files. Because SDL is a text-based language, it may be typed in directly by a user. The full functionality of SDL may be used in this way, making the renderer alone a general purpose graphics system.
However, there are certain aspects of creating an SDL file where an interactive system is much easier to understand and use than a purely text-based system. When specifying both subtly curved shapes and sophisticated motions, it is highly desirable to use the interactive modeler and animation system. They allow intuitive interaction between the user on the one hand and the shape and motion representations within the system on the other. The final destination for all the interactively specified data is an SDL file.
An SDL file stores all of the information necessary for the renderer to be able to create the final images.
Rendering is a process of taking a geometrical and optical description of a scene and producing an image or picture as would be seen by an imaginary "camera."
Alias has two implementations of rendering processes: RayCasting and RayTracing.
RayCasting
The display screen of your workstation is similar to a piece of very finely ruled graph paper with over a mil-lion small squares. Each small square is drawn in a solid color. These squares are called picture elements, or pixels.
For each pixel on the screen, one or more straight lines (rays), are projected into the scene from the camera (eye point). The rays strike objects in the scene, and the light that is reflected off of each object at that point is calcu-lated.
RayCasting takes more time than either QuickRender or QuickShade, but provides higher quality results.

In this illustration, ray 1 strikes no objects until it hits the background image. The pixel at that place where ray 1 intersects the screen will be given the color of the background picture, or a color that you've specified as a background for the image.
Ray 2 strikes the egg, rays 3 and 4 the box, and ray 6 strikes the table top. All of these colors will be calcu-lated and placed in the pixels on the screen, taking into ac-count your choices for how shiny the objects are, if the objects have been given textures, the lighting con-ditions, and whether or not a special effect, such as fog, is used.
Ray 5 presents us with a slightly more complicated case: it passes through a translucent sphere and then comes to rest on the opaque tabletop. The Alias RayCaster calcu-lates the color for that place on the table, and then adds to it the amount of color it would get from the translu-cent sphere.
The task of the renderer is to use the intersection points to create a color value to be placed in the final output image. At each intersection point, the surface geometric values are combined with the lights in a scene to compute the amount of light reflected towards the eye. This is done using the surface shading model. A shading model is simply a mathematical expression for the way a surface interacts with light. It is controlled using a number of control parameters. These parameters, such as surface color or surface shinyness, can either be constant for a given surface or they can be made to vary as a function of the surface geometric values, or as a function of time.
For example, the surface color may be made to vary as a function of the (u, v) parameter values in order to "wrap" an image onto the surface. This is called "texturing" and is discussed in more detail later.
Once the reflected light has been computed for each intersection point, the list of intersections is processed from the farthest intersection to the nearest. The surfaces underneath a particular surface are obscured by an amount that depends on the transparency of the nearer surface. If the nearer surface is completely opaque, the more distant surfaces will be invisible. There is a second effect that does not depend on the surface properties at all, but rather is a property of the space between the surfaces. This is due to the nature of the optical medium in which the surfaces reside.
Landscapes on a foggy day and underwater scenes both have very visible "optical media". These are usually referred to as atmospheric effects. In the renderer, the atmospheric effects affect all of space and are controlled in the ENVIRONMENT Section of SDL.
Once a particular ray has been processed completely, taking account of both atmospheric and surface effects, the result is a single rgb color value. This may be placed in the image pixel locations directly or many rays can be computed and averaged to give a "representative" color for the pixels. This averaging over many rays per pixel is called "antialiasing" and helps to combat the artifacts that arise from the point sample nature of raycasting. The amount of antialiasing is specified in the DEFINITION Section of SDL.
RayTracing
RayTracing is similar to RayCasting in many respects, but has one significant difference - the ray of light doesn't necessarily stop when it hits an opaque object. It can bounce onto another object and from there, on to yet another and another, tracing and reflecting everything it sees in the scene. ALIAS RayTracing traces the ray of light as many times as you want it to. More time-consuming than RayCasting, RayTracing gives you the most realistic image possible.
Why would you want bouncing rays? They automatically give you realistic, accurate reflections on surfaces. To save time in rendering, ALIAS lets you pick which objects in a scene you want to have reflections.
RayTracing gives you:
- true reflections from reflective surfaces.
- true refraction through transparent surfaces like glass and water.
- true shadows from multiple light sources.
- definable shadows through transparent objects.
- accurate depth of field with a defined focus point.
RayTracing is a rendering process in which imaginary rays of light are traced from the eye point towards the scene. These rays that come from the eye point are called primary rays. When and if one of the primary rays intersects an object, the ray may reflect and/or refract according to some simplified optical properties. These bounced rays are called secondary rays. The secondary rays are traced in the same manner as the primary rays, and so on.
Shadows are also computed by tracing rays. Each time a ray intersects an object, a shadow ray is traced from that point toward each light source that casts shadows. If the ray strikes another surface before reaching the light, then that point is in shadow with respect to that light source.
The following illustration shows what would happen to ray 5 of the RayCasting example, if it were rendered with RayTracing.

The ray (a) travels from the eye to the sphere. At the point where it contacts the shiny translucent sphere, it splits into secondary rays, one of which (b) refracts through the sphere (that means it is bent at a slightly different angle because of the properties of the material the sphere is made of), and the other (d) which reflects off the sphere until it hits some other object in the environment. The reflected ray then picks up the color of what it has contacted.
The refracted ray (c), once it travels through the sphere, then exits the sphere and is refracted at another angle until it contacts the table. It then picks up some of the color of the table. ALIAS RayTracing then takes all of this infor-mation and automatically calculates the color that will appear at the pixel where the camera meets the screen.
ALIAS RayTracing lets you limit the number of bounces or secondary rays that may be generated from an in-ter-section with a surface.
PowerTracing
The Alias PowerTracer gives the same visual results as RayTracing; it simply performs RayTracing on a multiprocessor machine.
What SDL offers you
SDL stores the control structure for the entire image making process. You can think of it as a file that is designed using the interactive system and then used directly by the renderer to create rendered images. In this approach SDL files are a "black box," the contents of which are irrelevant since they are only executed and never read by the user. Such a purely interactive approach is possible for a large number of animation and modeling projects. However, a few basic SDL programming ideas open up the possibility of creating useful and spectacular effects that would be tedious or impossible using the interactive package alone.
Because SDL has many of the capabilities of a general purpose programming language, it is possible to program it to simulate the dynamic interaction of objects and forces. This opens up the possibility of modeling the behavior of physical systems correctly using the equations of motion. This, in turn, allows the convincing animation of springs and masses and projectiles. Collections of springs and masses may be used to model anything from a piece of drapery to a wriggling worm. Collections of projectiles may be used for particle system effects such as flames, fireworks and rain.
For information about how the Alias renderers process information in the SDL file, see The Rendering Pipeline.
aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights
reserved.