Custom Terrain Tutorial

A secret forum for people who preorder Overgrowth!
Post Reply
Dark
Posts: 38
Joined: Thu Dec 11, 2008 7:02 am

Custom Terrain Tutorial

Post by Dark » Wed Sep 02, 2009 5:57 pm

Ok, so lets make a custom terrain for use in OG shall we :D
I made a sepperate post since its rather large :)

I won't use allot of pictures as i think that playing around with a alpha piece of software gives you enough intelligence to search for some buttons :D

For this tutorial i will be using L3DT :) but you can use any program, even paint :3
(fun fact: tutorial started out as a test to show the program when i recommended it over World Machine)
You can download the Standard Edition here (Standard edition is free)

Install it, boot it up, ignore the tutorial in there, and press new map *takes a breath*
You can choose how to generate a map, the only ones we are interested in are the top 2 (Designable map and Blank designable map)
They are practically the same, only the first one uses a wizard to generate the terrain and the other one is completely do it yourself.

Let's pick the first one. Press next

Set the following options:
Width: 2048
Height: 2048
Horiz. Scale: between 1 and 10
Check Edge Wrapping
the horizontal scale defines the detail of the overall map, it also increases generation time, ain't that a peach. I left it at 1
Edge wrapping can be use full to, it generates a tillable landscape, so check it

NEXT!

HF/DM defines how many tiles exists.
L3DT uses tiles to define properties, you can give it several including height, erosion level, sea/lake, etc...
Again, higher = more detail + increase in generation time
I left it at 32

NEXT!

In this screen you can set the generation parameters for the terrain.
Most should be pretty much self explanatory. Just remember, OG doesn't have water yet (hint hint :p) so the Average altitude should be more towards land and lakes to few.
Hint: setting erosion to strong explodes generation time >_<

Climate defines what textures will be generated, usually you want either Temperate, Desert or Tropical
Lets pick tropical, its cold here :3

NEXT!

Now you can choose what to generate, only let it do the Design Map for the moment. the other steps will come later.

Now you can see the overall map design (with the tiles). pressing the edit button in the toolbar allows you to finetune parts you think aren't going to be good.
Do that if you want, its a tutorial, i don't care allot at the moment :)
If you do edit, mind the rel. checkbox, it stands for relative(duh), make use of it when you set height and such

Now, press the Calc. button (toolbar), leave the check mark at heightfield and press Ok
BRB!
The time it takes will be based on your settings, in general, higher erosion means longer generation time.
After its done you should see your heightmap :) You will also see some weird red and green lines.
These are used so you can define the height more clearly, lets turn them off, theyr anoying: View > Display Effect > Show Contour Lines
There, much better :)

Next step (Calc button, were doing everything step by step)

The water map is not very usefull for us yet, but it will be in the future, so leave it at default and let it rip! or not, up to you :3
If you want you can skip it, just remove the checkmark in front of water map.
we do need attributes map tho, so place a checkmark there and press ok
this one shouldn't take very long.

NEXT STEP!

Terrain normals are not needed, since OG generates them itself, generating them takes 4 seconds or so, so it aint a biggy

NEXT STEP!

The lightmap ain't important either, but it affects the color map a bit
i usually load the afternoon preset and change the Elevation a bit.
Uncheck water effects at the next screen (i told you enough why >_<) and press ok
You can allso uncheck use shadow maps because overgrowth has real time(-ish) terrain shadows

Next step is the texture map :)

Uncheck use light map here to and put max anti aliasing up to 32x for max quality
The high res texture option won't work because the free version only allows for 2048 x 2048 map sizes :(
But oh well, its free so don't complain. you don't necessarily have to make a mosaic map, this will just cut up the end texture in a number of parts
now hit ok

Aaaaaaaaand done :)
You now have all the necessary maps for OG (we only need 2 tho)
You can get a preview by pressing the 3D button in the toolbar. but i find this not such a good representation for some reasons. i call it preview for nothing :)

