2014 3-4 Acta Graphica.Indd
Total Page:16
File Type:pdf, Size:1020Kb
Vidmar et al.: Performance Assessment of Three Rendering..., acta graphica 25(2014)3–4, 101–114 author viewpoint acta graphica 234 Performance Assessment of Three Rendering Engines in 3D Computer Graphics Software Authors Žan Vidmar, Aleš Hladnik, Helena Gabrijelčič Tomc* University of Ljubljana Faculty of Natural Sciences and Engineering Slovenia *E-mail: [email protected] Abstract: The aim of the research was the determination of testing conditions and visual and numerical evaluation of renderings made with three different rendering engines in Maya software, which is widely used for educational and computer art purposes. In the theoretical part the overview of light phenomena and their simulation in virtual space is presented. This is followed by a detailed presentation of the main rendering methods and the results and limitations of their applications to 3D ob- jects. At the end of the theoretical part the importance of a proper testing scene and especially the role of Cornell box are explained. In the experimental part the terms and conditions as well as hardware and software used for the research are presented. This is followed by a description of the procedures, where we focused on the rendering quality and time, which enabled the comparison of settings of different render engines and determination of conditions for further rendering of testing scenes. The experimental part continued with rendering a variety of simple virtual scenes including Cornell box and virtual object with different materials and colours. Apart from visual evaluation, which was the starting point for comparison of renderings, a procedure for numerical estimation and colour deviations of ren- derings using the selected regions of interest in the final images is presented. Keywords: 3D Computer Graphic, Rendering Algorithm, Testing Conditions Colour Difference, Visualisation 101 Vidmar et al.: Performance Assessment of Three Rendering..., acta graphica 25(2014)3–4, 101–114 1. Introduction acceptable rendering time. Within a simplified scheme the incident light can be divided into The history of investigations in the field of reflected, absorbed, scattered and transmitted 3D computer generated graphics shows that a light, the proportions of which are defined by great effort was invested in the development of the properties and appearance of material. The rendering algorithms, simulation of light inter- simulations of these light phenomena, which are actions with different materials, visual percep- included in rendering equations, also enable the tion of 3D sufrace phenomena and computer reproduction of computer generated light (Birn, graphics (CG) colour reproduction and visuali- 2013; Erzetič, 2010; Kočevar, 2013). Render en- sations in various applications (Goesele, 2004; gine is a piece of programming code, which Paviotti, 2007; Ruppertsberg, 2007; Xiao, 2008; enables the final image output or sequence of Menk, 2013; Fleming, 2003). An evidence for images (renderings) of 3D computer generated this are numerous scientific publications and world. In technical terms rendering includes integration of these algorithms in rendering calculations performed by a render engine, engines, which enable different solutions and which translates the scene from a mathematical levels of photorealism of rendering outputs (Ka- approximation to a 2D image. The techniques jiya, 1980; Jensen, 1996; Lafortune, 1993; Pharr, that are the most widely used and popular in 2010; Murat, 2009). Countless web forums rendering engines are: ray tracing, path trac- present experiments of individual enthusiasts ing, photon mapping, bidirectional path tracing and endless discussions about which engine is and unbiased rendering. Apart from these, light capable of better results for a specific computer tracing, distributed ray tracing, metropolis light generated scene or situation. On the other hand, transport, stochastic progressive photon map- references lack more rigorous approaches, test ping (SPPM), beam tracing, cone tracing have scenes and criteria for analysis that could help a also been used frequently (Pharr, 2010). user to more objectively compare and evaluate final renderings and choose the most suitable In ray tracing, rays start their paths in cam- rendering engine. The aim of the study was to era. The visualisation of virtual scene is gener- define the procedure for evaluation of render- ated in image area, where the ray’s path is cal- ings made with three different rendering en- culated for each pixel. So called primary rays or gines in Maya software (Autodesk). The prob- view rays encounter the virtual objects and are lem was analysed from many aspects: usability reflected (reflective rays) or refracted (refrac- of engines, rendering settings, visual evaluation tive rays). When a ray hits the object in the area, and colourimetrical evaluation (Hunt, 2011). from which it cannot be reflected directly to the light source, a shadow is formed (shadow ray) (Appel, 1968; Whitted 1980). In path tracing, each ray is in its path traced from the camera to 2. Theoretical part the light source. When the light source is found, the total contribution of light reflected by dif- ferent materials and other potential virtual con- From the beginnings of CG, scientists and tributors are calculated on the path. In addition engineers have striven to improve results in to the lights, the background is considered as a the light phenomena simulation. The basic goal light source as well. Path tracing is suitable for was to consider physical, optical and energetic illumination of exteriors and scenes with easily properties of light, which should be somehow accessible light sources (Yafaray, 2009; Krishna- interpreted in the 3D virtual world (Appel, 1968; machari, 2004; Csébfalvi, 1997; Kajiya, 1986). Bouknigh, 1970; Phong, 1975; Blinn, 1976; Whit- ted, 1980). The main task, which is an active field Photon mapping was developed by the Dan- of research also nowadays, is to develop a meth- ish researcher Henrik Wann Jensen, which in od and combination of algorithms that would be his thesis presented a process that in the first able to render photorealistic reproduction in an step generates photon map and in the second 102 Vidmar et al.: Performance Assessment of Three Rendering..., acta graphica 25(2014)3–4, 101–114 one renders it with the use of ray tracing (Jens- spite of, in physical terms, an apparently perfect en, 2001; Jensen, 2002). As the result of the first rendering technique, some serious restrictions step, i.e. photon map, is a grainy visualisation, limit its use. (Pharr, 2010; Kouhzadi, 2013; Max- additional algorithms for corrections such as well, 2014). final gathering are usually needed. In compari- son to ray tracing, photon mapping simulations Cornell box was introduced in 1984 at the of real world phenomena are more accurate. Cornell University, with a purpose of testing the This technique treats light as a group of parti- interaction between diffuse surfaces and light cles (photons), whose calculation starting point and comparing computer generated render- is in the light source. Moreover, photon map- ings with photographic images (Goral, 1984). ping takes into account final gathering, indirect Referential image was usually a photograph of lighting, caustics and dispersion (Yafaray, 2009; real physical objects or settings, while the test Luxrender, 2013; Pharr, 2010; Krishnamachari, image was computer generated. In spite of some 2004). minor changes (original box had red and blue walls and no light source), Cornell box is still Bidirectional path tracing is based on BRDF a very popular test model with one light source (Bidirectional Reflectance Distribution Func- in the middle of the white ceiling, green wall on tion) and is in practical terms a combination of the right, red wall on the left and white back wall positive properties of photon mapping and path and floor. In the scene, 3D objects are positioned tracing. Bidirectional path tracing is a method in the middle of the box. with simultaneous tracking of rays coming from the light source (light path), which travel via camera, and from camera (eye path, camera path), which travel via light source. After track- 3. Experimental part ing the paths of a high number of rays from both sides, the rays are connected and image pixels are generated. Taking into account long render- In the experimental part three rendering en- ing time, quality of renderings is very high and gines in Autodesk Maya 2014´64 (software for the visualisations are physically accurate (Lafor- 3D computer animation, modelling, simulation, tune, 1993; Adamsen, 2009; Pajot, 2011; Bogole- rendering and compositing) were analysed. The pov, 2013). specifications of hardware and software (Max- well, 2014; O’Connor, 2010; Sannino, 2013) used Unbiased rendering - This physically based in the research are presented in Table 1. rendering procedure is defined as a rendering technique that does not introduce any system- The study consisted of five steps. The first step atic error into the radiance approximation and was the scene setting, i.e. modelling, texturing as a result theoretically enables a perfect pho- and lighting of Cornell Box, which provided the torealism. Due to a combination of many algo- same conditions for all three engines. The sec- rithms it contains, such as path tracing, light ond and the third step were the definition of the tracing, bidirectional path tracing, metropolis rendering quality for further testing and correc- light transport