<figure><img src="image_1.png" /></figure>

HAL
open science

# A Statistics Based Prediction Method for Rendering Application

Qian Li, Weiguo Wu, Long Xu, Jianhang Huang, Mingxia Feng

<figure><img src="image_2.png" /></figure>

## To cite this version:

Qian Li, Weiguo Wu, Long Xu, Jianhang Huang, Mingxia Feng. A Statistics Based Prediction Method for Rendering Application. 13th IFIP International Conference on Network and Parallel Computing (NPC), Oct 2016, Xi'an, China. pp.73-84, 10.1007/978-3-319-47099-3_6. hal-01647989

HAL Id: hal-01647989

https://inria.hal.science/hal-01647989

Submitted on 24 Nov 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_3.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
A Statistics Based Prediction Method for
Rendering Application

Qian Li, Weiguo Wu, Long Xu, Jianhang Huang, and Mingxia Feng

Department of Computer Science and Technology,
Xi'an Jiaotong University, Xi'an 710049, China
qian.l@stu.xjtu.edu.cn, wgwu@mail.xjtu.edu.cn, longxu20145@gmail.com,
huangjhsx@gmail.com, b83316772@163.com

**Abstract.** As an interesting commercial application, rendering plays an important role in the field of animation and movie production. Generally, render farm is used to rendering mass images concurrently according to the independence among frames. How to scheduling and manage various rendering jobs efficiently is a significant issue for render farm. Therefore, the prediction of rendering time for frames is relevant for scheduling, which offers the reference and basis for scheduling method. In this paper a statistics based prediction method is addressed. Initially, appropriate parameters which affect the rendering time are extracted and analyzed according to parsing blend formatted files which offers a general description for synthetic scene. Then, the sample data are gathered by open source software Blender and J48 classification algorithm is used for predicting rendering time. The experimental results show that the proposed method improve the prediction accuracy about 60% and 75.74% for training set and test set, which provides reasonable basis for scheduling jobs efficiently and saving rendering cost.

**Keywords:** Rendering; prediction; statistics; classification; render farm

# 1 Introduction

High performance computing (HPC) provides a chance for scientists to use large scale computing resources to settle problems in intensive computation application [15]. Gradually, researchers concentrate on how to manage what application could be applied on HPC platforms to maximize the performance. As an intensive computation and massive data access application, rendering with the feature of independence among frames is suitable for parallel processing in HPC environment. Rendering is the process of creating an image from a model by means of computer programs [16, 2], which is used widely on many field, for example, animation design, development of games, simulation [3], etc.

With the rapid development of animation industry, rendering is widely used in movie production and directly determines the visual effect of animation works. For an animation production, rendering a photo-realistic image with high resolution of 4K to 6K can be exceptionally costly, often taking days, or even weeks.
Generally, render farm, which is a cluster of interconnected computers used for
rendering images in parallel [4], is used by companies to rendering mass images
concurrently, which has been proven to be quite effective way to cutting down
hours of render time into minutes.

When using the render farm, users just submit their rendering jobs which
includes the requirement of number of rendering resources, types of rendering
software, budget and deadline etc. through web portal or client. The render farm
with a pool of finite rendering resources receives the rendering jobs, chooses ap-
propriate resources according to the demands of rendering users and scheduling
rendering jobs according to some policies. Generally speaking, the research spot
is focus on optimizing and design of scheduling policy [9, 26, 19]. But many is-
sues are based on the premise of obtaining the application running time in
advance or have not a-priori knowledge on execution time prediction [17], which
will negatively impacts the efficiency of scheduling policy, especially for the static
policy from the view of system. And from the view of users, without prediction,
users have no idea how long they will be waiting for finish rendering jobs, users
cannot obtain better experience on rendering service and choose an economical
way to employ rendering resources. Therefore, how to predict running time of
applications and improve prediction accuracy is significant topic for render farm.

In this paper, we propose a statistics based prediction method to provide a
guidance for scheduling policy in render farm. The proposed method extracts and
analyzes firstly the appropriate parameters which affect the rendering time by
the way of parsing blend formatted files. Then, the sample data are gathered by
open source software Blender and we use J48 classification algorithm to train and
predict rendering time. And the test result indicate that our method improves
the prediction accuracy about 60% and 75.74% for training set and test set
respectively.

The rest of this paper is organized as follows: related works are introduced
in section 2. In Section 3, we describe the system design and proposed method.
Section 4 presents the experimental results. And conclusion and future works
are provided in Section 5.

## 2 Related Works

Rendering is one of the most important research topics in computer graphics, and
it is closely related to the other technologies. Rendering plays an important role
in the field of animation and movie production. The execution time prediction for
rendering is necessary for scheduling and user's Qos. Obviously for this schedule
to be effective and experience to be better, a good prediction of the execution
time for rendering is required.

Many researchers have explored the use of various time models to predict
execution time. According to auto-regressive model a time series based predic-
tion method [21] is also proposed. For physically-based medical simulation, a
multirate output-estimation method using the ARMAX model [11] is presented
to improve the computational speed and accuracy. By rigid model, Liu [14] pro-
poses a proxy position prediction method using the geometric patch. The patch
is calculated from the real-time contact region prediction method. Hou and Sou-
rina [8] present a new prediction method based on auto-regressive model for
smooth haptic rendering [22] to overcome the low update rate of the physical
simulation with complex or deformable models. Schnitzer et al. [17] predict the
individual execution time of graphics commands using models for the main three
commands relevant for rendering, namely, FLUSH, CLEAR, and DRAW.

And then, prediction ideology is also be used for various types of render.
For remote image-based rendering (IBR) [12] in mobile virtual environments,
Lazeml et al. [10] propose a prefetching scheme that predicts the client potential
path based on the movement history using a linear prediction model. The server
then sends one predicted image with every position update for the client, which
reduces the server load and improves the system scalability. In Depth image-
based rendering (DIBR), a combined hole-filling approach [25] with spatial and
temporal prediction is presented.

Considering the workload in the process of rendering, Wimmer and Wonka
[20] present an estimation approach based on sampling rendering times, and
an improved mathematical heuristics based on a cost function. They propose
two hardware extensions, i.e. a time-stamping function and a conditional branch
mechanism, which make rendering time estimations more robust. Meantime, the
proposed estimation method for rendering time can also be used to calculate ef-
ficient placement of impostors in complex scenes. Doulamis et al. [7] address the
method of 3D rendering workload prediction based on a combined fuzzy classifi-
cation and neural network model. Litke et al. [13] predict computational work-
load of jobs assigned for execution 3D image rendering on commercially exploited
Grid. And Doulamis et al. [6] propose an efficient non-linear task workload pre-
diction mechanism with a non-linear model incorporated with a fair scheduling
algorithm for task allocation and resource management in Grid computing. The
history-based motion prediction method [23] aims at high file hits and predicts
the future motion according to the historical ones, which produces better results
when interpolation is added. Son et al. [18] propose a new approach for predict-
ing and identifying the load condition of agents to solve load balancing problem.
However, these methods only works for static model but ignore the influence of
the parameters used in render files.

3 Proposed strategy

3.1 System design

A workflow of prediction a rendering process is depicted in Figure 1. The input
scene files are encoded on BLEND format which is standard format support
by Blender. Blender is the free and open source 3D creation suite. It supports
the entirety of the 3D pipeline-model, rigging, animation, simulation, rendering,
compositing and motion tracking, even video editing and game creation [1]. And
the scene file offers a general framework for describing the structure of a synthetic
world and uses the minimum information required of interacting the rendering
<figure><img src="image_4.png" /><figcaption>Fig. 1. Workflow of prediction</figcaption></figure>

