Nature Soft Occlusion Shader Unity


Every year, developers try to raise the bar by making all game components of the highest quality because they directly affect detailing, image realism, and the level of immersion.

Standard Shader PBR with Occlusion Highlight This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers. Trees must use the Nature/Soft Occlusion Leaves and Nature/Soft Occlusion Bark shader. In order to use those shaders you also have to place the tree in a special folder that contains the name “Ambient-Occlusion”. When you place a model in such a folder and reimport it, Unity will calculate soft ambient occlusion in a way that is.

Most of what is considered a technical component in a game is connected with light. The various game engines use different methods for transmission of light.

One of these methods is called “ambient occlusion” (AO).

The first method that allowed simulating ambient occlusion in real time was developed by the research and development department of the German company Crytek in the development of graphical components of the CryEngine 2 game engine. “Crysis,” released in the fall of 2007, is the first game on the CryEngine 2 game engine that used the ambient occlusion method called SSAO (Screen Space Ambient Occlusion). The screen space ambient occlusion method works as a post-effect, and it is calculated in the screen space.

Today, this technology is used in all modern game engines. Many people underestimate the ambient occlusion technology, but in its importance, it stands only behind the effect of global illumination (GI). Global illumination and ambient occlusion are complementary effects; their task is to approximate the effect of real radiosity that occurs in real life in the multiple reflections of light and shading.

GI models how light is bounced off of the surface onto another surface, whereas ambient occlusion approximates the shading effect from GI.

This article highlights the meaning of ambient occlusion, the main AO algorithms, and their use in virtual reality (VR).

What Is Ambient Occlusion?

Ambient occlusion is a shading and rendering method used for global background or indirect shading of objects.

This method is used to add more realism to the render because it creates soft global shadows that contribute to the visual separation of objects.

This is a global method, i.e., the brightness value of every point of the object depends on other objects in the scene.

Shadows do not remain black, they dissipate, creating halftones and obscuring those places in space that get less light.

In most cases, ambient occlusion is calculated by constructing a hemisphere of rays emanating from a point on the surface in all directions and then checking them for the intersection with other objects. Rays that reach the background or sky increase the brightness of the surface, while the rays that cross other objects do not add brightness.

As a result, points surrounded by a large amount of geometry are displayed as darker ones, and points with a small amount of geometry in the visible hemisphere are displayed as lighter ones.

This means that the shading effect will be more noticeable between any objects that are located close to each other.

Here is an example of ambient occlusion. As we see, its absence makes the scene flatter and deprives a significant part of the depth that our brain subconsciously perceives.

Thus, the main idea of ambient occlusion is to imitate and calculate shading only in that part of the scene that we directly see.

The Main Ambient Occlusion Algorithms

There are various shading algorithms that provide different degrees of realistic shadow-rendering from global illumination. They differ in cost, the speed of operation, and type of input data.

What is Screen Space Ambient Occlusion (SSAO)?

SSAO (Screen Space Ambient Occlusion) is the least demanding computer graphics technique for approximating the ambient occlusion effect in real time, although the actual quality of the effect can vary greatly from game to game based on how well it was implemented by the developers.

This effect is visible on bends and indentations, but it is not visible on flat surfaces and on convex surfaces because they do not block the light access to each other. This effect is very important because its absence makes the scene look very flat.

Principle of Operation

The screen space ambient occlusion method is pretty simple. When the screen space ambient occlusion effect is built, each point on the screen is examined, and a hemisphere for each point is created. The task of this hemisphere is to determine how much light this point will collect from the outside space or how many shadows from surrounding objects fall over it.

In order to do this, a series of samples are made in the sphere in which it is checked whether the point penetrates some kind of surface or not. If it doesn’t penetrate, then the sky is seen, and this point receives additional light.

In order to check whether this point is shaded, a hemisphere inside the Z-buffer is built, and it is checked if this hemisphere is occluded by the Z-buffer.

For this method, the normal map is used to determine the normal of the surface relative to which the hemisphere is built, but the shading is determined by the ray-matching method. Depth buffer ray-sampling occurs inside the texture in order to find out if this point is shaded in the indicated direction.

When the SSAO effect is used for forward rendering, then the whole scene should be rendered again in order to get normals and depth, full-screen texture in addition to the depth buffer that is obtained during forward rendering.

Therefore, in deferred shading, this process is simpler because there is one of the buffers in which the normals for each point pixel-by-pixel are stored.

Screen space ambient occlusion is very expensive since for a single point, on average, dozens of ray-tracings in different directions are required in order to determine which directions are available for light penetration into this point and which are not.

Therefore, in its pure form, it is almost never used because it is costly.

In this regard, different ways to optimize the decrease in the number of samples are used.

  1. Interlaced sampling results in artifacts due to the fact that in some pixels, ray-tracing occurs, but in other pixels, it doesn’t occur.
  2. Downsampling is used, not for the original image, but for a reduced image by half, and then the texture is stretched, but it can seem blurred.
  3. Temporal accumulation to re-use calculations from previous frames.

Other Methods that Can Save Resources

1. Baking ambient occlusion onto the texture:

In this case, this texture is used as part of the material that is applied to the model. In some models, it is baked as a Green/Blue channel of a Metallic+Roughness texture. If the effect of the screen method is totalized, ambient occlusion from the texture is added to it, then more detailed shading is obtained. This method compensates for the shortcomings of another method – baking AO onto lightmaps. A drawback of this method is that in the baked AO texture, there will be no shading from adjacent objects. In fact, in this texture, only a self-shadowing map can be obtained.

2. Baking ambient occlusion onto lightmaps provided that lightmaps are available

This method is “free” because lightmaps are available, but it decreases the baking speed and adds extra time to the calculation of the ambient occlusion effect. This method is more accurate because at the baking stage, not only nearby surfaces but also larger space can be analyzed in order to understand how the rays move. The main disadvantage is that lightmaps aren’t very detailed, and the size of the texel is 1/10 or 1/20 of a meter. This means that AO baked onto lightmaps will contain only the largest parts, and all minor details will not be baked. Therefore, this approach is suitable only for the transmission of very large details.

SSAO Settings

There are certain parameters that should be taken into account.

  1. The radius of the sphere or hemisphere within which ray-sampling is performed. The larger the radius is, the less defined the AO effect is.
  2. The density of the rays directly affects the high cost of the effect.
  3. The intensity of shading – a multiplier we multiply by.

