3D World

GET STARTED IN LUMBERYARD

Part two of our Amazon Lumberyard tutorial focuses on terrain set-up.

- For all the assets you need to follow this tutorial, go to www.bit.ly/vault-213-realtime

as this set of tutorials focuses on the creation of a game level and its assets in Lumberyard, it pays to generate a game and level design before you dive in, in order to help structure your thoughts and creative process. Creating these designs is all about the brain, and not the paperwork, as their sole purpose is to solidify your ideas and concepts. There’s even a great part at this stage where you get to play games in the name of research. Look at other games and how they work, and collect mood and concept images to inspire your own. It also pays to look at the templates and talks available at sites such as GDC, Gamasutra and 80 lvl and be sure to check out the post-mortem talks at Gamasutra. These talks break down the good, the bad and the ugly of games after their launch, and offer newcomers in the field valuable advice and insight.

Last issue’s walkthroug­h focused on getting to know Lumberyard. In this issue, we’ll get you started on basic asset creation and imports, before creating vegetation and terrain assets in issue 214. We aim to end this set of tutorials a few months down the line with a small, forested level; with a hint of The Vanishing of Ethan Carter. Be warned, even for a small level, there’s a lot of work involved.

If you’ve played the game, you know that even though it’s very small, every area – or level – has a very distinct look and feel which drives the story. This means that The Astronauts, the company behind the game, pooled their team’s combined industry knowledge and spent some time planning on paper, playing it in their heads, and playtestin­g often. It’s also very likely that they started level design with a greybox.

If you’re new to the phrase, a greybox is a super simple level, based on your level design, with very simple geometry – no shaders and no lighting set-up. The purpose of such a bare-bones level is to focus on the basics and flow of your intended gameplay, and it acts as a starting point for refining your game. The reason for this is that experience

has shown that if you don’t spend at least a little time planning and blocking out a baseline for your game, you’ll get a lot of awesome prototypes, but hardly ever a finished level.

There are several ways to go about creating a document like this: for those who like to document everything, there are online tools, such as Trello and Dundoc – the latter is a set of online gamedesign templates that you and others can build into a design document.

For those who prefer to sketch it out, there are alternativ­es to Onenote, for example Photoshop’s Graphicriv­er has started selling isometric map generators for map and game design. These generate accurate templates for maps as they overlay the terrains with the grids you so sorely need for planning your game. If that’s not your thing, and you’re on Windows 10, Microsoft’s latest update came with Plumbago – a free tool for rough sketching and note taking – which also has some handy grid options.

Whichever tool you choose, make sure that under no circumstan­ces do you use a napkin. The last known game designed on a napkin was Mass Effect 3’s ending.

Also make sure to socialise when you’re in the early stages of design. Join a game design or modding community on Steam, Nexus or at any of the game engine sites. Storytelli­ng and design is not engine proprietar­y, and feedback always helps you get better. Bethesda’s games seem to have the largest mod communitie­s on Steam and Nexus, but also make sure to check in on communitie­s for smaller franchises.

1 UNDERSTAND­ING SCALE

The one thing you need to be aware of before you start creating is scale. Scale always matters in imagery, but even more so in a game engine, as it affects everything from proportion right down to gameplay memory.

Even something as simple as generating a terrain has constraint­s that stills or animations don’t. For example, when generating a new level in Lumberyard, you’ll be asked to define your Heightmap Resolution and Metres per Texel. We covered this briefly in last month’s tutorial, but in plain English, it means that the heightmap defines the size of your terrain. It supports the usual x2 format, for example 512×512, 1024×102, 2048×2048.

A more interestin­g point, which is maybe not so obvious to a novice, is that Metres per Texel is in effect is a multiplier. Here’s why: Metres per Texel (MPT) defines the distance in metres between two vertices on your terrain’s mesh. In addition to it being super handy for measuring the amount of steps between story beats or action/interactio­n points, its multiplier function is also important.

If you keep your Metres per Texel at 1, it means the terrain will stay at its original size and resolution. This gives you the easiest set-up and usually the best shader base to work with, provided the raw materials are to scale.

If you set a 512×512 terrain to 2 MPT, you’ll in effect get a terrain that’s 1024×1024, as it’s been stretched to two metres between its vertices, making it bigger. This stretch will cost you in terms of finer detail and smoothing; the larger you scale it up, the larger the triangles in the mesh become, and unfortunat­ely this means they also become more unwieldy to smooth.

2 SIZE MATTERS

How large a terrain you want to create, and how large or small you want to set your MTP is of course entirely up to you and the platform you’re creating for. However, if you want to run a multiplaye­r game on Amazon Gamelift, keep an eye on your terrain size, as a high resolution terrain with highly detailed textures will eat a lot of your game’s memory before you’ve even started detailing in the rest of your assets. It also doesn’t matter how much muscle you have from the cloud if your game’s terrain eats its memory before you’ve even defined the rest of your game’s assets.

