Three-Dimensional Engine Simulators with Unity3D Game Software

Similar documents
The 8 th International Scientific Conference elearning and software for Education Bucharest, April 26-27, / X

UNITEST FULL MISSION ENGINE ROOM SIMULATOR

THE USE OF THE SIMULATOR AS A TOOL FOR TRAINING STUDENTS OF MARINE ENGINEERING FACULTY

Getting Started with EAA Virtual Flight Academy

Virtual Flight Academy - Quick Start Guide

CS 354R: Computer Game Technology

Propietary Engine VS Commercial engine. by Zalo

A Virtual Environments Editor for Driving Scenes

Macquarie University Introductory Unity3D Workshop

Chapter 1 Virtual World Fundamentals

First Steps in Unity3D

Students: Bar Uliel, Moran Nisan,Sapir Mordoch Supervisors: Yaron Honen,Boaz Sternfeld

ADVANCED WHACK A MOLE VR

Understanding OpenGL

Development of a Dual-Extraction Industrial Turbine Simulator Using General Purpose Simulation Tools

Virtual Reality as Innovative Approach to the Interior Designing

Yokogawa Generic 100MW Combined Cycle Power Plant Simulator

Aerospace Sensor Suite

Fanmade. 2D Puzzle Platformer

The light sensor, rotation sensor, and motors may all be monitored using the view function on the RCX.

Falsework & Formwork Visualisation Software

VR for Microsurgery. Design Document. Team: May1702 Client: Dr. Ben-Shlomo Advisor: Dr. Keren Website:

Virtual Universe Pro. Player Player 2018 for Virtual Universe Pro

SPIDERMAN VR. Adam Elgressy and Dmitry Vlasenko

Next Back Save Project Save Project Save your Story

How to Blog to the Vanguard Website

REPORT ON THE CURRENT STATE OF FOR DESIGN. XL: Experiments in Landscape and Urbanism

ESCAPE! Player Manual and Game Specifications

The Design and Implementation of A Vehicle Coaching. Simulation System on the Ground Driving Subjects

Programming Project 2

Workshop 4: Digital Media By Daniel Crippa

Nighork Adventures: Beyond the Moons of Shadalee

Pro Flight Trainer Accuracy Flight Test Test-Pilot s guide Revision 2

Computer Games 2011 Engineering

In this project you ll learn how to create a game, in which you have to match up coloured dots with the correct part of the controller.

Adding Content and Adjusting Layers

CHEAP GOLF EDITOR MANUAL. v 0.11

Learning Based Interface Modeling using Augmented Reality

Nighork Adventures: Legacy of Chaos

Say Goodbye Write-up

Software user guide. Contents. Introduction. The software. Counter 1. Play Train 4. Minimax 6

A New Simulator for Botball Robots

Webcam Based Image Control System

Read & Download (PDF Kindle) JMonkeyEngine 3.0 Beginner's Guide

PS4 Remote Play review: No Farewell to Arms, but a Moveable Feast

CS Problem Solving and Structured Programming Lab 1 - Introduction to Programming in Alice designed by Barb Lerner Due: February 9/10

Orbital Delivery Service

Software Design Document

Visual C# Game Programming For Teens Download Free (EPUB, PDF)

Procedural Level Generation for a 2D Platformer

Human Factors of Standardisation and Automation NAV18

Momo Software Context Aware User Interface Application USER MANUAL. Burak Kerim AKKUŞ Ender BULUT Hüseyin Can DOĞAN

Motion Blur with Mental Ray

Human Computer Interaction Unity 3D Labs

Moving Man Introduction Motion in 1 Direction

Figure 1. The game was developed to be played on a large multi-touch tablet and multiple smartphones.

Oculus Rift Getting Started Guide

A VIRTUAL TOUR OF THE MEDIANA ARCHEOLOGICAL PARK USING UNITY 3D ENGINE

Effects of Shader Technology: Current-Generation Game Consoles and Real-Time. Graphics Applications

Project Documentation for Zombie Trail

Selective Editing in Camera Raw 5

Medium Engine Room Simulator - MER3D

DXXX Series Servo Programming...9 Introduction...9 Connections HSB-9XXX Series Servo Programming...19 Introduction...19 Connections...

Simtools - Installation

For use with the emwave Desktop PC version Dual Drive for emwave User Guide User Guide

Crowd-steering behaviors Using the Fame Crowd Simulation API to manage crowds Exploring ANT-Op to create more goal-directed crowds

Organizing artwork on layers

True bullet 1.03 manual

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Williams Pinball The Getaway: High Speed II Table Guide By ShoryukenToTheChin. Page 1 of 21

