Game Development Reference
In-Depth Information
a 3D software sense is light that comes from everywhere and nowhere (for
example, objects have no shading, and appear flat). In reality, what we think
of as “ambient light” in the real world is really bounced light. There is a light
source (the sun, a light bulb, etc.), and that light emits from the source and then
bounces off surfaces to further illuminate other objects around it. This bounced
light really isn't “ambient light” but light that has been dissipating as it continues
to strike and ricochet through our reality until all its energy is absorbed.
Back in 3D world, the problem is that all this bouncing light is a nontrivial
calculation. In fact for a long time, most rendering solutions did not calculate
any bounced light at all; when a light ray hit a surface, it stopped. This meant
that the area behind the surface received no light (from this light source) and
thus rendered black, as a shadow. At first blush, this sounds fine. The problem is
that real shadows in most situations are never black. There is enough bounced
light shooting around the environment to still illuminate the objects in shadow,
and thus the grass under a tree on a sunny day is simply less lit, not black.
As rendering technologies matured, radiosity-based solutions emerged that
simulated bounced light. In Maya, MentalRay is typically the rendering engine
to enable this. Through tools like Final Gather and Global Illumination, nice
diffuse light appears to be bounced across surface and the light even picks
up the color of the surface it has just bounced off of (actually the lit surface is
really just sampling surfaces around it through stochastic samples, but let's
not split hairs). The problem is that all this beautiful bounced light simulation
is processer intensive. Rendering a complex scene with great sampling rates
was a very time-intensive task. It just is not that unusual to have 12- or 15-hour
renders for a single frame, which of course won't work in game situations.
Hence the need to bake the lighting. Previous to Unity 3, baking in Maya
could yield some very nice results that could then be brought into Unity (with
the time-intensive reconstruction of materials). Now though, via Beast (the
technology for which Unity Technologies has a license), a built-in radiosity-like
renderer will calculate a render that includes bounced light that yields much
more believable shadows and even color bleed.
So baking in Unity is not only a possibility but preferred (for further convincing,
just wait until we talk about Deferred Lighting—yeeha!). This means that
learning Unity's light tools becomes more than just a placeholder or “rough-it-
out” technique—it becomes critical to getting the scene to look right.
In this tutorial we will be looking for a bit at Unity's lighting instruments and
the options they allow for. In the course of the tutorial we will light the scene
for daytime on a sunny day and again for the dusk time on a foggy day, which
the game calls for.
Unity's Lighting Instruments
Unity's lighting instruments are all available under the GameObject>Create
Other drop-down menu. There you will see Point Light, Spotlight, and
Search WWH ::




Custom Search