• 1/3

Technique 4: Using Ink and Paint shaders to create NPR’s

Posted by Eddie Perlberg, 22 September 2009 3:35 am

Creating Artistic Renderings in Autodesk 3ds Max Design
Technique 4: Using Ink 'n Paint shaders to create NPR’s.
In the last technique, we looked at the outlining effect of the  Contour shader in mental ray. The addition of the Ambient Occlusion effects, gave us rich 3d effects  while including a nice outline. But, some of the limitations of those techniques, outlines not reflecting or not showing through transparent objects, may have left our NPR looking a little incomplete. So to solve those small issues, we'll turn to the Ink 'n Paint Shader.
The Ink 'n Paint shader was originally developed as a Raytrace based material for use with the Scaneline rendering system. While developed for the entertainment world for the creation of cartoons, this shader has some benefits for us in the Design Visualization arena, especially when it comes to NPR's (Non-Photorealist Renderings). We'll discuss those benefits as we go along.
Because of its origins, Ink 'n Paint on its own will require some adjustments to components like Exposure controls and other rendering settings. And because it's not a mental ray shader, it doesn't have settings for Ambient Occlusion.

 
Ink 'n Paint with Photographic Exposure Control


 
Ink 'n Paint with Logarithmic Exposure Control

I strongly encourage you to read through the Ink 'n Paint Material section of the 3ds Max Design User Guide to understand the individual settings for your desired results.
One way to bring together the controls of the Arch & Design mental ray material (Ambient Occlusion and proper response to Exposure Controls)with the look of the Ink 'n Paint material is to use the Ink 'n Paint as a map inside the Arch & Design material. We do that with mental rays "Material to Shader" map.


Material to Shader
Material to Shader is a mental ray map allowing the user to use a completely defined material as a map in another material.

1. Open the Material editor (M).

2. Define a new Arch & Design material. In a Material slot and in an adjacent slot, start a new Ink 'n Paint material.

3. In the Arch & Design material. I've set the color to pure white. I've turned on and  adjusted the Ambient Occlusion to 32 Samples and a Distance of 5'-0".


 

Remember, these are not the magic numbers, just the ones that, for this model, give us acceptable quality with acceptable speed. Your values will differ.
4. After assigning the Arch & Design material to all non-glass objects, we get the following results.

5. Select the Map button next to the Diffuse color swatch.

6. From the Material/Map Browser, select the Material to Shader option

7. From the Material Editor, drag the Ink 'n Paint material we created earlier on to the Material bar. Choose Instance as the Copy Method. That way, any changes we make to the original, reflect in the Final Material.

Don't be surprised if the model does not turn blue in your scene. Don't forget, we set the Diffuse Color to white in the Arch & Design Swatch. That's what's driving the viewport "look". Assuming the Ink 'n Paint defaults, let's render!

Notice the Ink 'n Paint lines of the Pots are reflected in the Patio door glass. Because the lines are put in at render time, we don't lose them in the image. The rafters going into the space show through the glass as well.
 

Ink 'n Paint for Design Visualization
To control the "look" of your rendered material, let's look at how to assign or create regular components to make a realistic type of material with ink 'n paint boarders.
1. In the Ink 'n Paint material, open the Basic Material Extentions.

2. In the Bump slot, I've assigned a bitmap and set the Bump level. Mine is very high to "Show" in the tutorial.
3. In the Paint Controls, I've assigned another bitmap as the Paint Lighted map. This will respond the same as our Diffuse slot.


Well discuss Paint levels and Shades levels in the next section

4. Because my bricks are darker than the pure white from earlier. I adjust My photographic exposure control to make the scene a little lighter.
5. Render!


I told you, I applied the single Arch and Design to everything non glass.

Paint and Shaded Levels
When using Ink 'n Paint as a Material to Shader, the Paint levels aren't going to affect your final output, but the Shaded levels are.

Multi/Sub Map
Earlier in the tutorial, we looked at applying in a bitmap in the Paint Lighted map slot. Another way to create a quick artistic rendering is to use the new Multi/Sub-map.
1. In the Paint Controls, assign a Multi/Sub-map as the Paint Lighted map. Don’t' forget, this will respond the same as our Diffuse slot.

I'm going to accomplish the look I want with 8 colors Red • Orange • Yellow • Green • Cyan • Blue • Violet • Grey
2. Open the Multi/Sub-Map controls. For the Switch Color option, I select Object ID. Number of Maps, 8. and change colors 1 thru 8 to reflect the list above taking note of color to number relationship.

3. In the Scene, designate object ID's by selecting objects to render the same color. For this example, all of the walls will be Orange. So, in the Select in Scene dialog box(H), I select all of the wall objects. Space bar to lock the select set. Right click in the viewport to bring up the Quad-Menu. Navigate to the Object Properties… option. In the Properties dialog box, I will assign the Object ID 2 (Red objects were already number 1)

If you feel comfortable giving up control. you can always use the Random feature of the Multi/Sub Map to determine color assignments. Notice each color has a Map button next to the color swatch. This allows you the opportunity to use the map list including textures for these assignments.
4.  Render!

Ink 'n Paint and Render Elements
Another great benefit to Ink 'n Paint is the opportunity to separate out the Ink and the Paint as separate render passes. 

   

Imagine the fun you could have with these.

Next week. Our Final installment for this series. "Fun with Falloff"

Here's the PDF.

5 Comments

Ken Pimentel

Posted 25 September 2009 11:55 am

Very nice example of how to use this feature - good job!

VelvetElvis

Posted 29 September 2009 4:20 pm

This is a really great technique! What are the render times like? Do you see this is as more of a niche or do you think this style may become more popular with clients? Every job I get the clients want photo real. Is there a good way to pitch this style?

Eddie Perlberg

Posted 29 September 2009 4:45 pm

VelvetElvis -
Render times for Ink 'n Paint, when used alone are quite fast. Scanline and mr cut through them like warm butter. When added as a material to shader component, they render exactly as any other map in the arch&design material. So, there is really no disadvantage to using them.
From your question, it sounds like you be an independent DV artist. So, client are coming to you for a higher level of DV than they can produce on there own. In the past, that has always been Photo Real. Now that Non-PhotoReal (NPR) has become a part of your portfolio, perhaps run a special for past clients to introduce them to your new technique? NPR needs to be fast and effortless. 3ds max Design helps with that. Design apps like Revit and AutoCAD make jumping from style to style a challenge. Good Material Standards like good CAD standards makes it faster. Your artistry will make it invaluable.

VelvetElvis

Posted 1 October 2009 6:34 pm

Thanks for the response Eddie! I think I'll take a past project for a client and use that as a test run. Just to add that into my deliverable style menu. I am currently freelance working for various people. I have always been a fan of the NPR render style and the hybrid NPR / photo real. Sort of a photo real drawing!

Eddie Perlberg

Posted 12 January 2010 2:41 am

Welks!

Add Your Comment

You must be logged in to post a comment.

Please only report comments that are spam or abusive.