Not long ago Unity 5 has been released. There's lots of new things in Unity 5 but unfortunately the documentation hasn't been created yet.
Owing to my job as a technical artist I had to give up everything and upgrade a project to Unity 5. Recently Apple required developers to create 64-bit apps.
Once you open a project in the new version you'll see... nothing, or almost nothing. Unity 5 doesn't recognize old shaders that use alpha and just fills it with a black or white color depending on the shader implementation.
Good old Beast got retired so you'll have to rebake the lights too. All the info below is partially from Unity3d website and my experience.
To those who have updated to Unity 5.
A new standard Unity Shader for each platform is assembled separately, that is the unused fields won't be written into the resulting shader. Shader optimization is made due to the target platform. When a standard shader is building 2 important things are happening:
Standard shader parameters are divided into 3 sections:
Rendering mode is the way your shader is being rendered (transparent, semi-transparent, straight texture or a color).
Main Maps is the group of the properties that describes the main texture and its properties.
For properties Albedo, Metallic and Emission a texture is just an option and is NOT NECESSARY.
It's possible to set the color for properties Albedo and Emission but for emission a color can't be set when scale is set to zero.
Secondary Maps is the group of properties that describes the second texture which is laid on top of the main one.
An example of use from the video-tutorial is shown on a patterned fabric where Main Maps has a color and a texture set. Secondary Maps lays an embroidery-like pattern and its texture on.
I've found some documentation for GI but haven't come across any settings that worked out. That's why I was experimenting with different baking properties. All the properties were accomplished experimentally after reading manuals from the official site, blog and forum.
It came in really useful for me to download the Viking Village project.
Currently I'm working on a robust 3D project for tablets. I have got static shadows, light probes and a light source. I use directional light and the baking settings set to Mixed.
Surprise #1: You got 10 Gb cache in Local Settings. You may take a look at this disgrace by clicking Edit->Preferences.
IT'S not self-cleaning, you will have to do it with your hands.
About the first bake:
My system is located on 256GB SSD, that's why I transferred cache on a regular hard drive. To be honest I haven't noticed any difference in the bake speed even though plenty of textures are generated. The first bake of the scene with 100k polygons on default settings generated 200 maps (light + dir) that took 1 GB of memory (The process was carried out on a Intel I7-4770 processor, with 32 GB of memory). Unfortunately it was down the drain.
Currently Unity is using the technology of the real-time Global Illumination (GI) called.
It's using a dynamic GI for the direct lighting and shadows. They are calculated in real-time using GPU (Graphical Processor Unit) of the device.
Real-time GI needs to be pre-calculated. And you won't get a lightmap as it used to be in Beast, you will most likely get a LightmapSnapshot. This thing is pretty heavy because it contains copies of your Lightmaps. In the build this LightmapSnapshot less. I don't really know what's happening under the hood.
As an example I will use the Viking Village project, then Window->Lighting, tab.
This scene is baking for a half of an hour and it's really awesome.
The baking process is conducted in 2 phases: first one is divided into 11 sub-stages and the second one into 15. For Baked GI it glitches at 5/11 Clastering, 7/11 LightTransport, 4/15 Bake AO, 6/15 Bake Visibility 12/15 BakeInderect.
The lighting should be Baked or Mixed, which will help to switch smoothly between a baked and real-time calculated GI modes.
Properties Skybox and Sun are not required and can be left empty.
SkyBox a property to simulate the sky or other distant background
Sun. When a SkyBox is used you can set direction of the lighting or the (or any other big distant light source that is illuminating the scene. If this is set to None DirectionalLight is gonna be considered eternally-remote like the Sun.
Ambient Source is the source of dispersed light (Ambient Light) that is present all around the scene. There are 3 options for the source of the ambient light:
Ambient Intensity the brightness of the ambient Light in the scene, goes from 0 to 1.
Ambient GI. The property is only available when Precomputed Realtime GI and Baked GI modes are turned on. It allows you to choose a mode (Precomputed Realtime or Baked GI ) that is going to be used to handle the ambient light.
Reflection Source allows you to choose whether to use the Skybox for reflection effects (the default) or choose a Cubemap instead. If the Skybox is selected as the sourcean additional option is provided for determining its resolution for the reflection calculation.
Reflection Intensity level of the effect of Cubemap or Skybox reflections on the scene.
Reflection Bounces how many times the object reflection is going to be reflected. Speaking of that a mirror passage comes to mind.
Precomputed Realtime GI
Realtime Resolution sets the number of texels that are going to be used per unit of length for objects that are being lit by real-time GI. Usually this value is approximately 10 times smaller than the resolution of the baked ones. It can be a float number like 0.5.
CPU Usage determines how much you can load your CPU in the editor when baking textures in real-time.
Baked Resolution sets the number of texels (i.e. Texture pixels), that will be used per unit of length for the objects that are being lit by Baked GI. For a quick prototyping use values in range from 1 to 4.
Baked Padding distance on a texture between the baked objects in texels.
Compressed will the texture be compressed? If yes, it will less but unwanted artifacts may be introduced into the texture.
Ambient Occlusion relative brightness of surfaces in Ambient Occlusion i.e. shading on the internal angles. Higher values resulted in higher contrast between the shaded and lit spots. It can only be applied with the Indirect lighting calculated by the GI system.
Final Gather. When the option is enabled the final bounces that you get in the GI calculation will have the same resolution as the baked lightmap.
Following parameters influence reflected light in Realtime and Baked GI modes: Ambient, Light Bounces and Emissive materials but not the reflection.
Indirect intensity scales the brightness of Indirect Light. You can check your Indirect Light in menu Scene Window->Irradiance.
Bounce Boost determines to what extent the light is bounecd from one surface to the other. Reflected light is multiplied by this value. By default it's set to 1.
Directional Mode. It basically specifies whether you need to save the information about Directional and Specular into lightmaps when in Baked GI mode.
Atlas size Lightmap size when baking in Baked GI mode. I usually set it to 1024px.
A Lightmap Paremeters property has been added In Skinned Mesh Renderer. This property is in charge of the objects grouping, e.g. inside or outside of a building, by levels or scenes, manually or automatically set etc.
My custom setup for a quick bake.
Resolution. It is the resolution of the final lightmap in texels to world units.
Cluster Resolution is a ratio of the cluster resolution to the final lightmap resolution, i.e. the resolution which is used to calculate the reflected light.
Irradiance Budget specifies the accuracy of calculating the data about falling light for each texel on the lightmap, i.e. a pattern of falling light is written. Lower values result in blurring of the lit part borders, higher values lead to more distinct borders. Be careful with this parameter because it directily loads your memory and CPU when baking.
Irradiance Quality the quality of conveyance of the reflected light on a lightmap. The value doesn't affect the final result on a device, but increases precomputing time in the editor. As far as I understand this property is identical to the Final Gather Rays property in Beast but applies to reflected rays. The more rays you have the better quality you get but on the other side the bigger baking time you get.
Backface Tolerance. This allows to neglect the lighting of those texels that aren't sufficiently lit (e.g. the ones inside a mesh), and the calculation of their illumination is implemented by interpolation with the adjacent texels. Helps avoiding unwanted artifacts.
Modelling Tolerance is the maximal size of the holes in the grid geometry that can be neglected when calculating GI.
Edge Stitching. When the option is enabled UV charts will be baked with lightmaps, in order to avoid visual artifacts.
Is Transparent. If the property is enabled all transparent objects remain transparent while GI is being calculated. At the same time back faces aren't taken into account and the light is coming through the object. Can be used to make invisible surfaces radiate.
System Tag is a group of objects with lightmaps in one atlas. It's also the detailing that calculations depend on. A few System Tags are created automatically if there's plenty of objects in the scene. Different System Tags may be used whether for different levels in a location or for different level parts.
Blur Radius is the radius (in texels) of the blur filter that is applied to direct lighting during postprocessing. This radius is the distance over which adjacent texels are averaged out. Higher levels of blur tend to reduce visual artifacts but also soften and smooth the edges of shadows.
General GI Directional Lightmapping.
Directional lightmaps store more information about the lighting environment than regular lightmaps. Shaders can use that extra data about incoming light to better calculate outgoing light, which is how materials appear on the screen. This happens at the cost of increased texture memory usage and shading time.
You can choose one of three modes:Non-directional,Directional and Directional with Specular. All three are available as real-time and baked lightmaps.
Non-directional: flat diffuse T
he simplest mode that uses a single lightmap. It stores the information about how much light the surface emits, assuming it's purely diffuse. If the objects have NormalMap or diffuse light they will appear flat and diffuse, but otherwise will be lit correctly.
Directional: normal-mapped diffuse.
This mode adds a secondary lightmap, which stores the incoming dominant light direction and a factor proportional to how much light in the first lightmap is the result of light coming in along the dominant direction. The rest is then assumed to come uniformly from the entire hemisphere. That information allows the material to be normalmapped, but it will still appear purely diffuse.
Directional with Specular: full shading
Like the previous mode, this one uses two lightmaps: light and direction, but this time they're split in halves. Left side stores direct light, and right indirect. Unlike the two other modes, light is stored as incoming intensity. That extra information allows the shader to run the same BRDF that's usually reserved for realtime lights, resulting in a full-featured material appearance - now also interacting with indirect light.
Dual lightmaps allow using specular surfaces and normal mapping.
Directional uses twice more memory compared to Non-directional and has a higher shading cost.
Directional with Specular uses twice more memory compared to Directional.
All data posted on the site represents accessible information that can be browsed and downloaded for free from the web.