Jump to content

PBR = good car paint


anamous

Recommended Posts

We just finished a short press film for the new mercedes SLR on a very VERY tight schedule (3 weeks from brief to delivery). Most of the shots of the new car are CG, some were shot. Mantra's PBR was used exclusively. I'll post a higher res version as soon as I get it from the editor. A 1080p version is coming up.

http://www.youtube.com/watch?v=cM3oHlFgfCc

cheers,

Abdelkareem

PS: forgot to mention that the edit itself is a bit strange, but we had no say in that :)

Edited by anamous
Link to comment
Share on other sites

Wauw..Nice renders. - Awsome work

I am really impressed of the quality of Mantra :-O

Could you give some more info on the shader, and maybe a brief explanation of your ligth-setup.

What about the model, is it nurbs ++

Please tel us more!!

Erik

Link to comment
Share on other sites

Shaders are pretty straight forward. Most time was spent on the car paint shader, which does the obvious (base metal using two custom phong lobes, flakes, and clear coat with modulated normals). Lighting was done purely with white cards that had high dynamic range textures applied to them (we took a butterfly, lit it with a spotlight, and made bracketed photos of it, and used those as HDRIs).

Here's an image from the R&D stage - some mistakes in there. We had a tesselated CAD model to work with, which had thousands of normal issues.. About a week before delivery we received a NURBS model - both a blessing and a curse. The hood alone consists of about 640 profiled NURBS patches. There was no time for correct conversion to polygons, so Mantra had to fight through the raw NURBS surfaces (that in itself is an interesting topic....).

post-1116-1229802377_thumb.jpg

cheers,

Abdelkareem

Link to comment
Share on other sites

Beautiful!

I'm curious: why did you choose mantra instead of for example V-ray?

Is your studio based on Houdini? Was it easier to build the shaders in Houdini? Does it render faster?

regards,

Henning

Our rendering pipeline is based on Mantra and Mental Ray. Mantra was the better choice for this project. We switched away from Vray (we used to be a premium customer) a while ago for various technical reasons. I'm sure some one talented will be able to get at least as good results out of Vray (or almost any other renderer out there).

cheers,

Abdelkareem

Link to comment
Share on other sites

Outstanding work anamous, thanks for posting. Nice to see mantra used in situations like this.

I finished a similar PBR render a couple of days ago. Similar in the sense that it's a vehicle and I tried for some sort of studio lighting, but your car and renders are much sexier. :lol: But it did make me wonder how you guys approached some of this, and I was hoping you could share a bit. Here's the render I did. The only one, because it took my poor laptop an ungodly amount of time to get it this noise-free.

th_TPM_720p.jpg

I'd love to hear if you guys went with PBR or MicropolyPBR, and definitly a bit more about the shader if it's not too much to ask. When you say custom phong lobes, what does that mean? Something like two layers of speculars, maybe attenuated with fresnel or similar? Or something completely different...? And the clearcoat reflections, what do the modulated normals do? What about the diffuse, is anything done to that? What sort of problems were there with NURBS? I remember trying to import some IGS data into Houdini in the past, and on occasion mantra would ignore the trims and render out the whole patch.

Sorry about all the questions, might be a bit much.

Again, great work! Looking forward to the 1080p version. :ph34r:

Edited by DaJuice
Link to comment
Share on other sites

We used PBR, since MPPBR would have been too slow in this case - it's always a matter of weighing memory usage/render time against each other. The basic shader components are actually very simple.

- No diffuse() calls. This may be a bit strange but I actually never use diffuse() in PBR when dealing with metals and metallic surfaces. I see metal surfaces as a combination glossy and specular reflections, but rarely if ever do they have a reflection angle that resembles a diffuse reflection. Of course, in traditional lighting/shading, we try to approximate this behavior with a blinn or phong, but in the context of PBR, we can actually afford something better. In this case, the metal surface (silver car paint without the clear coat actually looks a lot like aluminum or the surface of a macbook pro..) was modeled using the VEX function phonglobe() twice (I had actually intended to use the cone() function but thankfully SESI convinced me otherwise ;) ). This function takes a reflection direction and an exponent and calculates the amount of reflected light. The higher the exponent is, the tighter the reflection angle. We used one wide lobe for the rough base and one tighter lobe for the specular sheen. The actual response model of the metal is a bit more complex, but this will do for now :). We mixed the two lobes using a fresnel function. In the near future, I will try to get something useful out of the lafortune() and measuredlobe() functions, I suspect that a better response can be modeled with those.

