Tuesday, August 5, 2008

Brazil Basics: Reflection Control and the Brazil Utility Material

Here's a little example showing the practical use of a few of Brazil's many, many settings.

I've been doing simple studio-type renderings like this of concepts for a client. Not concepts of sinks, but it will do. It's lit using the skylight and a single bright panel, with Global Illumination enabled but with just a couple bounces. The background is a gradient, but this would all work the same if I was using an HDR environment or whatever. The colors are intentionally 'odd' to highlight what's going on.
So what we have is the object on a plain, partially-reflective background. I used the Reflection Decay option under the Reflection Parameters on the floor to fade out the reflected sink. The floor is a Brazil Plane Primitive, set (not in the lower shot of course) as infinite.
So assuming this looks okay, the problem is that I want a pure white background.
To force the floor to be pure white, I did two things:
  • In the reflection parameters of the floor material, went to the Basic Reflection Control and checked the box labeled "Env:" This lets you set a different color or material for the environment the object is reflecting. I set the color to white.
  • Increased the Diffuse multiplier in the default material settings. The problem of course is that the shadow and reflection are 'blown out,' and it's lighting up the sink, which might be perfectly realistic, but this is not exactly about "realism."
This is where the Brazil Utility Material comes in. If we place the floor material inside a Brazil Utility Material, we can tweak, among many other things, the amount of lighting it emits and receives from global illumination. To do this, I created a Utility Material and assigned it to the floor object, then inserted the old floor material into the Base slot of the Basic material overrides section. I then scrolled down to the Global Illumination Parameters and reduced the Level and Saturation values for generating and receiving GI.

To completely remove the reflection of the pure white floor from the sink(which is not very realistic of course, but just to illustrate what you can do,) I went back to the Basic Material Overrides and inserted into the Reflected slot a copy of the original floor material, minus the adjustments.

Finally, to make the 'sky' pure white(with quicker render time than making the ground plane infinite again)I made a Single Color Texture and set it to white. I opened up the Environment section of the main Brazil settings panel, and inserted the texture into the Planar background slot of the Global Maps overrides. You can see it has no effect on the environment reflected on the object.
Here I switched the sink to a glass material and adjusted the ground plane to show the effect of the planar background setting.
With the planar background override turned on, you can see it has no effect on what's refracted or refracted in the glasss.
I posted a question about this on the Brazil support forum, thanks to Paul Sherstobitoff.