ART Ray Tracer


With v0.97 Anim8or has an integrated Ray Tracer. You can use it to render movies and still images just like to original scanline renderer and OpenGL shader renderer. All you need to do is select it from the Renderer→Renderer command dialog.

Ray Tracing is a global rendering technique for making relatively realistic images from 3D models. It traces the path that a light ray might take through the scene to discover what objects, lights, etc. affect the final color of a pixel. It is called a global technique because any part of the scene may influence to final value of any pixel. Ray tracing borrows from optics to model reflections, refractions and more.

Anim8or's ray tracer can render all of it's normal materials, of course. But it also can show reflections off of shiny objects and diffraction through transparent ones. The next sections will explain how to add these effects to your images.

ART Materials

You enable the additional capabilities of ART materials by adding certain attributes to normal materials. Attributes allow you to associate arbitrary values with a material. The ART renderer checks them when initializing a scene and chooses alternate rendering code when the right ones are present. You add attributes to a material by clicking on the "Attributes" button in the basic Material Editor. This section lists the main categories of ART materials.

The attribute class is the starting point for accessing ART materials. class is a string attribute which defaults to normal Anim8or materials when not present. Note that case is important in attribute names. Class and CLASS are names for different attributes and do not affect ART rendering. In addition to the normal parameters of Anim8or materials, individual classes may use additional attributes for more flexibility.

The main classes are anim8or (the default), glossyreflector, transparent and dielectric. Each is described in a following section.

Class anim8or

Class anim8or has additional attribute, specular. It determines the look of the specular reflection. There are 3 recognized values:

  • phong - the default value, phong is simple normal Anim8or phong shading for highlights.
  • reflection - a mirror like perfect reflection is added to a material. Rays are reflected off of a surface to determine what is visible in that direction. The result is multiplied by the materials specular weight, Ks, the material's normal color - including the original phong highlight - is weighted by (1 - Ks) and the tow values are added for the final color. Thus a value of Ks = 1.0 would be a perfect mirror with no base material properties visible, and Ks = 0.1 would be a normal material look with a slight rflection of the scene.
  • glossy - an imperfect reflection is added to the material. This is like a blurred mirror or defocused camera image. The further from a surface, the less distinct the reflection. The overall amount of blur is determined by the Phong Roughness. The default value of 32 is very rough. Higher values like 1000 make a more perfect reflection while 100000 is almost the same as a perfect reflection. Glossy images need anti aliasing turned on or they will look very speckled. Very glossy images will need more that the default AA samples per pixel value of 16. The image below uses the default, 32, and the default samples per pixel of 16 and is rather grainy.

Below is an example of the three settings for the specular class. From the left they are phong, reflection and glossy. Ks is 0.5 and Roughness is the default of 32.

Here is the Anim8or project for the above image: class_anim8or.an8

Class glossyreflector

This glossyreflector class is a simpler class that is similar to the anim8or class with the specular attribute of glossy. While the anim8or class is a little less accurate from a physical sense, glossyreflector attempts to follow the rules of physics a little more closely.

The glossyreflector class uses the Phong roughness value for the degree of glossiness. glossyreflector has one attribute:

  • Kr - constant of reflection. This is similar to the specular constant in normal Anim8or materials, Ks, but controls what percent of the light is reflected. It is set to the value of Ks if there is no explicit Kr.

Below are three glossyreflector spheres with roughness of 200, 1000 and 100000. You can still see quite a bit of graininess in the left sphere even though this image used 64 samples per pixel. Glossy surfaces require many more samples for high quality images. Also notice that there is no specular highlight from the infinite light source. Infinite lights don't represent real, physical entities. An area light would show a specular highlight however.

Here is the Anim8or project for the above image: class_glossyreflector.an8

Class transparent

This transparent class is a simple model for diffraction of light through transparent materials. There is also a slight reflection off the surface. The amount of transparency is set with the normal transparency value for a material. It has one additional attribute:

  • IOR - the index of refraction. This represents how light bends as it enters or leaves a transparent material. Useful values include 1.0 (air - no difference than outside of a material), 1.33 (glass), 1.49 (Plexiglas) and 2.42 (diamond).

Rendering transparent materials can take a very long time. Each primary ray (from the camera) can trigger tens or even hundreds of rays since each interaction generates up to two child rays, the reflected ray and the transparent ray.

The image below show 5 spheres with and IOR of 1.0, 1.1, 1.2, 1.3 and 1.5, and a transparency of 0.1:

Here is the Anim8or project for the above image: class_transparent.an8

Class dielectric

The dielectric class is a complex model that is closer to how light interacts with real transparent materials. It uses Fresnel equations to determine reflections and transmission parameters at each ray-surface interaction. As light travels through a dielectric material it is attenuated and gradually takes on the material's color. Thin sections appear almost colorless but thick sections can be quite dark. Glass is a dielectric which explains why a solid glass door looks clear from the front but looking into the edge can be dark green or gray. The dielectric class has two additional attributes:

  • IOR - the index of refraction. As with the transparent class, this controls how light bends as it enters or leaves the material.
  • UnitDistance - the distance a ray must travel through the material to be filtered by the material's diffuse color. The ray's color is multiplied by the diffuse color raised to the power of (the distance traveled/UnitDistance). So if the diffuse color is (0.5, 0.5, 0.5) and UnitDistance is 10, then a ray that travels 20 units will be scaled by (0.5, 0.5, 0.5)^2 or (0.25, 0.25, 0.25). The default value of UnitDistance is 10.0.

The image below shows several spheres and a rectangular prism that are dielectrics with an IOR of 1.3:

Here is the Anim8or project for the above image: class_dielectric.an8

Light Attributes

You can modify the look of area lights by changing the way that they are sampled with the following attribute on the light in a scene:

  • sampler - is a string attribute with three recognized values: multijittered (the default), jittered, and regular. The jittered modes produce a more random or grainy effect when under sampled while the regular sampler looks more like multiple shadows.

The image below has two area lights, the blue one (the yellow shadow) uses a regular sampler while the white light (which makes a blue shadow) uses the default multijittered sampler.

Here is the Anim8or project for the above image: light_samplers.an8