Now press File > Export > Export Map......
We are gonna export the Heightfield as png and the texture map as TGA (i'm not gonna say this again so pay attention!)
NOTE: sometimes it may ask you to save the project, L3DT will generate all project saves, resulting in 10+ files around 130mb total, so make sure to save the maps in a subfolder then for easier finding :D

Now we should have:
Heightfield in PNG format (hm.png)
Texture map in TGA format (color.tga)
i putted my used names between ()

I havn't tested it with other formats, but those give the best quality :)

Now lets get it into OG :D now is when the fun starts (this is sarcasm, annoying things will happen along the way >_< but remember, its alpha software)

Go to your OG folder
and make a new folder in /Data/Textures/Terrain
I called mine OGTutorial, copy the 2 files in there if you made it
Now we need to make the levels file, this is the file that all the problems gives i think :)
Go to /Data/Levels and create a xml file there (just save as name.xml with notepad or so, i'm not gonna explain it (see the note regarding alpha software and intelligence)

Now copy&paste the following into the xml file
<?xml version="1.0" ?>
<Terrain>
<Heightmap>Data/Textures/OGTutorial/deserttest/hm.png</Heightmap>
<DetailMap>Data/Textures/ground_normal.tga</DetailMap>
<NormalMap>Data/Textures/Terrain/OGTutorial/hm.png_normal.png</NormalMap>
<ColorMap>Data/Textures/Terrain/OGTutorial/color.tga</ColorMap>

</Terrain>
<Sky>
<DomeTexture>Data/Textures/skies/Blue2.tga</DomeTexture>
</Sky>

<SpawnPoints>
<SpawnPoint t0="0.000000" t1="140.000000" t2="0.000000" s0="1.000000" s1="1.000000" s2="1.000000" r0="0.935894" r1="0.057120" r2="0.347610" r3="0.000000" r4="-0.054953" r5="0.998357" r6="-0.016100" r7="0.000000" r8="-0.347960" r9="-0.004034" r10="0.937498" r11="0.000000" r12="0.000000" r13="0.000000" r14="0.000000" r15="1.000000" />
</SpawnPoints>
The text in bold should point to your files.
hmmm....you don't have a hm.png_normal.png file? this file is auto generated by OG
as you can see its just your original name with _normal.png after it. you can try to fill it in now, or fill it in after its generated

DONE!
yeah seriously :) the rest is handled by OG
Start up OG, press the load button, enter the name of the xml file you made (don't forget .xml at the end)
Check the log window, you will see it generating a cache file of your map and decimating it (optimizing it)
And there you go :D you can walk around on your map :D well...probably not
Its more likely that it crashed
stupid piece of...don't swear now :) remember its alpha software :) it will be fixed later on.
There are 2 things you can do right now:
- Exit OG and try loading again (preferred method)
- clear your caches

keep loading usually works for me. but clearing your caches can help :)
how you say? well, go to the folder where you stored the 2 maps, youl see that 4 files appeared, those are the cache files (and the normal map), you can safely delete those, they will be regenerated next time you launch the map
there is one more, in the root folder of OG you will find 2 files called terrainlow, delete those to

so you finaly get it to load huh...but oh no, your FOV is screwed?
solution: enter Camer.setFOV(90) in the console

aaaah there is the map in all its glory, there is only one problem left.
The map probably has a bit of a height problem, this is easily fixed tho, but it takes a while
you just need to tone down the brightness of the heightmap
but since you don't allways know how much youl have to try and see alot, combined with the constant errors *sigh* you know what i mean >_<
After you changed the brightness and still see no difference, then you should delete the heightmap cache file, its called [nameofheightfield].[ext].cache
if you set the value "wrong" as in that it does not look like it was in the L3DT preview then the texture will be slightly to way off, play around with the brightness or accept it

last bad thing...if the decimating step seems to be stuck, don't try ctrl+f5, its a visual studio thing
this is the worst error of all imo
it will generate a 300mb+ cache file for unknown reasons, only thing you
sometimes its just stuck tho
it usually happens for me when i don't reset the color mode back to grayscale, other times its just random

