1. Sandbox Editor - EnvironmentPrevious tutorial: Sandbox - Vegetation
Next tutorial: Sandbox - Custom textures (under development)
You can go to my Tutorial Center for easier access of these tutorials.
We're pretty close to achieving the correct look and feel of this map.
1.1. Environment toolHowever, the overall colour of this map seems a bit wrong, doesn't it?
Let me introduce you to the Environment tool.
It's a beast, if you tame it, just like 3ds Max. We'll get to 3ds Max later on, for now let's just stick to the Editor, it's a whole self-contained beast by itself.
Let's look at this tool. Approach the Rollup Bar, select Environment.
I included the perspective view there. And trust me, it's going to change, a lot.
Let's take a look at the categories and their params:
Environment (Main category)
Color = The colour of the fog.
Start = Starting dist. of the fog
End = Ending distance of the fog
ViewDistance = The absolute view distance. Don't set it to 4096 or you might lag!
SkyBox = The skybox texture/shader.
Water = The water shader.
SunLensFlares = The shader for the sun lens flares.
Shore = Defines the shader for the water foam on the beach
SunWaterRefl = Sun water reflection shader. Currently not anywhere on my machine :'(
EnvColor = The colour which adds itself onto every entity, and terrain.
WindForce = The force value for the wind, used in vegetation
OutdoorAmbientColour = Used in Specular (I think), the colour of an ambient light
SunColor = Also used in Specular lighting, defines the Sun's specular colour.
SkyBoxAngle = The rotation angle for the skybox (not tested)
SkyBoxStretching = Defines how much the skybox will stretch once you're on higher ground.
ShoreSize = Size of the water foam on the seaside
SurfaceTranspRatio = How visible is the surface below the water
SurfaceReflectRatio = How much visible are reflected objects above the water.
SurfaceBumpAmountY/X = The bumpiness of the waves
BorderTranspRatio = How visible the borders (terrain) are
FogColour = Colour of the underwater fog.
FogDistance = How far can you see underwater
BottomTexture = Probably the underwater texture:
You get an illusion that the waves are "bending" the light.
Caustics = Underwater caustics flag
GeometryLodRatio = Level of detail distance for the... terrain, I think?
TextureLodRatio = Mipmap distance for the texture layers.
DefaultZoomTexture = Unknown to me
After a ridiculous amount of param explanations, let's finally start this, shall we?
1.2. Sun Lens Flares
Let's start with the Sun lens flares.
Click the parameter, and then click browse [...] button. Find this shader: "Flarelamp". Click OK. Now press Apply on the bottom.
The sun will change almost immediately. Basically, any shader beginning with the "Flare" word, should work as a sun flare.
OK, there are a few more things to do.
Go to the Water param, and find the shader "TerrainDeepWater". Then press Apply.
See? It reminds me of Crysis, or maybe Far Cry 3's water, except there are no reflections.
Now find the shader "OceanWater". Now it's much better:
There are other water shaders: TerrainWater, TerrainWaterPS20, TerrainWaterFP et cetera...
Now, let's fiddle with the water shader a bit:
Copy those values into each parameter:
SurfaceTranspRatio = 0.8 (so the water is less see-through)
SurfaceReflectRatio = 0.7
SurfaceBumpAmountX/Y = 0.1
BorderTranspRatio = 1 (so the sun is reflected better)
Press Apply, and we have seemingly better water:
See? It's really interesting to find some leftovers when it comes to these things (e.g. the TerrainDeepWater shader), because always someone can find them a good use.
1.4. Environment Colour
OK, now we just go to EnvColor, and then we change it a bit:
Just click onto the coloured box, that's how you get into the colour selection dialog.
1.5. Ambient colours and Sun colour
Let's see what happens, if I set OutdoorAmbientColor to pure red?
Now that's more like the red trees from Far Cry 4.
In my opinion, the OutdoorAmbientColor should be always around 69, 133, 122. That's the RGB value.
And the SunColor should be 50, 255, 192.
But, why? Because of the balance, otherwise this map would look crappy.
And now, let's see how the new environment looks like compared to the old one:
The Sun flare is smaller, which is kind of usual for games, the colours are a bit more correct, the lighting seems better, we have new water etc.