3 TERRAIN GENERATION

Still one of the most popular tools for terrain generation across the board is, without a doubt, Stephen Schmitt’s World Machine, which comes in a small, free version if you don’t already have a terrain generator. The reason its node based output is so popular is that its ease of use and versatilit­y ensures it can be used in stills, animations, and most game engines, from Cryengine – and thereby Lumberyard – to unreal and unity.

The free version won’t let you generate terrains larger than 512×512, but that’s sufficient for this basic walkthroug­h. Alternativ­ely, you can also skip creating your own terrains altogether, and use the Grassy Hills terrain from World Machine’s Examples folder, there’s no harm in using pre-made content if it’s good enough and saves time.

4 MIND your METRICS

No matter which terrain generator you use, keep in mind that metric units will always be easier to work with than any native generator units in any game engine, so save yourself some serious hassle, and make sure your terrain’s units are set to metric. In World Machine, go to World Commands in the menu bar to access your Project Settings. Make sure that the Kilometer radio button in the General Settings tab is ticked before you generate your terrain. In the same tab, also untick the +1 next to Build Resolution and dial down the terrain’s height to about 500-1000 meters. We’ll lower this even further once we’re in Lumberyard, but it’s easier to see the terrain’s details in World Machine if you keep a little height at this stage.

5 CREATE A SIMPLE TERRAIN

One thing that’s worth noting before you start, is that you need to save often. Another thing to bear in mind is that, irritating­ly, Ctrl+z/undo is broken in version 2.3.7, so keep track of what you’re doing and save your work regularly! Now your workspace is set up, create a basic terrain for level and map generation. As World Machine bases all its generation on fractals, we’ll combine an Advanced Perlin node with a simple Perlin Generator, tweak it with some Erosion, and link the generated map to several output nodes.

Go to Devices and select Perlin Noise. Set Transforma­tion to 1.500×1.500, feature size to 2.43 km, Heightfiel­d Generation parameters to Hybrid Multifract­al and random seed to 12518. Then go to Devices again, and select Advanced Perlin. Set Feature Scale to 8 km, Basic Parameters to Stephen’s choice 1, Elevation center to 312.5 and random seed to 55123.

Next, add an Erosion node from Devices>natural Filters. Set it to Standard Erosion, Erosion Filtering Type to No Filter, Rock Hardness to 0.200 and Random Seed to 22630. Connect the Perlin Noise Generator to Advanced Perlin’s Shaping Guide (Heightfiel­d). The final step of this process is to connect the Advanced Perlin node’s Primary Output to Erosion’s Primary Input.

Press CTRL+B to build the terrain. Do this every time you add a node. A green square under the node means built, yellow means it needs refreshing, red means it’s not been built yet.

6 GENERATE your MAPS

Now we have a starter terrain, its time to generate the maps you need to start blocking your level – you can always add complexity to your terrain later. First, go to Converter and pick the Colorizer node. Then Connect Erosion’s Primary Output to its Primary Input. Double-click, and pick a gradient

you like, the example file uses the Dirt and Grass one. Go to Output, and pick a Bitmap Output node. Then set your format and path, and click Write output to Disk, to build the node. If you want to generate a Normal map, repeat the steps above by going back to Converter, selecting Normal, creating a Bitmap Output node, and connecting the nodes’ input and outputs.

7 MIND your BITS

Next, go back to Output and create a Heightfiel­d node. Connect its Primary input to Erosion’s Primary Output. A good rule of thumb regarding heightfiel­ds is to always use 16 bits RAW of TIF exports for game-terrains, as it will help avoid the terrain from stepping – that ugly-looking blockiness or banding when you’re scaling, smoothing or detailing your terrain, for example in Lumberyard.

8 ALL ABOUT THE SPLATS

your heightmap is ready for import into the Lumberyard Terrain Editor now, but you may want to create a splatmap for when we start texturing our terrain for real. Before we create some additional nodes, it would be useful to know what a splatmap actually is and what it does.

If you’re used to generating stills or simple animations, you may already be somewhat familiar with how splat map works from its siblings’ many names: alphas, weightmaps or masks. But even though a splat map in effect is a mask, its set-up is a little different. First of all, a Lumberyard splat map is Red, Green and Blue, with the different channels containing different elements from the heightmap. This multi-coloured mask is applied to your terrain layers for easier texture blending and tweaking. World Machine has two nodes for generating splat maps, the Splat Converter and the Basic Splat Map macro, but we’ll use the method that gives you more control by setting up separate nodes in a combiner: the one for unreal by Coach Sparks.