In some games, this parameter isn’t too noticeable; but in other games, it is made very noticeable in order to highlight inner angles and cavities.

Problems Connected with SSAO

Though SSAO is an effective method, some problems can occur.

Problem 1: Insufficient shading

Here is an example of insufficient shading. The tank bottom should be shaded because it should receive little light, but since the depth buffer has no information about the back face, the screen space effect does not obscure these areas. VXAO gives higher quality, and more accurate shading is obtained since there is information about back faces.

Problem 2: Shading from back faces or any occluded for eye geometry

SSAO does not have information of what is beyond the edge, and during camera motion, shading appears at the edges. Wherever the SSAO touches the edges of the screen, flickering of this post-effect is observed.

Problem 3: SSAO in the screen plane

If this effect is made in the plane of the screen, then it should be taken into account that the radius should change on near and far objects.

SSAO: Pros and Cons

Pros

−It doesn’t depend on scene complexity. It works fully only with the pixels of the final image.

−It works with dynamic scenes.

- It can be easily integrated into any modern graphics pipeline.

Cons

−It is expensive, and it depends directly on the image resolution

– the higher the image resolution is, the more expensive this effect will be, and the more it will be necessary to simplify the algorithm by reducing the number of rays and reducing the radius.

- It is difficult to blur the noise correctly without interfering with depth discontinuities, for instance, object edges.

What Is Horizon Based Ambient Occlusion (HBAO)?

HBAO (Horizon Based Ambient Occlusion) is an algorithm for approximating the ambient occlusion effect introduced in 2008 by NVIDIA as an upgraded SSAO variant. This method gives a better visual result, and it is more expensive than SSAO. Principle of Operation HBAO uses a physically-based algorithm that approximates an integral with depth buffer sampling. There is a certain surface in which the angles are measured, and how much light will be occluded is checked taking into account not only the depth but the direction of the normals of the surface in relation to the world (horizon). Thus, the direction of the surfaces is additionally taken into account in order to obtain a more accurate result.

Pros

−Image quality is higher than the SSAO algorithm.

−It has additional hardware acceleration on NVIDIA video cards.

Cons

−It has an increased performance hit compared to SSAO.

−Rendering HBAO at reduced resolutions causes flickering of the image.

What Is HBAO+?

In comparison to HBAO, HBAO+ doubles the detail level of the AO effect, uses the latest DirectX 11 technologies, and runs much faster. Principle of Operation In order to calculate HBAO+, checkerboard rendering is used. For processing the shading, a part of the previous frame and half of a new one are used. As a result, fewer GPU costs are required, and flickering is removed because the shading is rendered in the original resolution.

Pros

−It requires fewer GPU costs, so it allows rendering the shading at the original resolution without decreasing it.

−It offers a speedy implementation with a far richer, more detailed image.

Cons

−Due to the temporal accumulation from the previous frame, in dynamically changing scenes and sudden camera movements, it can be noticed that the AO effect doesn’t adapt immediately.

What Is High Definition Ambient Occlusion (HDAO)?

HDAO (High Definition Ambient Occlusion) has been developed by the AMD company. This algorithm is based on the Gather4 technology, which collects four texels in one register. Principle of Operation HDAO and HBAO have been generalized to be the same. They have a similar principle of operation – the method increases the number of samples used when calculating the areas that should be darkened and renders at full resolution for a more accurate representation of AO.

Pros

−It has additional hardware acceleration on AMD video cards.

Cons

−This algorithm is designed for AMD video cards that, according to the Steam Hardware & Software Survey, are much less popular than NVIDIA video cards.

What Is Voxel Accelerated Ambient Occlusion (VXAO)?

VXAO (Voxel Accelerated Ambient Occlusion) is a method that works with voxels – the equivalent of a pixel in 3D. DirectX 12 allows doing retracing and voxelizing a scene in search structures.

By doing that, a slightly more accurate method that takes into account more complex scene geometry can be obtained. However, this method is even more expensive than other methods. VXAO is part of the VXGI (Voxel global illumination) surround lighting technology, which more correctly takes into account direct and reflected light. Principle of Operation The VXAO algorithm encompasses three passes: voxelization, voxel post-processing, and cone tracing. Voxelization means that triangle-based meshes are rendered into a 3D texture.

Its performance depends on the total number of triangles, their size, and the number of draw-calls needed to render them. Post-processing involves the processes of clearing, filtering, and downsampling voxels. Its performance depends on the total number of voxels produced during voxelization. Then cone tracing is conducted in screen space. Its performance depends on the shading rate, screen resolution, and the cone-tracing pass in 1080p resolution.

Pros

−Provides the most accurate shading.

−VXAO handles dynamic scenes quite well.

Cons

−Only high-end GPUs will be able to take full advantage of it.

−Depending on the implementation, VXAO can be 3-4x slower than HBAO+.

−It requires the latest GTX video card.

The Use of AO Algorithms in Virtual Reality

In virtual reality, SSAO is very important, but it is less important than for ordinary games. This is due to the effect of stereo vision.

With stereo vision in virtual reality, our brain sees the depth-buffer, reconstructing it from two stereo pictures. The more objects are shifted in the pictures, the closer they are to the viewer, and thus the brain actually receives depth information and recognizes it.

Thus, unlike PC games, where there is no depth information on the monitor and such effects like AO are needed to emphasize depth, in VR, even without the AO effect, the viewer understands the depth of the scene and much needs this effect much less.

On top of that, due to parallax, the eyes perceive slightly different images, and SSAO, due to its screen space nature, generates slightly different results for them. They make AO seem “illusive” as each eye sees mismatched AO results. Therefore, in larger AO radiuses, it can even make a bad, general image impression and break immersion.

Another aspect is that all screen space effects depend on the resolution – the higher the resolution is, the more they affect performance, especially such a “heavy” effect like AO.

A characteristic feature of virtual reality is that huge-resolution images are rendered, and the main constraining problem is the low-fill rate of the video card. Therefore, the inclusion of the SSAO effect can decrease FPS by almost two times.

Unity Ambient Occlusion

ARVI has tested many AO algorithms available on a Unity Asset Store and has come to the following conclusion. The test was conducted on the Dragon scene (FPS for GTX 970), all effects with default parameters:

  • No Effects: 146 FPS;
  • TSSAO (Temporal screen space ambient occlusion): 99 FPS;
  • SSAO Pro (Screen space ambient occlusion): 144 FPS;
  • SESSAO (Sonic Ether’s screen space ambient occlusion): 126 FPS;
  • Cinematic Image Effect AO: 126 FPS;
  • Amplify Occlusion: 144 FPS.

