Artwork by Leif Pedersen

© Disney/Pixar

Tutorials | Stylizing the Pixar Ball

Stylizing the Pixar Ball



RenderING with Style


RenderMan ships with a flexible stylization toolset called Stylized Looks and in this introductory lesson we’ll demystify its use and creative potential.

So, technically, what is Stylized Looks? This powerful toolset allows RenderMan users to use the power of display filters, which are imaging plugins used to adjust pixel values before they are sent to the display driver.

In simpler terms, it’s a way for users to adjust their image before it gets output. This means the stylized results in the image represent a “true” pixel, as the image hasn’t gone through destructive post processing and filtering.

The Stylized Looks toolset ships with 3 main stylizations: Toon, Lines, and Hatching. We can call these “Looks.” There is also a fourth Look called Canvas, which provides a great starting point for styles which need backgrounds, such as paper.

The good thing about RenderMan display filters is that they can be daisy chained into a traditional layering stack, which lets us operate creatively in a familiar 2D mindset, a-la Photoshop or like a traditional illustrator would typically approach a drawing. This means that besides toon effects, we can create familiar workflows, such as starting with a paper canvas, creating the line work, and layering in pencil hatching techniques. The best part is that it’s all non-destructive and works within our existing RenderMan materials and lighting tools!

The Stylized Looks toolset features the same extensibility which makes RenderMan a production renderer, allowing for further flexibility via a Stylized Looks Pattern, which enables per-material overrides and creative pattern workflows.

For those of us who are very visual, picture the overall workflow like this…


In the above schematic, the input is our 3D scene, from which we’re deriving a lighting “signal” such as the diffuse or specular pass (AOV). This is the data that Stylized Looks uses to create its magic. This signal can be almost anything, including the albedo of a particular object, custom light groups, or even light linked LPEs. Oh, the possibilities! 

This signal gets passed to the Stylized Looks Display filter, where we have all the controls we need to stylize the image or modify the incoming signal. These stylized display filters work with a series of specific AOVs and LPEs to generate the Looks, such as data and color passes, which you can also tweak and customize, effectively putting the artist in control.

We also have familiar masking and compositing apply modes to make sure we can layer these Looks creatively. 

Of course, there’s that Stylized Looks Pattern right in the middle, which allows us to get even more granular if we need to, by hijacking arbitrary attributes and allowing us to modify them on a per-material basis.

TIP

Stylization is not only about rendering, it might extend to your models and textures.


In a practical sense, the concepts above can be distilled into 4 main categories in the Stylized Looks UI:

    • Input - The lighting signal we’re working with
    • Look - The final style we want
    • Mask - Options for masking our results
    • Compositing - Apply modes, transparency, and outputs


We can see some of these Looks and their respective lighting signals above. In the ball example, we’re doing the following:

    • Using the diffuse lighting signal to create a Toon effect.
    • Using the same diffuse signal, we bring back our shadows with some cross Hatching.
    • We’re also stylizing the specular by using its signal and applying a Hatching filter to it.
    • Finally, we’re using a custom AOV signal, the albedo, to generate lines.

Now that we understand the logic behind the system a bit more, let’s take a look at this process more practically, with a step by step breakdown. We’ll take a PBR (physically based rendering) scene and use the toolset to stylize it.

Here’s our starting image. The first thing we’ll do is disable the depth of field, to get rid of the physicality of the camera lens. Also, we can set the specular bounces to 1 and the diffuse bounces to 0 … this is traditionally too low for any reasonable work, but we’ll override the image with a Toon Look, which will compensate for the darkness caused by the lack of indirect bounces. It turns out stylization can help us with efficiency as well.

Another important piece of the puzzle is turning on "Enable Stylized Looks" in the render settings. This will create all the necessary AOVs and LPEs behind the scenes. We don't want to forget that!


TOON

The Toon filter applies a traditional cartoon or anime style effect to our lighting signal and provides remapping controls for high and dark values. A strong lighting signal works best to emulate these traditional illustration styles, such as a directional light.

We’ve done very little to modify the default values to get an appealing result. Of course, using a cartoony looking floor texture helps our cause!

Attributes we’re changing:

  • Input Remap > Signal Max = 0.5 | We’re clamping the max signal value to exaggerate the effect.
  • Stepping > Smooth = 0.02 | We want to avoid any aliasing in the toon effect.
  • Play with Toon Blending




TIP

You can keep the indirect bounces very low, as the Toon style lets us remap the shadow areas with colors.


HATCHING

Our next step is bringing back the shadow information we’re eliminating in the Toon filter. The Hatching Look is really useful for getting creative with a multitude of built in textures and we can also create our own set of textures to give the image a more personal style.

Attributes we’re changing:

  • Input > Mode = Div Albedo | This is using a white shader approximation.
  • Input > Input Remap = 3.5 Gain/2.0 Gamma | We’re remapping our signal to exaggerate the lighting terminator.
  • Projection > Mode = 1 Value | We can use a series of textures or a single one. Let’s keep it simple.
  • Projection > Frequency = 0.2 | The size of the textures is based on the scale of the scene.
  • Projection > Projection = Triplanar | This projection will make the textures stick to our scene.
  • Play with the Color | We’re adding a bit of purple to the shadows, get creative!
  • Play with the Textures | Change the textures to any one you like or make your own.
  • Compositing > Mode = Over | We need to simply layer this Look on top of the Toon.
  • Compositing > Gamma = 1 | We can tweak its intensity one last time.


TIP

Hatching is dependent on scene scale when using Triplanar Projections, so make sure the assets in your scene have a consistent scale.


SPECULAR HATCHING

