Get Real! Creating a Realistic Farm in VR

Welcome back to week three with the Crop Dusters!  This week we’ve gathered our tools and our new-found knowledge to get cracking on our virtual sprayer simulator.  We are building the foundation of the virtual farm world in which our simulation exists by building out the terrain and populating it with assets found in the real world.  We also gathered the needed models and began to wire up the controls to build a drivable sprayer.  Finally, we did some animation and rigging to begin bringing things to life.

Self-Propelled Sprayer Rigging

 

Creation of the environment is an important step in the process of engaging users in another world. The space the user is placed in must be believable enough that they are willing to suspend any disbelief.  With VR training, beyond the need to have realism for immersion, we also need to have a realistic environment so that our training is practical and impactful.  To accomplish this, we decided to use real farm patterns from Google Maps.  First, we found a suitable location on Google Maps that could be translated to suit our needs.  We used this as a reference to build our own terrain map.  We imported the image into Unity as a sprite and began the process of painting the terrain to match the field patterns.  This process took a while and looking back at it, we think it might be possible to automate it in the future to speed up development of new environments.  Ultimately, we would like to use GIS data to replicate real world locations that those in training will be actually operating in.  As cool as this would be, it’s going to have to take a backseat for now as we build up this first prototype.

Google Maps Reference View

 

After the terrain was in place, we needed to begin populating the assets in the scene.  The corn crops needed to be placed into rows, and this process would be tedious if one were to use the unity terrain system to place each stalk by hand.  Instead we coded a script and custom unity inspector to do the hard work for us.  The script looks at an image map that is overlaid onto the terrain, and anywhere there is a black pixel, a corn stalk is generated.  Following that we added in roads and street signs to both increase realism and add more obstacles.  For this process we used the Unity package Easy Roads 3D.  Unity packages like this allow us to rapidly prototype our project and save us time in some areas so that we can focus on our unique issues to solve.

Asset Creation - Corn Stalks and Signs

 

We needed additional 3D models for our project, which can be a time-consuming process if we were to model everything from scratch.  Luckily for us, there are several online sources for modeling and we were able to find a highly detailed model of a self-propelled sprayer.  In fact, this model was too detailed, and we will likely need to come back to it further along in development to make sure we can still run in VR at good frame rates.  Although we were able to find a detailed model of the sprayer, numerous things still needed to be added to the world.  One such model was the specific joystick we are working with while we wait to get more representative equipment that more closely mimics the actual gear.  Thus, some time was taken to model a mockup of our joystick so that we could better link the real and virtual worlds.  This helps first time users when they can look down at the virtual model and see a representation of the controls they are holding.

Joystick Model

 

Finally, this week we did some work on rigging and animating our model.  It’s amazing how some simple animations can really make things immersive.  By animating the boom arms on our sprayer and viewing it in VR, we could instantly see the benefits of this project.  It became clear the power of VR with regard to depth perception and understanding the scale of the vehicle and the boom arms compared to just looking at the model on a screen.  Now that we have the basics of being able to drive the machine with controls, we can start looking into how that will tie in with the training portion of the simulation.  We’ll be diving into that part next week so stay tuned!  Be sure to watch our video below to catch all this week's action!

For more complete information about compiler optimizations, see our Optimization Notice.