1. Introduction
In the ship manufacturing industry, ship painting usually accounts for 9%–12% of the total cost of shipbuilding [
1]. There are strict requirements for the technical level of the operators; otherwise, it is easy to cause problems such as increased costs, decreased spraying quality [
2], and lower productivity [
3]. Currently, physical hands-on training [
4], virtual simulation training [
5], and video teaching are usually used to improve the technical level of sprayers, but these methods suffer from environmental pollution, high costs, and weak human-computer interaction. Therefore, finding a green and efficient spraying training program is an urgent problem.
The current rapid development of VR technology provides an efficient and convenient way to train and has been effectively used in many industries, such as driving VR training [
6], wheelchair VR training [
7], and construction safety VR training [
8]. We propose the use of VR for operator training in ship painting. While there have been several works in the field of computer graphics that use computers to simulate the visualization of the painting process [
9,
10], they are limited to non-real-time spraying and do not apply to spraying training systems for ships. In contrast, our approach enables real-time and interactive reproduction of the actual spraying process between the gun and target structure under varying angles, distances, and speeds.
To make the VR coating results similar to the actual coating results, the first thing that needs to be considered is the creation of an artificial-based coating model [
11]. The spraying parameters of the spraying model (spraying pressure, moving speed, spraying distance, etc.) are related to the coating quality of the ship and thus affect the service life of the ship [
12]. And in the process of manual spraying, unskilled personnel, lack of experience in spraying, and other human factors will lead to an uneven distribution of the spraying surface and thus affect the quality of the coating [
13,
14]. Many scholars have simulated the coating thickness distribution by mathematical modeling methods [
15,
16,
17], and Zhang investigated the effect of the spraying parameters on the spraying flow field and coating thickness distribution by numerical simulation [
18]. Balkan [
19] proposed to determine the coating flow rate by using the experimental coating thickness distribution obtained with different gun settings and spraying parameters, and the prediction and determination of the coating thickness distribution where various theoretical and experimental studies were conducted. Suh [
20] developed an automatic trajectory planning system for paint spraying robots, which found elliptical paint thickness distribution by analyzing the coatings of the coatings. Yang [
4] proposed a VR system that simulates the painting of a ship hull and designed an immersive stereoscopic display platform with realistic paint rendering techniques and an intuitive user interface that matches the realistic painting environment. However, most of these models currently consider only the calculation of the coating thickness, which is inadequate if one wants to use them for operator training in painting. The calculation of the paint loss during the spraying process is not considered, which is precisely the focus of research in marine spraying training from the point of view of calculating the cost and environmental pollution.
Therefore, this paper carries out theoretical research on the artificial spraying model and establishes an artificial spraying model based on the relationship between the gun parameters, gun position, spraying direction, and coating thickness. And the coating thickness, coating amount, and volume of the coating after the actual formation of the coating are verified by the spraying test for the spraying simulation of the spraying model. Finally, the ship spraying training system was developed by C# and Unity3D, and the reliability of the spraying system was analyzed by four typical scenarios and feature tests of the ship. An effective scoring mechanism was designed and personnel with different coating experiences were selected for VR-based coating training.
In the rest of the paper,
Section 2 presents a method for building the interactive spraying model and the calculation of coating thickness, and
Section 3 presents the calculation of the coating loss.
Section 4 presents an experimental study and analysis of the artificial spraying model.
Section 5 introduces the structure of the ship spraying training system and its spraying training process.
Section 6 concludes the paper and presents future work.
2. Artificial Spraying Model
2.1. Artificial Spraying
Interactive spraying technology has been widely used in various industries such as aviation, automotive, and shipbuilding [
21]. Interactive spraying typically involves robotic spraying and artificial spraying methods. Generally speaking, robotic spraying methods can use traditional methods [
22], and deep learning methods [
23] to optimize the spraying trajectory and predict the spraying effect to improve the spraying efficiency. However, when it comes to large and complex surfaces, robotic spraying is not yet sufficiently mature due to the large one-time spraying area and the complexity of the spraying environment [
24]. Therefore, the artificial spraying method is also used. Artificial spraying involves the operator holding the spray gun and adjusting the spraying parameters to spray the target area in a random motion. The artificial spraying simulation proposed in this paper is based on the actual worker spraying process and uses virtual simulation technology to achieve interactive spraying of the ship.
2.2. Artificial Spraying Model
The artificial spraying model is the basis of the interactive spraying simulation, in which the coating thickness can be calculated using the coating thickness distribution of each frame after spraying with the gun. Therefore, establishing an accurate gun model is a prerequisite for ensuring the authenticity of the simulation results. The thickness at each point on the model is the sum of the thickness added frame-by-frame during the spraying process. The spraying model is classified into two main types: flat spraying and tilt spraying models, as illustrated in
Figure 1. The construction of the spray model involves the following steps.
- (1)
Construct a plane through the target point P, the plane is perpendicular to the axis of the nozzle, and the intersection point with the axis is P1; then, the distance from point P1 to the center of the nozzle is Lp = P1 Om
- (a)
If
Lp >
Lm, point
P is located outside the sprayable area. In the case of point
P′ in
Figure 1, a vector
Om P is constructed from point
Om to point
P, and the angle between this vector and the axis of the spray gun is α
1;
- (b)
If
α1 >
α, point
P is located outside the sprayable area, as in the case of point
P″ in
Figure 1;
- (c)
If the angle between the normal direction of point P and the axial direction of the spray gun is ≤90° (generally judged by the positive or negative of the dot product of the normal vector and the axial vector of the nozzle), then the point P cannot be sprayed.
- (2)
Determine the sprayable area of the spray gun on the constructed front plane according to Lp, α, and β. Due to the fixed ratio of α and β, only Lp and α are needed to determine the spraying area Sp:
The maximum effective working distance Lm of the spray gun is along the axis of the nozzle; beyond this distance, the spray cannot be sprayed; the longitudinal opening angle of the spray gun α is half of the opening angle in the long axis direction; the horizontal opening angle β of the spray gun in the short axis direction is half of this angle. Generally, β is not set, and the fixed ratio of α and β is taken, that is, the fixed ratio of the long axis and the short axis sprayed on the front plane.
Here P is the target point, Om is the center of the nozzle of the gun, P1 is the intersection of the plane through point P and the axis through the nozzle Om, Lp is the distance from the center point Om of the nozzle to P1, Lm is the maximum distance of the spray gun spraying, α is the longitudinal opening angle of the gun, β is the transverse opening angle of the gun, Sp is the spraying area, γ is the angle between the axial direction of the spray gun and the normal direction of point P, lm is the stacking thickness in the plane corresponding to point P, lp is the stacking thickness normal to point P.
2.3. Artificial Spray Simulation Coating Thickness Calculation
Artificial spraying is a study of the simulation of the coating thickness algorithm for the calculation of the thickness of a different surface coating buildup and how to show the effect of spraying when the spraying path is not determined, i.e., the path, direction, and travel speed of the spray gun is not determined. The data required to calculate the thickness of the surface coating include gun parameters, gun position and spray direction, and surface data. This algorithm gives a new thickness calculation method for any point outside the nozzle in a frame, and calculates the stacked thickness at point
P within a frame, as shown in
Figure 2. The spraying direction is the X-axis, the Y-axis is the gun tension direction, the spraying area of each frame is oval, the length of the Y-axis is
L, and the length of the X-axis is W. According to the gun model, the X and Y directions are the distribution of the paint when spraying is distributed in a parabolic manner.
Here X is the gun spray direction, Y is the spray gun tension direction, L is the length of the spray area in the Y direction, W is the length of the spray area in the X direction, P is the target point, P1 is the center point of the spray area, and d is the distance between point P and point P1.
The spraying flow rate of the spray gun is
Q, and the current frame interval is Δt; thus, the total volume of paint sprayed in this frame is
Q Δt. According to the utilization rate of 40%, the actual total volume of paint accumulated in this area is 0.4
Q Δt. Assuming that the thickness at the center point is
δ0, the formula for the parabola along the Y direction is:
The total volume of paint in this sprayed area is:
Then, , and can be calculated.
Due to the symmetry of the parabola, the thickness at point
P is
δ:
3. Calculation of Paint Loss for Artificial Spraying Simulation
During the artificial spraying process, the paint loss may be caused due to the user’s untimely switching on the gun and misalignment with the sprayed surface. During the spraying simulation process, the on-off time of the spray gun can be recorded, so that the total spraying amount of the paint consumed can be calculated; then, the total volume of the coating in the wet state can be calculated, and the paint loss amount can be calculated as follows:
The total spray quantity
Q0 of the coating:
where
q is the working flow rate of the gun spraying speed in mL/s and
T is the spraying time in s.
Calculate the actual amount of paint on the coating:
The sprayed surface is topologically a discretized triangular mesh model, which is a group of discrete points and a group of triangles constructed from these discrete points. The coating thickness at any point within the triangle surface during spray simulation is obtained by interpolating the three vertices of the triangle. For the sprayed model, we obtain three triangles whose paint thickness is not 0 on the three nodes, assuming that there are N of them in total.
Figure 3 shows the expression of the coating surface triangles, and the coating volume
vi is calculated for each triangle. Assume the thickness of the three points be
h1,
h2, and
h3 from small to large; the fixed points are
H1,
H2, and
H3; and the area of the triangle is
Si; the length of the side from
h2 to
h3 is
l2; and from point
H1 to
l2 the height is
h1–2, then
vi is:
The actual amount of paint used for the coating is
During the spraying simulation, the same surface may be sprayed with different paints in stages. For example, when spraying a ship, it is necessary to spray the primer first and then the top coating. Currently, one layer of coating is obtained for each spraying. The effective amount of paint and paint consumption are also calculated. Do it in batches. The above algorithm is suitable for the consumption calculation of a single (process parameter determination) spraying. During the program design, the thickness value and paint type obtained by each spraying can be recorded in the same vertex data structure for multiple spraying. The above algorithm can be used to calculate the actual amount of coating for each spray.
5. Case Study
5.1. Design of Artificial Spray Training System for Ships
The previous sections analyzed the reliability of the artificial spraying model, and in this section, a VR-based ship spraying simulation training system using C# and the Unity3D game engine is developed. It is deployed in the HTC VIVE VR headset to realize immersive spraying by interactive operation. The structure of the ship’s artificial painting simulation training system and its relationship are shown in
Figure 8.
The ship spraying simulation training requires four stages to be covered: preparation of the painting scene, setting of painting process parameters, painting operation, and analysis and evaluation of the painting results. To achieve this in a VR environment, the system needs to be able to complete all tasks related to these stages. These stages are interdependent and involve different hardware and software, with different roles for the operator in each stage. For example, painting scene arrangement and process parameter settings do not require practical VR interaction equipment, and therefore, the system is divided into the foreground VR environment, data server, and background computing environment.
To begin with, the painting scene, spray gun, and paint data need to be stored in the database before the painting process parameter setting can take place, as these are prerequisites for parameter determination. The background computing environment is responsible for managing and storing this data. The operator sets the painting process parameters before the painting simulation operation, which is carried out on the VR user side. The training result analysis requires multiple calculations and displays, but real-time requirements are not high. As a result, this stage is also placed in the background computing environment.
For simulation of the spraying operation as shown in
Figure 9, first, select the correct scene, set the parameters, start, use the VR equipment, enter the 3D virtual environment for parameter selection and spraying simulation operation, and end training. This process is done entirely in the 3D mode. From the point of view of implementation, it is carried out to complete the initialization of the 3D virtual environment, read the spray training scene file to complete the model import, read the gun file to complete the gun model initialization, and enter the simulation cycle. The contents to be processed in each cycle include whether there is parameter switching, whether to end the training/examination, viewpoint movement processing, gun movement processing, gun switching processing, gun working status display, determination of the surface to be coated, coating thickness increment and coating thickness value calculation, recording coating thickness value, recording gun position, and switching status.
To measure the effectiveness of ship spraying training scenarios and improve the efficiency of spraying training. The operator’s proficiency is evaluated by designing the operation process and the coating result scoring system. The coating result scoring system is based on the evaluation of the operator in terms of coating thickness area distribution and coating loss. The thickness distribution evaluation starts by defining standard values according to the requirements of different scenarios and defining intervals below and above the standard values. Finally, the data of all thickness values distributed by the coating applied by the operator are counted. The area distribution of all thickness values is divided according to the defined thickness criteria and scored with a total score of 100. The coating loss rate is its error with the standard loss rate scored. Finally, the above two items are combined to score and evaluate the coating effectiveness of the trainer.
5.2. Ship Scene Spraying
Four main scenarios were created for the training needs of ship painting, including cabin, ballast tank, deck, and outer panel scenarios. These four training scene models are the target models that can be painted with a grid composition. Therefore, by default, the primary color of the training scenes is gray. Before our spray test, the hull’s surface must be pre-treated with rust removal and shot blasting to reduce its surface roughness to the minimum possible value. In the simulation process, the surface being sprayed is close to a smooth surface because it is a computer simulation of spraying.
Because the normal spraying environment is unknown and complex, these spraying scenarios are built to test the spraying performance of this model on complex surfaces. We selected typical surface features from four spraying scenarios, as shown in
Figure 10. The thickened part of the model surface is the part that can be sprayed by spraying the model. The coating thickness as well as the paint loss were analyzed for the spraying model, as shown in
Figure 11 and
Figure 12. The error between the simulated coating thickness and the actual coating thickness of the four spraying scenarios is below 4.5%, the average error between the total spraying volume and the actual spraying volume is 9.5%, and the average error between the coating paint volume and the actual paint volume is 17.2%. The paint loss error is relatively large; this is due to the fact that the air gun in the actual spraying process will be spraying extra areas, environmental causes, evaporation loss, and other reasons. Overall, the ship artificial spraying simulation training system proposed in this paper has a certain accuracy compared with the actual spraying training.
5.3. Ship Artificial Spray Training Test
Helps to test the reliability of the training system by training groups of operators with different experiences and comparing them [
6,
8]. Therefore, we recruited 60 participants for the painting training trial and divided them into three groups. Group 1 consisted of 20 inexperienced operators (non-related students at school), Group 2 consisted of 20 operators who had experience in painting but were not proficient (ship painting-related students and shipyard employees with hands-on experience), and Group 3 consisted of 20 operators who were familiar with painting (shipyard employees who were engaged in painting work). The training system evaluates the effectiveness of the trainer’s coating from the point of view of the coating thickness area distribution and coating loss rate. Firstly, the training manager establishes the qualification intervals for the coating thickness values and the standard loss rate of the coating according to the requirements of the coating process. Secondly, the trainer is scored based on the percentage of the distribution of the coating thickness within the qualified thickness. The coating loss rate is scored in terms of its deviation from the standard loss rate. Finally, the above two results are combined to provide a comprehensive evaluation of the trainer’s coating effectiveness. The specific calculation is shown in Equations (8)–(10):
where
STotal is the total score,
Sct is the coating thickness score,
Sqt is the qualified thickness area,
Sst is the total spraying area,
Scl is the coating loss score,
Rsl is the spraying loss rate, and
Rql is the qualified loss rate.
To meet the needs of post-spraying performance evaluation, result analysis, and subsequent training demonstration, the following information needs to be recorded in the spraying simulation process: operator information (personnel name, work number), training time information (start time, end time), training scenes (scene model name), coating thickness information—according to the coating thickness data corresponding to the set of process parameters when spraying, i.e., each model and each point on the final thickness value corresponding to that group of process parameters. If there are multiple groups of process parameters, there are multiple thickness values ordered. This is organized according to one model of the scene—gun work process information (recorded by each frame or other feature: time, gun on/off status, gun position, work parameters (nozzle, pressure, paint number, color card number)).
5.4. Results and Analysis
To compare the enhancement effect of VR training for the testers, this experiment compared the performance of the three groups initially trained with VR with their performance after five training sessions. The results are shown in
Figure 13, with the After Training Group representing the results after five training sessions.
The results from the untrained groups show that the VR spraying training scenarios designed in this paper basically match the actual level of the operators. After five training sessions, the scores of operators in three groups improved significantly. The scores of the three groups improved by 44.9%, 38.5%, and 20.1%, respectively. The score of Group 1 with the lowest initial score was basically able to pass the test, and the score improvement of Group 2 was significantly higher than that of Group 3. This also proves that the VR spraying training in this paper applies to novice and inexperienced spraying operators, which is of helps their technical development.
Of course, some of the operators also gave some feedback, mainly that prolonged use of head-mounted VR devices for spray training tends to make them dizzy and feel physical discomfort. We also think this is reasonable, as most people have not used VR headsets and occasional use does lead to physical discomfort [
28,
29]. Most people said that using VR for spray training can effectively improve spraying and is a green operation, as well as cost-effective.
6. Conclusions and Future Work
This paper proposes a VR-based artificial spraying model for ship painting training, which firstly establishes an artificial spraying simulation model and verifies the accuracy of the simulation calculation of the coating thickness and coating loss of this model by implementing a test under the same conditions for comparison purposes. The results show that the data errors in both the simulation and test are lower than 7.1%, and the data errors in the total amount of spraying and coating spraying are lower than 9.8% and 11.6%. The accuracy of the model was also tested in a VR environment in different spraying scenarios, and the results showed that the artificial spraying simulation model proposed in this paper quite accurately calculates the coating thickness and coating loss in the artificial spraying process of ships.
Secondly, a VR-based ship spraying simulation training system was established by C# and Unity3D. And the corresponding scoring mechanism is established to evaluate the spraying results. The results show that the method of using VR for coating training can effectively improve the coating level of operators with different levels of coating experience. This provides a reference for future training programs under different applications.
Although the scheme in this paper has achieved good results in ship painting training, it still has some problems. The artificial spraying model in this paper still has a certain gap with the actual spraying, mainly because the factors considered in the modeling are not comprehensive enough, only considering the influence of the gun parameters, gun position, spraying direction, and other factors on the coating thickness and paint loss. There are other factors such as the viscosity of the coating, the ambient temperature, etc., which can cause certain effects. Secondly, in terms of training, the evaluation perspective is not comprehensive enough; so operators fail to accurately understand that they are deficient in a certain area. Finally, the VR spray training system not only contains the interaction of VR helmet buttons but also voice interaction, gesture interaction, and other functions [
30] applied to VR training can be added. This is what we want to do in the future to make ship spraying training more accurate and convenient.