Last day before I take my time off work and I spent it tinkering with car headlights again!
This time I am exploring polarised light and thin-film interference on a transparent body in Blender.

Thank you @KarolMiklas for car model! Beautiful work as always 🙏

Follow the 🧵👇 ImageImageImageImage
Polarised light and Thin-film interference are not the same in terms of physics. One is caused by injection moulding of the plastic, other - by a very thin layer of material on the surface of another material.
Both offer similar looks, so I use the same technique to model it. Image
Here are two real-world examples. ‘Colorisation’ on the headlights are caused by polarisation while on windshield - by a defrosting coating. Most people, including me, mixes these, so for an artist like me, a single approach to tackle both problems, is working just fine! 👌 ImageImage
Mostly thin-film interference is a beautiful accident caused by an oily cleaning liquid or gasoline (🌈 in puddles), but if used on purpose, you can have very effective light blocking sunglasses or obnoxious car headlights. Also those anti-glare coatings on lenses work this way. ImageImage
Before I move on to ‘praxis’ part. I just want to establish some theory before, so you learn something too. I will keep it simple.
Also, this is a work in progress. I don’t know everything, I’m learning on the go. So if you know things about the topic, please correct me.
I’ll start with light polarisation.
As I mentioned, it is an inevitable side-effect of moulding. It reveals the flow of liquid plastic and high tension points in the structure. It can easily be seen with a polarisation filter and any plastic object in your household.
#nftart Image
Polarisation difference from thin-film interference (TFI) is that the ‘colorisation’ is not in reflected light, but happens during transmittance. It makes the colouring look less vibrant than of TFI and can filter out the light completely.
Why we can see it with naked eye on some car headlights? 🤷
My guess is that car manufacturers use polarised coating to filter light from projectors, but as a result - reveal the imperfections in the glass body. Perhaps also glass is polarising itself at some angles. Thoughts? Image
Thin-film interference is more straightforward. It is a very thin ‘film’ of transparent material with a different density (and IOR) than the material it in contact with. The layer is so thin that light waves start ‘glitching’ from the phase change from surface reflections. Image
Now we know a little more about the mechanics behind both effects, but I bet it does not help you replicate the effect now by yourself. And it is not really trivial too.
Luckily smart people have figured it out before me and I can just take their findings and adapt for my needs.
Et Voilà, here it is! After many tries with different shader based procedural approaches, I have found that LUT technique is the fastest and most accurate. I used the method from the awesome thread by @amandaghassaei
Happy holidays! ⛄️ I have a moment to continue the thread.

So how do you use that rainbow-y LUT texture in Blender?

That LUT is a plot of soap bubble TFI where horizontal (x) axis is film thickness in nanometres (1-2500 nm) and vertical (y) axis represent view (incident) angle.
- download this LUT
- drop into shader Node editor and set to linear (?)
- add ‘combine XYZ’ node and connect it to the texture ‘Vector’ input.
- in ‘X’ slot goes the ‘thickness’ value from 0.0 to 1.0
- in ‘Y’ slot - Dot product of surface Normal and View Vectors. Image
I forgot to mention that the apparent thickness of ‘film’ changes based the view angle of the surface. That’s why we need also ‘incident’ angle input on top of the ‘thickness’.
That’s what makes the iconic color shift at grazing angles. Image
- Add three shaders ‘Refraction BRDF’, ‘Glossy BRDF’ and a ‘MIX Shader’.
- Add a Fresnel node and connect to ‘Mix Shader’ factor.
- Connect Refraction to upper and Glossy to lower shader inputs in ‘Mix shader’ node.
- make sure ‘roughness’ for both shaders is 0 ir close to it.
for thin-film interference - attach the LUT output to ‘Glossy BRDF’ Color input and for polarised light effect - to ‘Refracfion BRDF’ Color input.

For Eevee make sure SSR is enabled in render settings and Refraction is ticked in material settings and ssr depth is close to 0.
This will stay in written form till I get to PC, then I’ll snap a shot of node setup.

Meanwhile I have these.

left - film thickness low
mid - film thickness ~400nm
right - film thickness modulated with regular Blender 3D noise ImageImageImage
oil in a puddle test using blender noise for thickness modulation. Image
And here is my Shader Node setup. Upper Window - Material, lower - Thin-Film Interference node group.

This is by no means a definitive approach. I can see room for improvement and I am not sure if mixing with pure fresnel is accurate. But this is the best result I have so far. Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Mārtiņš Upītis

Mārtiņš Upītis Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @_martinsh

Feb 9
exercise - real anisotropic reflections in Eevee render in #blender.

In theory it means that surface has ‘controlled’ scratches going in same general direction.

My first tests turned out quite pretty, although requires multiple render samples unlike the analytic approach. ImageImageImageImage
With Voronoi texture you can make quite convincing scratching. Each cell gives you ‘position’ data that you can shape into a line and rotate via any data value - texture or vector.

Here is a regular voronoi grid, lines are scaled by a photo and rotated by Perlin noise. Image
goal for this experiment is again automotive shader related - I want to achieve realistic microscratching on shiny surfaces.

This is my first test. I am not entirely satisfied, but I am getting there eventually. Image
Read 8 tweets
Jan 14
Let’s consider the previous thread a ‘teaser’ for this tweet sized introduction into retroreflectivity in CG.

I’ll explain what it is and how to do it yourself in #blender

As before - I will divide it in ‘Theory’ and ‘Praxis’ parts.

So here we go..
🧵
Just a disclaimer. This will be no science class.
In my side job as a Blender teacher in art college, I convert concepts that are difficult to grasp to simpler analogies and I leave out the hardcore stuff (So I don’t scare away my ‘kids’)

That’s a job for universities.
Theory is simple:

Retroreflectors reflect majority of received light directly back to its source.

How does it differ from specular reflection?

Specular reflection directs only a small portion of light that bounces back from the surface normal facing the source. Image
Read 23 tweets
Dec 10, 2021
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
Let's start with the reflector - the shiny chrome part behind the glass.
Modelling it accurately is rather important, especially if you plan to have the headlight turned on. @KarolMiklas has done sublime work on those! Even for a low-poly car, the normals are silky smooth!
And here's why an accurate model with a nice topology is important. I put a 50-watt "bulb" where it should be in reality. Viewed off-axis, the headlight barely is shining, but once I look head-on, the light is very concentrated. Really cool to see it work in Blender so well!
Read 9 tweets
Sep 12, 2021
Now, let me tell you one of the secrets for a fine looking water surface. And it has nothing to do with the water itself! It’s the environment.
From visual aspect, water is a reflection and refraction of surrounding objects, so a good looking sky is where you should start. #b3d
(This is my attempt for clickbaity advertisement)
So you want skies like image above? Buy ‘Physical Starlight and Atmosphere’ addon for Blender and support two brothers, entrepreneurs @_karlisup and me. We call ourselves @PhysicalAddons.
more info:
blendermarket.com/products/physi…
This is going to be another rant about water rendering.
Topic - water surface shading.
Not about geometry and not underwater ‘volume’. Just the thin border separating the two worlds.
Read 12 tweets
Sep 10, 2021
Smooth transition from air to underwater in Blender(work in progress). I’ll do a thread because not often I see it done right in CG.
#b3d
I teach things like these in art college. I guide my students through the analytical process of dissecting the effects of physical lighting and materials.

So there are several concepts you have to understand that will let you create the water transition effect convincing. Image
First concept - we have to imagine that our Blender camera is actually a real camera. Camera has a sensor, lens assembly and most importantly - a waterproof housing.
(Image source - Outex) Image
Read 15 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(