Study of Plant Animation Synthesis by Unity3D

. Virtual plant is a novel research issue in computer applications, and realistic plant animation is widely used in many fields. The research of precise, efficient and photorealistic plant animation synthesis is one of the important issues that the current virtual plant facing with.This paper using maize achieves real time and realistic plant animation, based on the platform of Unity3D. The virtual maize model is generated by use of interactive parameterized modeling method. By setting a good interactive interface, users can dynamically adjust the parameters to realize different animation effects. Finally, concluding and analyzing this method. In addition future research and application direction is discussed in order to achieve better plant animation.


Plant Modeling and Animation
In recent years,plant modeling and animation synthesis become a novel research ,achieving wide attention of domestic and foreign researchers ,generating a number of representative studies [1][2][3][4][5][6].As for the issue of plant platform simulation,Zhao Xing et al. [1] from the aspect of botany,established a two-scaled automaton model of virtual plant growth based on the growth mechanism of plants.By restoring camera movement and tree's three-dimensional point clouds, Tan et al. [2] constructed realistic 3D models of natural trees based on real plant image.On this basis,for plant dynamic virtual simulation and animation synthesis problem,Feng Jinhui et al. [3] using nonlinear mechanics and wave theory to solve the motion of different branches,simulating tree swaying in the wind.Habel et al. [4] using geometry and dynamic model which is physically based, through a two-step nonlinear deformation method to simulate the interaction of branches and the external force acting on them,realizing the simulation of branches bending and swaying in the wind with a high sense of reality.Diener [5] using the coupling of video analysis and hierarchical clustering offers as an alternative to physical simulation.Feature tracking is applied to the video footage, allowing the 2D position and velocity of automatically identified features to be clustered.Extracting the motion of real plant in the wind from video, mapping it to 3D plant models,forming the plant animation.Xiao Boxiang et al.
[6] presented a motion capture data-driven animation approach ,reconstructed plant motion by real plant scanned data and motion capture data.Based on the virtual maize model,implemented data-driven plant animation.Existing research methods provide a technique reference to achieve high precise and high realistic animation synthesis.At the same time,the development tool oriented game production also provide a good platform for realistic simulation of the plant.

Unity3D Simulation Platform
As a fully integrated,cross-platform professional game engine,Unity3D[7] is a hierarchical comprehensive development tool,can be used for interactive contents ,such as real-time three-dimensional animation,3D video games,architectural visualization and so on.It provides a visual authoring environment,uses C# and JavaScript as the scripting language,has a detailed property editor and a dynamic game preview.Unity3D[8] has a highly optimized graphics rendering pipeline for DirectX and OpenGL.With excellent advanced rendering effects and user customization support,Unity3D can sufficiently handle large volumes of three-dimensional model in real time.It has a very powerful physics engine,can realize realistic interactive feel , create high-quality 3D simulation system[9] and real visual effects to simulate physical phenomena of the real world.Unity3D provides a highly perfect light and shadow rendering system with the function of soft shadows and baking,can release the game to Windows,Mac,Android or iPhone platform.Using the Unity web player plugin,which is only 500K in size, can release web games,supporting Mac and Windows'web browser.A complete Unity3D program is a combination of several scenes.Each scene including many models,through the script can dynamically control their behavior.With the Unity as virtual reality development platform,the efficiency of development is high,the effect is realistic,the interactive capabilities is powerful,the amount of data is small.

Key Technique Research and System Development
This paper uses Unity3D as development platform.First, three-dimensional model of typical plant is generated by use of interactive parameterized modeling method.Then, getting and setting the attribute value of WindZone using C# scripting language.Interactive interface is made by use of NGUI, users can adjust the parameters to dynamically modify the value of wind main, wind turbulence, wind pulse magnitude, and wind pulse frequency.The overall architecture of the system is shown in Figure 1:

Interactive Plant Parameterized Three-dimensional Modeling Method
Plant three-dimensional modeling method is varied.For different modeling purposes and application requirements,different modeling methods can obtain different modeling results.Parameterized modeling method is the method which starts earlier,is more influential and widely used.This kind of method uses a set of parameters to represent the main organs and three-dimensional morphological structure of the plant.Usually in an interactive way to realize parameters' dynamic adjustment and editing,in order to achieve the purpose of modifying the three-dimensional shape of models[10].This paper adopts an interactive parametrized modeling approach.First collecting three-dimensional morphology structure data of maize in field with the three-dimensional instrument Immersion G2LX.Then constructing the three-dimensional model of maize,by defining the veins curve and leaf blade margin curve to achieve the virtual modeling of leaf characteristics.Finally generating maize plant and population model in accordance with the plant type structure of typical maize.

Model Import
There are two methods for constructing three-dimensional model in the scene.One is the use of built-in functions of Unity3D.Another way is to import the 3D model as the same way of importing resources,where the models are constructed in the modeling software.This paper uses 3DMax as the modeling software to construct the three-dimensional plant model.Converting the format of three-dimensional plant to .fbx,which is the compatible format in Unity3D.The imported model information in Unity3D including spatial location,shader name,etc.Then, in the inspector panel of Unity3D to set the textures.Though directional light is added in the scene,there still exists the phenomenon that the imported model appears partial dark.This problem is solved by setting and adjusting point light.

Interactive Technique
A good user interface is produced by use of NGUI plugin.Through clicking the button,users can switch the browse modes.By dynamically input parameters to achieve different levels of animation effects.There are three cameras in the scene.The NGUI camera is to display the constructed two-dimensional user interactive interface.By defining two camera objects in the scene,dynamically controlling the state of the scene camera and first-person camera, browse mode is switched.By importing the first-person controller in the scene and setting its position and viewing angle,users through mouse,keyboard roaming in the scene,and then from different aspects to observe animation effects.

Plant Animation
This paper realizing the plant animation by adding the component of WindZone,as shown in figure   3.And then getting and setting the component's each property value in scripts,to achieve the plant's swaying effects under different wind conditions.Unity3D comes with the tree component is

Conclusions
By study of the above key techniques, a simple and low-cost plant animation system is built.This system achieves a certain degree of realism and interactivity.Through the interactive interface, users can switch browse mode and dynamically change the wind conditions.In the mode of first-person,users can roam in the scene by use of mouse and keyboard,and can from different angles to observe the plant's motion effects caused by different wind conditions.In the follow-up work,we intended to implement a plant animation system with a more perfect function,more friendly man-machine interactive interface.To further enhance the realism and interactivity of user experience,data glove can be also used,thus allowing users to interact with the scene more efficiently.