Reader small image

You're reading from  Grome Terrain Modeling with Ogre3D, UDK, and Unity3D

Product typeBook
Published inFeb 2013
Reading LevelIntermediate
Publisher
ISBN-139781849699396
Edition1st Edition
Languages
Right arrow
Author (1)
Richard A. Hawley
Richard A. Hawley
author image
Richard A. Hawley

Richard Hawley started programming in the early 1980s at the start of the home computer craze with the Sinclair ZX-81. Before leaving high school he had worked on three game projects for Assassin Software and later worked on conversions of classic strategy board games for 8- to 16-bit machines. He went on to develop end-user tools for popular flight simulations including Empire Interactives Enemy Engaged helicopter series and the highly successful Origin Janes Longbow series (MissioneerPlus). Hes the director of Tricubic Studios, a small UK company dedicated to creating simulation and training environments using off-the-shelf 3D engines including Unity and Leadwerks. Together with technical artist David Hopkinson (Total War: English Civil War conversion) and physics guru Fred Naar (creator of Helicopter Total Realism for Microsoft Flight Simulator X) they are collectively known for their work on helicopter simulations.
Read more about Richard A. Hawley

Right arrow

Chapter 7. Exporting to Unity, UDK, and Ogre 3D

We're going to export our project to three engines. While Unity and UDK are game engines (although they certainly have uses beyond games), Ogre3D is a 3D rendering engine which doesn't have functions for audio or user input, but it's open source and quite flexible. We'll be taking a look at a the OgreGrome SDK which implements GROME's Graphite engine for Ogre3D.

Unity


By far the easiest of the three engines to use and can build games for PC, Mac, and mobile platforms. Unity comes with its own terrain system however this isn't available in the Unity iPhone/Android editor. This is simply because mobile platforms can't (yet) render the hundreds of thousands of polygons that typically constitute landscapes on their larger desktop counterparts.

In spite of this limitation, Unity iPhone/Android has been partly addressed by including a simple terrain system for mobiles, GROME still has this well in hand through its use of Mesh layers.

Mesh layers are 3D models based on the terrain heightmap exported in Collada (.dae) format. We can export our terrain with enough detail for a target mobile device or for PlayStation, XBOX, and PC. We can do this for multiple levels of detail (LOD). For desktops we can simply use the heightmap from GROME and load it into the Unity editor so we can use all of the native Unity terrain tools for painting and vegetation. This...

Unreal Development Kit


Featuring advanced rendering techniques, Unreal Development Kit (UDK) can now be downloaded for no fee for the purposes of trying it out. We're going to add a basic terrain object and import our GROME terrain with some texture layer information.

GROME export plugin for UDK

To export the GROME heightmap we will use a new plugin that makes it easier for us. It's important we match the plugin with the correct version of GROME. The most recent versions are given as follows:

Extract this plugin, ensure the .plug file is copied to the GROME3 plugin's directory (the source code is included but isn't needed unless you intend to make modifications). Launch GROME to install it. If the plugin initialization worked, UDK should now be an available option when we select export from the File menu.

This plugin creates a correctly formatted .bmp...

Ogre3D


At this point I will assume you have some programming experience of the Ogre open source 3D graphics engine. A crash course in Ogre3D programming is a little beyond the scope of this book but there are plenty of great books and tutorials to be had.

Before we get started compiling a simple scene and viewer, we will need to install the OgreGrome SDK which at time of writing can be downloaded from:

http://www.quadsoftware.com/download.php?file=grome2ogre/OgreGrome_1.00.27.exe

Alternatively, visit Quad Software's website and navigate to "GROME – Support for Engines and External Formats". There you will find links to any updated SDKs and plugins.

Another requirement is the OgreCOLLADA application (or some other tool) that converts COLLADA models used by GROME into the .mesh format required by Ogre3D.

http://sourceforge.net/projects/ogrecollada/

OgreGraphite engine

The OgreGrome sample viewer makes use of the Graphite engine and is fully compatible with scenes produced by GROME. As such, it...

Summary


In this final chapter we exported terrains as RAW and 3D models for Unity and used a simple script to import splat data from GROME. We installed a plugin for UDK and exported the terrain into the Unreal Editor along with material layers. Finally, we looked at Ogre3D and exported our scene for the viewer application.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Grome Terrain Modeling with Ogre3D, UDK, and Unity3D
Published in: Feb 2013Publisher: ISBN-13: 9781849699396
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Richard A. Hawley

Richard Hawley started programming in the early 1980s at the start of the home computer craze with the Sinclair ZX-81. Before leaving high school he had worked on three game projects for Assassin Software and later worked on conversions of classic strategy board games for 8- to 16-bit machines. He went on to develop end-user tools for popular flight simulations including Empire Interactives Enemy Engaged helicopter series and the highly successful Origin Janes Longbow series (MissioneerPlus). Hes the director of Tricubic Studios, a small UK company dedicated to creating simulation and training environments using off-the-shelf 3D engines including Unity and Leadwerks. Together with technical artist David Hopkinson (Total War: English Civil War conversion) and physics guru Fred Naar (creator of Helicopter Total Realism for Microsoft Flight Simulator X) they are collectively known for their work on helicopter simulations.
Read more about Richard A. Hawley