{"id":1010,"date":"2009-06-17T01:12:37","date_gmt":"2009-06-17T07:12:37","guid":{"rendered":"http:\/\/www.mrbluesummers.com\/?page_id=1010"},"modified":"2011-03-04T18:22:55","modified_gmt":"2011-03-04T18:22:55","slug":"ink-n-paint-primer","status":"publish","type":"post","link":"http:\/\/www.mrbluesummers.com\/1010\/3d-tutorials\/ink-n-paint-primer","title":{"rendered":"Ink & Paint Primer"},"content":{"rendered":"

Hello everyone,<\/p>\n

I was putting together my Monday Movie last week, and I realized that the 3dsMax Ink n Paint material is pretty robust.\u00a0 In this primer, we’ll be walking through the material looking at some visual examples of each feature.\u00a0 By the time you’re done, you’ll have a firm understanding of how to use this often misunderstood material.\u00a0 You’ll even walk away with a few keen tips on how to achieve unusual effects!\u00a0 This first page is devoted to quickly going through the tools at our disposal.\u00a0 The next page is where we’ll get rambunctious and see what crazy things we can cook up!\u00a0 Everything you read here is pretty much renderer agnostic- you could use either the 3dsMax Scanline renderer or the mental ray renderer.<\/p>\n

\"Creating<\/a><\/p>\n

Creating the hashed shading effect is easy!<\/p>\n<\/div>\n

Material Basics<\/h2>\n

If you’re going to read one paragraph in this entire primer, it should be this one.\u00a0 The Ink & Paint material is basically a combination of two elements- inked edges and color that fills the shapes they outline.\u00a0 While these two elements are housed in the same material, it’s best to think of them separately.\u00a0 They’re rendered this way too; the object is rendered using a rough shading technique, and then an edge detection algorithm adds the boarders to create the final effect.<\/p>\n

\"Ink<\/a><\/p>\n

Ink + Paint = Ink n Paint!<\/p>\n<\/div>\n

Some of what we’ll cover later can seem a little mind boggling, but in the end it pays off.\u00a0 This material is a wonderful compliment to any architectural rendering pipeline, and even those of you in the video game industry would do well to know the ins-and-outs of cell shading.<\/p>\n

\"Basic<\/a><\/p>\n

Basic Parameters<\/p>\n<\/div>\n

The standard parameters of the material should be pretty familiar to you.\u00a0 Lucky for us, the default 3dsMax Ink n Paint material supports bump and displacement mapping.\u00a0 This means that you can apply the material to characters or objects with high-frequency details, as well as to terrains and objects who’s form is heavily influenced by a displacement map.\u00a0 The only non-self-explanatory feature here is ‘Opaque alpha’ which will cause the image alpha to be affected by areas that would be painted regardless of whether they’re actually being painted or not.\u00a0 I.E. If this feature is on, but the material does not have paint (like the far left example in my first image), the interior of the statue would still be white in the render’s alpha map.<\/p>\n

Paint Basics<\/h2>\n
\"Paint<\/a><\/p>\n

Paint parameters<\/p>\n<\/div>\n

The paint controls allow you to take charge of the lit, shaded, and highlight aspects of the material.\u00a0 The lighted section controls whether there is any paint at all in the material- if the checkbox next to the blue swatch is unchecked, you’ll get the ink-only effect.\u00a0 On the other hand, unchecking the “Ink” checkbox under the Ink Controls will yield a paint-only effect.<\/p>\n

Under each of these groups you’ll see spinners denoting the blend between a map (if you chose one) and the swatch color.\u00a0 The glossiness parameter operates similarly to an ordinary material; it controls how sharp the highlights are from reflected light sources.\u00a0 Finally, the paint levels spinner controls how many ‘steps’ there are in the paint effect.\u00a0 Values too low (like 2) could hide details in your render, but values too high (like more than 10) could destroy the paint effect.<\/p>\n

\"3dsMax<\/a><\/p>\n

3dsMax Paint Levels Comparison<\/p>\n<\/div>\n

Ink Basics<\/h2>\n
\"Ink<\/a><\/p>\n

Ink Parameters<\/p>\n<\/div>\n

The ink parameters let you control how the 3dsMax ink algorithm does its job. You can control whether the ink is rendered at all using the “Ink” checkbox.<\/p>\n

\n
\"Ink<\/a><\/dt>\n<\/dl>\n

The width of the ink lines drawn during the render can be controlled by the “Ink Width” parameter group. There are two spinners ‘Min’ and ‘Max’ and they, of course, control the minimum and maximum width of the ink lines. In the image shown here, the ‘Variable Width’ checkbox is unchecked, so the lines will always be the same width: 2 units. If I were to check that box, I would have complete control over the width of the ink lines.<\/p>\n

The ‘Ink Quality’ parameter spans 1-3 and can be used to adjust the speed\/quality tradeoff of your render. The image below shows the Buddha statue rendered identically except the ink quality was adjusted. Notice that the statue that has the higher-quality ink material has noticeably more detail in certain areas. This is because the filter has softer edges (shown at the bottom of each example), and because the renderer biases itself to areas where ink might<\/em> appear.<\/p>\n

\"Ink<\/a><\/p>\n

Ink Quality Example<\/p>\n<\/div>\n

Let’s take a quick look at the next few parameters all at once. Outline, Overlap, Underlap, and so on all control the different line types. 3dsMax’s Ink n Paint material can distinguish between different line types, and render them with different styles. Some lines go along the outer border of the object. Others are where the object overlaps with itself. Still others happen across smoothing groups within the object. The bias spinner controls how aggressively these lines should be accentuated (just like in the ‘Overlap Bias’ example earlier). Note that the bias is in absolute units (as opposed to relative units), so very small 3d models or very large 3d models may respond unpredictably to changes in these parameters. Below is an illustration of the different line types (much more digestible than a dry description). In this Torus Knot, I kept the smoothing groups in strips to demonstrate that line group. The only line type not represented here is Material IDs, but I think you get the gist of it.<\/p>\n

\"Ink<\/a><\/p>\n

Ink n Paint Line Types<\/p>\n<\/div>\n

Ink n Paint Material Experiments<\/h2>\n

And now the moment you’ve been waiting for is here! Let’s fire up this material and see what kinds of effects we can get. If you put your mind to it, you can really accomplish a wide variety of effects using the Ink n Paint material in 3dsMax.\u00a0 Each of the following experiment types is unique in it’s own way, but you’ll see how it ties into the concepts we discussed previously. The first is an exploration of the paint aspects of the material in mental ray; let’s see how far we can go in changing up the paint material. The second is an exploration of the ink features to see what kind of sketch effects we can make- similar to the Monday Movie<\/a> I made a few days ago. Finally, the third is a few clean, yet stylish applications that bring the first two explorations together.<\/p>\n

Extended Paint<\/h2>\n

In mental ray we have a wealth of advanced shaders at our disposal. Better yet, these shaders are modular enough to be maps instead of full-blown materials. Thus, we can start applying these into the paint and shade slot of the material in order to start arriving at some very unique effects. We can accommodate everything from Ambient Occlusion to Car Paint. Let’s try a few examples.<\/p>\n

The image below starts off simple and uses two separate color swatches to instruct the Ink n Paint material to go from a light blue in lit areas to a darker purple in shaded areas. You can create simple color combinations in this way.<\/p>\n

\"Basic<\/a><\/p>\n

Basic color swatches can create an interesting effect easily.<\/p>\n<\/div>\n

Overall this is a rather trivial setup. Let’s look at something more complex. Below I’ve taken the same material, but applied a map to the Paint Map slot and one to the Shade Color Map slot. The first is a Landscape (lume) map that dynamically generates color based on the geometry and orientation of the object. Notice that the rendering of this map does not <\/em>adhere to the idea of ‘paint levels’. Instead it’s a very explicit map. In the same way, the DGS map I applied to the Shade Color Map slot has highly detailed levels of brightness and color in it- as though it were not part of the Ink n Paint material. What the ‘Paint Levels’ is controlling in this example is the transition from the Landscape map to the DGS map.<\/p>\n

\"Complex<\/a><\/p>\n

Complex Colors Example<\/p>\n<\/div>\n

Extended Ink<\/h2>\n

The paint render effects you can generate using the above techniques are extensive. Let’s now investigate these ink parameters and stretch them into something that goes beyond merely supporting the paint effects. For starters, we can alter the bias parameters for each of the line types. In the image below, I’ve made a change to the “Overlap Bias” parameter, which controls how aggressive the line drawing algorithm is. Very low numbers will make the effect more extreme, while very high numbers will make the effect more subtle. As I mentioned earlier, remember that these bias spinners are not relative values! You shouldn’t need values beyond the range of 0-20 in order to produce this kind of effect. In the image below, notice what a powerful sketch effect I’ve created just by altering one parameter.<\/p>\n

\"Overlap<\/a><\/p>\n

Overlap Bias can be used for rough, grungy effects!<\/p>\n<\/div>\n

Let’s have a look at how we can use maps in the 3dsMax Ink n Paint material to alter how the lines are drawn over objects. Using maps to control the line width can have a subtle but clear impact on the final render. Ordinarily, we could allow the renderer to handle when to use thick and thin lines. However, using an image or procedural map can help the engine get away from the dry, clean-cut look of a render. In the image below, I applied a noise map to the line width map in order to ‘muddy up’ this mechanical render. The effect is kept under control by keeping a tight minimum and maximum width (1-3).<\/p>\n

\"Applying<\/a><\/p>\n

Applying a width map will make the lines 'lumpy'.<\/p>\n<\/div>\n

Below is one more example where I applied a falloff map to the line color map slot. This map was set to Shadow\/Light and spans from perfect black at the most illuminated to a 160 gray at the least illuminated. This assures that a) we’ll always get at least some shading during the render, and b) the most illuminated sections will get the darkest lines. You can be quite creative with these maps.<\/p>\n