environment. Also it describes the rendering algorithm as well as respective parameters used for performing the rendering. To identify the parameters that impact the rendering process and the algorithm used, the scene files are parsed. In this way, a set of candidate parameters is constructed, which is responsible for selecting the most significant parameters among all candidates, i.e., a feature vector of appropriate attributes is constructed to predict the rendering time.

The predictor predicts the time of a rendering process by taking into consid-
eration the feature vector. The J48 classification algorithm is used for training
and predicting rendering time. And then, scheduler will scheduling rendering
jobs according to exploiting information provided by the previous prediction
result. In the paper, we mainly focus the process of prediction.

## 3.2 Parsing of parameters

A BLEND file usually contains many parameters which describe the rendering attributes, and some parameters may have less impact on rendering time. We use Blender's API for Python scripting to parse parameters and the scene image is shown in Figure 2. And Table 1 shows the initial parsing result.

We use the method of control variable to select the parameters and change the
corresponding value of parameter to get rid of the parameters with less impact
on the rendering time. The rendering time is an average value obtained by 20
times rendering. As shown in Table 1, the change of parameters value has less
impact on the rendering time. Except that, the vertex, edge and face of object
is fixed in a scene and the impact of these factors is included in that of no. of
Mesh. And then three parameters are also rejected. Therefore, at the processing
of prediction we don't consider these parameters. Then, we will introduce the
parameters which mainly impact on the rendering time.

- Shadow [5], Blender provides two types of shadow, Ray-Tracing Shadow and Buffer Shadow. Table 2 shows the relationship between rendering time and
<figure><img src="image_5.png" /><figcaption>Fig. 2. The scene image for prediction</figcaption></figure>

<table><caption>**Table 1.** The parameters with less impact on rendering time</caption><thead><tr><th>Parameter</th><th>Variation range</th><th>Rendering time</th></tr></thead><tbody><tr><td>intensity of illuminant</td><td>[1.01-11]</td><td>[55.0401-59.9534]</td></tr><tr><td>No. of camera</td><td>[1-10]</td><td>[55.0572-55.6572]</td></tr><tr><td>Absorption types of ambient light</td><td>[MULTIPLY,ADD]</td><td>[50.3848-55.6572]</td></tr><tr><td>Absorption intensity of ambient light</td><td>[1-10]</td><td>[50.3848-55.6572]</td></tr><tr><td>Types of diffuse reflection</td><td>5 types</td><td>[50.1567-55.6572]</td></tr><tr><td>Types of highlight</td><td>5 types</td><td>[50.1688-55.6572]</td></tr><tr><td>Types of anti-aliasing filter</td><td>7 types</td><td>[55.6572-58.8323]</td></tr></tbody></table>

types of Buffer Shadow. When an image is rendered, the rendering time with different types of Buffer Shadow is different.

- Light type, there are five types of light, point light, sun light, spot, hemi light and area light. Hemi light has no sampling value so it is rejected. We use formula (1) to indicate the influence of light types on rendering time. And the coefficient is empirical value.

$$ \text{Light\_s} = \frac{1}{7} * \text{Point\_s} + \frac{1}{7} * \text{Sun\_s} + \frac{1}{7} * \text{Spot\_s} + \text{Aera\_s} \quad (1) $$
<table><caption>**Table 2.** The rendering time with different types of shadows</caption><thead><tr><td>Types</td><td>Rendering time</td></tr></thead><tbody><tr><td>REGULAR</td><td>49.7928</td></tr><tr><td>IRREGULAR</td><td>50.6198</td></tr><tr><td>HALFWAY</td><td>52.3219</td></tr><tr><td>DEEP</td><td>50.3958</td></tr></tbody></table>

- Number of light, which is an important factor on rendering time. In a scene, there includes various types of light corresponding to different number of light. We use formula (2) to indicate the influence on rendering time. And the coefficient is empirical value.

