A Statistics Based Prediction Method for Rendering Application

. As an interesting commercial application, rendering plays an important role in the ﬁeld 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 eﬃciently is a signiﬁcant issue for render farm. Therefore, the prediction of rendering time for frames is relevant for scheduling, which oﬀers the reference and basis for scheduling method. In this paper a statistics based prediction method is addressed. Initially, appropriate parameters which aﬀect the rendering time are extracted and analyzed according to parsing blend formatted ﬁles which oﬀers a general description for synthetic scene. Then, the sample data are gathered by open source software Blender and J48 classiﬁcation 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 eﬃciently and saving rendering cost.


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 appropriate 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 issues are based the 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.

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 prediction 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 Sourina [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 imagebased 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 efficient placement of impostors in complex scenes. Doulamis et al. [7] address the method of 3D rendering workload prediction based on a combined fuzzy classification and neural network model. Litke et al. [13] predict computational workload of jobs assigned for execution 3D image rendering on commercially exploited Grid. And Doulamis et al. [6] propose an efficient non-linear task workload prediction 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 predicting 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. 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 consideration 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.

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  Light s = 1 7 * P oint s + 1 7 * Sun s + 1 7 * Spot s + Aera s (1) -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.
N Light s = 1 5 * N P oint s + 1 5 * N Sun s + 1 10 * N Spot s + 1 10 * N Hemi s +Aera s -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.

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.

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.  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.  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.

Conclusion and Future Work
In this paper, we present a statistics based prediction method for rendering application. 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 accuracy about 60% and 75.74% for training set and test set respectively, which provides reasonable guide for scheduling jobs efficiently and saving rendering cost.