Author : DanRobson


Reply
Reply
 
Thread Tools Display Modes
Swizzle's Avatar
Old (#1)
In this brief tutorial, I'll show you how to start setting up Landscape for use as terrain for environments. Before I start, though, I'd like to point out that there is a ton of useful info on the UDK help pages.

Here are some relevant links:
http://udn.epicgames.com/Three/Landscape.html
http://udn.epicgames.com/Three/LandscapeMaterials.html
http://udn.epicgames.com/Three/LandscapeEditing.html
http://udn.epicgames.com/Three/LandscapeCreating.html

This tutorial is going to distill the info in those pages down to the essentials to get you started with Landscape.

This WILL NOT be an in-depth tutorial.

If you want specific numbers and info on things not covered in this tutorial, go read those pages. There's a lot of info in them.


GETTING STARTED

The first thing you should know about Landscape is that it is a completely separate tool from Terrain, UDK's previous ground mesh creation tool. Terrain has a lot of useful tools, but the way it handles materials is a little bit clumsy and it doesn't take advantage of some of the polygon-pushing power that UDK now offers.

Landscape is compatible with DirectX 11 hardware tessellation and offers a very different but much more powerful material editing system (SPOILER ALERT: It's the material editor.). I'll outline a basic way to take advantage of this material editing system in my next post.

So, let's take a look at how to start working with Landscape.

In a new map, click on the Landscape button under Modes.


This should cause the Landscape Edit window to pop up.


We want to create a new Landscape, so scroll down to the section called Create New.


We're not importing a heightmap for this tutorial, so don't worry about that section. What we're worried about is Heightmap Size. Because of the somewhat complex way Landscape works under the hood, the numbers you're going to plug in here may look a little odd. There's an in-depth description of how it works here: http://udn.epicgames.com/Three/LandscapeCreating.html

In the Heightmap Size section, we want to plug in some pretty small numbers since this is just a test to make sure we know what we're doing. In the Size (vertices) boxes, type 63 for both. In Component Size, select 63 quads and 4 sections per component. Now just click the Create Landscape button.

You should now have something that looks a bit like this:


That large checkerboarded plane is your Landscape. How cute! If you want to add some sort of lighting, such as a DominantDirectionalLight, that will help with sculpting the Landscape.

From here, sculpting your Landscape is very similar to sculpting Terrain. All the tools in the Landscape Edit window have tooltips telling you what they are and information about them is available in the links at the top of this post. If you wish to sculpt some bumps and such, you can do so by holding Ctrl and clicking, just as you would with the Terrain tool.


THE LANDSCAPE MATERIAL SYSTEM

In a nutshell, the Landscape material system is really just an extension of the Material Editor. To take advantage of possibilities this offers, you will need to create a material that has your ground textures in it. If you don't know how to create a material and put a couple of textures in it, then this tutorial is going to get a little too complex a little too quickly for you.

Drop your textures into a new material. Your material editor should look a little something like this right now.


For the purposes of this tutorial, I'll just be blending two textures. These textures are available in the August UDK. Their filenames are T_CobbleStone_D and T_Cobble_02_DL. I'll also be using their normal and displacement maps in the next post.

To blend these two textures together, you're going to need two nodes introduced with the Landscape system. These are TerrainLayerWeight and TerrainLayerCoords. The first puts your textures into layers so you can blend them and the second applies the textures to your Landscape UV coordinates. We're only going to need a single TerrainLayerCoords node and this will be plugged into our texture nodes. We will need two TerrainLayerWeight nodes, however, since we want to have one layer for each texture.

Plop two TerrainLayerWeight nodes and one TerrainLayerCoords in the material editor. Then plug them into your texture nodes like this:


Now, that's all fine and dandy. However, there's a problem that may not be immediately obvious. Each texture layer you'll want to paint onto your Landscape needs to have a unique name, but you're working with a single material that only has one name. How to overcome this obstacle? Click on the TerrainLayerWeight nodes and type in a unique name for each of them under Parameter Name. You're going to use these names in the Landscape Edit window in just a moment.

This is what your material should look like now. Note the names of the TerrainLayerWeight nodes have changed to reflect the names of the layers they'll be assigned to.


We're now finished with our very basic material and we need to apply it to our Landscape. Save your material and close the material editor.

To apply the material to the Landscape, select it in the Content Browser and then double-click on your Landscape in the main viewport. This should open the properties for the Landscape.



Under the Landscape rollout, click the green arrow next to Landscape Material and close the properties window.

NOTE: If your Landscape turns black in the viewport, DON'T PANIC. That means your material has been successfully applied.

Now, finally, we can get to the part everybody wants to see: Painting texture layers.

LANDSCAPE TEXTURE LAYERS


Open up the Landscape Edit window if it isn't already open and scroll to the section under the Editing rollout labeled Target Layer. In this section, you should see a brownish box with the words Height map and an icon of displaced wireframe terrain. This is a texture layer, and it just happens to contain the height map for your Landscape, as opposed to a texture you'd want to paint color onto.



Notice the three Edit Modes you can select. For this tutorial, we need the one in the middle, Edit. Click the radio button next to Edit and it should change to look like this:



We're now going to add layers to paint onto the terrain. To do this, simply type in the name you entered for one of the TerrainLayerWeight nodes and press the + button to create the layer. Follow this same procedure for subsequent layers.

The Target layer section should now look something like this:


Now that you have a couple of layers, it's time to actually paint them onto the Landscape. Since the Landscape is totally black right now, it's a good idea to lay down a base using one of the layers so you can see what you're doing more easily. To do this, click on one of the new layers you created. It should be highlighted and the Height map layer should gray out. Now you can paint on the Landscape as you would if you were sculpting terrain by holding Ctrl and clicking and dragging.

Since you probably want to fill the entire Landscape with a texture, you should probably adjust the Brush Size, Tool Strength and Brush Falloff so that you can cover as much surface as possible and then click and drag on the Landscape. This should fill large portions with texture very quickly.

If you did everything correctly, you should have a Landscape that looks a bit like this:


Now that you have a texture applied to the Landscape, it's as easy as selecting the other texture layer and painting with it in the same way to achieve whatever look you want. The links at the beginning of this post have a wealth of information on how to use these tools in detail, so make sure that you read through them carefully if you have any questions about how to use Landscape and its texturing tools.

In my next post, I'll show you how to take advantage of the new material system that Landscape uses so that you can blend textures together in ways that were previously only possible on imported meshes. Vertex painting, bitches!
Offline , veteran polycounter, 2,608 Posts, Join Date Dec 2007, Location Fremont, CA  
   Reply With Quote

Swizzle's Avatar
Old (#2)
RESERVED
Offline , veteran polycounter, 2,608 Posts, Join Date Dec 2007, Location Fremont, CA  
   Reply With Quote

Bart's Avatar
Old (#3)
Thanks for this Swizzle Looking forward to see the next tutorial !
Junior Artist - Crytek UK

www.bart-j.com
Offline , spline, 195 Posts, Join Date Dec 2010, Location Nottingham UK / Poland Szczecin Send a message via MSN to Bart  
   Reply With Quote

Ace-Angel's Avatar
Old (#4)
Vertex painting bitches indeed! Can't wait for that post, awesome work mate
There's a very good chance that I experienced MORE problems, then all the internet put together in the area of 3D. Talk about being original for once...
Offline , veteran polycounter, 4,779 Posts, Join Date Apr 2011, Location Canada  
   Reply With Quote

Froyok's Avatar
Old (#5)
Quote:
Originally Posted by Bart View Post
Thanks for this Swizzle Looking forward to see the next tutorial !
Me too !
Fabrice Piquet - Technical Artist, Product Designer, Quality Assurance - Allegorithmic
Twitter - LinkedIn - Portfolio - Maya Scripts
Offline , polycounter, 1,091 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

Visceral's Avatar
Old (#6)
Awesome !
Offline , polygon, 731 Posts, Join Date May 2010, Location Sweden  
   Reply With Quote

Zipfinator's Avatar
Old (#7)
Thanks for the tutorial Swizzle. I made a quick landscape and am trying to paint the materials on it, but after I apply one material to one part it won't let me subtract or paint another material over it. Isn't Control+Shift+Left Mouse how you subtract?

EDIT: Figured it out... The brush strength was defaulted at 0 for some reason. Derp.

Last edited by Zipfinator; 09-02-2011 at 04:32 PM..
Offline , veteran polycounter, 2,647 Posts, Join Date Aug 2008, Location San Francisco, California  
   Reply With Quote

Jeff Parrott's Avatar
Old (#8)
Sweet Swizzle! Been thinking about messing around with landscape. This will definitely help.
Offline , veteran polycounter, 3,333 Posts, Join Date Oct 2004, Location San Rafael, CA Send a message via AIM to Jeff Parrott Send a message via Skype™ to Jeff Parrott  
   Reply With Quote

b1skit's Avatar
Old (#9)
Hey Swizzle, great tutorial. Any idea how to get normal maps to work with terrain?

I've tried using the same TerrainLayerWeight and TerrainLayerCoords blending mode material method described above, but it doesn't seem to work at all with normal maps?

The epic documentation is vague (and possibly outdated), the same setup works perfectly for specular and diffuse... I'm tearing my hair out.

Any help/advice appreciated

the same setup also works for the specular slot)
Visit my website at www.adambadke.com
Offline , line, 80 Posts, Join Date Jan 2010, Location Vancouver, BC  
   Reply With Quote

EvilPixills's Avatar
Old (#10)
Well executed. Looking forward to Part 2.
Gary Matthews - Environment Artist
Portfolio
Offline , spline, 145 Posts, Join Date May 2008, Location Daly City, CA  
   Reply With Quote

HeliosphanXtal's Avatar
Old (#11)
Hey, I also have the issue with the normal maps (like b1skit has I guess).
what I do basicly is this; I set up my spec and normal maps also with terrainlayerweight nodes, like the tutorial does with the diffuse maps.
I give these (layerweight-)nodes the same names as their difuse 'brothers'.
I noticed this works fine up to a set of 3 textures with each their spec and diffuse.
But from the moment I add a 4th one, the terrain texturing goes blank.
Is this because I hit the DX9 limit?
Or is there a better way to do what I am trying (so painting with diffuse, spec and normal maps for grass for example at the same time, instead of just diffuse grass)

cheers
Offline , null, 3 Posts, Join Date Oct 2011,  
   Reply With Quote

Sandro's Avatar
Old (#12)
Hey Swizzle, thanks. Have never used UDKs landscape system before, my question might sound silly

Basically I'd like to know if it's possible to pull this kind of environment using landscape.



Where there is little or no elevation data but need for complex material transitions (blending diffuse/normal/spec elements of several different concrete tiles, soil, asphalt, grass) Or am I better off designing custom tile-sets and using vertex paint?
Offline , polygon, 616 Posts, Join Date Aug 2009, Location Tbilisi, Georgia  
   Reply With Quote

b1skit's Avatar
Old (#13)
I think that would be remarkably easy to pull off. Just taking a look at that reference pic, I see the following materials:

- Plain Gravel/dirt
- Larger, darker gravel under the tracks
- Grassy, weedy dirt
- Weedy, garbage-littered dirt

You could easily blend those together, and then cover the landscape with:

- Static meshes for the trains, tracks (modular), fences, poles etc
- Foliage meshes (for the overgrown grass)
- Garbage meshes (add some 3D clutter on top of your garbage texture)

I actually think the HARDEST part of the scene is going to be your skybox. Large, flat areas that fade to the horizon are tough, you need to believably obscure the void from the players view (and this scene doesn't call for very dense fog). You're gonna have a lot of work building background meshes (buildings, highways, etc) that obscure your horizon than the work involved in setting up your landscape textures.

What does everyone else think?
Visit my website at www.adambadke.com
Offline , line, 80 Posts, Join Date Jan 2010, Location Vancouver, BC  
   Reply With Quote

b1skit's Avatar
Old (#14)
HeliosphanXtal: My normal maps don't blend at all. I can plug one normal map directly in and it will appear on my landscape, but if I attempt to set up the TerrainLayerWeight and TerrainLayerCoords blending mode material with my normal maps it doesn't work. Is this what you're seeing?

Are we just restricted to 1 terrain normal map?
Is anyone able to get more than 1 normal map to appear (or even better, blending normal maps?)
Visit my website at www.adambadke.com
Offline , line, 80 Posts, Join Date Jan 2010, Location Vancouver, BC  
   Reply With Quote

Sandro's Avatar
Old (#15)
@b1skit

Thank you, that's not the actual landscape I'm going to attempt, only ground portion is similar. I'm aiming for this quality of blend, where both diffuse, normal and spec elements are correctly blended using custom mask or heightmap.
Offline , polygon, 616 Posts, Join Date Aug 2009, Location Tbilisi, Georgia  
   Reply With Quote

b1skit's Avatar
Old (#16)
Damn, that's an amazing tut. BOOKMARK
Visit my website at www.adambadke.com
Offline , line, 80 Posts, Join Date Jan 2010, Location Vancouver, BC  
   Reply With Quote

HeliosphanXtal's Avatar
Old (#17)
b1skit;
I manage to blend 3 layers with diffuse/spec and normal maps.
Check my image here; it shows my shader up to the breaking point.
what I show in the image works for me; but once I add a 4th texture, it goes wrong on its normal map.

This is the link for the image if it doesnt show here;
http://imageshack.us/photo/my-images...intlimit2.jpg/
Offline , null, 3 Posts, Join Date Oct 2011,  
   Reply With Quote

HeliosphanXtal's Avatar
Old (#18)
I think the issue is related to the amount of texture samplers you can use; I noticed that it works up to 10/12.
Regardless if it are diffuse/specular/normal maps.
I ran some tests and it all seems to point in that direction;
this explains also why it worked for me up to 3 diff/spec/nm (total of 9/12 texture samplers) and also with some other tests I did; it works also with 5 diffuse/normal maps if you drop the specular.
So whatever combo you make, with a maximum of 10 texture samplers seems to work.

cheers
Offline , null, 3 Posts, Join Date Oct 2011,  
   Reply With Quote

b1skit's Avatar
Old (#19)
Hrm.... INTERESTING. I can test this very easily myself, but I'm wondering: Is it SPECIFICALLY limited to the number of unique texture samplers?

I'm guessing if it is, we still might be able to use some normal map blending trickery to create some extra variation if we go above 9 unique texture samples?
Visit my website at www.adambadke.com
Offline , line, 80 Posts, Join Date Jan 2010, Location Vancouver, BC  
   Reply With Quote

Lithium's Avatar
Old (#20)
I can only hope that you will post the next tute on vertex painting in landscape mode soon... I have been attempting to work this out for hours and it is driving me crazy.
Offline , null, 1 Posts, Join Date Oct 2011, Location Melbourne  
   Reply With Quote

King Mango's Avatar
Old (#21)
Just reserving a seat in the most clear cut and helpful tutorial I've found in two days of searching. Thanks Swizzle. :cheers:
Offline , spline, 189 Posts, Join Date Aug 2008, Location Los Angeles  
   Reply With Quote

MasteroftheFork's Avatar
Old (#22)
Ah excellent tutorial, this really helped a lot
www.DrewGarnerDesign.com

Alien Mech Thread

<======. \
<:::::::MasteroftheFork::::{O
<======' /
Offline , triangle, 410 Posts, Join Date Oct 2004, Location Vancouver Canada  
   Reply With Quote

Jessica Dinh's Avatar
Old (#23)
Thanks so much Swizzle, this is exactly what I've been looking for. Now my Landscape is all set up! Happiness! Looking forward to your vert painting tut ^_^
Offline , dedicated polycounter, 1,693 Posts, Join Date Nov 2010,  
   Reply With Quote

King Mango's Avatar
Old (#24)
bump
Best regards,
King Mango
Offline , spline, 189 Posts, Join Date Aug 2008, Location Los Angeles  
   Reply With Quote

synergy11's Avatar
Old (#25)
Awesome tutorial!
Offline , triangle, 333 Posts, Join Date Mar 2011, Location Toronto, Canada  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 1998-2014 Polycount