Author Topic: Shadowkillers epic terrain guide  (Read 9767 times)

0 Members and 1 Guest are viewing this topic.

Offline shadowkiller

  • Lead Level Designer
  • MWLL Developer
  • Lance Captain
  • *
  • Posts: 712
  • l33tp0intz: +38/-0
  • Particle Guru
Shadowkillers epic terrain guide
« on: January 30, 2012, 03:15:14 PM »
Hey everyone,

Well i have finally decided to pass on all my knowledge of terrains. This tutorial will show you a bunch of tips and tricks for making really good looking terrain. Its not a beginners tutorial for gc2 or sb2, its mainly my workflow i use for my terrains. It will require gc2, sb2, crazybump and photoshop.

First off we need to make our terrain in gc2. the first thing we need to do in gc2 is set the width and height of the map in the generation>general tab. This will make the proportions of the 3d preview in gc2 match what it will look like in sb2 and save you a headache later when your fine tuning it. Also enable keep seed, this will keep the noise from randomizing every time you generate.



For the sake of the tutorial lets use a modded preset. Click the presetbrowser button at the top of gc2 and select geocontrol>erosion>soft fluvial old + thin flows sediment.



Before you generate this preset go into the general tab and set the width to 4096 and the height to 512. Set the noise to 16 and enable keep seed. Then go into the isolines tab and erase the 2 isolines it has set up. For the sake of the tutorial we will let the random noise seed take care of everything. After that hit generate and you should end up with somthing like this... (will take a few mins to generate depending on your comp speed.)



After you have this terrain you need to export 3 files. The heightmap,  the colormap and the normalmap. Before exporting the colormap map sure you disable the shading in the view>relief menu so there is no baked shading. Also make sure you use 16bit .raw for the heightmap.



After you have the 3 files open up the colormap and normalmap in photoshop. We will first generate the cavitymap. This is done in crazybump however the crazybump normals are slightly different. You need to invert the green channel of the normalmap before importing into crazybump. Select the green channel and hit ctrl-i. The shading on the green channel will now appear to be lit from the bottom instead of the top. Select all the channels of the normal and hit ctrl-a to select the whole canvas and then ctrl-c to copy it. Open crazybump and select paste normalmap from clipboard. Select the displacement tab in crazybump and move the sliderbar on the enhance detail setting to 100%. You will now have a greyish texture with white highlights on the ridges and dark lines in the cracks.



Hit the little disk icon in crazybump and select copy displacement to clipboard. Go back into photoshop and paste this cavitymap onto your colormap texture. Select The overlay blend move and set to about 40-50% opacity.



You should now have some subtle shading in your colormap. The cavitymap makes the features of the terrain pop out more even when the lods wash them out. Be careful not to make the cavitymaps too dark. Play around with opacity settings.

If you are using a dynamic tod then you would stop here, however if you have a static tod then you can take it another step further by baking the shading into the terrain. This adds a whole other level of detail and can make your terrains look awesome.

To add the direction shading we will use the normalmap from before. For those that dont know how a normalmap works each channel of the rgb is for a direction of light and is shaded accordingly. The engine then overlays this shading onto the texture. The red channel is for shading when the light is to the left or right of the object. The green channel is for top and bottom shading. The blue channel is for when the light is directly above the object shining straight down onto it. The engine inverts the channel depending on the direction the light is being cast from. For example, the red channel appears to be lit from the right side in photoshop. If you invert the red channel it will appear to be lit from the left side. This is how the engine can handle 2 different light directions for 1 color channel.

We will use either the red or green channel of the normal for our baked shading. (blue is ignored) Select either the red or green channel (depending on that direction you want it to be lit from, invert for the opposite direction on that axis) and hit ctrl-a to select the whole canvas. (only on the channel you have selected though) Then select your colormap and hit ctrl-v to paste the shaded channel overtop of your colormap. Select the overlay blendmode (same as the cavitymap) and set to about 70% opacity. For this tutorial i used the red channel and its being lit from the right side. (uninverted)



