Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This tutorial expands on the instructions set forth in Harsh Agrawal's Community Site version and focuses on look development and lighting.

...

The scene recreates studio lighting as well as organic objects and adds depth of field for better realism. We'll dissect each object and its shading first.

Modeling

When creating assets, it's important to understand which objects fall into certain categories and model their detail accordingly:

  • Hero assets - Things like main characters and the focus of a shot or story
  • Set assets - These may have varying levels of detail based on where they are in a scene. Close-up items may need more details
  • Props - These are often kept as simple as possible, you'd be amazed at how good texturing can take a low-detail asset and make it look quite nice!

RenderMan is designed to render subdivision surfaces when possible for animated characters and hero objects. This reduces possible tearing and improves the look of characters and organic objects seen up close. This is also a good choice when using displacement. Polygons like to come apart when displaced, so convert to a Subdivision Surface.

When modeling for Subdivision Surfaces, keep these things in mind to get the shape you want but not destroy performance:

  • When converting to a Subdivision Mesh using the default Catmull-Clark scheme, to avoid over-dicing, use quads only. This means all your faces have 4 sides. Avoid triangles and N-sided faces.
  • Only model the bare minimum detail you need in the base mesh so that the resulting surface is the correct shape when subdivided and not more.
  • Keep creased edges to a minimum, they can be expensive.
  • Make use of higher micropolygonlength settings. This provides automatic level-of-detail, and higher numbers are more coarse but can still be enough to look good. Try settings anywhere from 1.5 to 3 for reasonable production quality. (Note that if this is too coarse you will get shading artifacts especially along edges, reduce the value slowly. Anything less than 1 is very high quality.)

Polygons are also quite useful for anything with hard normals (faceted faces for many inorganic things like buildings, props, set pieces, etc.) You may soften these normals for closer rendering or add more modeling details to make it look nice but be aware that silhouette artifacts may appear during shading if that's insufficient. But despite these caveats, polygons for background and prop objects will render just fine and perform quite well. These objects are typically not deforming and plentiful in your scene. Making these subdivision surfaces can balloon your memory usage for little visual impact. Make use of bump mapping instead of displacement on polygons or convert them to subdivsion surfaces for displacement.

When laying out your UVs, avoid overlapping UVs and keep an eye on UV shells with flipped edges as this can cause artifacts when displacing or warnings during the render.

Info

Our texture caching mechanism can handle filling the scene with high quality textural details and looks, but we need the whole scene geometry to trace against to live in memory. By being careful with your modeling choices you can fit quite a lot into your scene and render many many gigabytes of textures at once.

Understanding the basic design of PxrSurface.

The main material used for making objects, props, and characters in RenderMan is the PxrSurface material. This is a single (and therefore "monolithic") material used for all kinds of shading jobs. Each section of the material represents a particular "lobe" of the material.

...

  • Textures should be named appropriately based on their destined effect and object assignment. For example: <object>_<effect>.jpg or possibly tableTop_specular.jpg
    • Do not use spaces and special characters in names like: theCar&boat.jpg or "the Car and Boat.jpg"
    • Do not use spaces and special characters in file paths either. These textures may fail to load.
    • Texture sequences should have a clear naming convention for frame number. mySequence.0001.jpg is correct rather than mySequence0001.jpg or mySequence.jpg.0001
  • Most formats can be used such as .png, exr, .tif, and .jpg, but to be rendered they must be converted to the .tex format. In Maya this happens when you begin a render and cached on disk to be reused until changed or updated in the scene. Scenes with many textures may take awhile to convert the first time to render.
  • Occasionally interchangeable naming pairs occur, consistency is important to your pipeline and artist's ability to work accurately.
    • Diffuse and Albedo
    • Roughness and Glossiness (please take note that RenderMan uses the standard "Roughness" convention where 0 = mirrored and 1 = rough or nearly diffuse) Roughness also applies to a Diffuse parameter so occasionally artists substitute Glossiness as the name.
  • Textures can be color (RGB) and scalar (greyscale) and color channels can be connected to matching parameters to drive them. For example, the Red channel of an image can use used to drive a scalar (float slider) if it's useful.
  • Normal maps are typically preferred over bump maps (scalar or grayscale) for their detail.
  • Linear color workflow is highly recommended and textures where their color is visible in the final render should be linearized (the typical sRGB gamma curve should be removed for rendering). Textures used as data like bump, masks, and displacement, should not be linearized.
  • Displacement maps and other data textures should be the highest precision possible to avoid artifacts from texture quantizing. Usually these are exported from modeling applications as floating point EXR or Tiff. See workflows for normal and scalar displacement.

...

Note

There is no particular reason not to use the Maya File Node for texturing if it has the features you require or you enjoy the simplicity of using the Maya workflow for things like texture sequences. If you require a viewport representation of your texture, use a file type Maya recognizes (.tex and .tx are not currently supported) and the Maya File Node. This should display in the Viewport to aid in texture placement.Maya workflow for things like texture sequences. Both the Maya file node and the PxrTexture node will display textures in the viewport. However, only the Maya file node will display UDIM/tiled textures in the viewport and apply a corrected gamma to the viewport.

 

Wood Table

The table makes use of a few different texture maps. One is for the diffuse (sometimes called albedo) color, this controls the actual color variation and result for the wood. This is the most basic form of color mapping for objects and is independent of reflection color and other material effects.

...

Using the IPR mode in Maya, you can pass your textures through some utility nodes and make some value adjustments directly in the render. 

Info

The pattern networks can be evaluated during the render every time it processes the texture or you can bake the result and improve overall efficiency for complex assets. (You might want to avoid baking things until you have final approval from the client to avoid endless trips to the render farm.) Some patterns are more expensive to evaluate than others and can begin to impact your scene render times. Baking can improve this since it's simply evaluated once as a texture and cached. You can find out more on the topic of efficiency by looking at the article on Improving Performance.


Note

While Ptex can save time preparing assets for texturing, the performance is not as good as using standard textures on objects with UV's defined. This cost and benefit balance should be weighed when planning a project. If you have many objects to texture, Ptex may save your artists time overall. Otherwise you may find better rendering efficiency and simplification with texture maps and typical UDIM (or "tiled") UV layout.

...

Below, the Specular Roughness texture is changed using a PxrColorCorrect node and adjusted in Maya's IPR. Different Gamma values are used in the Color Correct section of the pattern. Since the texture is a grayscale (scalar) map, the RGB channels all have identical values. Only the Red Channel is manipulated and then connected to the Primary Specular Roughness parameter. Alternatively you could connect the Color Correct pattern to a conversion node like the PxrToFloat pattern, but this adds another evaluation to the node graph that's not necessary in this example.

...

Layering this affect more easily has two options we'll talk about and a third concern about trace depth covered in another document:

  • Using PxrLayerSurface to separate and then combine the shading of the glass and the dirt.
  • Correct UV layout to prevent texture repetition on the inside and outside.
  • Controlling ray depth appropriately to get the right physical result for glass.

...

Info

When rendering most glass containers with liquids, it's helpful to understand intersection priority to avoid artifacts and "air gaps". This is technically known as the dielectric interface or nested dielectrics.

...

The milk surface is actually simple to create. The PxrSurface pages provide a useful table of data used to create common items using Subsurface Scattering. Populate the parameters under the Subsurface rollout with the correct color values.

After this there are 2 simple ways to control the result you require:

...

This scene makes use of a common three-point lighting scene. There is a fill light that makes use of the PxrDomeLight, a rim and key light that use a PxrRectLight.

With the exception of the Fill Light, the other lights use the emission focus to create a softer edge and a subtle spotlight effect.

...