that should be it :) you will get allot of errors and headaches from making terrains at the moment, and i hope wolfire will make it smoother in new releases :D but always remember, OG is still alpha :) it won't stay like this :D

this is my result:
Image
(il remove the arrow next time i take a screenshot)

il answer any questions you have :D
for the record, it was 1 am when i finished the tutorial + i didn't feel like a serious one, so its full of grammatical errors, but hey, see me care :3

User avatar
Azminday
Posts: 38
Joined: Sat Jul 11, 2009 6:16 am
Location: Cincinnati OH
Contact:

Re: Custom Terrain Tutorial

Post by Azminday » Wed Sep 02, 2009 10:54 pm

wow, this is very complex. but after hours of fiddling i finally got it to work. :mrgreen:

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Custom Terrain Tutorial

Post by Endoperez » Thu Sep 03, 2009 12:26 am

Could you explain what's the difference between Terragen and L3DT?

My quess is that L3DT only makes heightmap, while Terragen makes heightmap and also clouds, sky and lets you render the final image. Are L3DT's heightmap tools that much better than Terragen's?

Dark
Posts: 38
Joined: Thu Dec 11, 2008 7:02 am

Re: Custom Terrain Tutorial

Post by Dark » Thu Sep 03, 2009 5:09 am

Azminday wrote:wow, this is very complex. but after hours of fiddling i finally got it to work. :mrgreen:
its actually not not THAT complex, its just the quirks of getting it to open in OG

i prefer L3DT over terragen since you have much more control over the results
if you see something is off, just go back to the design view, make some changes, and regenerate
In the tutorial i just generated a random terrain, but i usually go for a blank designable map
you can paint the terrain just like you paint a heightmap, but you can define the properties so the result is more realistic.

i have played around with terragen, but the results where to random, to uncontrollable
you can have completely random terrains to, but you still have the design map phase, where you can change the parameters to change the things you don't like.

but indeed, L3DT does not generate skyboxes, but then again, this was a tutorial about getting a terrain into OG, not skyboxes :p
allso, don't know for sure tho, but terragen can only generate cubical skyboxes right?
OG uses a different "format" for it :3

you can change the skyboxes easily (relatively speaking, getting terrain into OG looks easy to xP) by changing the xml

Code: Select all

<DomeTexture>Data/Textures/skies/Blue2.tga</DomeTexture>
just point it to your skybox :) you can have a look in that folder so you know what i mean with format :p

I am going to start on a xml tool to make new xml files now :)

SinKing
Posts: 53
Joined: Sat Jun 20, 2009 10:13 am

Re: Custom Terrain Tutorial

Post by SinKing » Thu Sep 03, 2009 4:01 pm

Is there a way to export this terrain model to ZBrush and sculpt it some more? It's really nice, but for some fine-tuning and a little more control, I think ZBrush would be the perfect tool.

Dark
Posts: 38
Joined: Thu Dec 11, 2008 7:02 am

Re: Custom Terrain Tutorial

Post by Dark » Thu Sep 03, 2009 5:32 pm

SinKing wrote:Is there a way to export this terrain model to ZBrush and sculpt it some more? It's really nice, but for some fine-tuning and a little more control, I think ZBrush would be the perfect tool.
you actualy can :D and if zbrush can output the grayscale heightfield again, then it can be integrated back into L3DT :)
just generate your heightfield (only that, the rest is just a waste of time for this)
NOTE: extensions > Azurite > show provides a better preview of the model, but no textures and no 3d editing tho
then, file export map > heightfield and in the format dropdown, choose one of the 3d formats(like .X or .OBJ)
import that file into zbrush and sculpt away :D
i don't know if its possible, but export the heightfield as grayscale in zbrush
then, open L3DT, choose file > import > heightfield, select your grayscale and there you have it :)
you can continue the generation process like nothing happend :D