$$ 
\begin{aligned}
NLight\_s = & \frac{1}{5} * NPoint\_s + \frac{1}{5} * NSun\_s \\ 
& + \frac{1}{10} * NSpot\_s + \frac{1}{10} * NHemi\_s \\ 
& + Aera\_s
\end{aligned} 
\qquad (2) $$

- Ambient light, there are two types, raytrace and approximate. The approximate is rarely used and we use raytrace as the main factor. The raytrace usually includes three types, CONSTANT_QMC, ADAPTIVE_QMC, CONSTANT_JITTERED. We use formula (3) to indicate the influence on rendering time. And the coefficient is empirical value.

$$ 
\begin{aligned}
Ambientlight = & 5 * CONSTANT\_QMC \\ 
& + 3.5 * ADAPTIVE\_QMC \\ 
& + 1.4 * CONSTANT\_JITTERED
\end{aligned} 
\qquad (3) $$

- Pixel value, which is the product of resolution ratio, the more pixels the more elaborate image, and the rendering time is longer. In the paper, we use 17 types of resolution ratio.

- Tile size, the more tile size, the longer rendering time. Usually, the tile size is approximate number of resolution ratio.

- Number of object, the object has many attributes and in the paper we just consider the influence of number of object. The more objects the longer rendering time.

- Anti-aliasing, there are 4 types of Anti-aliasing sample values, 5, 8, 11, 16. And the value 0 means that the anti-aliasing is not used. The impact is shown in Table 3.

- Raytrace method, there include 6 types, AUTO, OCTREE, BLIBVH, VBVH, SIMD_SVBVH and SIMD_QBVH. The impact with different types is shown in Table 4.
<table><caption>**Table 3.** The rendering time with different types of Anti-aliasing sample values</caption><thead><tr><td>Value</td><td>Rendering time</td></tr></thead><tbody><tr><td>0</td><td>14.5008</td></tr><tr><td>5</td><td>55.6572</td></tr><tr><td>8</td><td>85.4189</td></tr><tr><td>11</td><td>116.9777</td></tr><tr><td>16</td><td>171.1598</td></tr></tbody></table>

<table><caption>**Table 4.** The rendering time with different types of Anti-aliasing sample values</caption><thead><tr><td>Type</td><td>Rendering time</td></tr></thead><tbody><tr><td>AUTO</td><td>55.6572</td></tr><tr><td>OCTREE</td><td>162.5122</td></tr><tr><td>BLIBVH</td><td>138.0688</td></tr><tr><td>VBVH</td><td>78.2354</td></tr><tr><td>SIMD_SVBVH</td><td>56.6742</td></tr><tr><td>SIMD_QBVH</td><td>59.0663</td></tr></tbody></table>

### 3.3 Strategy description

In this section, we will introduce the prediction strategy according to the parameters parsed in above section. We use Weka as tool and J48 classification algorithm [24]. The J48 has the following advantages.

- Easy understand for rules. Each branch of the decision tree in J48 corresponds to a classification rule, and the total rules set is easy to understand.

- The fast running. The time complexity of J48 algorithm is $O(n^3)$, n is sample size.

- The higher accuracy.

## 4 Experimental Results

At the beginning, we need dispose the original data. The inactive data is to be rejected. And then, the rendering time set need to be discretized, which is helpful to classification and prediction. We sort the rendering time set with descending order, and each 5 second as a subsection.

The disposed data is input into Weka and Figure 3 shows the visualization result. The rendering time is automatically discretized into 20 classes.
<figure><img src="image_6.png" /><figcaption>Fig. 3. The visualization result of discretized data</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Fig. 4. The classification matrix of training set</figcaption></figure>

We use the J48 algorithm provided by Weka and the accuracy rate of training set is 49.14% after 10 times of cross validation. And the accuracy rate of test set is 66.67%. The classification matrix is shown in Figure 4 and Figure 5.
<figure><img src="image_8.png" /><figcaption>Fig. 5. The classification matrix of test set</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>Fig. 6. The comparison of rendering time and prediction result.</figcaption></figure>

