Esteban Ibarra

May 23, 2021

3 min read

Getting into 3d Environments and Lighting!

After the rush of achievement of completing the 2D game course, I’m now embarking on the adventure of learning Cinematography at GameDevHQ and it looks like it’s going to add a lot of useful tricks under my developers' belt. After going through the preliminary lectures, I’ve already begun to learn a lot.

Creating a 3D game brings on even more challenges that are not too unlike creating a Hollywood film. We’ve talked about sound design, but now we need to look into lighting which is also an art and a science in itself. Because of this, Unity does offer a collaboration tool for larger teams to work together.

Everything in a Unity environment is a 3D Model and those models require textures. We can import the textures along with the model, but Unity also offers built-in materials that we can assign to the models to give them a more realistic appearance. Models can also have submeshes that have other materials so you can assign more than one material to an object. Naturally, there are also special transparency materials for things like windows and display cases.

While newer hardware can do a lot of heavy lifting like raytracing shadows and reflections, It’s still limited to expensive hardware that only the most dedicated of gamers will have in their PCs. Unity offers many tools to fake lighting effects like light mapping where we ‘bake’ lights or the lighting effects are rerendered right into the texture as well as implementing occlusion maps that help simulate shadows without taxing the hardware.

There are also tools like light probes that work similar to baking lights but are used to affect moving objects in the scene that could change the scenery, like in this case, a thief passing by a wall that’s surrounded by light probes would cast his shadow on the wall with the light probes help. Otherwise, the baked lighting would stay the same like a static animated background and things would look really off.

Environments also include outside environments like the cityscape. That’s created using a skybox which is exactly as it sounds. It’s a box that textures are attached to that contain things like environments, skies, and in our case, new york city. It’s like the old Hollywood trick of propping up a town comprised of 2D buildings except on a grander scale.

Finally, there are Reflection probes and screen space reflections that help give environments that extra sense of realism by reflecting items off other items like the sidewalls from the floor.

I’ll go more into detail during the week, but I just wanted to share my excitement over Unitys powerful environment tools. See you tomorrow!