Addon developer and lighting expert Martins Upitis has made a thread on his Twitter account detailing his technique for getting realistic physically-based car headlights in Blender's Eevee.
Physically-based car headlights in Blender. This method is made for Eevee because refraction and reflections in a single material do not interact nicely.
Here is a breakdown of the classic reflector/refractor headlights. If you want to know more, follow the🧵#b3d pic.twitter.com/6BGfx95Ldp— Mārtiņš Upītis (@_martinsh) December 10, 2021
This thorough breakdown discusses Martin's techniques to mitigate Eevee's limitation when handling refraction and reflection on the same material, a disposition that perfectly fits the car headlight scenario.
If you enable "screen space reflections", the brightness is amplified even more, because the light bounces multiple times inside the chrome "dish" before it leaves.
the image on the left: without SSR. Right: with SSR.
(different story with Cycles, reflections are ON by default) pic.twitter.com/XagQrknfOe— Mārtiņš Upītis (@_martinsh) December 10, 2021
Martins splits the refractive and reflective properties of the glass into separate shaders, and uses a mix of Refraction, Glossy and Transparent BSDFs to achieve the desired effect.
The other important headlight part is a refractor. That is the glass "lens" cover that serves a dual purpose.
- it protects the bulb from weather and impacts
- the strange shapes in the glass refract the light and direct it down the road surface and away from oncoming traffic. pic.twitter.com/S5WlGrCjOg— Mārtiņš Upītis (@_martinsh) December 10, 2021
The inside part does all the light distortion that comes out of the headlight.
I use "refraction BSDF" with a normal map that comes with the car model by @KarolMiklas.
Refraction Depth, IOR and Normal strength control how the light refracts. pic.twitter.com/nrq3qAIYpk— Mārtiņš Upītis (@_martinsh) December 10, 2021
Martins is most known for his very successful lighting addon "Physical Starlight and Atmosphere", but he frequently shares his insights into lighting and shading techniques on Twitter. Give him a follow to check out this full thread and keep up to date with his future breakdowns!
And the 'icing on the cake' - the smooth and shiny outer layer of the glass body.
That is just a 'Glossy BSDF' mixed with 'transparent BSDF' by a fresnel factor. Material is set to Alpha Blend which introduces some problems as any transparent object does but mostly works fine. pic.twitter.com/yPW0Qd8uWc— Mārtiņš Upītis (@_martinsh) December 10, 2021
1 Comment
Great work your images looks beautiful I would love to see an animation of the finished product!