The low accuracy rate is due to the less change range for each parameter. The useful data in each classification is less and unrepresentative. Therefore, we can suitably reduce the accuracy of the classification for rendering time and
use 10 second as a subsection and discretize rendering time set again. And the
accuracy rate of training set and test set is 60% and 75.74% respectively. The
prediction result is shown in Figure 6. The comparison result shows that the J48
classification algorithm can obtain the accurate prediction result for rendering
time according to the main parameters parsed from scene files.

5 Conclusion and Future Work

In this paper, we present a statistics based prediction method for rendering ap-
plication. The scene files with BLEND format are parsed to extract and analyze
the parameters which affect the rendering time. And we use Blender to gather
the sample data and J48 classification algorithm to predict rendering time. The
experimental results show that the proposed method improve the prediction ac-
curacy about 60% and 75.74% for training set and test set respectively, which
provides reasonable guide for scheduling jobs efficiently and saving rendering
cost.

**Acknowledgments.** This work is supported by Natural Science Foundation of China (61202041, 91330117), National High-Tech R&D (863) Program of China (2012AA01A306, 2014AA01A302) and the Key Technologies Program for Social Development of Shaanxi Province (2016SF-428). Computational resources have been made available on Xi'an High Performance Computing Center.

References

1. http://www.blender.org/

2. Baharon, M.R., Shi, Q., Llewellyn-Jones, D., Merabti, M.: Secure rendering process in cloud computing. In: Privacy, Security and Trust (PST), 2013 Eleventh Annual International Conference on. pp. 82–87. IEEE (2013)

3. Chapman, W., Ranka, S., Sahni, S., Schmalz, M., Moore, L., Elton, B.: A framework for rendering high resolution synthetic aperture radar images on heterogeneous architectures. In: Computers and Communication (ISCC), 2014 IEEE Symposium on. pp. 1–6. IEEE (2014)

4. Chong, A., Sourin, A., Levinski, K.: Grid-based computer animation rendering. In: Proceedings of the 4th international conference on Computer graphics and interactive techniques in Australasia and Southeast Asia. pp. 39–47. ACM (2006)

5. Doulamis, N., Doulamis, A., Dolkas, K., Panagakis, A., Varvarigou, T., Varvarigos, E.: Non-linear prediction of rendering workload for grid infrastructure. Machine Graphics and Vision 13(1/2), 123–136 (2004)

6. Doulamis, N., Doulamis, A., Litke, A., Panagakis, A., Varvarigou, T., Varvarigos, E.: Adjusted fair scheduling and non-linear workload prediction for qos guarantees in grid computing. Computer Communications 30(3), 499–515 (2007)

7. Doulamis, N.D., Doulamis, A.D., Panagakis, A., Dolkas, K., Varvarigou, T., Varvarigos, E., et al.: A combined fuzzy-neural network model for non-linear prediction of 3-d rendering workload in grid computing. Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on 34(2), 1235–1247 (2004)
8. Hou, X., Sourina, O.: A prediction method using interpolation for smooth six-dof haptic rendering in multirate simulation. In: Cyberworlds (CW), 2013 International Conference on. pp. 294–301. IEEE (2013)

9. Khan, A.R., Saleem, M., Banday, S.A.: Improving the performance of hierarchical scheduling for rendering. In: Computational Intelligence on Power, Energy and Controls with their impact on Humanity (CIPECH), 2014 Innovative Applications of. pp. 457–460. IEEE (2014)

10. Lazem, S., Elteir, M., Abdel-Hamid, A., Gracanin, D.: Prediction-based prefetching for remote rendering streaming in mobile virtual environments. In: Signal Processing and Information Technology, 2007 IEEE International Symposium on. pp. 760–765. IEEE (2007)

