Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Interested in game making? Start in Unity—a game engine for mobile and desktop games and real-time simulations. Author Adam Crespi shows techniques used in game development with Unity and introduces the basics of scripting and game functionality. First, learn how to import models and textures, organize your project and hierarchies, and add terrain, water, and foliage. Next, Adam explores how to use lighting to bring the game to life, and add rendering, particles, and interactivity. The end result is a sample game with a lush environment, fully animated characters, and some basic interactive gameplay.
Cookies, in Unity, are images that are placed over a light to change the shape of the light. If you’ve noticed, we’ve got three basic light types to use, and their shapes are fairly limited. There’s points, which are spheres of light, directional lights, that run fairly parallel and simulate suns well. And spotlights, which yield even cones of light. In order to make the light vary, we’ll place a cookie over a light. And this is analogous to what we do in real world theatrical lighting, placing a pattern over a light to simulate the cast of light on an object and project forward either a shadow or a cutout of that light.
Outside are some larger cones and a sphere, we've got all kinds of lights available and so we need to have a tool in our tool bag to be able to simulate that, fairly cheaply. What I've done then is to place in the texture's folder a new image and it's called, Clouds. Cookies, then, are typically grey scale images with an alpha channel. Where it's usually the same image and the color and the alpha. To make this into a cookie, what I'll do is, in the Texture Type, drop down under Texture and choose Cookie. This tags it as a Cookie and I can specify it for a specific kind of light.
I'll drop down under Light Type and pick Directional, and then, I'll hit Apply. I'm going to leave the max size alone, as this is already 512 square. Now that that's made as a cookie, I can see it when I choose a cookie in my Sun. What I'll do, though, to add some variety to the light, but still keep my shadows, is to duplicate that sun. I'll pick my existing sun and back off the intensity just a little bit, maybe 0.8. Then I'll pick it and press Ctrl+d to duplicate and name this new sun, SunClouds.
Now I'll take this new sun and turn off the shadows. It's going to brighten up my scene considerably, but I'll adjust the luminance in a minute. First though, I'll pick my cookie. Clicking on the Pick button next to the cookie texture. And in here, in the assets, I'll type in CL to filter down for clouds. And there's my clouds cookie. With it selected, it casts that dappled pattern over my scene. Adding a subtle variation to things. I'll lower down the intensity of this light, and I get that soft sun coming in. And we can perceive, especially on the balcony, a little bit of variety across that surface.
As we pan around and look outside, we can see some minor drama going on in the lighting on the bridge. And that's the result of that cloud shadow in the sun. We need to be careful with cookies, because it's very easy to end up with dark rings from them or odd light areas. So, often I'll use a cookie for general mood like this, and then back off the intensity of both lights, because I'm doubling the sun. What I'll do then is use a cookie as well for diffusers on the light, for example. To square of a light and let it come through a surface in a different shape than a standard cone.
You can make any kind of cookie you'd like. And putting them in is as easy as choosing the type and putting in that light. I'll back off the intensity just a little more, down to 0.2 for my cookie. And now, it's just the tiniest bit of subtlety, which we can really see up here on the roof. Try making a cookie of your own and putting it in the scene. You may even want to use a cookie to focus down or spread out a spot light a little bit for your can lights. Or, use a cookie to add some variety into the point lights so they're not so obvious spheres of light in the scene.
There are currently no FAQs about Unity 4.3 Essential Training.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.