Toxic Renderer for Windows

http://www.toxicengine.org

Download (Contains Source Code and Sample Scenes as well)

Source Code on SourceForge

Documentation

 

The Toxic renderer is a Ray Tracing renderer for the Windows operating system. There is some documentation on the website pertaining to porting the Toxic renderer to Linux, but I did not find anything pertaining to using it on Mac OS. Toxic is open source project, and therefore not only is the renderer free to download and use, its source code is as well. You can download all versions of Toxic, as well as most versions of its source code here. Currently, the Toxic renderer is in the alpha stage, and the developers are working on releasing a beta version in the near future. The website also contains a developers section for those who are interested in aiding in the development of the Toxic renderer.

 

The main objective of the Toxic developers is to simulate physical correctness when rendering scenes. Due to this desire to achieve physical correctness, the Toxic renderer performs Ray Tracing using very CPU-heavy computational algorithms. Thus, scenes take on the order of minutes to render. The current version of Toxic has several features, which include: the use of full global illumination; the use of fully diffuse and fully specular BDRF for surface reflectance; both point light sources and area light sources; automatic generation of hard and soft shadows from light sources; antialiasing via supersampling pixels; and depth of field specification, allowing for out of focus objects to appear blurred.

 

The renderer takes as input two XML files: a settings file and a scene file.

Settings File: The settings file describes the way in which to render the scene, and allows for tradeoffs in quality vs. rendering speed. There are two main elements in the settings file. They are the pixel sampling element and the lighting components element. The pixel sampling element describes whether and how supersampling is to be performed, or whether a special method of sampling, called Whitted Adaptive Sampling is to be performed. The lighting components element describes how and what lighting computations will be performed. It allows for the specification of combinations of, and the parameters for direct lighting, indirect lighting, specular reflections, and caustics. The documentation for settings files can be found here.

Scene File: The scene file describes the scene to be rendered. These files can specify objects, as well as the texture and lighting conditions under which to render. There are two main elements in the scene file. The first element specifies what surface shaders are to be used in the file. The surface shaders allow for the specification of the BRDF of a surface, the reflectance spectrum of the surface (i.e. color or texture), the EDF of the surface (whether or not and how it emits light), and the spectrum of the light it emits (if it does indeed emit light). The second element specifies the objects to be rendered. The objects that can be specified are cubes, rings, spheres, squares, planes, triangle meshes, point light sources, and cameras. Area light sources are specified in the shader elements, and can then be attached to surfaces of objects. Triangle meshes can be specified in separate files using either .obj, .ase, or .tri file formats. Some example 3D triangle mesh files and their associated texture files that can be rendered by the Toxic renderer can be found here. The documentation for scene files can be found here.

 

 

Example Scenes

Below are some example scenes that were rendered using the Toxic renderer. These scenes either came with the latest version of Toxic (alpha-5), or can be found in the Download section of the webpage.

 

Figure 1

This scene came with the software. It took about six minutes to render. The settings XML file for this scene specifies the use of direct and indirect lighting. The boxes, walls, floor, and ceiling are all triangle meshes stored in .obj files, which are referenced in the scene XML file. The square light source on the ceiling creates the soft shadows of the boxes on the walls and floor. If you look closely, you can see that the left side of the left box has a reddish hue from the left wall, and the right side of the right box has a greenish hue from the right wall, due to the indirect lighting.

 

Figure 2

This scene also came with the software. It took about three minutes to render. The settings XML file for this scene specifies the use of direct lighting, specular reflections, and caustics. A separate texture file is used to create the texture of the wood. The ring is an object created in the scene XML file. If you look closely, you can see the reflection from the wood texture on the ring due to specular reflections. This is an interesting picture in that it shows, with the proper textures, how realistic a scene can be rendered with this renderer. It looks as though the picture was taken by a camera.

 

Figure 3

This scene can be downloaded from the website. It took about fifteen minutes to render. The settings XML file for this scene specifies the use of direct and indirect lighting. The model is stored in an .ase file. There is some blurring of the hand of the robot in the foreground. It is hard to tell due to the size of the picture, but there is also some slight aliasing.

 

Figure 4

This scene can be downloaded from the website. It took about fifteen minutes to render. The settings XML file for this scene specifies the use of direct and indirect lighting. The model is stored in a .tri file which can be found at http://www.tsi.enst.fr/3dmodels/. The texture for the object in this scene can also be found on the same website. This image is interesting in that it also shows how realistic scenes can look when rendered using this renderer.

 

 

My Scene