We are almost done. In order to make the shading really pop out there is one more step. Select the channel in photoshop with the shade map you just copied over and run the image>adjustments>equalize. This will really make all of the subtle small details pop out ALOT more and give the shaded map way more detail and depth.



After that you can save the colormap as a 24 bit bmp. Dont save over the original unshaded version incase you need to redo it or tweak things later. When thats all said and done we need to import it into the editor. Open up a new map and select 4096x1 size (or whatever resolution you generated your terrain at) and give it a name. Open up the terrain editor window and select modify>set max height and input what you had set in gc2 and then import your heightmap. For this tutorial i set it at 512.



Next you need to set all your terrain tile resolutions to 1024. (to match the total size of the terrain texture)



After you set all the tiles to 1024 (they can be lowered down later for optimizations) you need to import the colormap. Select the import terrain texture option from the terrain menu at the top of sandbox.



In this next window that pops up you will see an overview of your terrain and all the grid locations. Highlight the top left box and click and drag your mouse across all the other boxes to highlight all the others. When all the boxes are highlighted hit the import button and select your final colormap. Wait a few seconds and a box will pop up telling you to save and generate your terrain texture. You only need to generate the terrain to the resolution of the texture your using. Since my colormap and terrain are 4096 i generate my terrain texture at 4096 resolution. Anything higher and i wont gain any extra detail but it will take MUCH longer to generate.



After you generate your terrain texture you should have somthing that looks like this.



Its lookin pretty good so far but we still need to set up the lighting. Since the light on the shading is being cast on the right side of the terrain we need to adjust the direction of the sun in sb2 in the terrain>lighting menu. The red arrows show the direction of the sun as the tod progresses. Also set the terrain occlusion to max.



After thats set lets apply a default tod. Open the tod menu and select import tod. Select the time_of_day_mp.tod from the crysiswars/editor folder and set the time to 07:00. Everything should match up and look something like this.




Congrats, you just made a great looking terrain. You can go back and regenerate your terrain texture again with the high quality option for even more detail however the HQ wont work unless you import the terrain texture again before you generate.
After you do all this you still need to apply surface detail maps. I can write up a tut for that later. A few tips in the mean time are to make sure you set your brush hardness to 0 so you dont destroy your awesome new colormap on the terrain. Also, when your making your colormap in gc2 (skipped in this part cause the preset already had one made) keep the surface details in mind. When adding different colors for rock, grass, sand etc try and stick to only angle and height selectors. That way you can match it up with the surface types in the editor.

However if you just want variation in your color for each surface type you dont need to stick to the height and angle selectors. For example, say you want some variation in your sand color so its not all the exact same color for all the sand. You can assign differant colors in errosion lines and other selectors but all that variation is still only for the sand surface type. Any transitions from one surface type to another should be restricted to angle and height. From sand to grass or rock for example.

After your dont with painting your terrain surface types you can go ahead and start decorating the terrain with various models. Try and avoid doing any major terrain mods in the editor, do as much in gc2 as possible. Small things can still be done like flattening out a section for a building or something but avoid adding hills and things.

Hope you enjoy the info, i cant wait to see what you guys come up with. ;D



(╯□)╯︵ ┻━┻

Angry coffee table flip attack!

Offline Aidan

  • Living Legend
  • *******
  • Posts: 2308
  • l33tp0intz: +47/-6
Re: Shadowkillers epic terrain guide
« Reply #1 on: January 30, 2012, 04:24:45 PM »
Nice tut SK !

 :)
When is your book published?   ;)





Intel Core i7 @ 3.50GHz, AMD/ATI HD6990 LCS, Catalyst Control Center V12.8, 6GB Tri-Channel Dram, 640GB HD, 128GB SSD, DirectX 11,  Windows 7 Pro (64 bit), Corsair 1200 Watt Power Supply, Liquid Cooled GPU and CPU.

Offline =KoS= Tripod

  • Alphatester
  • Living Legend
  • *
  • Posts: 3497
  • l33tp0intz: +138/-0
    • Kos Boards