ADVANCED TRAINING SIMULATORS

CHAPTER 11: DIGITAL CONTROL

The quantitative relationship between distance, time and speed

Understanding Controller Setup for Accurate Liquid Application

Relationship to theory: This activity involves the motion of bodies under constant velocity.

Applying virtual reality technology to architectural design teaching

VERSION Instead of siding with either group, we added new items to the Preferences page to allow enabling/disabling these messages.

Activity 1 Position, Velocity, Acceleration PHYS 010

ACTIVITY 1: Measuring Speed

PHYSICS 220 LAB #1: ONE-DIMENSIONAL MOTION

Getting Started with Osmo Words

Introduction to programming with Fable

Maniacally Obese Penguins, Inc.

Team Breaking Bat Architecture Design Specification. Virtual Slugger

Designing an Obstacle Game to Motivate Physical Activity among Teens. Shannon Parker Summer 2010 NSF Grant Award No. CNS

GRAPHIC COMPUTER SYSTEM

Oculus Rift Development Kit 2

DISCO DICING SAW SOP. April 2014 INTRODUCTION

Installation Instructions

PLANETOID PIONEERS: Creating a Level!

Motion Graphs Teacher s Guide

The Joy of SVGs CUT ABOVE. pre training series 3. svg design Course. Jennifer Maker. CUT ABOVE SVG Design Course by Jennifer Maker

Battlefield Academy Template 1 Guide

CS Game Programming, Fall 2014

Silhouette Connect Layout... 4 The Preview Window... 5 Undo/Redo... 5 Navigational Zoom Tools... 5 Cut Options... 6

PDF / HOW TO TURN ON THE PS4 EBOOK

MRT: Mixed-Reality Tabletop

Copyrights and Trademarks

04. Two Player Pong. 04.Two Player Pong

Pull Down Menu View Toolbar Design Toolbar

Transcription:

The 13th Annual General Assembly of the JAMU Expanding Frontiers - Challenges and Opportunities in Maritime Education and Training Three-Dimensional Engine Simulators with Unity3D Game Software Sergio Perez-Gruszkiewicz, Ph.D. Profess01; U.S. Merchant Marine Academy, Department of Marine Engineering. Kings Point, NY 11024 perezs@usmma.edu Elwood Baumgart Chief Engineer, Captain, US.MS, U.S. Merchant Marine Academy. Kings Point, NY 110 21 baumgarte@usmma.edu Abstract: The difference between a computer game and a simulator can be a small one - both require the same capabilities from the computer: realistic graphics, behavior consistent with the laws of physics, a variety of scenarios where difficulties can emerge, and some assessment technique to inform users of performance. Computer games are a multi-billion dollar industry in the United States, and as the production costs and complexity of games have increased, so has the effort to make their creation easier. Commercial software products have been developed to greatly simplify the game-making process, allowing developers to focus on content rather than on programming. This paper investigates Unity3D game creation software for making threedimensional engine-room simulators. Unity3D is arguably the best software product for game creation, and has been used for numerous popular and successful commercial games. Maritime universities could greatly benefit from making custom simulators to fit specific applications and requirements, as well as from reducing the cost of purchasing simulators. We use Unity3D to make a three-dimensional steam tu rbine simulator that achieves a high degree of realism. The user can walk around the turbine, open and close valves, activate pumps, and run the turbine. Turbine operating parameters such as RPM, condenser vacuum, lube oil temperature. and governor status are monitored. In addition, the program keeps a log of any errors made by the operator. We find that with the use of Unity3D, students and faculty are able to make custom three-dimensional ship and engine room simulators that can be used as training and evaluation tools. Keywords: simulators, PC simulators. game-programming 1. Introduction Consider a computer game where the user drives a car around a track. The car must respond in a manner consistent with the laws of physics, accelerating when the accelerator is pressed, slowing when the brakes are applied, detecting when the car collides or goes off the road. The user must respond to inputs, and the game must keep track of the user's performance (score). 53