From the Selector bar, create three Select height nodes and plug them into Erosion’s Primary Output. Click the Converter bar, and select Channel Combiner. Plug the Select Height nodes into each their channel in the Channel Combiner, so you have a node in each of the R, G, and B channels. Grab an Overlay View node from Output, and connect the ubiquitous Primary Input to Erosion’s Primary Output. Next, Connect the Overlay Input in the

Overlay View’s node to the Channel Combiner. Press F8. And now start tweaking your map with each Select Height node on the left, so you get an RGB map outlining the different blend areas on your map. When you’re happy with it, go back to the main view. Create a Bitmap Output node, hook it up to the Channel Combiner’s Primary Output. Save as .bmp, .tif, or .png. And press CTRL+B one last time to build and save your map outputs.

9 LUMBERYARD LEVEL PREP

To speed up level creation down the line, let’s do some final prep-work. Before importing your terrain and other assets into Lumberyard, decide whether you want to keep using the GAMESDK from last issue, or if you want to start a new project. For the former, create a new level in the Lumberyard Editor This is the safest option, as Lumberyard is in beta.

To create a new project, run CMD from the Windows Taskbar to get a DOS prompt, and also open the Project Configurat­or on your desktop. In the Configurat­or, click Create New. Name your project, using alphanumer­ic characters only. Then click Enable Gems, and select and save the ones you want in the screen that comes up. Next, you will be told to run lmbr_waf configure. Go to your DOS prompt. Type in CD\ – this will exit you from your current folders. Type in CD Amazon\ Lumberyard\1.4.0\dev\ or similar, depending on where you’ve installed Lumberyard, and press enter. Next, type in lmbr_waf configure and press Enter. The project will now compile. Once it’s finished, go back to the Project Configurat­or, and set your new project to default, and run the Lumberyard Editor.

The Asset Processor will now start churning, adding your selected Gems to the project. Once your project is ready, create a new level.

10 IMPORTING PROPS

Next, import the props you want to use. This tutorial uses the Free Low Poly Watch Tower from holographi­cstd at Cgtrader as an example, but you can use anything you want, as long as it’s in .fbx format. Go to your Lumberyard project folder and in the Objects folder, create a new folder called Fbx_imports for easier navigation. Move your .fbxfile and its textures into the folder, as Lumberyard won’t load items not in the project folder. It’s a good idea to play it safe with your textures and use the Crytif exporter or the Rc-plugin we discussed

As with terrains, environmen­t props like these need to be as low-poly as possible

last issue, with an alpha channel in the diffuse for leaves and similar items. In the View menu, select View PANE>FBX importer (Preview, not the legacy). Next, click the folder icon in the dialog, and navigate to the files you put in the Objects\ Fbx_imports folder and load it – this may take a while, depending on file size. Click Import and your imported file should show under Brushes/objects/ FBX or similar, depending your save path.

11 IMPORT AND SET up TREES

Another option is to import trees via the Lumberyard Exporter Plugin in 3ds Max or Maya. We’ll cover the creation of vegetation and the best way to import it into Lumberyard via the exporter plug-in in the next issue.

For this part of the tutorial, let’s stick to FBX to set up simple vegetation: Pick a tree from one of the free demos from CG Axis or the Evermotion tree packs, and move it to your Fbx_imports folder, making sure you follow the process outlined in the last step. If you’re a hobbyist wanting to use your DAZ woodlands or free Xfrog assets, please note that it’s OK to use polyheavy models for exploring and getting to know Lumberyard if your hardware permits it, but as with terrains, environmen­t props like these need to be as low-poly as possible. In addition, there are copyright issues, should you distribute games with this kind of content without having a license.

Once your import is done, press M to bring up the Material editor. In the Material editor, pick Select From Object to load the imported file’s textures. Set both Shader and Surface type for all the materials to Vegetation. Next, tweak the Bending Branch and Edge Amplitude settings, in addition to small Detail Bending Frequency tweaks.

At the time of writing, there was a Save Material bug that sometimes randomly reset all the shader’s settings when saving, so make sure you save your scene before you save your material.

Once you’re happy with your tree, you can save it as a new CFG by clicking Save as CFG in the Brush Options panel.

12 MAKE TREES RUSTLE

Now to make your trees rustle: Go to Vegetation in the Rollup bar’s Terrain tab, and click Add Vegetation Object. Load the file you just saved. It will show up as Default\filename in the viewport and you need to select it. In the Parameters list, set Bend to 3. This setting is just for show, leaves usually rustle with lesser settings. In addition, try setting Size to 2 or 3 to tweak your scale. With the tree selected, slide the paintbrush slider to the right, somewhere between 2 and 4 so we have a single instance, and press Paint Objects. Press CTRL+Z to undo and repaint to tweak, until you’re happy with your tree. Then click Save As next to the trashcan to save your tree as a *.veg file so you can use it as a vegetation brush on the terrain you’re about to import.

13 IMPORT your TERRAIN

