GameDev

Secrets of Photorealism in 3D for Beginners

Secrets of Photorealism in 3D for Beginners

Learn: The Profession of a 3D Generalist

Learn More

Photorealism continues to be the most popular direction in 3D design. At Blender Conference 2022, Andrew Price, founder of the renowned online resources Blender Guru and Poliigon, shared techniques from the film "Toy Story 4" that enhance the realism of 3D scenes. These methods are also widely used in the gaming industry, enabling the creation of immersive and visually appealing game worlds. Improving photorealistic modeling and texturing skills is becoming a key aspect for professionals striving to create high-quality content.

Skillbox Media's Gamedev editorial team presents the key findings of the speaker's presentation.

In his presentation, Andrew highlights three key aspects of photorealism. First, image accuracy, achieved through meticulous detailing and high-quality textures. Second, lighting is an essential element, playing a crucial role in creating a realistic atmosphere and perceiving objects. Finally, composition helps correctly arrange elements in the image and direct the viewer's eye. These three components form the basis of photorealism, allowing you to create works that are as close to reality as possible.

  • lighting,
  • materials,
  • optics.

Working with Light

The key to high-quality lighting is the correct choice of shades for light sources. The optimal option is a combination of warm and cool tones on the Kelvin scale, since such colors are naturally present in the surrounding world. In most scenes of the film "Toy Story 4", the artists used warm shades for lighting and sunlight, while cool tones were used to depict the dark sky and moonlight. Towards the end of the film, the contrast of color temperature smoothly transitions into the world of neon signs of the amusement park, creating a unique atmosphere and visual effect. The correct combination of shades allows not only to improve visual characteristics, but also to convey the emotional load of scenes.

Scenes with natural and artificial lighting Stills: the film "Toy Story 4"
Scenes with natural and artificial lighting Stills: the film "Toy Story 4"

The use of contrasting tones of the Kelvin scale is a common technique in various works of art. An example of this is the short film "Bad Trip" from the third season of the animated series "Love, Death & Robots," where director David Fincher instructed his team to set a fixed color temperature: 1800K for the lamps and 4000K for the moonlight. Placing light sources with opposing hues at a significant distance from each other enhances the visual expressiveness and realism of the CG animation. This approach to lighting allows you to create a unique atmosphere and highlight details, which makes the animation more attractive to viewers.

Arrangement of light sources in the animation "Bad Journey" Frame: Blender / YouTube

To activate the Kelvin scale In Blender, you need to enable the Blackbody node in the appropriate settings. This process allows you to precisely adjust the color temperatures for different light sources, significantly improving the realism of the rendering. Using the Kelvin scale in Blender helps artists and animators create more accurate and expressive visual effects.

Setting up the Blackbody node in Blender Screenshot: Blender / Blender Foundation

Incident lighting is an important yet often underused technique in 3D design. This type of lighting involves light falling on objects from a certain distance, creating unique visual effects. According to experts, many artists don't fully understand the potential of incident lighting and its impact on the perception of objects. Skillful use of this technique can significantly improve the quality of work and add depth to a composition. Understanding and correctly applying incident lighting opens new horizons for 3D artists, allowing them to create more realistic and expressive scenes.

The scene features a character with a light source positioned at arm's length above them. As a result, 100% of the light rays reach the top of the head, but only about 1.2% of them reach the character's feet.

Frame: Blender / YouTube

In the scientific community, this phenomenon is called the inverse square law. According to this law, light intensity decreases inversely proportional to the square of the distance from the source. Artists don't need to study the physics in detail, as modern 3D software automatically performs all the necessary calculations, simplifying the process of creating realistic scenes. This allows users to focus on the creative process without being distracted by mathematical details. When lighting, it's important to consider that a significant portion of the light is blocked upon first contact with the surface. The further the light rays travel, the less light is lost. In the image shown, the character's face and fingertips are brightly lit by the match flame, but the illumination decreases significantly as they move from the knuckles down. Meanwhile, the lower torso and legs are evenly illuminated, creating an interesting contrast and highlighting details. The correct distribution of light in a frame can significantly change the perception of an object, making it more expressive and focusing attention on key elements.