Three-Dimensional Engine Simulators with Unity3D Game Software A 3-dimensional engine simulator is not very different from a game: like the game, the simulation must behave in a physically realistic way, respond to user inputs, allow motion in the 3-D space, and advise the user of the status of the simulation (pressures, temperatures, etc.). Creating a PC-based simulator or a game from the ground-up is not an easy task. Computer games and simulators are typically written in C++ or some other programming language. The seemingly simple act of displaying a 2-dimensional image on a PC screen requires about 200 lines of code in C++ [l]. The problem is that a game or simulator must perforn1 two non-trivial tasks: deal with Windows, and display and move objects in three dimensions. To aid programmers in developing PC games, powerful software products have been developed which can greatly simplify the programming task. These programs have pre-made functions or subroutines that handle some of the difficult parts of creating 3D simulators or games, and allow the programmer to focus on the content of the simulation. Some of these products are free, such as Lite-C [2], Panda3D [3] and Blender [4], while most are commercial products, such as DarkBasic [5], Torque [6] and Blitz 3D [7]. Readers are refened to Wikipedia [8] for a list of software products which can be used to make games and simulators. Perez [9] showed that game-making software product Jamagic could be used for making a variety of 3-D simulators, including ship handling and flight simulations. Jamagic was also used to make a 2-D engine room simulator, presented at the 9'h International Conference of Engine Room Simulators (ICERS 9) by Perez and Byra [10]. The authors showed that game-making software could be used to make a 2-Dimensional panel-type simulator of a steam turbine. Some of the products mentioned above use their own or simple programming languages, for example DarkBasic, Blender and Blitz3D, while most require writing code in C++ or Python language to access pre-programmed routines for making games (known as game engines). Using game programming software, the task of making a simulator becomes greatly simplified, enabling learning institutions to make their own simulators. An important aspect of this, aside from the obvious one of cost, is the ability to tailor-fit assessment techniques to the needs of individual institutions. However, it must be remembered that creating a simulator is not an easy task, as algorithms still must be created to model the physics involved with engine room simulators. In this paper we explore the use of Unity software (www.unity3d.com) for 3-D modeling of a small steam turbine, including user assessment. Unity is an extremely powerful tool for creating 3D video games, and can run on Microsoft Windows and Mac OS X. Many highly successful commercial games have been created with Unity. The games it produces can be run on Windows, Mac, Xbox 360, PlayStation 3, Wii, ipad, iphone, as well as the Android platform. The software version used for this simulation is freely available from the Unity web site - this is a fully functional version of the Pro Version \Vhich costs about $1500. 2. 3-DArt One of the first steps in making a game or simulator is obtaining the 3-dimensional images of the simulated object. For this project we needed a realistic 3-dimensional model of a steam turbine, with valves, pipes, and displays. Usually one has to make the 3D objects using commercially available software like Maya, Studio Max, or the freeware Blender. Making 3D game objects can be a very time-consuming 54

Perez-Gruszkiewicz, Baumgart task, but occasionally the 3-D objects can be found on the internet already made - these objects may be ready for use, or may be modified using 3-D modeling software. We were fortunate to find 3-D art of turbines, pipes and valves that was sufficiently similar to actual systems to greatly simplify our task. The turbine model came with no piping, but the pipe models used were easy to modify and add to the 3-D scene. Once the 3-D art is available, it can easily be "dragged" into the Unity scene. 3. Programming An)' simulator must be given instructions how to behave. For example: what happens when a pump is activated or a valve opened? How much does the pressure drop across a valve while throttling? How does one control the pitch of the turbine sound as the RPM change? By writing a computer program, developers can control the action on the simulation. Unity can be programmed in either Java or C# - the programmer selects which. For this paper Java was selected because it is somewhat simpler to use. A sample portion of the main program used for this project is shown below. It illustrates an algorithm used to control the pitch and speed of the turbine based on the amount that two valves upstream of the turbine are opened. The simulator created for this project required about 500 lines of program. rate= spinl/90*spin3/90; //rate depends on valve 1 and valve 3 open amount rpmgoal = 1250*rate; if(rpm>o) { audio.pitch= 0.1 + rpm/300.0; //adjust the pitch based on rpm if( tsound<o) { audio.clip=turbsound; //the turbine sound clip to use audio.play(); //play the clip tsound = 1.0; } } if (rpmgoal>rpm & rpm<900) //we add to rpm { rpm= rpm+ Time.deltaTime*(-spin3)/7; 4. The Simulation The simulation developed for this project is based on a steam-driven turbine/generator at the U.S. Merchant Marine Academy. The goal was to demonstrate the capabilities of Unity for engine room simulations and evaluation of sh1dent performance. The model displays operating parameters such as turbine RPM, condenser vacuum, lube oil temperah1re, and governor status. A list of errors is displayed on the screen informing students and instructors of any missteps. 55