One of the fun things about the toolset is that it allows us to bring in any LPE or AOV to drive the Look, so we’re bringing back the specular highlights with some crosshatching. This allows us to avoid an unappealing CG cell shading look.

Attributes we’re changing:

  • Input > Signal =  Direct Specular | It’s nice to have a built-in signal for this!
  • Input > Invert Signal = On | We need to use the signal as a cutout.
  • Input Remap > Gain = 1.1 | A slight tweak to get rid of distracting mid vale specular highlights.
  • Projection > Mode = 1 Value | We can use a series of textures or a single one. Let’s keep it simple.
  • Projection > Frequency = 0.2 | The size of the textures is based on the scale of the scene.
  • Projection > Projection = Triplanar | This projection will make the textures stick to our scene.
  • Play with the Color | We’re keeping this value white, but by all means go crazy!
  • Play with the Textures | Change the textures to any one you like or make your own.



LINES

In illustration, having appealing linework adds your distinct style to an image, and developing a personal style can take a lifetime to master. Stylized Looks makes this process really fun with a series of controls for generating lines from a diverse set of line detection techniques.

Attributes we’re changing:

  • Line Detection > Type = Custom AOV | We can use any AOV or LPE here.
  • Line Detection > Data AOV = albedo | We’re picking albedo to use the textures for the line detection.
  • Line Detection > Weight = Hermite
  • Line Detection > Activation = Sigmoid.
  • Line Detection > Sigmoid Sharpness = 40
  • Line Detection > Sigmoid Offset = 0.3
  • Line Thickness > Thickness = 2 | Lines can be very subtle or more apparent, up to you.
  • Line Distort > Enable = On | Add a little wiggle, no one can draw a perfect line!
  • Line Distort > Offset = 5 | How distorted do you want your line to be?
  • Line Distort > Remap = On | This remaps the incoming distort signal from -1 to 1.
  • Line Color > Light Tint > Line Color Shadow = Purple | This tints the line in the shadow area.


And there you have it folks, a stylized Pixar ball! In the included materials you’ll also find other looks for you to inspect and have fun with, including a stylized refractive Pixar ball and an illustration Pixar ball.

We’ve only scratched the surface, so make sure you play with the attributes … and don’t be shy … stylize stuff!

TIP

Use the “M” button next to the display filters to mute and isolate their effect during look development.





Pixar Ball Stylizations

BONUS MATERIAL

As a bonus scene, we have a project made from open source assets courtesy of Polyhaven, where we’re using some intermediate to advanced features, some of which we’ll highlight in detail. Please use the previous introductory material to infer the stylization choices made for the basis of these Looks.


STYLIZED COMIC DESK

In this first Look, we’ll mix a PBR render with dusk lighting with some comic stylization. A Key feature of this look is a halftone look based on Camera Distance, so let’s take a look at that workflow in more detail.

This zooms-in really well and smooth


Camera Range

Thanks to this feature, we can use Z depth information to both drive and mask a Look, which can be very helpful in isolating Looks so that they don’t overwhelm the aesthetic of the image.

To activate it, we simply choose Camera Range as the Input source in our Hatching Look. This will generate a signal energy based on the camera distance, which will allow us to use the controls under the Camera Range tab to control the range of effect.



By default, the range is conditional upon how near or far from the camera the objects are, but the remapping ramp allows us to limit the effect within this range to something a bit more suitable.



In this scene we’re introducing a halftone effect, a printing technique which uses dots of different sizes to create sophisticated gradients. When using color, this technique would introduce artifacts when the dots of different ink colors wouldn’t align, creating a chromatic effect (artifacts) in certain parts of the image.


Source: Wikipedia Halftone


We’ll use the Camera Range to mask a similar halftone Look in our image, so that the effect doesn’t overwhelm the image. This breakdown helps us contextualize these creative choices a bit better.



STYLIZED NOIR DESK

In this second stylization, we’re trying to emulate a Film Noir style, where we’re leaning heavily on the Toon Look to get rid of our PBR render completely … except for a couple of assets.

This zooms-in really well and smooth


To achieve this style loosely based on comic strips, we need to use the Stylized Looks Pattern and its override features, including masking, line distortion, and line thickness variation. This will help us achieve a look that mimics the imperfections of hand drawing.

Let’s break these choices down a bit more in detail.


Stylized Control

If we graph any material we’ll notice a Stylization pattern attached to the Utility Pattern slot. This pattern talks to the display filter and is a necessity for Stylized Looks to work at all.



The PxrStylizedPattern node has a myriad of attributes for overriding and controlling our stylization, organized in tabs that correspond to the main Look types. The features we’re interested in for this example are:

    • Mask - Controls the visibility of a given Look on a particular material. We’re simply setting the Hatching and Toon mask to 0, but this can also be connected to a texture.

Use masking with PxrStylizedPattern to isolate Looks on materials.

    • Distort - Textures can be plugged in to distort Lines. To turn on the line distortion feature in the main Lines Look, we first need to supply the Stylization pattern with a distort texture. A simple procedural fractal will do, but we can also use a texture.
    • Thickness - Textures can be used to drive the thickness of the Lines by turning on the override attribute in the main Look. We’re using the same distortion fractal to drive the Line Thickness attribute and then remapping the low and min values to exaggerate the effect on a per-material basis.

Use Line Thickness and Distortion to give things a more hand drawn look.


And thanks to one last breakdown, we can see these choices in action. Download the projects and have fun!



About the Artist

Pixar Ball Terms of Use

The Pixar Ball asset is property of Pixar. By downloading the project files you agree to the terms of use as defined in the EULA for RenderMan Models.


Desk Terms of Use

The Desk project is available with a CC0 License and is free of copyright. Assets courtesy of Polyhaven.com.







 
 
 

NEWS | RenderMan 26 is here!