- The flakes we created using a noise function that had a smooth stepped cutoff applied to it, giving us nice antialiased dots in the s/t space. The shading normal for these points was modified by adding a quasi-random vector to it, and the resulting vector was used in a specular() call to get a specular reflection. Another fresnel was used to attenuate the effect of the flakes, since they tend to stick out more at facing angles. The result was then added to the base metallic layer.

- The clear coat is of course a specular() call. But before the call, two layers of noise are applied to the shading normal. The first on is an extremely low frequency low amplitude noise that creates the illusion of imperfections in the surface curvature of the car parts. The second one is fairly high frequent and is very low amplitude for silver car paint, and of higher amplitude for black car paint, and models the imperfections in the depth of the clear coat layer (seen when you observe a detail of a black car at night - you can see that reflections are "bumpy"). The clear coat layer has its own fresnel coefficient by which it is multiplied and then added to the other layers.

Soooo basically, you end up with the following shader layout (in disgusting not-even-quasi code)

//metallic base
baseF = phonglobe(base_R, lowValue)*base_kt + phonglobe(base_R, highValue)*base_kr

//flakes
flake_nD = smooth(noise(highFreq),cutoffparams) + N
...calculate reflection vector using fresnel function
flakeF = specular(flake_R)*flake_kt

//clear coat
ccoat_nD =noise(highFreq) +noise(lowFreq) + N
...calculate reflection vector using fresnel function
ccoatF = specular(ccoat_R)*ccoat_kt

F = baseF + flakeF + ccoatF

That's the rough picture :) There's a lot missing, some of which I have yet to implement (and package and hopefully upload to exchange). It's not completely physically correct but it looks ok...

cheers,

Abdelkareem

  • Like 1
Link to comment
Share on other sites

Thanks for that detailed explenation anamous, really appreciate it.

The makeup of your shader is pretty different from what I thought. I was pretty confused until I started looking at the help and the vex code in some of these VOP nodes. I was getting mixed up still thinking in terms of traditional rendering, but I think it's much clearer now.

For example it looke like the Trace VOP uses specular() when you do mirror reflections and switches to cone() when you want to do glossy reflections. Why did sidefx advise against using the cone function btw? I didn't see anything about the lafortune() or measuredlobe() functions in the help, maybe you guys are using a newer version.

I have other questions, but I don't want to clutter your thread with them. Thanks again so much.

Link to comment
Share on other sites

The cone() function doesn't blur light borders the way you would expect it to - it will give you sharp outlines on the light source reflection, which isn't really desirable in this case. The phonglobe() function blurs everything "correctly".

I didn't use lafortune() for the same reason as you: I have no documentation beyond what "vcc -x surface" tells me, and I didn't want to take that risk in a 3 week project ;)

cheers,

Abdelkareem

Link to comment
Share on other sites

The cone() function doesn't blur light borders the way you would expect it to - it will give you sharp outlines on the light source reflection, which isn't really desirable in this case. The phonglobe() function blurs everything "correctly".

You're right. I actually noticed that for the first time when I was doing some test-renders a couple hours ago. :blink:

conefunctuion.jpg

Link to comment
Share on other sites

  • 2 weeks later...
hey nice.

is the car paint built in one shader? or is it separate layers and comped? eg. flakes, clear-coat ...

again good work!!

jason

Thanks, everyone. Unfortunately, Mantra 9.5 doesn't support AOV's or output layers in PBR mode. The car paint was rendered as a monolithic shading. BUT it's perfectly possible to set up houdini takes, and split the shader using them (rendering each pass on it's own). If you intend to create the look in compositing (recommended for most cases), a good setup of passes for the carpaint would be

- base metallic (possibly with the highlights as a pass of it's own)

- flakes

- clearcoat reflection

- base fresnel

- flake fresnel

- clearcoat fresnel

cheers,

Abdelkareem

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...