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 5. Bring Me a Shrubbery

Vegetation has a huge impact on scene quality. Significant coverage was once difficult to achieve without making compromises for memory and rendering power. Early computer games would use single pixels to sell the impression of movement (and sometimes even that was a stretch). Thanks to current Graphics Processing Unit (GPU) technology it's realistic to have lush scenes consisting of 2,50,000 vegetation objects on mid-range gaming PCs.

GROME, Unity, and other game engines all have their own unique vegetation system but broadly speaking they do the same thing; take a single object (such as a tree or grass billboard) and draw thousands of copies at different locations within the scene.

Games commonly use smoke and mirror techniques to fool the eye into thinking a scene is more complex than it is, even using old cinema tricks like forced perspective. The amount of detail we want to include is impacted by the altitude of the camera in our game; a flying game would...

Exportability of vegetation


Vegetation data does not translate well to Unity and UDK, there's no easy way to move it unless they are using GROME's native Graphite engine (such as the Ogre3D Graphite rendering module).

The most practical method of transferring vegetation coverage to Unity and UDK is through the use of coverage masks. GROME uses masks to populate vegetation within zones and these are saved as image files by several of the built-in exporters.

These masks can (with some effort) be imported into Unity and UDK but this presents practical editing issues should we need to perform any fine-tuning to the game map. Once a bulk transfer of vegetation data has been completed, any edits later on become more difficult to integrate, especially if it's required to reimport everything, potentially losing many hours of work. For this reason I usually recommend using Unity or UDKs built-in vegetation tools from this point onward but there are no hard-and-fast rules.

GROME detail objects and billboards


GROME's vegetation layers have a set of properties controlling visibility range, fade-out distance, and create objects where one model is swapped for a lower detail one (Level of Detail "LOD" collections). It also supports billboards; a term used in computer graphics to describe a textured quad that always faces the camera. A billboard quad is aligned to the camera using a vertex shader on the 3D hardware and can process thousands of billboards very quickly. Most game engines support this kind of object.

GROME vegetation layers are named "Detail" layers since it can render any kind of object such as rocks or debris, not just vegetation.

GROME also divides detail layers into two very distinct types:

  • 3D Objects

  • Billboards

You specify the type of detail layer when assigning zones to a Detail layer. Again these types won't export directly to our game engines.

The Detail layer stack

To set the mode of the layer stack to Details we set it from the drop-down control...

Summary


We looked at the detail layer stack and the two types of detail layers (Grass Billboards and 3D Objects). We went through each tool available to Detail layers; brushes, importing, and procedural mapping using distribution masks. Finally, we had a quick look at blending and the issue of baking shadows from trees onto terrain using object layers.

In the next chapter, we look at adding water features such as rivers, water planes, and a look at road building.

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