Creating a cohesive and appealing realtime scene in Unity

edited in Tutorials
I was recently asked by a member of the community how I achieved the overall "look" of this screenshot in Unity:

image

I was going to type a long reply to the user in response, but then I thought "why not let the entire community see, instead of only one person?".

I don't pretend to be the master of this process in any way, so I'm adding the large disclaimer of "this is my experience". Hopefully some of you find this interesting or helpful!

-----------------------------------------------------------------------------------------------------------

there are several elements to the overall procedure:

1. Post-processing
2. Texturing, modeling and normal map handling (normals as in 3D normals, not normal bitmaps)
3. Optimisation


As far as my colour grading process goes, I use the following:

Scion post-processing: https://www.assetstore.unity3d.com/en/#!/content/41369
Colour grading pack: https://www.assetstore.unity3d.com/en/#!/content/37668

Scion post-processing is an excellent product. It allows you to get all the benefits of a complex post-processing stack in one pass. This translates to faster performance, which is a big part of post processing success. By combining an LUT with another neutrally coloured LUT I'm able to blend the intensity of those premade grades to my liking. Give Scion a look - it's a powerful tool.

-----------------------------------------------------------------------------------------------------------

As for texturing - this is a complex learning process. My toolset for modeling and texturing:

Substance Painter: https://www.allegorithmic.com/
Blender: https://www.blender.org/
Wings3D: http://www.wings3d.com/

The effectiveness of my texturing process lies in several disciplines:

1. Baked and realtime ambient occlusion

Substance Painter bakes the internal shadowing of your models for you. The result is much greater visual depth. In the image up top, you can see it in the interior angles of the rock formations. For the trees, I manually added that via an image editor as foliage is generally better composed in other programs.

Realtime AO is also recommended for realism. It enforces the idea that the environment is physical and behaving accurately with regards to dynamic light.

2. Understanding of cool vs. warm colour in your environment and utilising this in the splatmap

The following is from a post I wrote on the Unity forums last year:

image

Above is a WIP screenshot of the terrain. I'm using the following tools from the asset store:

1. RTP (Relief Terrain Pack 3) https://www.assetstore.unity3d.com/en/#!/content/5664
2. UBER shaders (note the translucency on the edges of the leaves) https://www.assetstore.unity3d.com/en/#!/content/39959
3. Suimono water: https://www.assetstore.unity3d.com/en/#!/content/4387

1. I use textures.com to find suitable bitmaps.
2. I do some colour tweaking in Gimp to bring out greater richness. Usually via increasing contrast a little.
3. In RTP I create normal maps to give it greater meta-detail.
4. There are two textures being used here. They are:

image

The texture on the right is applied as a 100% opacity base texture for the entire environment. It carries some nice yellow and blue tints that come through in the final image.

Then, I apply the texture on the left in varying levels of opacity. 100% being brighter and 10% being very dark. Look at the left side of the screenshot - it seems richer because more of the blue and darker tones are escaping through the top layer of the left texture.

Remember that all images output a level of warm or cool colouring (warm being orange, cool being blue). One of the common mistakes people make when creating terrains in Unity is using textures that have way too much warmth. If you applied the left texture alone it would look garish and the colour tone would be false. The base texture fixes this.

There are two more layers of texture being calculated above these that are exclusive to RTP:

1. Perlin noise - a random map of shadowing that gives the terrain a nice, non tiling blemish. It gives greater depth to the landscape than a terrain without this.
2. UV overlaying - RTP basically maps each texture over the textures again but at different UV values. It gives more variation to the image (but you have to be careful not to overexpose the image by allowing the colours to stack. Selecting a low level of saturation helps).
3. The entire map is being given a slightly blue tint by RTP. Realistic light will be slightly blue because of the atmospheric scattering that occurs in our sky (hence a blue sky).

Finally, I break repetitive texturing by adding those little flower patches. They carry a lot of cool/blue colouring that gives the game a really "mature" look. Vignetting and depth of field via post processing adds some extra sheen to the image. Grass is applied to the terrain both via the built in grass shader and some models that I created myself for variation.

In the case of the original image at the top, I also break warm colour with the dirt texture.

3. Highlighting edges