Still: the film "True Grit"

Our planet is located at a distance of approximately 150 million kilometers from the Sun, resulting in low solar radiation reaching the Earth's surface. As a result, objects at the top of the Burj Khalifa receive the same amount of sunlight as those located at the base of the iconic tower. This emphasizes that the building's height does not affect solar radiation intensity, which is important for architects and environmentalists considering solar energy in their designs.

In Toy Story 4, one of the key scenes takes place in the attic of an antique store, where sunlight streams through the windows, creating an atmosphere of coziness and nostalgia. The incident light from the lamps was realized using directional sources such as the Spot and Area lights in Blender. These lighting techniques create a realistic perception of space and depth, highlighting the details and textures of the surrounding environment. Using these lighting techniques is an important aspect of creating visual storytelling and helps convey the mood of a scene.

Examples of sun rays and incident light from lamps Stills: Toy Story 4
Examples of sun rays and incident light from lamps Stills: the film "Toy Story 4"

In this example, we will look at the use of incident light in Blender. The scene includes a character who is directed at a point light source located at a considerable distance from the object. The use of point lighting allows you to create natural shadows and lighting that emphasizes the details of the character. Understanding how to set up and control the position of point lights in Blender will help improve the overall atmosphere of a scene and make it more realistic. Pay attention to the intensity and color of the light to achieve the desired effect.

Frame: Blender / YouTube

The screenshot shows that most of the model is evenly lit. To highlight a character's face, you can take a photo, then open it in Photoshop and brighten the area around the face using layers. However, with the previously mentioned incident light in mind, you can move the light source closer to the model, position it slightly above the head, and reduce the illumination radius. This will create the effect of incident light, which will significantly improve the composition and add depth to the image.

On the left is a render with the original position of the light source as in the image above. In the render on the right, the size of the light source is reduced, and the source itself is moved towards the character. The result is a falling light. Still: Blender / YouTube

Choosing the right size of the light source plays a key role in lighting. A smaller light source creates harsher shadows, accentuating fine details. This can be undesirable when photographing human faces, as any skin imperfections become more noticeable. For best results, it's recommended to use larger light sources, which provide soft, even illumination that softens shadows and makes skin appear smoother.

Frame: Blender / YouTube

A large, diffused light source can To conceal image imperfections. This is why various reflectors are used on Hollywood film sets, even on outdoor locations. Toy Story 4 masterfully combines two types of lighting: hard light for outdoor scenes and soft light for interiors. This creates visual harmony and enhances the emotional impact of each scene. Using such techniques allows you to achieve high image quality and make it more attractive to viewers.

Examples of hard and soft light Stills: the film "Toy Story 4"
Examples of hard and soft light Stills: Toy Story 4

When choosing a lighting source for a portrait photograph, it is important to consider its location in relation to the subject's face. Light falling from above can visually narrow the face, creating shadows that emphasize the contours. By directing light from the front, you can achieve a wider, more open perception of the face. Proper lighting not only influences visual characteristics but also creates the right mood and atmosphere in a shot.

Andrew Price, in his course for beginners, examines in detail various techniques for working with light in 3D. To view the text version of the course, follow the links below.

Working with light in 3D modeling: setting the direction and size of light sources

In 3D modeling, lighting plays a key role in creating realistic scenes. Properly setting up light sources helps convey mood and atmosphere, as well as highlight details in a model. It's important to pay attention to two key aspects: light direction and light size.

The direction of light sources affects how shadows and highlights are distributed across the surface of objects. Using different lighting angles can create interesting effects and accents. For example, angled light can add depth and volume to a model, while direct lighting makes objects appear flatter.

The size of light sources also significantly affects the perception of a scene. Large sources create soft shadows, which gives the scene a more natural look. Conversely, small light sources create sharp and clear shadows, adding drama. Adjusting these parameters allows you to achieve the desired visual effect and improve the overall aesthetics of a 3D model.

Therefore, working correctly with light in 3D is the foundation for creating a high-quality and realistic image. Adjusting the direction and size of light sources will help you achieve professional results in your projects.