\n

\"This<\/a><\/p>\n

This line color map creates an interesting effect.<\/p>\n<\/div>\n

Extended Material<\/h2>\n

Now that we’ve explored some of the tools available, let’s get crazy and see what kinds of effects we can get when we put the two together. In the example below, I’ve combined two effects we covered earlier. First, I’ve made the line drawing algorithm moderately aggressive by turning the Overlap Bias to a lower value. Then, in the shaded slot I’ve inserted a static gradient ramp set to tile with high frequently. It’s mapped to “Environ->Screen”, and rotated 45 degrees so that it looks the way we need it to.<\/p>\n

This creates a lovely effect.<\/p>\n

\"Creating<\/a><\/p>\n

Creating the hashed shading effect is easy!<\/p>\n<\/div>\n

What I’ve done below may seem obvious, but when executed with subtlety, 3dsMax’s Ambient Occlusion map can be an excellent lighted paint map in the Ink n Paint material. I’ve assigned it here with only 1 paint level so that we don’t get the stepping effect at all. It may seem like a waste, but the real power here is in the Ink overlay on the ambient occlusion render. In the render below, you can see how the subtle shading (from white to gray) combined with the hard, clean ink lines creates a very potent render that’s perfect for showing off that new cell phone prototype.<\/p>\n

\"The<\/a><\/p>\n

The Ambient Occlusion map can make some very convincing product design renders.<\/p>\n<\/div>\n

And that’s the rundown. We’ve taken a hard look at the two major sections of 3dsMax’s Ink n Paint material (not surprisingly “Ink” and “Paint”). We then investigated some of the more robust effects we could accomplish by changing parameters to values we might not think of right away. I hope you’ve found this primer insightful, and remember to check back every Monday for my Monday Movies!<\/p>\n","protected":false},"excerpt":{"rendered":"

Hello everyone, I was putting together my Monday Movie last week, and I realized that the 3dsMax Ink n Paint material is pretty robust.\u00a0 In this primer, we’ll be walking through the material looking at some visual examples of each feature.\u00a0 By the time you’re done, you’ll have a firm understanding of how to use […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,111,23],"tags":[142,56,140,141,136,143],"_links":{"self":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/posts\/1010"}],"collection":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/comments?post=1010"}],"version-history":[{"count":0,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/posts\/1010\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/media?parent=1010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/categories?post=1010"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/tags?post=1010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}