Today I’m going to talking about achieving realism in 3D images through lighting, but first a quick disclaimer. I’ll be focusing on “realism,” which is not to be confused with “reality,” or “the real world,” or whatever phrase you use to describe the magical dance of energy that engulfs us all. I’ll leave it to the philosophers to tackle what is “real,” and instead focus on what makes 3D images look real to the viewer.
I’m sure you’ve had what must be a universal experience: You’re watching a movie or playing a game when an image knocks you out of your suspension of disbelief as your brain registers it as looking “fake.” But what does “fake” mean? Often it’s that one part of a composite image does not match the rest, due to variations in the lighting. It’s a fact that computer-generated imagery has had a spotty history in terms of photorealism — go back and watch movies and TV shows from the 1990s if you don’t believe me — but with today’s tools you can create images and scenes that appear “real” to the viewer.
Some look even better than real. And it’s all about the lighting.
Also known as available light, ambient light is the light already available in the environment. This is similar to natural light. Imagine pulling light curtains closed over a large window. The room becomes evenly lit with no harsh shadows or highlights, which makes everything in the room easy to see because your eyes don’t need to adjust as you look around. Game engines can easily fake this kind of light on low-end hardware such as mobile devices. It’s an easy way to brighten a virtual scene without taxing the rendering pipeline. But be careful. The simplicity of virtual ambient light has a major drawback: It doesn’t cast shadows. This can make the scene look strange, and if you turn ambient light up too much things start to look unnatural and cartoony.
The example with ambient light demonstrates how important shadows are to making a realistic scene. When an object has a shadow, it means it’s solid and has presence in the scene. A floating box without a shadow looks very out of place. It looks like a hologram, floating in the air. You might have trouble telling how far away or how big the box is. By adding a shadow it gives the box presence. You can immediately see the box is quite large and in the distance. Shadows are a good addition to virtual scenes. The type of shadow also gives hints about lighting and environment. Hard shadows, with hard edges, indicate a point light. Dark shadows indicate a bright light source with little ambient light.
An ambient occlusion is a special type of shadow. The name describes what is going on: The ambient light gets occluded, or blocked, by nearby objects. You can often see this in action in corners. Look into corners and you will notice they are darker than the surrounding area. This is actually quite taxing for a computer to do. Desktop and laptop computers can do it in real time, but only high-end mobile devices can handle it. One workaround is to use baked ambient occlusion on objects. Unfortunately, in that case, the object casting the shadow cannot move relative to the surface it’s on.
The way light interacts with objects is crucial for believing those objects are real. Does the object reflect light? Does light pass through it? Does it give off its own light? Is it some combination of the above? Light interacts differently with plastic as compared to something like skin. You can distinguish wood and steel by how light reflects and scatters off of it. The most common property is specularity.
All the described properties and more are taken into account in physically based rendering (PBR). Legacy rendering methods used simple properties such as diffuse color and specular amount to approximate realism. PBRs, on the other hand, uses actual properties taken from real world objects. This makes achieving realism less time consuming, because many materials already have known values for the properties in PBR. And if they are unknown, they are easy to measure and plug in the values.
We use the Unity 3D game engine in much of our design, and it has many options for lighting a scene. Unity includes multiple types of lights, configurable lighting modes, a ton of bundled post-processing effects. The engine has become so advanced, Unity made a short film called Adam (above) to show off features and demonstrate the capabilities. The important settings can all be found in the lighting window, which is broken down into three tabs: object, scene, and lightmaps.
Using Unity is easy. An object tab’s contents depend on which object is selected. Select a light, and it will show all the options. Select an object with a renderer, and it will show lighting options relating specifically to that renderer. The scene tab contains settings pertaining to the entire scene. Settings for ambient light, reflections, unity’s global illumination, and fog among other settings. These apply to the whole scene. This should be evident as it’s where you set the skybox, of which there can only be one.
Wondering where you can see some finished products that take advantage of 3D imagery and effects while going largely unnoticed by the general public? Check out Ikea’s website. Do you think those are real products you’re seeing? Most if not all the product shots are rendered from virtual scenes. A few years ago Martin Enthed described how Ikea was transitioning to virtual scenes instead of photography for product shots. One big advantage of using virtual renders is control over lighting. Need to change a shot from daytime to night? Just change a few settings instead of waiting several hours for the sun to go down.
The most well-known image editor in the world, Photoshop has a long and very public history when it comes to photo manipulation. The Adobe product is considered the industry standard — so much so, that the average person, upon seeing an obviously modified photo, will say it was “Photoshopped.” Photoshop has even garnered something of a negative reputation because of certain kinds of manipulation. News services often have rules banning the use of Photoshop on photographs, on the grounds that it’s altering the reality of what is depicted. For us though, Photoshop is indispensable when creating realistic 3D images.
Brian Turner is an Augmented Reality/App Developer at Marxent.
Marxent Our resident doctor answers the important question - "What is Markerless AR and how does it work?" https://t.co/7bXIlJKJRC #tech #howitworks
Marxent Great to hang out with both the Marxent and @mobilemagnetic teams this weekend for the summer luau! https://t.co/kLJ0bdRZZ3
Marxent Get your new pair of @Nike sneakers using augmented reality in the SNKRS app https://t.co/RE0ZpjcpIv via @luchanglu @DigitalTrends #retail