D3PLOT 22.1

What is Ray Tracing? A Mini Tutorial

What is ray-tracing? A mini tutorial.

Normal computer graphics, at least in the engineering world, use quite a simplistic approach to drawing objects: colour and transparency can be controlled, and also lighting, but the "surface properties" of the element being drawn are not usually controllable making it difficult to make much distinction between - say - steel, rubber, concrete and glass. In addition shadows are not cast, reflections are not seen, and light rays can pass through solid objects without hindrance. However it is fast, with modern graphics cards able to display and rotate huge models in real-time, making it ideal for interactive use on the desktop.

But there are times when you want to produce a higher quality image, and it becomes necessary to use a different approach.


Image direct from D3PLOT
(Smooth shading used)


The same image rendered via ray-tracing
using default settings.

The examples above show raw D3PLOT output, and the same image rendered via ray-tracing. They are - deliberately - not very different, because the default settings attempt to emulate the D3PLOT visual properties, however you can see that in the right hand image there are shadows cast from the light source and a generally more realistic appearance. Also it corrects errors in transparency visible in the left hand image caused by deficiencies in conventional rendering (for example look at the lower seat cushion).

However there is no wireframe overlay, and other wireframe items, such as the belt upthe B post, are not drawn. In addition only SHaded mode plots are performed at present, so it is not possible to ray-trace contour plots.

So how is this done? As the name suggests ray-tracing considers "rays" of light bouncing off every part of the object, and it "traces"their path from object to eye, taking into account reflections, material surface properties and a host of other subtleties that are ignored in conventional computer graphics. An online search will reveal much more information, but a good starting point is this wikipedia article .