Working with light in 3D: color, readability, and accents

Lighting is a key element in 3D design, as it significantly affects the perception of objects and scenes. Proper lighting helps highlight important details, improve readability, and create the right atmosphere. Light color also plays a key role, as different shades can evoke different emotions and moods. For example, warm tones can create a cozy feeling, while cool shades are often associated with technology and modernity.

When working with light, it's important to consider its intensity and direction. Bright light sources can accentuate certain elements, while soft lighting can soften edges and create a harmonious composition. It's also important to properly adjust shadows so they aren't too harsh or, conversely, too blurry, which can make the scene difficult to perceive.

Using different types of light sources, such as spotlights, directional lights, and ambient luminance, helps achieve the desired effect and create dynamic and engaging visualizations. Experimenting with lighting settings can significantly improve the quality of your 3D work and make it more professional.

In conclusion, working with light in 3D design is an art that requires attention to detail and a basic understanding of color theory. Proper lighting not only improves readability and perception but also helps create a unique atmosphere that will attract viewers.

Materials

When light hits the surface of a material, a number of physical processes occur. Some light rays are immediately reflected, while others are absorbed and interact with particles within the material, causing them to scatter and subsequently escape. This process is known as refraction. In 3D graphics, this phenomenon is often called diffuse or scattered light reflection. Diffuse light reflection plays an important role in the perception of the color of objects, allowing us to distinguish shades. For example, a red car looks red because its surface is covered with red auto enamel, which effectively reflects the red spectrum of light.

Diagram of the process of light refraction Frame: Blender / YouTube

Many people believe that Objects can be divided into two categories: those with a reflective surface and those without. This difference is reflected in glossy and matte textures, as shown in the image below.

Frame: Blender / YouTube

In fact, these objects emit the same amount of light. The key factor is the surface: smooth surfaces reflect light toward the source, while rough surfaces scatter it in different directions. As a result, the reflection becomes so diffuse that the human eye cannot detect it. Understanding these principles of light reflection is important for a variety of fields, including lighting design and optics.

Frame: Blender / YouTube

The presented collage shows scans of bricks from the Poliigon portal. The first image might give the impression that the material is highly porous and non-reflective. However, the second image, taken in cross-polarized mode, disproves this notion. Using certain techniques in Photoshop, it is possible to create an effective reflectivity map for brick, expanding its use in visualization and 3D modeling.

All objects in the world reflect light, but their roughness properties vary. When working with materials in Blender, it is important not to change the Specular value. It is recommended to leave it at the default value of 0.5. If you want to achieve a matte finish, simply increase the Roughness value. These parameters are available in the Principled BSDF node, which is automatically created when you add a new material. Correctly setting these values ​​will help achieve realistic display of materials in your projects.

Frame: Blender / YouTube

Reflections have unique characteristics that depend on the angle of incidence of light. The smaller the angle between a light beam and an object's surface, the more light will be reflected. In physics and 3D modeling, this phenomenon is known as the Fresnel effect. This effect indicates that at the edges of an object, light reflection reaches 100% at an incident angle of 90 degrees. Understanding these principles allows you to create more realistic images and improve visualization in graphics applications.

Frame: Blender / YouTube

When working with the Mix Shader node, it is important to consider that When combining the Diffuse BSDF and Glossy BSDF nodes, the Fresnel effect will not be achieved. In such cases, using a single Principled BSDF node is a more efficient solution. Reduce the Roughness value to the desired level, and Blender will automatically generate the Fresnel effect for your object. These recommendations are especially relevant for working with materials that do not have a metallic effect. Using the Principled BSDF can significantly simplify the process of setting up materials and achieve more realistic rendering.

On the left is the final result of assembling nodes without the Fresnel effect, on the right is using the Principled BSDF node. Frame: Blender / YouTube

Metallic materials have unique properties that distinguish them from others. They are capable of 100% light reflection, eliminating the possibility of refraction. Although some light is still absorbed, it is converted into thermal energy. As a result, when looking at a metal object, our attention is focused solely on its reflection, creating a mirror-like effect. These characteristics make metal coatings in demand in various industries, including construction, design, and manufacturing.