Now all the prep has been done, it’s finally time to get your creative fingers dirty and start working on your first few level drafts.

Before you get stuck in, ensure your level is set to 512×512 or 1024×1024 with MPT set to 1. Go to the terrain editor and import your heightmap. Don’t be surprised if all you see is water, or a very tall terrain. Lumberyard, like Cryengine, sometimes reads height a little too enthusiast­ically. There’s an easy fix for this, though.

In the Terrain Editor, go to Modify, and select Set Max Terrain Height. Set it to somewhere between 128 and 256, depending on how low you want your terrain. Then you can re-import your heightmap, and with the first import controllin­g the height, the second import will adapt, and display correctly this time around.

14 FIX ANY HEIGHT ISSUES

One issue you may run into when loading a ‘low’ terrain, is that it can turn into a small archipelag­o. There are two ways of getting rid of that. One is to select Remove Ocean in the Modify menu. The other is to lower how far the water reaches up to the terrain by selecting Set Ocean Height and setting it around 12, depending on your terrain’s size and/ or height.

15 ADD A COLOURMAP

Do a Smooth Slope from Modify if your terrain is a little blocky. Then, if you want to import your colourmap as a low detail texture, go to Tools while still in the Terrain Editor, and select Export/import Megaterrai­n Texture. Import your map. Look at the map that comes up when the Exporter/importer loads and you’ll see it’s set to 256 or higher. Click Change Resolution and set it to your own terrain’s resolution, depending on your map. Click Close.

16 ALL SET!

Now you’re all set to start blocking in your level. If you use the Gamessdk. Press CTRL+G often and use Grunt to keep things in scale. Click F1 to cycle between views.

Explore your levels by drawing paths and points of interest on your heightmap – save it out as a terrain layer texture, so you can test it as you design. In addition, explore simple primitives like boxes or spheres at the map points where you want to generate some interest to see how the walkthroug­h feels to you. Don’t worry, there will be AI later. Whatever you do, explore, experiment, and have fun!

 ?? setting props ?? Use the Alphatest slider under Opacity settings to tweak your leaves’ opacity maps
setting props Use the Alphatest slider under Opacity settings to tweak your leaves’ opacity maps
 ??  ?? 12a
12a
 ??  ?? open lumberyard Once you’ve generated all your maps, it’s time to open Lumberyard
open lumberyard Once you’ve generated all your maps, it’s time to open Lumberyard
 ??  ?? 10c One way to pack your FBX and textures for Lumberyard, is to use Neil Blevin’s classic Soulburner script for bitmap collection, as it’s more flexible than 3ds Max’s native tools open lumberyard
10c One way to pack your FBX and textures for Lumberyard, is to use Neil Blevin’s classic Soulburner script for bitmap collection, as it’s more flexible than 3ds Max’s native tools open lumberyard
 ??  ?? 10a
10a
 ??  ?? 10b
10b
 ?? know your splats ?? 8 Splatmaps, or weight maps, can be very useful for mixing and blending terrain textures in Lumberyard
know your splats 8 Splatmaps, or weight maps, can be very useful for mixing and blending terrain textures in Lumberyard
 ??  ?? using world machine It’s easy to generate the output maps you need in World Machine, including your low colour detail map 6
using world machine It’s easy to generate the output maps you need in World Machine, including your low colour detail map 6
 ?? know your scale ?? Make your engine import easier by making sure you untick the added pixel, and set units to kilometers
know your scale Make your engine import easier by making sure you untick the added pixel, and set units to kilometers
 ?? keep it simple ?? 5 3 Start simple, you can always complicate things later. Remember to check your terrain in Explorer View (F7)
keep it simple 5 3 Start simple, you can always complicate things later. Remember to check your terrain in Explorer View (F7)
 ?? terrain software ?? If World Machine’s nodal approach isn’t your cup of tea, you may want to give World Creator a go
terrain software If World Machine’s nodal approach isn’t your cup of tea, you may want to give World Creator a go
 ?? maintain scale ?? The average male is 1.72 metres tall and is 50 cm across the shoulders. Use a primitive or a Makehuman figure as a grunt to keep your modelling and scene to scale 1
maintain scale The average male is 1.72 metres tall and is 50 cm across the shoulders. Use a primitive or a Makehuman figure as a grunt to keep your modelling and scene to scale 1
 ??  ?? 2
2
 ??  ?? level block in Cirstyn shares her process for setting up a game level
level block in Cirstyn shares her process for setting up a game level
 ??  ??
 ??  ?? 13
13
 ??  ?? 14b Try adding a low detail Megaterrai­n map – it can make it easier to paint your details Adding detail
14b Try adding a low detail Megaterrai­n map – it can make it easier to paint your details Adding detail
 ??  ?? 14a
14a

Newspapers in English

Newspapers from Australia