So, standard cinematic effects from Unity reduce FPS from 146 to 126, amplify occlusion reduces FPS insignificantly (from 146 to 144), SESSAO reduces FPS to 126, SSAO Pro (it is one of the fastest algorithms) reduces FPS to 144, and TSSAO reduces FPS from 146 to 99. These effects don’t work with Single and Multi-passes in VR.

For VR, Amplify Occlusion 2.0 can be a good solution. As it is stated, “Amplify Occlusion 2.0 completely discontinues HBAO-based techniques in favor of the much superior Ground Truth Ambient Occlusion (GTAO), bringing quality and accuracy closer to traditional ray tracing.”

This method supports VR Single and Multi-Passes, and it offers high quality, fast operation time, and a performance boost.

Also, take a look at Unity’s new implementation of AO in PostProcessing Stack v2. It has many interesting features such as scale-wise AO.

Bottom Line

Thus, it is better to use even the simplest AO algorithm than not to use it at all.

We are very excited by new ray-tracing features of DX12 and NVIDIA RTX video cards. It seems that in the future, AO methods will go in the direction of fully dynamic ray-tracing instead of Depth-Buffer ray marching.

Nature soft occlusion shader unity definition

Our ultimate recommendation is as follows:

If your computer copes with the game well without AO, then you can choose either SSAO or HBAO with the lowest quality to save more performance. Usually, these methods decrease FPS by no more than 10%.

If performance allows, then HBAO+ or HDAO are possible options. If you have a top-end graphics card, then go for the VXAO algorithm.

Interactive Comparisons

  1. Ambient Occlusion On or Off
    After
  2. Ambient Occlusion Ultra vs Ambient Occlusion Low
    After
  3. SSAO vs HBAO+
    After
  4. HBAO+ vs Ambient Occlusion Low
    After
  5. HBAO+ vs Ambient Occlusion Ultra
    After
  6. VXAO vs HBAO+
    After
Disqus: Your browser does not support JavaScript!
  • 2Step 1: Resolution settings
    • 2.1Heightmap resolution
  • 3Step 2: Modeling the terrain
  • 6Step 5: Adding trees and some more details
    • 6.2Advanced editing of trees
  • 7Step 6: Final lighting
    • 7.1Bake tree shadows
    • 7.2Adding advanced shadows
  • 9Step 8: Making the player itself dropping shadows

Preface

This tutorial is based on my – I have to admit: few – experiences with Unity’s built in terrain engine. I have tried to proof as many of my statements as possible but I can not rule out that it still contains some mistakes.

So please feel free to edit and correct any part of this tutorial. And if you would like to add something new do not hesitate to do so.I really like the idea of this place becoming some kind of central knowledge database for all questions on the terrain engine.

Step 1: Resolution settings

Some questions that might help to find the right setup

  • What size should the terrain have?
  • How do the boundaries of the terrain look like? Is it an island? Or are there some mountains or walls?
  • What would be the max height of the terrain?
  • Which details would i like to be part of the terrain? Hills, mountains, paths...
  • Do I really need a terrain? Wouldn't some modeled meshes do a better job? [Have a look at: Note: Restrictions on Terrains]

This first section is about finding the right setup for creating your terrain – about balancing performance and the level of detail. And as it isn’t easy at all to change any of the basic resolution parameters afterwards [except from the resolution of the heightmap] without losing a lot of your work, you really should pay some attention to do the setup carefully.

From the performance’s point of view less is more. So first we will have a look at the different resolution settings and how they will affect your 'freedom of design' and the performance – better: the number of draw calls and memory usage:

Heightmap resolution

Note:

If you don’t need very high mountains just set the height as low as possible because this will give you more accuracy on the y-axis.

Let’s say we will set up a terrain with the dimensions of 1000 x 120 x 1000m.


Common resolutions for a heightmap are 257px / 513px or even 1025px.

Note:

Any calculation or number below depends on dimensions of 1000 x 120 x 1000m.

Having a terrain with the dimensions of 2000 x 120 x 2000m the relations would look like this:

  • 257px heightmap resolution: 1px = 7.8m x 7.8m
  • 513px heightmap resolution: 1px = 3.89m x 3.89m
  • 1025px heightmap resolution: 1px = 1.95m x 1.95m

So on our terrain each pixel of the heightmap will represent:

  • 257px heightmap resolution: 1px = 3.9m x 3.9m
  • 513px heightmap resolution: 1px = 1.95m x 1.95m
  • 1025px heightmap resolution: 1px = 0.98m x 0.98m