Re: Shadowkillers epic terrain guide
« Reply #2 on: January 30, 2012, 08:46:11 PM »
aww yea

where do you get geocontrol anyway? is it free?

Offline linkinfrost

  • Apprentice Dev
  • MechWarrior
  • *
  • Posts: 319
  • l33tp0intz: +25/-0
Re: Shadowkillers epic terrain guide
« Reply #3 on: January 30, 2012, 09:23:34 PM »
Holy shit Shadow. That is an impressive guide! Definitely made it very straight forward too. Nice work.

On a darker note, I tried to apply this to flatlands and some where in the process I removed nearly all vegetation from the map without realizing it (across multiple saves so I lost the backups). lame!!!!!

I guess it's a good excuse to start a new map :)

Offline KorJax

  • Level Design (Reader of Stickies)
  • MWLL Developer
  • Living Legend
  • *
  • Posts: 2571
  • l33tp0intz: +45/-2
  • Memento Mori
Re: Shadowkillers epic terrain guide
« Reply #4 on: January 30, 2012, 11:04:49 PM »
Awesome guide. This will be useful as a refresher  ;D

Also, always make sure when you generate surface textures, you calculate terrain sky accesibility (not really nessicary to do except on the final pass though). This basically generates an in-engine "normal map" for the terrain. This makes distant terrain that is normally very low-quality, really pop out and still retain some of the lighting details. Combined with the cavity map that shadowkiller shows how to make, you'll have terrain that really pops. Note that terrain normal maps only appear on high settings or greater, they won't be visible on medium/low (while a cavity map or doing baked shading will still show up on all settings). I don't know why terrain normal maps only appear on high settings, considering any video card newer than 2005 will be able to render them without any trouble.

A lot of this stuff won't look good or seem good though unless you really do make your terrain in Geocontrol or similar terrain-editing programs. If you try and do these steps using only terrain made in the editor, it won't look good or some of the steps (like cavity maps or terrain normals) will appear to not do anything..

Holy shit Shadow. That is an impressive guide! Definitely made it very straight forward too. Nice work.

On a darker note, I tried to apply this to flatlands and some where in the process I removed nearly all vegetation from the map without realizing it (across multiple saves so I lost the backups). lame!!!!!

I guess it's a good excuse to start a new map :)

This shouldn't happen if you've hand-placed vegitation, which you should always try to do if time permits. If you did procedural vegitation, you'll just need to recheck which material layer you applied the vegitation to show up on.

aww yea

where do you get geocontrol anyway? is it free?

http://www.geocontrol2.com/e_index.htm

It isn't free, but if you want to go for terrain editing, GC2 is one of the best out there at the moment for it. There are plenty of free alternatives however, like Terragen and L3DT, though they are a little more clunkier to use, you can't do as much with them, and they don't support as large of heightmaps.

Offline shadowkiller

  • Lead Level Designer
  • MWLL Developer
  • Lance Captain
  • *
  • Posts: 712
  • l33tp0intz: +38/-0
  • Particle Guru
Re: Shadowkillers epic terrain guide
« Reply #5 on: January 30, 2012, 11:19:49 PM »
Awesome guide. This will be useful as a refresher  ;D

Also, always make sure when you generate surface textures, you calculate terrain sky accesibility (not really nessicary to do except on the final pass though). This basically generates an in-engine "normal map" for the terrain. This makes distant terrain that is normally very low-quality, really pop out and still retain some of the lighting details.

Actually this isnt totally accurate. The sky accessibility bakes in AO into the terrain colormap. This AO also takes models into account, so if i have a huge building it will bake in a darker AO area around the building into the terrain colormap. Doesnt have anything to do with normal maps afaik.


(╯□)╯︵ ┻━┻

Angry coffee table flip attack!

Offline linkinfrost

  • Apprentice Dev
  • MechWarrior
  • *
  • Posts: 319
  • l33tp0intz: +25/-0