Three-Dimensional Engine Simulators with Unity3D Game Software The operator must perform tasks in the proper in order to avoid error messages. Before admitting steam into the turbine the following tasks must be performed: oil must be checked, gland-sealing steam must be admitted into turbine, the lube oil pump must be primed, vacuum raised in the condenser, and sea water and condensate pumps turned on. In addition, a drain must be opened in the main steam line before opening the throttle; this allows steam to be visible exiting the drain so the operator can visually check the flow of steam for presence of liquid droplets. Once the turbine begins rolling after the throttle is opened, the pitch of the turbine sound will rise as RPM increase. As the throttle is opened or closed, turbine RPM reacts accordingly. Also, the lube oil primer will shut itself off at a given value of the RPM. The status of the turbine is displayed in a 3D text above the turbine, while the status of all pumps is shown in a pump menu at the bottom of the screen. In order to aid students in understanding the system, the user can right-click on objects to display a message describing the item clicked. Valves are opened by left-clicking (more clicks open the valves more) and closed by right-clicking. The camera (which provides the view to the user) is moved using the arrow keys (Table 1) as well as by number keys: Table 1: Camera Controls Ui;+... ii Ti ~ ~Y. 'if.,., ~!SHH?!!) 1 Rotate left 2 Rotate right 3 Move down 4 Move right 5 Rotate down 6 Rotate up The screenshots below show the simulator in operation. The user has the capability to walk around the 3D space at will using the anow keys and the number keys listed above. 56

Perez-Gruszkiewicz, Baumgart Figure I. The turbine and generator. Figure 1 shows the turbine with associated piping and valves. The vacuum, seawater circulation, condensate, and oil primer pumps are controlled by the buttons at the bottom of the scene. Turbine operating parameters are displayed over the turbine. The valves can be clicked to open and close. Figure 2. Turbine Close-up 57

Three-Dimensional Engine Simulators with Unity3D Game Software Figure 2 is a close-up of the turbine. The upper left valve is the throttle, the middle valve is the steam drain, and the lower valve allows gland-sealing steam into the turbine. The two pipes exiting the turbine are the gland sealing steam inlet and outlet lines. When the throttle is opened, the turbine slowly accelerates, and reaches a RPM value based on the amount the throttle and main steam valve are open. As the turbine turns faster, the pitch of the engine sound increases. Shutting the throttle down causes the pitch and RPM to drop gradually. Figure 3. The steam drain line. Steam can be seen exiting the pipe. When the steam drain line is open, steam is seen exiting the pipe as a fog. As the pipe is opened more, the steam exits further from the pipe, and becomes clear close to the pipe, indicating superheated steam at the exit. 58

Perez-Gruszkiewicz, Baumgart Figure 4. The turbine and generator. Figure 4 shows the turbine from the side, with the generator connected to it. Figure 5. Close-up of pump controls. Figure 5 shows three of the pump controls. The controls are a red color when pumps are off, and turn blue when activated. The lube oil primer pump shuts itself off automatically at a set RPM, and the lube oil pump starts. 59

Three-Dimensional Engine Simulators with Unity3D Game Software Figure 6. Display of error messages. Figure 6 shows sample error messages displayed on the screen. The error messages are activated by a number of errors, including the failure of the operator to open the throttle slowly. 5. Observations and Conclusions Unity is an extremely powerful and versatile tool that can create simulators as good as any commercial product on the market - in fact, Unity has been used to make many successful commercial games. Unity's ability to quickly render 3-D scenes and execute code makes it ideal for simulators as well as games. The entire engine room of a ship could potentially be simulated using the software, with much less work than ifthe simulation were programmed directly using a programming language. Unity has a rather steep learning curve, especially if the programmer is not accustomed to object-oriented languages. However, the on-line documentation is very good, and the user forums are of immense value in learning how to do specific tasks - one merely has to type what one wishes to learn into a search engine, and usually someone else has already answered that same question in the past. The project was completed with 60-100 hours of work, with the programmer already somewhat familiar with Unity. Quite a bit of time was saved by purchasing pre-made 3D models of the turbine and piping systems, which came to about $50 total. It is anticipated that the time required for any future projects of similar complexity would be considerably less due to the programmer being more familiar with the software. References [l] Parberry I., "Introduction to computer game programing with DirectX 8.0", Worclware Publishing, 2001. [2] ww\v.conitec.corn/english/gstudio/litec.htm [3] www.pancla3cl.org [ 4] ww\v.blender.org [ 5] \VWW. clarkbas icpro. thegamecreators. com [6] www.garngegames.com [7] www.blitzbasic.com [8] http://en.wikipedia.org/wiki/list o(garne engines 60

Perez-Gruszkiewicz, Baumgart [9] Perez S., "Elementary Game Programming and Simulators using Jamagic", Charles River Media, 2003. [10] Perez S., and Byra A., "PC game technology for creating engine room simulators with student assessment capabilities", Proceedings of JCERS 9, 2010, Kings Point, NY, pp 1-15. 61