Thursday, January 15, 2009

Render Workflow Overview

The main reasons for using RenderMan for Maya as my renderer are:
  1. Speed, especially when scenes are not raytraced
  2. Fast motion blur, which is important in my film
  3. Good memory management, which means fewer crashes (my Maya files contain anywhere between 2 and 200 characters, and can get as large as .5 GB)
  4. Render-time smoothing (i.e. subdivision scheme) enables me to avoid heavy polygon meshes in my already huge scenes
  5. Integration with Massive - initially, I was going to use Massive's direct integration with RenderMan, but have since abandoned this approach
  6. I'm a geek - I've always wanted to learn more about RenderMan because of its role in the history of CG
Due to time and resource constraints, I can't render everything with all the bells and whistles I like. I've avoided ray tracing because the size of my scenes would probably cause all sorts of memory issues and require heavy optimization. As a substitute, I've relied on RenderMan for Maya's point cloud occlusion, which is a non-raytraced solution. Even with this feature, however, I can't render entire scenes in a reasonable time frame. (i.e. less than 10 minutes per frame as I only have access to 4-6 render nodes at a time).

Therefore, I only use occlusion on the 'hero' characters such as Bir, his mother, the old man, the goons, etc. For the rest of the characters and the set, I baked the occlusion into the respective file textures using Mental Ray. While baked occlusion doesn't look as good as the real thing, the rendering speedup makes it a worthwhile compromise.

So for example, a multipass exr might contain:

DiffuseDirect:

DiffuseIndirect (i.e. Shadowing):

DiffuseEnvironment:

OcclusionIndirect (i.e. Ambient Occlusion):

alpha:

Put the above layers together*, and you get:

Beauty:



Initially, I was rendering out all my render layers (such as the background, sky, etc) into multipass EXRs, but found that it was overkill and I really just needed that extra level of control on the hero characters.

* The actual compositing operations are:
(DiffuseDirect - DiffuseDirectShadow + DiffuseEnvironment) * OcclusionIndirect

** I left out the Specular components for simplicity, but the math is the same as for Diffuse

Thursday, January 8, 2009

Confrontation Revisited

The confrontation between Maqbool and the goons has been bothering me for some time now. It feels a little sluggish and lacks impact. With input from colleague Joanna Griebel, I reedited the sequence.

Old:


New:


The new cut has an added line of dialogue for Maqbool ("He dropped his cap"). The old edit seemed unclear to a lot of viewers, and I think adding this line back in is an improvement. (The line was in the original script, but I had taken it out for some reason that I can no longer remember. Perhaps I felt it was redundant at the time.). Another reason I like the new line is that it is a reference to Bir's "Sir, you dropped your cap" earlier in the film.


Tuesday, December 16, 2008

Life Photo Archive Digitized



Google recently digitized the Life magazine photo archive. This means that many of the images from Margaret Bourke-White's documentation of Partition that I used as reference are now easily available online.

Thursday, November 27, 2008

'Topi' featured on VFXWorld + Massive Student Gallery

Some crowd tests that I did for my thesis are now featured on Massive Software's student gallery. There's a lot of other interesting projects that have been posted there as well.



VFXWorld also did a write-up on student work that features Massive, and included an image from my film - check out http://vfxworld.com/?atype=articles&id=3602&page=2




Sunday, November 2, 2008

Outtake

Sometimes a crowd character tries to steal the limelight:

Wednesday, October 8, 2008

RenderMan for Maya Notes

There's not a whole lot of RenderMan for Maya tutorials out there, so I'm collecting all the little nuggets I've gotten from various blogs on this post:

Turn off the default Final pass that contains all the objects in the scene (useful when rendering out multiple passes)
setAttr "rmanFinalGlobals.rman__torattr___computeBehavior" 0;

To generate a shadow pass
Use the 'Occlusion Direct' ancillary output

To generate a multi-pass OpenEXR
In the pass, under Output, right-click and select Create Output->Custom. This pops open a list from which you can select multiple outputs
For 16-bit vs 32-bit, under Extra Output Settings for the pass, select and add 'OpenEXR Pixel Type'. 'Half' is 16-bit and 'Float' is 32-bit.

To create a Matte
Select a Material, open the Attribute Editor and add the custom RenderMan for Maya attribute "Matte Object". This attribute works the same way as the "Black Hole" setting in Maya Software/Mental Ray.

Jordan Reece Halsey's blog has a good tutorial that walks through a Global Illumination example using point-based techniques.

Confused about shading rate and the render quality in general? Check out:
http://www.renderman.org/RMR/st/PRMan_Filtering/Filtering_In_PRMan.html


Cheat Sheet from above site:
"
  • ShadingRate - should be 0.25 or smaller for final images. Smaller shading rates may be needed for large displacements. Larger shading rates may be needed if the render is too slow, but image quality will suffer.
  • PixelSamples - should be at least 8 in each direction for a shading rate of 0.25 and should never be less than 2 / sqrt(ShadingRate). Even numbers of samples are more efficient for many kernels. Larger numbers of samples may be needed for motion blur.
  • ShadingInterpolation - should be "smooth".
  • PixelFilter - start with the mitchell 4.0 filter. To soften and/or reduce aliasing, increase the width up to 5.0 (fractions are ok!). For a sharper filter, use a custom Mitchell with controllable sharpness (using a RIF plugin for example); or, use one of the recommended standard filters: separable-catmull-rom 4.0, lanczos 4.0 to 6.0.
"

I don't go below 0.5 for my own shading rate, and usually stay at 1, and use the relationships defined above to compute the appropriate parameters for my renders.
--------
Also, when enabling Motion Blur, values of Motion Factor greater than 1 automatically drop the shading rate of motion blurred objects, which may or may not be desirable. I use this feature to speed up my Ambient Occlusion pass because AO is more noticeable when the object is not moving.





Tuesday, October 7, 2008

8 rules for writing a short story

From http://en.wikipedia.org/wiki/Kurt_Vonnegut#Writing

In his book Bagombo Snuff Box: Uncollected Short Fiction, Vonnegut listed eight rules for writing a short story:

1. Use the time of a total stranger in such a way that he or she will not feel the time was wasted.
2. Give the reader at least one character he or she can root for.
3. Every character should want something, even if it is only a glass of water.
4. Every sentence must do one of two things—reveal character or advance the action.
5. Start as close to the end as possible.
6. Be a Sadist. No matter how sweet and innocent your leading characters, make awful things happen to them—in order that the reader may see what they are made of.
7. Write to please just one person. If you open a window and make love to the world, so to speak, your story will get pneumonia.
8. Give your readers as much information as possible as soon as possible. To hell with suspense. Readers should have such complete understanding of what is going on, where and why, that they could finish the story themselves, should cockroaches eat the last few pages.

Vonnegut qualifies the list by adding that Flannery O'Connor broke all these rules except the first, and that great writers tend to do that.