View Full Version : Shader for car paint?
Hi all. I'm working on a home project trying to make some very nice real time renderings of a car.
I stumbled across this page:
and was wondering if anyone knows the shader program that they used to achieve this clear-coat look?
It's obviously got an environment map, on top of a very specular surface, but it looks like there's more to it than that. Opinions?
01-06-2002, 04:58 PM
This has been published in Siggraph, here's the online copy:
SGI call it "Clearcoat 360"
The idea is to environment map the object with a rendered version of a sphere with a complex lighting model and a high dynamic range environment map which has been pregenerated (in this case with an accurate Monte carlo paint scattering model). You need to generate lots of these BRDF result maps because the results change for each viewpoint around the object. Each output spheremap map gives you the BRDF map for that view position and environment orientation. It works with any material, but a clearcoat car paint effect with high dynamic range environment is a good example.
The unique thing about the method is that it uses multiple spheremaps and a 2D image warp (a morph) between spheremaps maps from multiple viewpoints (3 maps I think) to generate a unique and reasonably accurate BRDF spheremap for novel viewpoints as the eye moves around the object.
So the preprocessing is to generate a bunch of environment maps around the object, then each frame, use the view vector to warp/morph multiple maps to generate a novel environment map which is texgen'd onto the object.
Cube maps would be higher quality but might present a problem with the warp across cube face boundaries.
01-06-2002, 05:02 PM
This is all in the paper with more detail.
Thanks for the pointer Dorbie.
Unfortunately, this technique turns me off because of it's non-generality and difficulty in implementation. View-dependent environment maps are too much work. I don't have the time nor equipment to go photograph clear-coated spheres http://www.opengl.org/discussion_boards/ubb/frown.gif
So, this puts me back to the drawing board. It'd be great to start a discussion here of the optics involved and which methods would probably work the best.
I'd like to simulate a clear-coated metallic paint. For the reflection, it would be nice to use a simple view-independent cube environment map. BRDF may be the best thing for the rest of the lighting, but where would one get data for that and how would you simulate the metallic glitter?
01-06-2002, 09:52 PM
You can fake this out very easily.
Start with an illuminated base texture, then add a cubemap environment map * reflection function. That would be some clearcoat Fresnel f(V.N), There are demos which already do this, the reflecting/refracting glass from NVIDIA for example, it's easy by multiplying with with an eye space cubemap that maps f(V.N).
You also want high dynamic range for the reflection so you might want to add in an additional term like the last one but with a separate environmant map with only the super bright spots and a different fresnel term, maybe one which accounts for the super brightness of the light and your limited precision.
That's basically 4 or 5 textures and probably two passes, IMHO it'd look great.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.