there are some good things you can do
for example, export the heightfield both as PNG and as a 3D file
let OG make a normal map for it
in zbrush, open the model file and apply the normal map to it that OG generated
sculpt away, export the new normal map
overwrite the OG normal map with the new one
presto :D
i actualy think this is even better :p

EDIT: i checked, i got the terrain into zbrush, changed a bit but couldn't find out how to get greyscale map =<
BUT
after googeling around, a bump map would work to :D only thing is, don't know how :p will look it up tomorow but now i'm off to bed :3

SinKing
Posts: 53
Joined: Sat Jun 20, 2009 10:13 am

Re: Custom Terrain Tutorial

Post by SinKing » Sat Sep 05, 2009 7:34 am

Sounds awesome. I'm not good enough in ZBrush to model organic bodies, but if there is a reliable way to work with terrain, I guess that could be a nice thing to do. Now the next important thing to find out, if it also works with "Decimation Master", so you can reduce the polycount and keep impressive detail in your sculpting. I guess the texturing part could be a drag, but the results would surely be rewarding. Despite all the great tools in any engine, I often find the sculpting tools deliver either too much of the same or create unnatural looking boundaries between different kind of textures and meshes.
The only thing I'm worried about now is that this method is more complicated than learning how to do the same things with the editor provided. If you look at the remake of "Dear Esther" you see how much can be done in Hammer, provided you know how to use the tools to its fullest.

Dark
Posts: 38
Joined: Thu Dec 11, 2008 7:02 am

Re: Custom Terrain Tutorial

Post by Dark » Sat Sep 05, 2009 2:45 pm

decimation master won't have any effect, it reduces polycount yes
but
the engine loads the terrain based on a heightmap, wich is just a image, so polycount is decided by the engine.
It would be indeed a great way to make a terrain texture tough :D i don't think it will give alot of problems pulling off :)
then again, because if the way OG renders heightmaps, some spots in the texture will be a bit off

i tried the normal map thingy a bit but i couldn't get it working ._. problem is me being a zbrush noob :p
but now you mentioned it, i am going to try making a texture in zbrush.
Over at moddb, someone recently posted some textures he made using zbrush and they where awesome, looked very realistic, so i know zbrush can pull it off :D

SinKing
Posts: 53
Joined: Sat Jun 20, 2009 10:13 am

Re: Custom Terrain Tutorial

Post by SinKing » Sat Sep 05, 2009 4:18 pm

yeah, ZBrush is still 2.5 D because it was originally a meshpainting tool. It just evolved into the goddess of sculpting apparently.
And thanks - now I finally know what a heightmap is. I always mistook it for a full mesh, since I never understood what the button "generate heightmap" really means.

User avatar
m3nace
Posts: 406
Joined: Sun Jul 26, 2009 11:00 am

Re: Custom Terrain Tutorial

Post by m3nace » Sun Sep 06, 2009 7:48 am

when i load it the contrast between high and low terrain is massive compared to what i see in the 3d-preview in L3DT. Any one knows how to fix this?

Dark
Posts: 38
Joined: Thu Dec 11, 2008 7:02 am

Re: Custom Terrain Tutorial

Post by Dark » Sun Sep 06, 2009 8:27 am

just open it up in a image editor and lower the brighness a bit :)
i said it in the tutorial you know :p
the reason for this is that the highes (white) and lowest (black) values are not the same for L3DT and OG
you can change them in L3DT but i have yet to find them (didn't look either) >_<

User avatar
m3nace
Posts: 406
Joined: Sun Jul 26, 2009 11:00 am

Re: Custom Terrain Tutorial

Post by m3nace » Sun Sep 06, 2009 8:39 am

*_* bummer! Thx

Dark
Posts: 38
Joined: Thu Dec 11, 2008 7:02 am

Re: Custom Terrain Tutorial

Post by Dark » Sun Sep 06, 2009 8:45 am

your welcome :)

Post Reply