The scene I created is fairly simple, yet it showcases some of the highlighting attributes of the Toxic renderer. It took about 17 minutes to render. The scene includes an off-white ceiling, three walls, the color of each being of the three RGB values, a floor textured with the image in figure 4, a box with a realistic wooden texture that was used in the image in figure 2, and a sphere with a perfectly specular mirror-like texture. The XML file for this scene can be found here, and the XML file for the settings for this scene can be found here. Many of the values of the attributes in these files were directly copied from the scene files in the examples above. The texture file for the cube can be found here, and the texture file for the floor can be found here.

 

Figure 5

Originally, I had planned to create a scene involving much more complicated mesh objects. However, although the models of these objects were easy to import, the sizes of the objects were vastly different, and I decided that it was not worth the time required to scale each object, and that the characteristics of the renderer could be just as easily demonstrated using simple geometric objects, such as cubes and spheres. Also, the time to render a scene containing several complex objects would have been unreasonable, as mesh objects take much more time to render.

 

As you can see, the sphere is like a mirror, reflecting the walls and the box. This is done naturally using the renderer’s specular reflections calculations. The shadows are also done naturally using the renderer’s indirect lighting calculations. The shadows generated by the sphere can even be seen as reflections in the sphere itself. One of the most interesting things about this image is that the floor looks 3D, as if the statue in figure 4 is popping out of the floor.

 

It would sometimes occur that the renderer would get stuck at a certain percentage while rendering my image. Sometimes it seemed to be due to a specific geometric object that it seemed it just could not render, and other times it seemed to occur with a specific light source being placed. I do not know the specific cause of this failure to complete the rendering of my image, but a couple of times I was forced to remove an object from my scene, and it took up quite a bit of time (a few hours), especially as the rendering process is slow. I had originally planned to use more area light sources in my scene, but was forced to use only one because of this failure.

 

 

Final Thoughts

The main design goal of the developers of this renderer is correctness and quality. As a result, the images generated are quite astounding. Shadows are automatically generated, and reflections on mirror-like surfaces can be automatically generated as well. As the work on this renderer is still in progress, and it is not the final version, there are still some features missing. For instance, only fully diffuse and fully specular BDRF’s can be specified. Also, this version only allows for the creation of surface shaders, and the developers hope to implement volume shaders through the specification of refraction parameters. Regardless, the current latest version creates some very realistic-looking images.

 

The use of XML files to specify scene models was, at first, rather strange and hard to get used to. Arbitrary shapes must be specified in a different file and referenced by the XML file. There is no transformation matrix stack, and so the same transformations for different object must be stated repeatedly. The documentation for these XML files is good enough that even a beginning user with some previous knowledge in computer graphics can create at least a decent image. However, a lot of the complex details regarding the schemas for these files are glossed over, and so unless you already have an intimate knowledge of the specific rendering techniques, it is difficult to know what some of these elements and their attributes mean. For instance, the documentation for the settings file does not describe well the specific attributes regarding the lighting components, such as the Indirect Lighting, Specular Reflections and Caustics elements, making it hard to be able to tweak these values properly. Also, some of the details regarding the optional parameters for the mesh objects for the scene file are glossed over as well, so unless one already has strong understanding of these details, these parameters are difficult to set. There is a forum on this website, as well as a wiki, although the wiki does not have very much information.

 

One very big problem with this renderer (and most likely with all ray tracing renderers) is that, since it takes several minutes to render a scene, error corrections, incremental tweaks, and modifications of the scene take an inordinate amount of time. You cannot just create what you hope to be a scene, render it to see how it looks, modify it, render it again, modify it again, etc. until it looks right, unless you have several hours on your hands. You MUST have a perfect model of your scene already created before rendering it using this renderer, or else you will waste quite a bit of time. I fell victim to this downside, and thus it took me a few hours to create what would normally take much less than an hour. If you are creating a scene from scratch using this renderer, the quickest way to do so is to turn off all lighting calculations in the settings XML file except for the direct lighting calculations while you are creating the scene, and then after the scene is complete, the other lighting calculations can be turned back on and their parameters tweaked.

 

Overall, this renderer can be quite powerful, and with a good knowledge of the XML schemas required as input to this renderer, this renderer can be very powerful. However, for those who do not have good background knowledge of computer graphics or ray tracing, then this renderer may take a long time to learn, and their rendering abilities may be limited. The failures I encountered dealing with multiple area light sources reveal that this renderer, although powerful, is still in its development stages, and has some bugs which still need to be worked out.