Saturday, 17 December 2011

Linear Workflow in Maya

(Image from Bushman tuts website at http://bushman.blog.com/2011/11/21/maya-linear-workflow-part/)

This has always been a confusing aspect of post-production work to me especially because of how critical it could be to getting it right through out the whole pipeline of a project, and in other to get a final result that had the required quality. So I decided to do a bit of research so I could understand it better and also improve the quality of my finished animation piece.The confusion about linear workflows start with the fact that graphics programs process images via a linear system or method, but the display devices we use to visualize these images have been calibrated by a different standard based on how video is recorded and thus images that will be shown via these devices need to be corrected. This is where the concept of gamma comes in. While a linear graphics program produces images at gamma 1.0, display devices display images at gamma 2.2 and therefore correct gamma 1.0 images by that factor so as to display it the way the human eye would expect to see it.

It is this confusion that leads to the first problem which is that very frequently images and textures used in linear programs such as Maya have this gamma 2.2 correction already baked into them and then again after render, when displayed via normal display monitors have another gamma 2.2 correction applied to them. This in turn means that the images have 2 sets of correction on them and would appear more contrasted than they ought to. This by itself defeats the advantage of the linear workflow which requires that linear processes should only be applied to linear data and so it  is usually advised that any image to be used as a texture must first be converted back to a linear image in a software such as Nuke so that the 3d program will have corrected data pass through it and maintain the integrity of the linear process.

The second problem occurs because maya as a package itself not only processes images in linear color-space but also displays it within its custom render viewer the same way. In essence, we see an "uncorrected" image and in the process are prone to cranking up light and color values to simulate the effect and values that we want. Maya does not have any built in way of changing the gamma of the image within the render viewer at present and this should perhaps be introduced in layer versions of the software. As such, the workaround method for maintaining the linear process within Maya is then to add a mia_exposure_simple node to the lens shader of the renderable camera so it corrects the image being seen during preview to gamma 2.2 and only at the time of final render do you set it back to gamma 1.0 to maintain the linear quality of the images for compositing. for images being used as textures or even color values one can add a gammaCorrect node between the texture node and the shader's diffuse input. This converts the colour space of textures back to linear and maintains the integrity of the linear workflow.

Finally, at the rendering stage, images should be rendered as openEXR images/files as they by default maintain only linear data. At the time of compositing, the advantages of this process can be seen as Nuke can make use of the linear data without any loss in quality and can render out the corrected gamma 2.2/sRGB images for viewing on normal monitors. Although the nature of this article is somewhat technical, understanding this workflow I think is critical to standardizing the way I approach producing finished and polished work especially keeping in mind my desire to adhere to front-of-the-line industry best practices. I have attached below some of the video tutorials that have helped me to grasp this concept more firmly below.



Maya Linear Workflow (Part 1 of 2) by jidez99 Part 1


Maya Linear Workflow (Part 2 of 2) by jidez99 Part 2

No comments:

Post a Comment