Return To Teaching3D Home Page
 
 
 
 

Rendering For Linear Workflow

 

Theoretical Basis

An important concept in rendering, particularly in high quality modern rendering, is the "linear workflow". Using a linear workflow will result in more physically correct renders. For example, if used properly the lighting will look more natural. Even non photorealistic work can benefit from a linear workflow.

Linear workflow is actually very simple to understand.  What it means is that math during rendering should be done correctly. Numbers should add up the way they ordinarily would.  One plus one should equal two.

Unfortunately, by default, due to technology, and human perceptions of light and color, rendering in Maya does not always appear to be linear. This is because what is seen on the monitor when working with Maya is actually a sRGB signal.  It is a non linear color space, where number don't add up the way they normally would in Math.

To understand this properly, you need to learn about human vision/perception, physical light levels, representations of light spectrums and levels in software, and the devices used to display images.

Note that most modern hardware uses the sRGB color space by default.







Getting back to rendering

To be clear:

  • internally, in the renderer, everything is computed in proper linear space.
  • this is true for every renderer that is physically correct at all (eg. Mental Ray, Cycles, Luxrender)

However, textures used as input to the renderer, images output, and displays on screen, are not necessarily in linear space.

Thus, linear workflow break down into the following steps:

  • Know the color profile of source material.
    • If you don't know, the best assumption is sRGB.
    • This applies to any textures, photos, scanned data, etc.
  • Set the software up to convert the source images (textures) into linear space.  Textures usually go from being sRGB on disk to being linear in rendering calculations.  The conversion process essentially color corrects or "gamma corrects" the source images into linear space, from whatever space they were in before
    • During this process.you may need to tell your 3D rendering software what color space the source images are in.
    • Often, a global default setting can be adjusted, so that it is automatically applied.
    • Again, if you don't know, the best assumption for input color space is usually sRGB.
  • Inside the renderer and in the settings in the 3D application, all numbers should be in linear color space.  Internally, in most renderers, most computations are done in linear color space by default.
  • Once the render is finished, color correct while converting the result back into a color space that can be properly displayed on hardware and perceived by human beings.
    • Most of the time this means applying a color correction that goes from linear space to sRGB space.

 

Maya Setup For Linear Workflow And Rendering

MR Color Management
 input - srgb
 output - linear
 output to openexr and
 set framebuffer to 4x32bit
 expect to color correct your renders afterward (this is good/correct)

Display options in render view

 use 32bit float
 input - linear
 output - srgb (to see a somewhat color corrected preview in the maya render window)


compare to physically correct lux and you'll see it matches!  Lux has
an entire tonemappng section in the gui.  If you turn off tonemapping
it will look like garbage... kinda like maya defaults.



Understanding why color and light is actually so much more complicated than it seems

  • Light is emitted from something, in a spectrum of specific wavelengths
  • Light travels, likely through a medium, in which it can be scattered or absorbed, wavelength dependent
  • Light hits surfaces, absorbed, tranmitted through or reflected, is it scattered in the process, from a typical 3d graphics artists's perspective the more scattered it gets the more "diffuse" the light is, the less scattered, the more "specular" it is.
    • Keep in mind the scattering, transmission and bouncing are all wavelength dependent
  • Light transmitted or reflected goes through the previous steps over and over again as it bounces through the scene
  • A few of the light photons eventually hit the viewer eyes (or a camera)
  • light is scattered through our lenses