Re: Shadowkillers epic terrain guide
« Reply #6 on: January 31, 2012, 02:25:54 AM »
On a darker note, I tried to apply this to flatlands and some where in the process I removed nearly all vegetation from the map without realizing it (across multiple saves so I lost the backups). lame!!!!!

This shouldn't happen if you've hand-placed vegitation, which you should always try to do if time permits. If you did procedural vegitation, you'll just need to recheck which material layer you applied the vegitation to show up on.


Not sure what happened, but literally all vegetation except for one or two grids got blasted. It was all hand placed too. I'm curious - aside from the better looks why is hand placed better?

Offline (Wilson)

  • Lead Developer
  • Lance Captain
  • *
  • Posts: 724
  • l33tp0intz: +60/-0
  • The Man
Re: Shadowkillers epic terrain guide
« Reply #7 on: January 31, 2012, 06:44:29 AM »
Nice work man, thanx for sharing ur workflow with the community.. I can also testify that the results garnered from putting this amount of effort into making your terrain are definately worth it. :)
"Engage people with what they expect; it is what they are able to discern and confirms their projections. It settles them into predictable patterns of response, occupying their minds while you wait for the extraordinary moment that which they cannot anticipate"
- Attributed to Sun Tzu - The Art of War

Offline KorJax

  • Level Design (Reader of Stickies)
  • MWLL Developer
  • Living Legend
  • *
  • Posts: 2571
  • l33tp0intz: +45/-2
  • Memento Mori
Re: Shadowkillers epic terrain guide
« Reply #8 on: January 31, 2012, 06:50:44 AM »
Awesome guide. This will be useful as a refresher  ;D

Also, always make sure when you generate surface textures, you calculate terrain sky accesibility (not really nessicary to do except on the final pass though). This basically generates an in-engine "normal map" for the terrain. This makes distant terrain that is normally very low-quality, really pop out and still retain some of the lighting details.

Actually this isnt totally accurate. The sky accessibility bakes in AO into the terrain colormap. This AO also takes models into account, so if i have a huge building it will bake in a darker AO area around the building into the terrain colormap. Doesnt have anything to do with normal maps afaik.

I stand corrected! I just based that knowledge off the fact that the console command that toggles this effect refers to it as terrain normalmaps.

On a darker note, I tried to apply this to flatlands and some where in the process I removed nearly all vegetation from the map without realizing it (across multiple saves so I lost the backups). lame!!!!!

This shouldn't happen if you've hand-placed vegitation, which you should always try to do if time permits. If you did procedural vegitation, you'll just need to recheck which material layer you applied the vegitation to show up on.


Not sure what happened, but literally all vegetation except for one or two grids got blasted. It was all hand placed too. I'm curious - aside from the better looks why is hand placed better?

Thats an odd issue - never had it before so I can't really put any light on why it would happen :\

And it's better to hand-place most vegitation simply because Crysis's procedural vegitation system isn't really all that well done. It only takes into account the horizontal distance a player is, it has a very limited range, and anything outside of this limited range will pop in. It also isn't as efficent (performance wise) as hand-placed vegitation.

Hand-placed has the advantage of being able to actually adjust real view/sprite distances beyond the very-short procedural vegitation view distances, it looks more natural if you place it right, and generally performs better.

Granted these are things that have mostly a large effect for maps with enough vegitation to make that performance difference. Having some collision-less pebbles procedurally generate on some ground might be the best option if you want to save time, especially since the differences between hand placed in this case would be minor. As such, it's great for lots of small stuff like leaves on the ground. Plus procedural generation has the advantage of being able to change settings like size/view distance (as short as it is), etc on the fly while hand-placed vegitation is "permenant" (of course you can remove it later and re-apply).

In short: Just don't rely on doing your whole map with procedural generation if you can help it. While not so bad for small stuff, it looks awful on anything of modestly decent size (large bushes, trees, ferns, etc) and may end up performing worse.
« Last Edit: January 31, 2012, 07:00:37 AM by KorJax »

Offline shadowkiller

  • Lead Level Designer
  • MWLL Developer
  • Lance Captain
  • *
  • Posts: 712
  • l33tp0intz: +38/-0
  • Particle Guru
