Mike Pan creates a realistic metallic car shader, including metallic flakes and scratches. Download included!
Let’s create a car shader! In order to create a nice looking paint material, let’s first examine how car paint is in the real world.
Have you created anything with this shader? Share your result in a comment!
9 Comments
Great material setup. But I'm confused with one thing: What does the last mix shader do? Light Path "is camera ray" as factor, and first input not connected, second input is the material
It is some king of optimalization.
I think this optimization is not that good. I can't test it right now, but there is a serious problem with this method. When you look at the image in this article you can see the reflections of two different objects. One on the left and one on the right. All objects have the same car paint material applied. The reflections of both objects are black, because the reflection is NOT camera ray. Considering it is a car paint one has to take into account the geometry of cars and the possibility of selfreflections. In this case it will get black reflections. Problably this is wanted or it gives you a better rendertime, but last thing i can't verify.
Watching an old cgcookie video the method should be applied before the 2 Bump nodes. It conserves the reflections but disables calculating bumb nodes when is camera ray is not true.
Hi, I am the original creator of the file. You are absolutely right it's a bad and lazy optimization. It was a result of some testing I was doing but I forgot to take it out for release. It's gone now!
It is some kind of optimization.
Your tutorial was quite helpful, it made me rework my own car paint material.
I have created some car paint material after reading a blenderartists thread about this topic. It uses a group node called "tSpecularLayer" for wich I found a tutorial one day, can't remember where it was - it extends the "tFresnel" group node I found at the same place, which is a fresnel node based on the layer weight node combined with some maths.
This tSpecular node is the last before the material output. In its input goes a group node I created called "Iridescence Overlay", a Voronoi-based flake generator where you can set the iridescence color, the size and quantity of the flakes.
In the "Iridescence Overlay" input goes my base color, a rough glossy node which you have in your car paint as well. But it's not one single color, it's a color ramp with the tFresnel at the Fac input, because I found that car paint sometimes varies its hue and brightness at different angles.
So all this together makes my car paint, it didn't have no orange peel or scratches by default but I added them after reading your tutorial. Now I'm quite satisfied with my result, and while even rendering about 10% faster it is also less noisy than your car paint ;-)
The link in the blog is not working already. Could anyone pls reupload it somewhere?
LINK not working!
It happens - the article is 5 years old ¯\_(ツ)_/¯