Note: Restrictions on Terrains

  • Due to the 2d heightmap you won’t be able to build things like cliffs or caves.
  • You will always have to deal with the terrain’s chequerboard grid which might not fit to all the geometry you would like to have [e.g. nicely curved roads]
  • '...it can be tempting to make a heightmap have super-fine detail, but if you crank it up too high -- say below 1 m/pixel, you will have performance problems and the terrain will get all spiky as the polys get too small and close together. The smoother the terrain can be, the lower res the heightmap, and the smoother it will be to walk around on.' [Source: http://forum.unity3d.com/viewtopic.php?t=7240&view=next&sid=56dc862ba7982801e1fbd0e72c9ad660]

Of course it would be great to have a super-fine resolution but is it worth spending all the gpu power on the terrain?Does a high resolution heightmap help you create things you want to bake to the terrain?

Heightmap-Resolution 257px
54 draw calls / VRAM 22.4 MB
Heightmap-Resolution 513px
103 draw calls / VRAM 22.6 MB
Heightmap-Resolution 1025px
216 draw calls / VRAM 23.3 MB

Note:

The 257 and the 1025px resolution heightmaps have just been made by resampling the 513px heightmap using Photoshop. They are not manually optimized or reworked.

Trail and error

So let’s have a look at a pretty common example: Digging a path into your terrain.

In order to do that you will need at least 3 pixels of the heightmap: 1 for the left border or slope, 1 for the ground floor or the path itself and 1 for the right slope.[In case you don’t want to make your path follow the terrain’s grid you might even need 4 pixels.]

So a path [including slopes] will have following min. dimensions:

  • 257px heightmap resolution: 3px = 11.7m width
  • 513px heightmap resolution: 3px = 5.85m width
  • 1025px heightmap resolution: 3px = 2.94m

Comparing the 3 examples shown in the images on the right you will find out:

  • The 257px heightmap resolution won’t let you draw a path onto the terrain which could really be recognized as a path [adding textures would help of course].
  • The 513px heightmap resolution gives you a pretty nice result, but doubles the number of draw calls.
  • The 1025px heightmap is even nicer and more detailed of course, but with 216 draw calls it eats nearly half the number of draw calls suggested by Unity for casual games [which is 500].

Conclusion

  • Using a 1025px heightmap for a 1000 x 120 x 1000m terrain is no option. A 513px heightmap gives us a pretty nice level of detail at an affordable price.
  • So a resolution of 1px ≈ 2m x 2m might be a rough rule of thumb and should fit most of your needs.
  • Due to the large number of draw calls of a high resolution heightmap you should think about putting higher detailed geometry to
    • extra game objects or
    • maybe even a second terrain [in case you have a rather smooth landscape [terrain_1] and only some high and rough mountains [terrain_2]]

Detail resolution

Note: What does detail resolution mean?

'Details are the generic name for grass and small things to render close but not far away. So this is the resolution of the map. The bigger your terrain is or the finer the groupings you want of items, the bigger your detail map should be.' – DocSWAB

[Source: http://forum.unity3d.com/viewtopic.php?t=7240&view=next&sid=56dc862ba7982801e1fbd0e72c9ad660]


Does a higher detail resolution end up in a higher number of draw calls? Yes and no: No in case you do not use large clusters of grass but just a few smaller plants like in the examples on the right.

  • A higher detail resolution will help you to place details like small plants or rocks much more precisely [have look at the example 'placement of plants'].
  • In case you paint massive clusters like grass the number of draw calls will increase by factor 2 to 4.

So for our example I suggest to choose a 1024px resolution for the detail map.

'Each 64x64 chunk of the Detail Map is one draw call' – aNTeNNa trEE

Placement of plants

Example: Placement of plants

As you can see, the 512px detail resolution map won’t let you place small plants exactly at the slopes of the path, whereas higher resolutions will give you much more control without raising the number of draw calls significantly – at least in this case.

Although I would expect a higher usage of VRAM working with higher resolution detail maps, it pretty much keeps the same... Any explanation for this?

Control Texture Resolution

The control texture resolution describes the resolution of the splat-textures used for painting textures on the terrain.

'I haven't noticed any particular slow-downs with larger splatmap resolutions...what you want to avoid is going over 4 textures if possible, as each set of 4 (or partial set) requires an additional splatmap which causes the terrain to be drawn again I think, but that's a separate issue.' – Eric5h5

So let’s have a look at different solutions:


The 512px resolution won’t allow us to draw a well defined path onto the terrain: A 513px heightmap in combination with a 512px control texture resolution would end up in a pretty poor terrain... Choosing a 1024px control texture resolution would result in each pixel of the splatmap representing 0.5 x 0.5m of the terrain which still is quite a lot. But as the VRAM usage gets very high working with a 2048px resolution we will take the 1024px resolution in our example.


As Eric5h5 wrote above: Each Splatmap is capable of containing 4 textures. So using more than 4 textures will add a second splatmap which not only means 1 additional shader pass but also

  • Control Texture Resolution: 512px: 1.3MB more VRAM usage
  • Control Texture Resolution: 1024px: 5.3MB more VRAM usage
  • Control Texture Resolution: 1024px: 21.2MB more VRAM usage

[All values for uncompressed splatmaps. But 'splatmaps don't get compressed, since DXT compression artifacts would render the splatmap unusable to some extent.' – Eric5h5

Anyway – the splatmap resolutions that are used at runtime can be controlled by your project’s quality settings: Texture Quality to fit older graphic cards ]

Base Texture Resolution

'The 'base texture' is the fully composited terrain texture that is used in the distance or on old hardware that does not support fully detailed terrain rendering.' – Aras Pranckevicius

Well, I don’t use this...


Step 2: Modeling the terrain

Terrain Editors:

I haven’t tested these editors but you will find some words about them on Unity’s forum.

Unity Terrain Toolkit: http://unity3d.com/support/resources/unity-extensions/terrain-toolkit.html

Grome: http://www.quadsoftware.com/index.php?m=section&sec=product&subsec=editor

World Machine: http://www.world-machine.com/

Terragen: http://www.planetside.co.uk/terragen/

I would strongly recommend using Sandor Moldan's excellent Unity Terrain toolkit, which plugs straight into the unity editor, and can quickly produce some very believable results.

Being built into the Unity editor, means there are no export/import issues, the resulting height-field can be edited in Unity (with both the standard terrain tools and new erosion brushes provided by the toolkit), or exported to your favorite art program for fine tweaking.

The toolkit also provides a procedural texturing function which saves hours of tedious work, allowing you to perform a full terrain texture pass in seconds, and then just focus on areas of detail. Best of all it's free!There is an informative short video tutorial here: http://www.youtube.com/watch?v=YnO9RtarzHE

Failing that there are lot of external terrain editors around, but I have no experiences with any of those. I just use Photoshop or Fireworks to get a first draft of the terrain – most about dimensions and proportions: Where is a mountain, where a river or lake, what will the coast line look like... All other work I do with the built in tools which is not as comfortable as I would like it to be... I really miss a visual feedback of where you are drawing e.g.

Exporting a terrain from a 3d App

You can also use a common 3d app to model your terrain in case your are able to export heightmaps in the appropriate format. See the Blender tutorial dealing with this topic.

World Machine is another great tool for creating realistic heightmaps and texture alphamaps. It exports in 16 or 8 bit RAW format (Windows byte order).

With the TerrainImporter script, you can import height and texture maps very much like normal asset importing.

Exporting a terrain from unity

To export your terrain as .OBJ in case you want to modify it with an 3d app, you can use the TerrainObjExporter script.


Step 3: Setting up the basic lighting

It might be a bit confusing to set up the lighting at this point of work, but this is this is the way I do because all textures we apply to the terrain will be affected by the light and should fit the surrounding atmosphere.

Some words about fog

As I have seen a lot of projects not having fog applied I guess I should mention that I think adding fog is absolutely essential:

  • Fog adds much more realism to your scene.
  • Fog helps to cover the far clipping plane of the view frustrum and the fading of terrain details like grass.

So more fog please.

Some further information and images on fog [which is called aerial perspective in traditional painting] can be found here:http://en.wikipedia.org/wiki/Aerial_perspective

Getting the right Gamma etc.

'To ensure that your game looks good on a wide range of computers, especially PCs, it's important to have your monitor properly calibrated, and then adjust the lighting levels and texture brightness.'Read the full article here:http://www.unifycommunity.com/wiki/index.php?title=Adjusting_light_levels

So after having placed an avatar on the terrain [which we will need to check lighting]:

  • import your skybox and apply it to the scene using the render settings.
  • Create a directional light which will represent the sun. Make its position fit the lighting or even visual sun in the skybox.
  • Back to render settings: Choose a color for the ambient light which will affect the darkness of the shadows on any game object.
  • Adjust fog color and fog density so the terrain smoothly fades with the sky.
  • In case you have the pro version: Make the directional light drop shadows, this helps a lot [later on we will turn them off...].
  • Readjust all parameters untill you like the result.

This might lead to something like this: A bright sunny day – somewhere in the desert.

In fact I would not suggest building a terrain like this, as each detail, each blade of grass would drop a hard and well defined shadow on the terrain which is impossible to reach with Unity. And, as we are going to use a lightmap on the terrain, even large objects like trees can’t drop a hard shadow... anyway.


Step 4: Adding the first textures

Creating tiling textures

It is all about highpass filtering. A tutorial on highpass filtering can be found here: http://www.gamasutra.com/features/20010523/hajba_03.htm

A good texture tool which includes highpass filtering is luxology’s imagesynth. http://www.luxology.com/whatismodo/imageSynth/

Grass details‎

I love details

As I want the grass texture to fit the avatars size I use a rather detailed image... but the base texture doesn’t need a resolution higher than 512px just the detail resolution comes with 1024px in order to reduce tiling effects...

Adjusting color and brightness

As I mentioned before: In order to achieve a pretty good looking terrain you should work on the coloring and brightness of all textures to have them match your lighting. I do this by adding a lot of adjustment layers in photoshop. This gives my the possibility to apply changes afterwards without losing any information stored in the original image. It will also help to do different versions of the same texture in case you want to use it in another scenery [with different lighting...].

Getting the right Gamma etc.

'To ensure that your game looks good on a wide range of computers, especially PCs, it's important to have your monitor properly calibrated, and then adjust the lighting levels and texture brightness.'Read the full article here:http://www.unifycommunity.com/wiki/index.php?title=Adjusting_light_levels

Texture resources

How to modify the built in Terrain shader

Right now the built in terrain shader doesn’t support specular or bump mapping. But there is a trick to replace the built in shaders:

As we are going to build a terrain with some smooth grassy hills we choose a grass texture that tiles very well, as our base texture.

This texture was made using high pass filtering in order to avoid any visible tiling effects. Turned out as tiling perfectly but pretty boring.

So our 2nd texture is made from the same source material – but with less highpass filtering. This gets us a very detailed and lively texture but with high tiling effects, which is not practical for texturing large areas:


Mixing both textures using different brushes and opacity values gives us both: nice tiling and lively grass.

The third texture is a sandy one to paint paths with and to add more details to the grass:

The next texture would be rocks I guess.... always rocks. Hmmm, we will see. Let us just skip it for the moment, but keep in mind: We still have one texture for free [Remember: 4 textures for each splatmap].

Update: See also -> Terrain_tutorial#Abusing_the_lightmap for more tips on texturing the terrain.


Step 5: Adding trees and some more details

Now it is time to bring in some trees and plants.

Preparing trees

Adding more variety to trees

Unity's terrain engine allows you to paint trees with different sizes and colors all based on the same model or prefab. It doesn’t allow you to paint trees with different rotation angles due to the internal billboarding system.

For this reason a forest just made with one tree model looks pretty strange. But instead of adding more and more different trees I would suggest to use 2 or 3 different models of the same tree [The terrain asset ships with 3 different models of the scotchpine: wonderful work]. In order to get different models you can just duplicate the model and rotate the duplicate in a 3d app. Of course you can also do a completely different version of the model – which is quite a lot of work unless you don’t have the original model.[The demo package will ship with 2 rough versions of sycamore, 2 slightly different version of alder and some more.]

Of course you may also place a rotated tree manually [as game object] but this tree won’t billboard as it isn’t controlled by the terrain engine.


Precise placement of trees

In order to paint a tree more or less exactly where you want choose a 'Brush Size' of 1 and set 'Tree Density' to 100.This will give you most control.


First import your trees and make sure they are placed in a folder whose name contains 'Ambient-Occlusion':

'Trees must use the Nature/Soft Occlusion Leaves and Nature/Soft Occlusion Bark shader. In order to use those shaders you also have to place the tree in a special folder that contains the name 'Ambient-Occlusion'. When you place a model in that folder and reimport it, Unity will calculate soft ambient occlusion specialized for trees. The 'Nature/Soft Occlusion' shaders need this information. If you don't follow the naming conventions the tree will look weird with completely black parts.' – Unity documentation

The next steps would be:

  • First of all: Switch the terrain from vertex lighting to lightmapped and create the terrain’s lightmap using the built in 'calc. lightmap...' function [A resolution of 512px will be enough this time]. This is important for the lightmap controls the lighting of trees, grass and detail meshes.
  • Drag your tree into one of the preview panels next to your avatar.
  • In case the tree doesn’t fit the avatar’s size you will have to scale the tree by editing the 'Mesh Scale Factor' in the import settings of the original mesh [not the prefab]. Scaling the mesh or the prefab using the scale handles will corrupt its lighting.
  • Adjust its 'brightness' by playing with the sliders for baselight, ambient and direct occlusion and make it fit your scene’s lighting.

In case you can not reach an appropriate lighting on the tree [leaves or trunk are too dark e.g.] think of additionally adjusting the textures in Photoshop.

  • Add a capsule collider and make its dimensions fit the trunk’s size.
  • Then create a new prefab and drag the tree from the 'Hierarchy view' onto it.
  • Add a new tree to the terrain and assign the just created prefab to it.
  • Paint some trees on the terrain.
  • You might want to readjust the 'brightness' of the prefab [Don’t forget to select 'Refresh Tree and Detail Prototypes' from the terrain menu in order to make your changes be applied to the terrain’s trees.
  • Finally delete your prefab from the 'Hierarchy view'.


Advanced editing of trees

Painting trees onto the terrain works pretty well as far as the terrain is flat or the tree’s trunk is very tall like the alder’s one [from the original terrain asset]. But as we use the sycamore tree with a rather wide trunk we will get some 'floating' trees when painting on rough edges of the terrain.

Floating trees [nearly fixed in unity 2.6.1 / unity 3 beta]

There are several strategies to avoid those floating trees:

  • The cheapest one: Do not paint trees on rough edges... no option to me.
  • Edit the tree model in a 3d app and raise the pivot. This will stop mesh trees from floating but leads to floating billboards... [nearly fixed in unity 2.6.1 / unity 3 beta]
  • The only solution I could find to get both – non-floating billboard trees and non-floating mesh trees – is to work with 2 terrains: the first [and lower] one just for the trees [it is lowered by something around -0.5m/-1m], and a second one for texturing and all details like grass etc. This solution works very well but costs some extra draw calls.

Further details can be found here:http://forum.unity3d.com/viewtopic.php?t=16635


  • Is there any reason you can't just edit the tree meshes in your favorite modeling program? Simply extrude the trunk 0.5m so it goes below the pivot point, which stays the same. You will need to UV-unwrap the new polygons so they correctly display the bark texture. Alternatively, just select the bottom vertices of the trunk mesh and drag them down 0.5m. Note that this will stretch the texture a bit, but if you also move the next highest edge loop, or perhaps make a new edge loop halfway up the trunk and manipulate it, you can average out the stretching so it's barely noticeable. For bonus points, you could actually model the bottom of the trunk to look like roots, so trees near a cliff have their roots exposed a little bit. I don't know exactly how billboarding works, but I assume if you don't move or edit the branches or the pivot point, it will look the same. -WarpZone


In case you can’t afford to work with 2 terrains I would suggest combining route 1 and 2: avoid to paint on rough terrain and raise the pivot just a litte bit.

But as we have been very stingy as far as the heightmap resolution is concerned we can afford a second terrain.

Working with 2 terrains [nearly obsolete since unity 2.6.1 / unity 3 beta]

Creating the second terrain:

  • So just create a second terrain and make its size and heightmap resolution settings fit the settings of the first terrain. As we neither paint textures nor details on the 2nd terrain, set detail, control texture and basemap resolution to: 513 / 64 / 64.
  • Select the first terrain and export its heightmap.
  • Import this heightmap to the second terrain.
  • Lower the second terrain by something around 0.5m using the inspector
  • Add just the base texture and the tree to the second terrain and start painting trees again.


Note: On the image below the second terrain is colored grey and hasn’t been assigned the base texture

Getting rid of floating grass

Using the built in and common grass features ['Add Grass Texture' in the 'Paint Foliage' tab] of the terrain engine will lead to problems equal to those of the trees: floating grass.For this reason I hardly use any grass textures [at least not on rough terrain] but mostly detail meshes whose pivot is raised so they 'sink' into the terrain and 'climb' slopes pretty nicely:

Grass rendered as detail meshes 'climbing' a slope.

Construction view

As you can see the grass’ pivot is pretty high, so half of it will sink into the terrain.

This model comes with a 'high' number of polys which won’t increase the number of draw calls but the number of drawn polys of course.

Update: Using grass made from detail meshes can easily raise the number of polys up to 1 million [terrain + trees + details [grass]].On modern graphics hardware this should not be a problem – but older gpus will get a really hard job. So in case you are addressing a wide range of graphic cards I suggest to mix usual 'grass' rendered as 'grass texture' [on rather flat terrain] and 'grass' rendered as 'detail mesh' – just for the slopes and rough terrain.

Nature Soft Occlusion Shader Unity Tutorial

Is there any posibility to just add grass as 'detail mesh' and maybe switch to 'grass texture' on runtime if necessary?

Getting rid of alpha transparency problems [updated]

I often had problems with alpha transparency using the grass- or nature/Soft Occlusion Leaves shader: Small dark borders at the edge of the texture or geometry.In order to get [mostly] rid of those first set the texture from 'repeat' to 'clamp'.

Update: Make sure that, in the import settings, you have chosen the original size as 'Max Texture Size'. If you want to use a lower resolution version of the texture go to Photoshop and resize the texture there.

Additionally make sure that the uvs don’t touch the borders of your texture.Doing so will improve any detail mesh rendered as 'Grass'.

Update: On older graphics hardware [tested on ATI Mobility Radeon 9700 / 64 MB] you probably will still have those borders whereas the same player on more advanced hardware [ATI Radeon X1600 / 128 MB] won’t show any.

Optimizing grass’ coloring

As we already have grass painted on the terrain I like the mesh grass’s color matching the color of the base terrain texture.This really helps to cover the fade in / fade out of detail meshes and gives us a nice looking lawn.

Do so by adjusting colors and brightness of your grass texture in Photoshop and applying color values to 'Healthy Color' and 'Dry Color' in the 'Edit Detail Mesh' dialog which are pretty much white or grey.

Detail meshes and wind

Detail meshes won’t be affected by wind as far as any bending is concerned. Instead of bending they will do some color cycling which doesn’t look convincing and totally messes up our coloring.

I don’t know how to influence or deactivate this color cycling. So I strongly recommend to turn off wind for the detail terrain by setting all sliders to zero. Trees however still will be affected by wind as they are placed on the second terrain...

Any other idea?

Optimized painting of grass

Not working with 'low contrast grass' [see paragraph above] might lead to a visible pattern of the detail resolution map.

In order to reduce this visual pattern you also should not try to paint large areas with low density of grass. Due to our low resolution detail map this always will produce that kind of pattern.

Paint several clusters each with a high density of grass instead.

Do so by selecting one of the 'rough' brushes and setting opacity to 80 – 100.


Adding more details

Adding more details just works the same way like adding grass:

  • Import the model and texture.
  • Add it to the 'terrain_details' using 'Add Detail Mesh' in the 'Paint Foliage' tab.
  • Make sure you choose color values for 'Healthy Color' and 'Dry Color' which are pretty much white or grey.
  • Paint some examples of the new detail mesh on the terrain.
  • Adjust color and contrast of the texture using Photoshop in order to make them fit your lighting and all other colors.

Detail meshes vs. Trees

As we use detail meshes to paint grass on our terrain we should reduce the 'Detail Distance' in the 'Terrain Settings' tab to something between 30 – 90 metres in order to get an acceptable number of draw calls and polys. As these values do not represent a pretty far viewing distance and any detail beyond the detail distance just won’t be drawn I would recommend to use 'grass textures' and 'detail meshes' only for rather small or low plants.

Higher plants might be drawn as trees even if they are no trees at all because trees have their own distance slider and support billboarding.Next to this there are some more differences between trees an detail meshes:


TreesDetail Meshes
LightingAmbient and direct occlusion.Vertex lighting: one value for the whole mesh.
ShadowsSupport of real time and baked shadows.Not supported.
WindNice bending.Only color cycling or even not affected.
PlacementPretty much independent placement correct?Accuracy depends on detail resolution map.
VariationsHeight, width, color.Height, width, color, rotation.
Collision DetectionCapsule Colliders.Not supported.
LODBillboarding.Not supported.


Let’s have a look at an example: weed.

Weed usually has a height between 1 – 2 meters. Due to its height it

  • should bend in the wind
  • and be visible over a long viewing distance.

For these reasons we will add weed as tree:

Just look at the weed and do not pay much attention to the water please...

As the 'Nature/Soft Occlusion Bark' shader seems not to produce nice results on such tiny geometry like the weed’s trunk one, both trunk and leaves are rendered using the 'Nature/Soft Occlusion Leaves' shader. This will affect the bending but in an unimportant way.

As trees don’t support rotated instances of the original model our model does not contain just one single trunk and some leaves but comes as cluster of several trunks and leaves.


Step 6: Final lighting

In order to make our terrain more realistic, it is essential to add shadows.

Scenery with a common lightmap.

Scenery with a common lightmap and additional [baked] tree shadows.

Bake tree shadows

Hand-drawn tree shadows

Drawing tree shadows by hand is not much fun but it is really possible as long as you don’t have too many trees. And the result might even look much better than that using the script mentioned on the left.

In order to bake tree shadow to the terrain’s lightmap we need some scripts:

  • 'Assets/Editor/LightmapExport.cs' from the Island Demo

And in case you have Unity Pro:

  • 'Terrain/CustomLightmap' from the wiki: http://www.unifycommunity.com/wiki/index.php?title=CustomTerrainLightmap

If you don’t have the Pro version – well, then you will have to draw all shadows by hand...


Prepare the lightmaps

It doesn’t matter whether you draw or calculate tree shadows: The first step would be to create the terrain’s original lightmap in the wanted resolution [in our example: 2048px which will give us a shadow resolution of 0.5 x 0.5 meters]

Unfortunately the script 'CustomLightmap' doesn’t handle higher resolutions than 2048px. Additionally it does not compute any coloring of lights. So we will have use some workaround to create our lightmap:

Basic setup

Basic Setup of the custom lightmap script

  • Calculate the terrain lightmap [if you work with 2 terrains: the lightmap of the upper detail terrain] using the built in 'Create Lightmap' function from the terrain settings tab. Don’t tick the checkbox 'Shadows'.
  • Duplicate the lightmap from the project view using the 'Assets/Editor/LightmapExport.cs' script.
  • rename the duplicated lightmap
  • [if you work with 2 terrains]
    • Turn off the upper terrain.
    • Select the lower terrain and raise it up to 0 meters.
  • [endif you work with 2 terrains]
  • Choose 'Terrain/CustomLightmap' and render it. As we have already rendered a lightmap for the terrain’s geometry we will just render the tree’s shadow. Do so by choosing a high value for 'Heightmap shading contrast' e.g. 100.
  • Duplicate the lightmap from the project view using the 'Assets/Editor/LightmapExport.cs' script.
  • rename the duplicated lightmap
  • [if you work with 2 terrains]
    • Lower the tree’s terrain back to the initial value.
    • Turn on the upper terrain.
  • [endif you work with 2 terrains]

In case you want or have to draw shadows by hand:

  • Open the basic lightmap in Photoshop.
  • Add a new layer.
  • Start drawing shadows on the new layer.
  • Save the lightmap and assign it to the terrain [see next paragraph].
  • Check and correct the position of your shadows by switching between Unity and Photoshop while doing the adjustments...


Combining the lightmaps

Now we have 2 lightmaps: One for the terrain’s geometry and one just for the shadows of the trees.

Combine them by using Photoshop. Copy the tree’s shadow on top of the terrain lightmap and change the blending mode to 'multiply'. Adjust the darkness of the shadows using the opacity slider. Then save and import the combined lightmap.

Note: In the 'Import Settings' choose 'Texture Format: RGB 24 bit'. Otherwise the lightmap will get corrupted on exporting.

Note: The custom lightmap could contain some shadow 'artifacts' [from the terrain’s geometry] that you will have to erase.

In order to apply the new combined lightmap

  • choose the [upper] terrain from the project view [icon with palm...].
  • Then drag the new lightmap on the appropriate slot in the 'Inspector'.

That’s it. The result looks much better now – but still not good enough...


Adding advanced shadows

Looking at the picture above you will notice that:

  • tree shadows are a bit too dark.
  • detail meshes don’t drop any shadow.
  • the coloring of the detail meshes especially that of 'ground foliage' is pretty much the same and looks a bit boring.
  • trees that are in the shadow of another tree still have the same brightness.

Now we are going to correct this.

Improving tree shadows

As the overall tree shadows of the combined terrain lightmap appear a bit too dark we start by brightening them using Photoshop.

Then we manually add special shadows just to the trunk of each tree. Do so by:

  • drawing a rectangle and adding a gradient from black/100% opacity to black/0% opacity.
  • Scale, rotate and position it in an appropriate way.
  • Save the lightmap and switch to Unity to check your adjustments.


Adding shadows to detail meshes
The ground foliage already receives shadows from the trees. Additionally it slightly changes in brightness because of its healthy and dry coloring [white and grey].

Adding manually drawn shadows will make the ground foliage drop shadows on the terrain and influence its coloring/lighting for this depends on the terrain’s lightmap. So you won’t just get shadows but also some more lively coloring and lighting of the ground foliage.


Unfortunately our lightmap resolution of 2048px is pretty low compared to the size of the terrain which is 1000x1000m. So each pixel of the lightmap just represents a area of about 0.5 x 0.5m.

For this reason I will give you some more examples from another terrain which has the dimensions of 500x500m and a lightmap resolution of 2048px:

Bushes dropping shadows.

Flowers dropping shadows.

Reed [not the one rendered as tree as mentioned above but a different model rendered as detail mesh] dropping shadows.

Please note the differences of lighting on the the reed: this is the result of manually adding detail shadows.


Improving the lighting of trees

As you can see: the both trees on the right side are pretty bright – especially their trunks – although they should receive shadows from the left tree.

Lighting of trees can be controlled using lightmaps. But, as the terrain’s lightmap already contains the trees’ shadows, all trees would be black in case we used this lightmap: The lightmap color at the pivot of each tree nearly is black because of the trees’ shadows.

For this reason we will have to create a special lightmap just to light the trees:

  • Copy the combined lightmap which includes the terrain’s lightmap and the trees’ shadows.
  • Resize it to e.g. 512 x 512px as we don’t need much accuracy.
  • Brighten the terrain’s lightmap – otherwise all trees would become too dark.
  • Use the trees’ shadows as 'landmark' to find where to add some dark spots which will 'light' the trees in the shadow of other trees. [see the green boxes in the left half of the image].
  • Turn off the layer with the trees’ shadows and save the new lightmap.
  • Import the new lightmap to Unity and apply it to the trees using the script 'Terrain/Update Tree Lightmap Color' from the island demo if you work with just one terrain.
  • In case you work with two terrains the demo package will ship with a special script which allows you to choose the terrain and the lightmap you want to apply.

Update tree color using 2 terrains

  • Turn off the upper terrain.
  • Choose 'Terrain' -> 'MyUdateTreeLightmapColor'
  • Drag the lower terrain to the slot 'Terrain' and the tree’s lightmap to the slot 'Tex'.
  • Hit run.
  • Then turn on the upper terrain.

The result might look like this.

Note: This approach won’t add 'real' shadows to trees of course – it just darkens a whole tree...


Abusing the lightmap

In order to make the terrain texture more lively without adding more terrain textures you can abuse the lightmap by adding e.g. some colored noise.

1. Normal terrain texture.

2. Terrain texture with colored noise in the lightmap.

3. Lightmap with added colored noise.

Just try yourself!


Step 7: Dropping shadows on top of the player

Right now the player doesn’t receive any shadows from the trees or any other game object which would be high enough.

We will change that by adding a projector:

  • Add a projector.
  • Make it 'Orthographic' by ticking the checkboxes
  • Choose 500 [=half of the terrain’s size] as 'Orthographic Size'
  • Set the Position to 500/60/500 [=middle of our terrain]
  • Set the 'Far Clip Plane' to 60 [= Y-position of the projector – in case you have a higher terrain adjust those values]
  • Assign the default grey ramp as 'FallOff'

Now we have to create an appropriate cookie. Well: we can use the 'Custom lightmap' as a cookie as it contains just the trees’ shadows and maybe some shadows from other game objects. So:

  • open the combined lightmap
  • Copy the trees’ shadows layer to a new file.
  • Resize it to let’s say 512px – we don’t need much accuracy here.
  • Then create a new alpha channel and copy the trees’ shadows layer to it.
  • Save and import the cookie.
  • Assign the cookie to the projector.

Now you should have projected shadow on top of the lightmapped shadows.

Next step will be to restrict the projector just to our player or any other moving game object:

  • Select the player in the 'hierarchy view'.
  • Select its layer and choose 'add a new layer'.
  • Name it something like 'receives_projected_shadows'
  • Assign this layer to the player.
  • Switch back to the projector and choose 'Ignore Layers' = 'Everything' but 'receives_projected_shadows'

That’s it.


Step 8: Making the player itself dropping shadows

I think there are 3 ways to achieve this goal:

  • Adding a blob shadow projector to the player.

This would be rather cheap but wouldn’t give us a nice and accurate result.

  • Adding realtime shadows [Unity Pro only]. This would mean to assign pixel-lighting to the terrain... Even lowering the shadow distance to something around 15 or 20 meters [as we just want the player to drop real time shadows] this would be pretty expensive to render. Furthermore the blending between realtime shadows and the terrain’s lightmap at the edge of the shadow distance doesn’t look very nice.
  • Using some other method to project realtime shadows: The Character Shadow script from the wiki [Unity Pro only]:

http://www.unifycommunity.com/wiki/index.php?title=Character_ShadowThis one will let us combine the lightmapped terrain [and other lightmapped game objects] with our moving player, smoothly, so we will take this one.

Character Shadow script

Just attaching the original script to the directional light of our scene does not work well: On the backside of e.g. hills [seen from the directional light’s position] it produced very weird shadows even pointing to a complete wrong direction. So just assign the script to a game object that follows the player [but doesn’t] rotate. The demo package ships with a customized 'ThirdPersonController'-Script that will do the job. So:

  • Create an empty gameobject and name it: '001 Character_Shadow' – this name is used by the 'ThirdPersonController'-Script to address this object.
  • Place it next to your player between player and the main light.
  • Assign the Character Shadow script to this gameobject and drag your Player (or one of the player’s submodels) on the appropriate slot called 'Target'
  • Setup all other settings
  • Run the scene to see the script in action
  • Readjust the position of the '001 Character_Shadow' gameobject to make the projected shadow fit the lighting. Note: The closer you place it next to your player the fewer problems you will get on uneven terrain and geometries like cubes or walls.

Unity Occlusion Probes

Note: Make sure your Fadeout Texture is set to 'clamp' and has black pixels both on the right and on the left side. Otherwise the projected shadow won’t be limited to the area just next to the player.See: http://forum.unity3d.com/viewtopic.php?t=17680

  • Adjust the starting point of the projected shadow by adding, or subtracting, black pixels to the left side of the Fadeout Texture.
  • You might want to exclude more layers from receiving the projected shadow [right now only the 'water' layer is excluded]. Do so by editing line 121 of 'CharacterShadow.cs'

Nature Soft Occlusion Shader Unity Patch

---> myignoreLayer = (1<<targetLayer) | (1<<mywaterlayer);

The demo package

Download

Get the unitypackage [55 MB] at:

The demo package contains:

  • all specific scripts mentioned above
  • all models and textures shown in the webplayer and even some more

Most models and textures that ship with the demo package are free to use in any kind of project as far as it is done using Unity.But there are some restricted models which are taken from a crysis mod [You will find them in the folders 'restricted models']. They are free to use in non-commercial projects. In case you want to use them in a commercial project, please contact the original author, who offers a package containing more, and advanced, models:

Note: All lightmaps are edited with Fireworks and saved as png. Opening those pngs in Photoshop will give you just one flat layer. In order to get access to the different layers and objects you will have to use fireworks...‎

Real time lighted terrains

to be continued...

Nature Soft Occlusion Shader Unity Definition

Retrieved from 'http://wiki.unity3d.com/index.php?title=Terrain_tutorial&oldid=14809'

Comments are closed.