Adverti horiz upsell
Faking radiosity in Maya
Faking radiosity in Maya
natgeo, added 2005-08-31 10:22:41 UTC 45,710 views  Rating:
(0 ratings)
Page 1 of 1

An approach of simulating color transport in Maya in few steps without any extra light source...




Well, to begin I'd say that this tutorial is a global method to fake 'easily' and quickly radiosity in Maya. I know there's many different ways to achieve the same effect.

You may want to see this as a guideline more than a 'must-be-done-this-way' thing.

So, here is the workflow to simulate radiosity in Maya and other 3d packages (as a general workflow)

I've taken the Cornell box as example. No big deal for the model and the texture, simple materials with colors.

For the lighting, I first have worked with an area light (which is obviously the better light source in this case for illumination).
But as long as I worked on it, I noticed the shadows were too strong (to me). So finally I used a spotLight which is better for the shadows. If you tweak a bit the parameters, you can get an area light type of illumination with a spot.

A little technical spec seen by the artist I am. Color transport or reflected light 'technically' is 'globally' a ray that hits a surface, bounce on it according it's normal, and hits another surface, and so on...

Regarding radiosity package such as BMRT, color diffusion is given by the diffuse attribute of a material (Kd). The higher this attribute is, the more light will be emitted by the surface and then a close object object from a high diffuse material will receive more refected light than one with a low Kd.

In our case, the main trick is to see which object is supposed to receive color from another one.

The first thing is forget about radiosity. Make your shading and lighting 'as usual'. Once this is done, you have to calculate some passes of reflexions.
In this tutorial, I have rendered 3 different passes (One for the sphere and cube, one for the background wall (blue) and one for the roof and ground).

In each cases, I have applied a simple black blinn (with eccentricity set to 0, a white spec color, and fully reflective) and a 3d bump with a granite texture to the objects supposed to receive color.


Here are the images I used to generate the reflected color maps.




Sphere and cube pass...
Note the very noisy bump to catch colors from everywhere as the normal is perturbated.




The floor and roof pass...
Note that the sphere and the cube are only visible in reflection.




And the background wall.


Once those reflections maps calculated, remap them into the incandescence attribute of your material with a 3d projection (perspective type).
To avoid a washed out material/object, set the colorOffset of your projected texture to -0.1.

When you render the image, your reflected color maps are noisy (like it's been rendered). So let's apply a little blur to those image. Previously, I was using the filterOffset of the tetxure file to blur the image, but it sucks!
Another way of blurring the image, is to use the uvFilterSize (thanks to Duncan for that tip in one of his posts on Highend).
The uvFilterSize calculates how blurry the texture is regarding the distance from the object to the camera.
So, select your texture files, then create a ramp without its 2d placement. Kill the outUVFilterSize connection of the file, and connect the outAlpha of the ramp into the uvFilterSizeX and uvFilterSizeY. Then delete 2 colors of the ramp, set the remaining to 0 and render an IPR session.
Apply a different uvFilterSize per material to have a smooth reflected color map.

For one shader, the hyperShade would look like this.




Now, the higher value the ramp's color is, the blurrier the texture will be.


The time to get a coffee while rendering (long because of the ray-traced shadows), and it should looks great (At least I hope so)



Limitations regarding this method:

- The smaller an object is the more difficult it'll be to see a reflected color on it (because applying a blur to the texture file will mix the colors from a normal to another (see the cube has some green feed_back to its normal 'facing' the camera).



And the final Cornell box image.

click for larger version


And this is the previous image I had made to illustrate the (first) version of this tutorial. You can see the difference...

click for larger version


Once again, I warn people that it's only a guideline for faking radiosity. This method will work in 'most of the cases', but you may need to think about the thing depending of the shot you have to fake, the objects, etc...

Anyway, I hope this tutorial will help you and will give you ideas to enhance your lighting / rendering