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.
You're reading from Grome Terrain Modeling with Ogre3D, UDK, and Unity3D
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...
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.
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...
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.
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.