Frame: Blender / YouTube

Metals differ from other materials in that they not only reflect the color of the light source, but can also create different shades in the reflection. This property makes metals unique in design and architecture, as they have the ability to add depth and complexity to visual perception. The use of metal elements in the interior or exterior allows you to create spectacular and original solutions that attract attention and emphasize the style.

Examples of renderings of metal objects Frame: Blender / YouTube

In the first picture, illuminated by the sun When exposed to rays of light, the wooden watch case becomes more vibrant, while the gold dial displays a variety of hues. However, the Fresnel effect causes the shades of the metallic coating to become less noticeable. This phenomenon emphasizes the contrast between natural and artificial materials and creates interesting visual effects that can draw attention to the details of the piece.

When creating realistic metals, it is important to consider many nuances. We recommend using the Principled BSDF node as a basis. Set the Metallic parameter to maximum and reduce the Roughness to achieve the desired effect. Avoid adding additional diffuse maps or shaders with similar properties to maintain the purity of the material. This approach will ensure a high degree of realism and will help avoid common mistakes in metal visualization.

Creating a gold bar using the Principled BSDF node. Frame: Blender / YouTube

In everyday life, we often encounter objects with non-uniform surfaces. Such surfaces are everywhere: from uneven asphalt with visible tire tracks to melted chocolate icing on a popsicle. Surface non-uniformity affects the perception of objects and their functional characteristics, making it an important aspect in various fields, including construction, design, and cooking. Understanding the properties of heterogeneous surfaces can help create higher quality and aesthetically pleasing products.

Still: Blender / YouTube

Toy Story 4 features a wide variety of textures. Realistic roof surfaces, cabinet walls, and laminate flooring contribute significantly to the believable environment, despite the stylized nature of the animation. These details help viewers immerse themselves more deeply in the characters' worlds and make the animation more engaging and memorable.

Examples of non-uniform surfaces in scenes Stills: Toy Story 4
Examples of non-uniform surfaces in scenes Stills: the film "Toy Story 4"

To increase the realism of materials in Blender, it is recommended to use the Noise Texture node. Set the Roughness value to a value between 0.01 and 1 and connect it to the corresponding parameter in the Principled BSDF node. This simple action will significantly improve the visual characteristics of your material, adding depth and texture.

Enabling the Noise Texture Frame: Blender / YouTube

The non-uniformity effect can be improved by adding An Overlay node for displaying color information, as well as a Bump Map, will allow you to create a more complex and realistic material that will effectively convey texture and surface depth. Using these nodes will significantly enrich the visual perception and add detail to the final result.

Frame: Blender / YouTube

Ready-made sets of PBR textures are collections of maps with various properties that are used in 3D modeling and visualization. These textures can be found on specialized resources such as Poliigon and Quixel Megascans, as well as on various marketplaces. Using such sets simplifies the process of creating realistic materials and reduces project development time.

Optics

Camera settings, especially exposure, play a key role in photorealism. When taking photos on a sunny summer day with a smartphone, many of us encounter the problem of the subject appearing darker than the background. This happens because the camera automatically determines exposure based on the overall brightness of the frame. However, if you aim for a dark area of ​​the subject, the background may appear overexposed. Optimal exposure settings will help achieve a harmonious balance between the subject and the background, which is an important aspect in creating a high-quality photorealistic image.

Footage: Blender / YouTube

Exposure settings are key to achieving optimal Brightness depends on lighting conditions. There's no universal exposure for capturing both bright and dark objects in the same frame. In such cases, it's advisable to use HDR post-processing. If there's an open window with bright light behind the subject, it's best to leave the background overexposed, which aligns with the exposure rules discussed earlier. Correct exposure settings help create a harmonious composition and emphasize details, which is especially important in photography.

Still: the film "There Will Be Blood"

In "Toy Story 4" there is a moment when Woody approaches the car and opens the box containing Bo Peep, the shepherdess. The scene takes place at night, and the taillights illuminate the sheriff's face, creating realistic lighting, just as it might have in real life. This episode highlights the creators' attention to detail and verisimilitude, making the film even more appealing to viewers.