11. Lee, K., Lee, D.Y.: Real-time haptic rendering using multi-rate output-estimation with armax model. In: Control, Automation and Systems, 2007. ICCAS’07. International Conference on. pp. 1821–1826. IEEE (2007)

12. Leung, W.H., Chen, T.: Compression with mosaic prediction for image-based rendering applications. In: Multimedia and Expo, 2000. ICME 2000. 2000 IEEE International Conference on. vol. 3, pp. 1649–1652. IEEE (2000)

13. Litke, A., Tserpes, K., Varvarigou, T.: Computational workload prediction for grid oriented industrial applications: the case of 3d-image rendering. In: Cluster Computing and the Grid, 2005. CCGrid 2005. IEEE International Symposium on. vol. 2, pp. 962–969. IEEE (2005)

14. Liu, Y., Chou, W., Yan, S.: Proxy position prediction based continuous local patch for smooth haptic rendering. Journal of Computing and Information Science in Engineering 12(3), 031004–031004–9 (2012)

15. Mochocki, B.C., Lahiri, K., Cadambi, S., Hu, X.S.: Signature-based workload estimation for mobile 3d graphics. In: Proceedings of the 43rd annual design automation conference. pp. 592–597. ACM (2006)

16. Monte, C.F.P., Piccoli, F., Luciano, C., Rizzi, S., Bianchini, G., Scutari, P.C.: Estimation of volume rendering efficiency with gpu in a parallel distributed environment. Procedia Computer Science 18, 1402–1411 (2013)

17. Schnitzer, S., Gansel, S., Durr, F., Rothermel, K.: Concepts for execution time prediction of 3d gpu rendering. In: Industrial Embedded Systems (SIES), 2014 9th IEEE International Symposium on. pp. 160–169. IEEE (2014)

18. Son, B.H., Lee, S.W., Youn, H.Y.: Prediction-based dynamic load balancing using agent migration for multi-agent system. In: High Performance Computing and Communications (HPCC), 2010 12th IEEE International Conference on. pp. 485–490. IEEE (2010)

19. Tamm, G., Kruger, J.: Hybrid rendering with scheduling under uncertainty. Visualization and Computer Graphics, IEEE Transactions on 20(5), 767–780 (2014)

20. Wimmer, M., Wonka, P.: Rendering time estimation for real-time rendering. In: Rendering Techniques. pp. 118–129 (2003)

21. Wu, J., Song, A., Li, J.: A time series based solution for the difference rate sampling between haptic rendering and visual display. In: Robotics and Biomimetics, 2006. ROBIO’06. IEEE International Conference on. pp. 595–600. IEEE (2006)

22. Xiao-peng, H., Cheng-jun, C., Yi-qi, Z.: Contact elements prediction based haptic rendering method for collaborative virtual assembly system. In: Intelligent Systems, 2009. GCIS’09. WRI Global Congress on. vol. 4, pp. 259–263. IEEE (2009)

23. Xiaohong, Z., Shengzhong, F., Jianping, F.: A history-based motion prediction method for mouse-based navigation in 3d digital city. In: Grid and Cooperative Computing, 2008. GCC’08. Seventh International Conference on. pp. 686–690. IEEE (2008)
24. Yadav, A.K., Chandel, S.: Solar energy potential assessment of western himalayan indian state of himachal pradesh using j48 algorithm of weka in ann based prediction model. Renewable Energy 75, 675-693 (2015)

25. Yu, W., Wang, W., He, G., Goto, S.: Combined hole-filling with spatial and temporal prediction. In: Image Processing (ICIP), 2013 20th IEEE International Conference on. pp. 3196-3200. IEEE (2013)

26. Yu, X., Zhang, X., Liu, L., Hwang, J.N., Wan, W.: Dynamic scheduling and real-time rendering for large-scale 3d scenes. Journal of Signal Processing Systems 75(1), 15-21 (2014)