Tuesday, November 20, 2007

Showing-off with the new B2 Domelight

As some of you may already know, we've just released a new Brazil 2 pro build with several new beta features (check the attachments at the bottom of that post). We've already started getting some interesting test imagery -- I thought it would be cool to share :)


"Render test by Cuneyt Ozdas -- Domelight with Brazil 2 Advanced material, SSS texture and area highlights. The scene is lit by the "Walk of Fame" HDRI from http://www.hdrlabs.com/gallery/panoga... The same HDRI is used as an environmental reflection and can be seen in the chrome sphere. Rendertime: ~4 min/frame on a 2Ghz Core2 Duo notebook (T7200 processor) 2GB RAM Max9. Pure QMC solution, no irradiance/render-cache, and no additional lights in the scene."

The youtube video got pretty compressed, so here is a 800x600 divx 6 version. (1.5 MB)

... And an image by Nathan Fariss:

This one uses HDRI from the Domelight with GI, the new analytic bump mapping, the new bi-directional sub-surface scattering (sweet!), caustics, dispersion.... Nathan is threatening to add more features to it -- if he does, I'll update the image :)

Also -- google alerts sent me a link to a new Brazil V1 video tutorial today, called, "Easy Occlusion with Brazil R/S." A couple things to note on this: 1) You can do the same thing with colored lighting if you use the Chroma Shadow pass, and 2) his technique will not work if you're using over-bright/hdr lighting (the blacks in the shadows end up being clamped-1.0-intensity-light when inverted). For doing the lighting passes when you want to use over-bright/hdr lighting, use the white plaster pass.

Sunday, November 18, 2007

Anisotropic Highlights

Theory

Anisotropic reflections occur when small groves in a surface cause the reflection to be stretched in a particular direction. So how do we create them in 3d? Well first, anisotropic reflections in cg can be split up into two categories.

  • An Anisotropic Highlight. A highlight is just a faked reflection of a point light source. Most 3d apps have a way to do anisotropic highlights, and that's what this tutorial is about.
  • An Anisotropic Reflection takes an actual reflection of your scene or an environment map and stretches it based on an anisotropy direction. This will be discussed at a later date.
Take this real world example of a christmas ornament that's made up of fine synthetic hairs that all travel in one direction.

Figure 1
Figure 1

Here's the direction of the grooves.

Figure 2
Figure 2

Here's another anisotropic highlight on a sphere...

Figure 3
Figure 3

This is caused by grooves like this...

Figure 4
Figure 4

Here's some Anisotropic highlights on a plane. A horizontal highlight like this...

Figure 5
Figure 5

is caused by vertical grooves...

Figure 6
Figure 6

A vertical highlight like this...

Figure 7
Figure 7

is caused by horizontal grooves...

Figure 8
Figure 8

Here's the example of a CD or the bottom of a pot...

Figure 9
Figure 9

Here's the direction of the grooves that causes the pot picture above.

Figure 10
Figure 10

As you can see, the grooves always go in the perpendicular direction to where the highlight is stretched.

3dsmax's Brazil Advanced Material Rendered in Brazil 1.0 or 2.0

Brazil has an anisotropic highlight as part of the Brazil Advanced's Blinn Highlight Shader. It's similar to the standard max anisotropic highlight, but with a few differences.

Here's the anisotropic highlight with default settings...



Notice it's quite similar to Figure 3 above.

The orientation is defined in object space, so it defaults to the grooves traveling along the x axis of the object, which of course produces a highlight that goes straight up and down (again, the direction of the highlight is always perpendicular to the direction of the grooves). Changing the angle parameter from 0 to 90 will change the direction of your non-existent bumps, and hence change the look of the highlight to something similar to Figure 1.



Here's the interface to the shader


To achieve the pot example above, you need to provide the shader with a more complex direction. That's where the angle map slot comes in handy, which bases the angle of the anisotropy off of a black and white map.

In the angle map slot, place a gradient ramp and set it up like this...


So have the gradient go from black to white. Set it to Spiral. Also, note that the Output Amount is set to 360. This is because, in Brazil the Angle is from 0 degrees to 360, so you need to set the gradient ramp to go from a value of 0 to 360, which is achieved by multiplying the black to white gradient by a value of 360. So the color black remains 0, and the color white, which is usually 1, is now 360.

Make a cylidner, and apply a UVWMapping modifier on your object, and set it to planar from the top.

And we get the correct highlight...



To learn more about Anisotropic highlights and reflections, please visit http://www.neilblevins.com.