Still: Toy Story 4

In the scene in the attic of an antique store, bright rays of sunlight penetrate through the rooftops, creating a unique atmosphere. This lighting technique highlights the details of antique pieces, filling the space with warmth and coziness. The play of light and shadow on antique objects arouses interest and immerses you in the atmosphere of bygone eras.

Still: the film "Toy Story 4"

Another director in Josh Cooley's place might have been wary of bright contrasts in scenes and tried balance the exposure by reducing the brightness of the sunlight. However, Josh preferred to leave everything as is. Overexposed shots with blown-out highlights are present throughout the film, creating the effect of being shot with a real camera. This approach gives the work a unique and authentic feel, highlighting the director's artistic vision and enhancing the viewer's visual experience.

In photography, an important aspect is the exposure triangle, which includes three key elements: shutter speed, aperture, and ISO. These three parameters are interconnected and influence the final result of a photograph. Shutter speed determines the time light hits the camera sensor, aperture controls the amount of light passing through the lens, and ISO controls the sensor's sensitivity to light. Correctly adjusting these elements allows the photographer to achieve the desired effect, whether it is creating motion blur or capturing a sharp image in low light. Understanding the exposure triangle is the foundation of creating quality photography and an essential step for any photographer looking to improve their skills.

Source: Photo7.ru

Understanding the three key principles is an essential aspect of working with a virtual camera in Blender. These principles will help you significantly improve the quality of your final renders, making your images more realistic and professional. Using the right camera settings will help you achieve the desired effect and enhance the visual appeal of your Blender projects. Aperture in photography is the opening through which a camera lens allows light to pass onto the sensor. The aperture directly affects the F-stop value: the larger the opening, the smaller the F-stop value, and the more pronounced the depth of field. This setting is especially important in portrait photography, where the focus on the subject and a blurred background create a dramatic look. Landscape photography, on the other hand, requires a higher F-stop value to achieve maximum sharpness across the entire frame. Proper use of aperture helps photographers control light and depth of field, which is key to creating expressive and high-quality images.

Several types of F-stop and shot options with different aperture settings. Stills: Blender / YouTube

Blender greatly simplifies the process of adjusting depth of field. To do this, select the camera, go to the object settings, and enable the Depth of Field option. Then, in the Focus Object section, specify the focus target. After that, set the desired focal length in the Aperture (F) section. Blender will calculate all other parameters automatically, allowing you to focus on the creative process.

When working with focus, it's important to consider the size of the subject. In small scenes, you need to carefully adjust the depth of field to achieve the desired effect. In larger scenes, the depth of field becomes less noticeable, allowing you to focus on other aspects of the composition. Setting the correct depth of field can significantly impact the perception of an image and highlight key elements of a scene.

Scenes with different zoom levels, but the same depth of field. The center shows the F-stop adjustment window. Still: Blender / YouTube

Andrew strongly recommends setting the actual size of all objects in the scene from the start. This makes it much easier to find the right focus and improves the quality of the final image. Correctly sized objects help achieve more accurate composition and realism in rendering.

"Toy Story 4" uses interesting scaling techniques to allow the camera to capture all the characters, who are significantly smaller than the world around them. This creates a unique perspective and allows the audience to better perceive the size of the toys in the context of their surroundings. The film masterfully combines animation and storytelling, emphasizing the importance of each character in the overall story.

Still: Toy Story 4

There is a classic depth of field effect, which creates a blurred and slightly elongated background. In photography, this effect is achieved using an anamorphic lens. To achieve a similar result in Blender, set the aperture ratio to 2.0. This technique allows you to highlight the main object in the image and add artistic expressiveness to the frame, which makes it more attractive and professional.

An example of a film frame with the effect of an anamorphic lens. On the right is the menu with the "Ratio" setting. Frame: Blender / YouTube