Look at the rock structure. It has white outlines on the rock to help define where it ends and begins. People underestimate how helpful this is in signaling to the viewer the structure of an object. These outlines also occur in nature due to the narrowness of organic material encouraging light diffusion (although not in rocks particularly). It's my opinion that, at least in the long run, this isn't a good practice for more "photorealistic" games. Natural rock formations do exhibit lines and breaks in colour, but not in such a mathematical way. Photoscanning is arguably a better route going forward: http://makegamessa.com/discussion/4602/experimenting-with-home-photogrammetry-3d-scanning-on-a-budget-free

4. Boldness with colour (when using tonemapping)

It's also very important to be aggressive with your colour choices. Many times in the development of a scene, it can be tempting to avoid bold colour choice so that your scene doesn't become too one-dimensional or garish. Look at the following:

image

The above scene is actually primarily warm. Deep and rich reds (the throne and carpet), bright yellows in the lights and gold tinting compose it so. Because they all come from a similar family of colour, they appear cohesive and the eye can rest easily. I break this by adding a colour LUT that includes dark purple (look at the ceiling above the throne). In this regard, the scene is complete.

If you were to view the in-Unity scene view, it would appear a great deal brighter and less nuanced. By utilising tonemapping in Scion Post-Processing, these issues are equalised and the end result gleans the best from each object pleasingly.

-----------------------------------------------------------------------------------------------------------

Finally, it is important to remember that your scene is meant to be played - not viewed through a screenshot!

Tips for optimisation in Unity that I have discovered over the years:

1. Create smart UV maps

Everyone is guilty of this at some point (I know I am); generating messy and overly numerous UV islands. UV mapping isn't an enjoyable experience, so it's understandable!

However, when your UV maps are built in this way, they increase the load on your GPU. When Unity converts your model into a language acceptable to a graphics card, it relies on smart UV mapping to reference the geometry of your models. When you have a large amount of UV islands, it has to create more "links" between them. This means your vert/poly count goes up and performance drops.

A good UV map:

image

And a bad one (I'm feeling ill just looking at it):

image

2. Use 3D normal interpretation to cover up low poly surfaces (but only if you're comfortable with the visual change)

Unity is gracious enough to provide a choice when importing your model. You can choose to use the normal data supplied with your mesh, or you can apply a mesh-wide normal value. This has gotten me out of a sticky situation numerous times by allowing me to cover up low poly surfaces. Case in point:

image

You can see some of the normals in the rock formation. In that case, I have a moderate (50-70) degree of normal smoothing. You still want to retain the creases of large congruent faces on the sides of the rock, but you don't want people seeing polygons. The default of 60 is generally a good point to start experimenting with.

3. LODs are important, and you should use them

If you are making a game for commercial resale, don't be lazy and forget LODs. By replacing a complex close model with a lower quality one at a distance, not only are you saving a ton of GPU time, but you're also making a product that can be more visually complex. You have more to work with, which is always a good thing.

What's nice about modern 3D modeling software is that it's usually very easy to create an LOD model. I almost always use a decimate modifier in Blender and retain the original textures. Now, there will be instances where this is not suitable (UV islands may get too badly distorted). However, due to the distance they are viewed at this may not even be an issue. It also saves texture memory that would usually be used for LOD model bitmaps.

4. don't be afraid to lower texture resolution

There are several techniques you can use to improve performance through texture optimisation:

1. Lower the resolution of metallic and smoothness maps

Often times these maps are not subject to the same level of visual scrutiny as albedo and normal maps. You can get away with a lot in this regard!

2. Utilise detail maps

This is a basic principle for scalable detail. by combining a relatively intermediate resolution on your albedo map with a repeating detail normal or albedo map, you can simulate high-detail texturing without any of the cost. A similar principle is applied when perlin noise subtexturing is used on a terrain map - by adding variable colour backing to a more tiled texture, you can eliminate the visual ugliness that would usually occur.

3. Know when detail isn't necessary

There will be a lot of objects in your world that simply don't need complex textures. For example, the flowers in the scene up top are very low resolution. If the object is taking up mere pixels on your screen, do yourself a favour and downgrade that thing.

-----------------------------------------------------------------------------------------------------------

And that's it! Apologies for the length and visual vomit, but hopefully this provides some useful reference and information for those looking to learn a little about environment design. Let me know if you have any corrections or thoughts!

Comments

Sign In or Register to comment.