Re: Shadowkillers epic terrain guide
« Reply #9 on: January 31, 2012, 11:24:13 AM »
No idea why it removed your vegetation. The only thing i can think of is if you imported a diff heightmap so the vegetation was no longer aligned to the terrain.

As for procedural veg. You shouldnt use any procedural veg. Somthing to do with performance and also something to do with multiplayer. Cant remember exactly what it was but apparently it can cause issues on multi. If you look at the stock crysis MP maps there isnt any procedural veg. An easy way to distribute vegitation is the auto distribute object feature. Just set up the angle, height and density values etc and hit auto distribute and it will cover the whole terrain with those models. You can then go back and do manual touch up and placement of specific vegitation.


(╯□)╯︵ ┻━┻

Angry coffee table flip attack!

Offline (TLL)KitLightning

  • Resident Necromancer
  • Apprentice Dev
  • Living Legend
  • *
  • Posts: 6012
  • l33tp0intz: +524/-2
  • πάντα ρει, και ουδέν μένει
    • The Living Legends
Re: Shadowkillers epic terrain guide
« Reply #10 on: January 31, 2012, 05:12:57 PM »
*effing sausage* thats one sassy tutor shadowkiller ;D btw need map with only VTOLs and no other aerotech please ;) ;)
   

                 BUG Reports                                    Technical Issues                                       Install Errors

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." ~Albert Einstein
                                     "It'll take time to restore chaos" ~George W. Bush

Offline linkinfrost

  • Apprentice Dev
  • MechWarrior
  • *
  • Posts: 319
  • l33tp0intz: +25/-0
Re: Shadowkillers epic terrain guide
« Reply #11 on: January 31, 2012, 09:27:48 PM »
No idea why it removed your vegetation. The only thing i can think of is if you imported a diff heightmap so the vegetation was no longer aligned to the terrain.

As for procedural veg. You shouldnt use any procedural veg. Somthing to do with performance and also something to do with multiplayer. Cant remember exactly what it was but apparently it can cause issues on multi. If you look at the stock crysis MP maps there isnt any procedural veg. An easy way to distribute vegitation is the auto distribute object feature. Just set up the angle, height and density values etc and hit auto distribute and it will cover the whole terrain with those models. You can then go back and do manual touch up and placement of specific vegitation.

This is what I opt to do usually. Procedural vegetation is super ugly because of the spawning behavior as you move.

Offline CGB [Duffanichta]

  • Recruit
  • *
  • Posts: 186
  • l33tp0intz: +15/-0
Re: Shadowkillers epic terrain guide
« Reply #12 on: January 31, 2012, 11:52:35 PM »
I see .. left out a few steps.. thanks man! I will try it your way soon. Karma for You!

Offline Voxel

  • Recruit
  • *
  • Posts: 96
  • l33tp0intz: +1/-0
Re: Shadowkillers epic terrain guide
« Reply #13 on: February 01, 2012, 10:16:43 AM »
Thank you Shadowkiller for the excellent guide.

But I have a question. How can set the terms for the generation of upland and lowland areas in GeoControl 2? To make such a mountain in some places, but not randomly.
A longtime fan of the BattleTech Series. Playing a board game and all games MechWarrior and MechCommander.
And sorry for my bad English.

Offline Spooky

  • Living Legend
  • *******
  • Posts: 3653
  • l33tp0intz: +159/-37
  • my little pwny
Re: Shadowkillers epic terrain guide
« Reply #14 on: February 01, 2012, 12:09:17 PM »
aww yea

where do you get geocontrol anyway? is it free?

http://www.geocontrol2.com/e_index.htm

It isn't free, but if you want to go for terrain editing, GC2 is one of the best out there at the moment for it. There are plenty of free alternatives however, like Terragen and L3DT, though they are a little more clunkier to use, you can't do as much with them, and they don't support as large of heightmaps.

Just wanted to add that World Machine would be another (non-free) alternative.