Increasing the camera's shutter speed allows more light to enter the lens, resulting in blurring of the subject. This effect is easily adjustable in Blender, allowing you to achieve the desired artistic result in your 3D visualizations. Proper use of shutter speed in Blender helps create realistic images, emphasizing the atmosphere of a scene and adding dynamism to static shots.

In the render settings menu, activate the Motion Blur option and set an appropriate Shutter value, which will depend on your creative goals. It is important to keep in mind the principles of the exposure triangle discussed earlier: noticeable motion blur is most often observed in dark scenes. This knowledge will help you achieve the desired visual effect and improve the quality of your project.

An example of the motion blur effect. The menu on the right allows you to adjust this setting. Shot: Chungking Express

The third element of exposure is the final attempt to increase the amount of light reaching the camera sensor. The higher the sensor's sensitivity, the brighter and more saturated the image. Optimizing ISO sensitivity allows photographers to achieve high-quality images even in low-light conditions, which is an important aspect in photography.

Frame: Blender / YouTube

Increasing this parameter leads to an increase in the noise level. The noise can be digital, appearing as a multitude of chaotic colored pixels, or film-based, which looks more aesthetically pleasing thanks to large, uniform gray particles. Film noise is more visually appealing and can add texture and depth to an image.

Comparison of digital and film noise using stills from the films "Collateral" and "Black Swan" Still: Blender / YouTube

Don't confuse various types of noise with the noise that occurs in an unfinished render. This defect is not related to photorealism. First, remove the noise using the Denoising tool, and then apply the grain filter in Photoshop to achieve the desired effect. When creating animation, it is recommended to use the Renoiser plugin or add the appropriate filter in a video editor to improve the quality of the final product.

Finally, we will summarize and discuss several additional methods that can improve your results. These techniques will help you optimize your processes and achieve better results. Applying these strategies will be an important step towards achieving your goals and increasing the efficiency of your work.

Distortion of a frame, in which the image is curved at the edges, is called lens distortion. In Blender, this effect can be easily created using the Lens Distortion node in Compositing mode. To achieve the desired result, simply increase the Distortion value. You can also experiment with the aperture ratio to simulate the effect of an anamorphic lens, which provides a unique visual style and image depth.

Example of slight distortion at the edges of the lens and the corresponding node in Blender Frame: Toy Story 4

This technique is used in situations where the shot requires hard light in dark scenes. The light source is softened, resulting in a blurry appearance, creating the effect that the camera sensor is unable to focus on it. Lens flares can also be effectively used in scenes with bright sunlight when the key subject is in shadow. This helps create interesting contrast and highlight the main elements of the composition, adding depth and atmosphere to the frame.

In Blender, the Glare effect is created using the Glare node in Compositing mode. This node's settings offer a choice of different modes, such as Streaks and Fog Glow, allowing you to achieve the desired visual effect depending on the project's requirements. Choosing the right mode and setting it up will help improve image quality and add the necessary accents to your work.

Examples of highlights and nodes for setting them up in Blender Stills: the film "Toy Story 4"

Results

The first Toy Story was released over 25 years ago and became a true milestone in the world of animation. Since then, technology has evolved significantly: powerful computer systems and modern 3D software have given artists new creative possibilities. This has made it possible to create even more realistic and captivating animated films, captivating audiences of all ages. Toy Story not only changed the approach to animation, but also left an indelible mark on cultural heritage, inspiring new generations of creators.

Comparison of similar frames from the 1995 and 2019 animation Frames: Toy Story; Toy Story 4

The limitations actually lend the films a realism. Even though the events unfold in a world where toys live and interact, elements of photorealism aren't found in every blockbuster. Andrew claims that it is precisely because of this feature that Toy Story has become one of the most exciting, funny and visually appealing animated films of recent years.

3D Generalist Profession

You will become a universal specialist who can do everything in 3D: create objects and environments, customize textures and Color, animate models, and integrate them into a 3D scene. Master Houdini, Autodesk Maya, Blender, Photoshop, ZBrush, Marmoset 3D, Substance Painter, Marvelous Designer, Arnold, and Rizom UV. You'll be well-positioned for work in advertising, games, or film. Pictured: Course participant Evgeny Kuznetsov's work.

Learn more