Every Trick for Shading Glass in Eevee - Fundamentals of Blender Materials & Shading (Bonus Video)
TLDRIn this informative tutorial, Jonathan Lampell from CGCookie.com dives into the intricacies of creating realistic glass materials in Blender's Eevee rendering engine. He addresses common issues with the default glass BSDF, such as excessive distortion and lack of refractive visibility through other objects, and presents a custom shader solution. The video offers an in-depth look at the shader's construction, material settings, and techniques like transparent shadows and refraction control. Lampell also discusses the importance of user-friendly controls, dispersion effects, and absorption for more natural-looking glass, providing a comprehensive guide for artists seeking to enhance their rendering skills.
Takeaways
- π Creating realistic glass in Eevee is challenging due to the lack of light ray bouncing effects, leading to the need for faking certain visual aspects.
- π Jonathan Lampell from cgcookie.com explains how to create a better-looking glass shader in Eevee compared to the default settings.
- π Eevee's glass BSDF has limitations, such as excessive distortion and the inability to see refractive objects through other refractive objects.
- π§ The shader tutorial covers material settings, including turning down the IOR or setting a refraction depth for more control over the glass appearance.
- βοΈ The refraction depth setting in Eevee is problematic as it cannot be adjusted per material and tends to copy the original material's setting.
- π¨ The custom glass shader omits IOR control and instead uses a thickness control for flexibility in achieving different object thicknesses.
- π Transparent shadows are a feature of the custom shader, which are not available with the default glass BSDF in Eevee.
- π The importance of settings such as backface culling being off, blend mode set to alpha hashed, and shadow mode set to alpha hash for proper rendering is highlighted.
- π The tutorial includes a step-by-step breakdown of the shader's creation, including the use of transparency and refraction to achieve the desired glass effect.
- π οΈ The node setup for the shader is explored in detail, including the use of mix shaders, fresnel for reflections, and layer weight for a more natural look.
- π‘ Additional features like absorption and caustics are added to the shader to enhance realism, with tips on how to implement and control these effects.
Q & A
What are the challenges of creating realistic glass materials in Eevee compared to Cycles?
-Creating glass in Eevee is challenging because it lacks the sophisticated ray-tracing features of Cycles, which results in less realistic light bouncing effects. This can lead to faked appearances and weird results with the default glass BSDF in Eevee.
What is the issue with the default glass BSDF in Eevee when it comes to object distortion?
-The default glass BSDF in Eevee distorts objects too much because it assumes the object is a complete solid, regardless of whether there are holes or spaces between different parts, leading to unrealistic refraction.
Why might the refraction depth setting in Eevee not work as expected?
-The refraction depth setting in Eevee might not work as expected because it cannot be set differently per material, which is a limitation if you want different objects to have different thicknesses.
What is the alternative to using refraction depth for controlling the thickness of glass in Eevee?
-An alternative to using refraction depth is to decrease the Index of Refraction (IOR) of the material, although this is not a realistic approach, it can be used for visual appeal outside the bounds of physical reality.
How does the custom glass shader in the video solve the issue of seeing refractive objects through other refractive objects in Eevee?
-The custom glass shader allows for seeing some reflections coming through and maintains some refraction along the edges, which is not possible with the default glass BSDF in Eevee.
What are the settings required for transparent shadows to work correctly in Eevee?
-To achieve transparent shadows in Eevee, the shadow mode must be set to 'Alpha Hash', and the blend mode should also be set to 'Alpha Hashed'. Additionally, increasing the number of samples in the render properties can help reduce noise in the shadows.
Why is backface culling turned off when working with glass materials in Eevee?
-Backface culling should be turned off to ensure that all parts of the object, including those facing away, are visible, which is essential for capturing reflections and maintaining the integrity of the glass material.
What is the role of the denoise node in the compositor when dealing with noise in renders?
-The denoise node in the compositor can help reduce noise in renders, especially when using 'Alpha Hashed' blend and shadow modes, which can introduce noise due to their transparency settings.
How does the custom glass shader in the video address the limitations of refraction in Eevee?
-The custom glass shader combines both transparency and refraction methods to create a more realistic glass effect. It uses a mix shader to blend the results of these two methods, allowing for control over the appearance of the glass.
What is the purpose of the 'Edge Refraction' control in the custom glass shader?
-The 'Edge Refraction' control adjusts the strength of refraction along the edges of the glass object, helping to avoid the 'double walled' effect and making the glass appear more realistic.
How does the custom glass shader handle the issue of caustics and absorption in glass materials?
-The custom glass shader includes an absorption section that uses gradient textures and mapping nodes to simulate the absorption of light within the material, starting from the center and spreading out. This effect can be controlled and adjusted to suit different materials.
What are the benefits of using a mix of diffuse and translucent materials for the absorption effect in the custom glass shader?
-Using a mix of diffuse and translucent materials for the absorption effect allows the shader to respond correctly to lighting changes, maintaining a realistic appearance under different lighting conditions.
How can the absorption effect be adjusted to start in a specific location within the object?
-The absorption effect can be adjusted to start in a specific location by changing the texture space in the mesh data properties or by using nodes to shift the gradient textures to the desired location.
Outlines
π¨ Custom Glass Shader in Blender's Eevee
Jonathan Lampell from cgcookie.com introduces the challenges of creating realistic glass materials in Blender's Eevee render engine, which lacks the ray-tracing features of Cycles. He explains the limitations of the default glass BSDF, such as excessive distortion and the assumption of solid objects, which can distort the appearance of objects with holes or gaps. Lampell outlines the process of adjusting the index of refraction (IOR) and refraction depth to achieve a more realistic effect, while acknowledging the need to compromise on physical accuracy for visual appeal. He also discusses the inability to see through refractive objects in Eevee and introduces his custom shader designed to address these issues.
π οΈ Advanced Techniques for Creating Realistic Glass
The tutorial delves into advanced material settings required for the custom glass shader, including turning off backface culling to preserve reflections and using alpha hashed blend mode for better layering of transparent objects. Lampell recommends increasing render samples for noise reduction and introduces the denoise node in the compositor. He then explains the shader's inner workings, focusing on the use of transparency and refraction to create glass, employing a mix shader to combine these effects and the addition of Fresnel for a more natural appearance. The summary also touches on the limitations of refraction and the creative use of layer weight nodes to achieve a gradual transition.
π Enhancing Glass with Dispersion and Edge Effects
Lampell discusses the addition of dispersion to the glass shader, inspired by a video from Grant Wilk, to create a more realistic chromatic effect. He describes the process of separating RGB colors and applying refraction shaders to each channel, then mixing them based on Fresnel for reflections. To avoid a 'double-walled' effect, he introduces a method to enhance the refraction at the edges of objects. The tutorial also covers the creation of transparent shadows by combining the results of transparent and refractive materials based on shadow rays, thus achieving a more convincing glass material.
ποΈ Fine-Tuning Glass Material Controls
This section focuses on the fine-tuning of the glass shader's controls for user-friendliness. Lampell explains the various nodes and settings that allow artists to adjust the color, reflection tint, alpha hash color fix, reflection brightness, roughness, and inner refraction to achieve the desired look. He also introduces an edge refraction control that can be adjusted to prevent a double vision effect and discusses the use of absorption to simulate light penetration and scattering within the material, providing a more dynamic and realistic appearance.
π‘ Implementing Caustics and Absorption in Glass
The tutorial explores the implementation of caustics and absorption effects in the glass shader. Lampell credits other creators for their influence on his approach and suggests checking out their work for additional insights. He demonstrates how to create caustics using spotlights and adjusting their properties to project light through transparent shadows onto surfaces. The absorption effect is achieved by blending a mixture of diffuse and translucent materials based on a gradient texture that can be manipulated for different absorption patterns and colors, adding a layer of realism to the glass material.
π Adjusting Texture Space and Mesh Data for Custom Effects
Lampell addresses the issue of absorption effects appearing in the wrong location on an object by adjusting the texture space and mesh data properties. He explains how to change the gradient's center by manipulating the location along the x-axis and discusses alternative methods such as using nodes for more precise control. The summary also covers the process of combining various nodes to create a shader that respects light changes and can be adapted to different materials, concluding with the availability of the shader for download and further learning resources.
π Conclusion and Additional Learning Resources
In the final paragraph, Lampell summarizes the glass shading techniques covered in the tutorial and invites viewers to download the custom glass shader node for immediate use. He also promotes his new course on cgcookie.com, which provides foundational knowledge on materials and shading in Blender, including a simplified glass shader build and an overview of shader nodes and settings for both Cycles and Eevee render engines. The paragraph concludes with an invitation to visit cgcookie.com for more learning opportunities.
Mindmap
Keywords
π‘Glass BSDF
π‘Eevee
π‘IOR (Index of Refraction)
π‘Refraction Depth
π‘Shader
π‘Transparent Shadows
π‘Alpha Hashed
π‘Screen Space Refraction
π‘Fresnel
π‘Layer Weight
π‘Dispersion
π‘Caustics
π‘Absorption
Highlights
Creating realistic glass in Eevee is challenging due to the lack of light ray effects seen in Cycles.
Eevee's default glass BSDF can result in unrealistic distortions, assuming objects are solid without considering their actual geometry.
Adjusting the Index of Refraction (IOR) or setting a refraction depth can help, but these methods have limitations in Eevee.
A custom shader can be created to achieve a more realistic glass appearance in Eevee.
The custom shader includes a mix of transparency and refraction to overcome Eevee's limitations.
Transparent shadows are not achievable with the default glass BSDF in Eevee, but the custom shader provides a solution.
Backface culling should be turned off to ensure reflections are visible on all parts of an object.
Blend mode should be set to 'Alpha Hashed' to avoid layering issues with overlapping objects.
Increasing the number of samples in render properties can reduce noise introduced by 'Alpha Hashed'.
Screen space refraction must be enabled both in material settings and render properties for the effect to work.
The custom shader uses a mix shader to combine transparency and refraction for a realistic glass effect.
Fresnel or layer weight nodes can be used to control the sharpness of the glass transition.
IOR control is omitted in the custom shader, opting for a thickness control instead for user-friendliness.
Dispersion can be added to the glass shader for a more advanced effect, as demonstrated in a linked video.
Caustics can be simulated in Eevee by strategically placing and adjusting spotlights.
Absorption can be added to the glass shader to create a more complex and realistic material.
The custom glass shader includes user-friendly controls for color, reflection tint, and roughness.
The tutorial provides a comprehensive breakdown of the custom glass shader's node setup and functionality.
The custom glass shader can be downloaded from CG Cookie or the Blender Market for easy implementation.
Transcripts
5.0 / 5 (0 votes)
Thanks for rating: