Scenes

In Unity 5

Screenshot_1Scenes are essentially playable areas within your game.  You put stuff inside, like players, enemies and quest items.  Add a few lights and textures and boom, a scene is born.  A Unity project can contain about as many scenes as you’d like for as many different purposes as there can be.

Setting up a new scene is easy as pie.  Just go to File > New Scene, to make a blank scene.  It will come with a camera and usually a directional light.  A directional light casts universal light in a certain direction.  Think of it like a sun.  The camera allows you to see the scene contents while the game is playing.

Directional lights are less useful for 2D games and if that’s all you have, then you probably don’t need one.  A scene without a directional light will default the lighting to it’s ambient color, which I’ll talk about in this next section…

Lighting

Open the lighting window by going to Windows > Lighting and drag it into whichever area you like.  The lighting window boasts a slew of features, but for this tutorial, we’re going to focus on the Scene tab and a few sections inside.

Screenshot_2

Environment lighting forms the bulk of tangible edits.  The Sky Box object shows the active skybox for the current scene, if any.  If you happen to be missing a sky box, then head on down to the Unity Asset Store and grab a free download.

Sun is not really important if you have a directional light.  If in doubt, leave it blank.  However, the ambient source does a heck of a lot to a scene’s looks.  You may select one of three sources, either the sky box, a gradient or a solid color.  I never use gradient, but setting it to the default sky box will light your world with the colors and tones demonstrated in the skybox you have chosen.  If you happen to have a night sky, then your world will appear dark.  Bright sunny day?  Likewise the opposite effect.

I prefer setting this to a solid color.  In this manner, you may illuminate your world in a shade of blue, purple, green or solid black if that’s your preference.  This is great for achieving the effect of a strange atmosphere or an alien world.  In case you want it to be night, just pull the color down to full black.

A fair note though

Setting the color to white is basically the default.  No lighting changes.

Screenshot_3

Finally, we can skip most of the junk in the middle and head down to the fog setting.  By default, the fog is usually left unchecked.  You may decide to incorporate fog in a 3D setting because it generates an atmosphere effect for long distance shots.  If your world is big, it may be a good idea to incorporate fog.  Also, I’m pretty sure it takes the edge off of your processor.

You can set your fog color to whatever you like, though I have found that a gray or black works the best in most atmospheres.  Choose your standard, depending on the setting.  The fog mode is best kept to the default settings.  I like exponential squared myself, though you may feel free to tweak the settings to find out how dense you want your fog to be.

A quick note

Fog is not actually a fog.  All this does is gradually fade the textures of your models into a solid color of your choosing, depending on distance.  It does not affect the rendering of a sky box, so if you  have a lot of objects on a flat plane, you’ll see a bunch of grayed out silhouettes and a blue sky.  Keep that in mind when designing your levels.  Best to have something high in the background.

That’s all for today.  Follow me to the next tutorial!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s