Shader Recipes: Rendering Wireframes from Maya

In this short course, we will learn how Maya Toon can be used to build a custom wireframe pass. Software required: Maya.
Course info
Level
Intermediate
Updated
May 3, 2010
Duration
7m
Table of contents
Introduction and Project Overview
Description
Course info
Level
Intermediate
Updated
May 3, 2010
Duration
7m
Description

In this short course, we will learn how Maya Toon can be used to build a custom wireframe pass, which can be output as a separate image when batch rendering. Getting clean, high-resolution wireframe renders from Maya has always been a challenge. However, by using Maya Toon, we can easily render out wireframes with a variety of styles and appearances. Software required: Maya.

About the author
About the author

Kyle was one of the first authors for Digital-Tutors (now a Pluralsight company) and has been a part of the team for over 10 years. Kyle began his career in computer graphics education as a college instructor and worked as a Digital-Tutors rendering tutor and curriculum manager since 2002.

More from the author
Maya 2018 Fundamentals
Beginner
11h 21m
Feb 7, 2018
3ds Max 2018 Fundamentals
Beginner
8h 48m
Sep 27, 2017
Introduction to 3ds Max 2015
Beginner
12h 35m
Jun 4, 2014
More courses by Kyle Green
Section Introduction Transcripts
Section Introduction Transcripts

Introduction and Project Overview
In this lesson, we'll learn how we can render wire frames from within Maya, using Maya Toon. So, the process of actually rendering wire frames within Maya has really always been something that is a little bit tricky and really not all that easy to do. But now with the advent of Maya Toon, or with the inclusion of Maya Toon, this process is actually a lot easier. So, what we can actually do is basically make ourselves now a wireframe pass whenever it comes to rendering this out. So, if using the render layers what I often times like to do is just go ahead and make myself a new render layer for something like the color pass, and then make myself another render layer for something like the wireframe pass. And then I can have any additional render layers in here for things like color, specularity, whatever the case may be. Now, in this wireframe pass, we can start to make some inclusions using Maya Toon so that they only affect this pass. So, let's start by going down to rendering. Let's go down to Toon, and with this object selected let's go to Create Outline and make ourselves a new Toon outline. So, you can see it will go ahead and make our outline around this character. Now, if we were to come in and just render this out, you can see that the wireframe, or rather the Toon outline does get created around this geometry, but it's really not anywhere close to what we would actually consider being used for a wireframe. So, let's actually into the options for this, let's select the Toon outline. Press ctrl+A to open up the attributes, and what we want to look for is down inside this Crease Lines. So, let's expand this, and what we can do is adjust the minimum and the maximum angle for applying any sort of a Toon outline. You notice by default it's set up to a relatively high value which basically tries to create any kind of Toon outlines on really, really hard edges. Now, if we start to dial this down to where the minimum and the maximum are both zero, what this will actually do now is create an outline around every single facet and face of the geometry. Now if we look you can see that the outline has been created basically around every face, but it's still pretty thick. So, we can always come back, and with this adjusted if we go all the way up to the top, we can now start to adjust the line width. So if we were to drop this down pretty significantly, something like. 02, and re-render this, we can now see he actual wireframe that gets created by these Toon outlines. Now, if we wanted this guy to be shaded something other than what we have in the color pass, what we can do is just simply select the geometry itself, and with this go back to the Toon outlines, and let's make ourselves a new fill shader. So, in this case we can make ourselves just a solid colored fill. And in this case we can just adjust the color to anything we want. We'll try something like something like white to begin with. And now, if we go into Select Camera, let's also adjust the background color. So, let's select the camera, go into the environment, and because right now we have the render layer set up, what we can do is just simply change the background color of the camera for this one pass. So, to do that that let's right click on this background color attribute, make ourselves a layer override so that way, any changes we make will only affect the current pass that we have active, which in our case is the wireframe pass. So now let's go ahead and make this white. Like, I said you will notice that we do have a layer override. Any attributes or any parameters that you see that are orange mean that there's a layer override that's been applied. So, what we should see now is whenever we render this, we have a nice, clean, white background and a nice black wireframe. And if we were to check the alpha channel for this, you can see we do have a nice alpha channel cut out around everything. Now, what's really nice is the fact that this is only affecting now this wireframe pass. If we go back to our color pass, everything is exactly as we left it. So there we go. Now we could call this a day and just simply render this out but what's kind of nice is the fact that because this is created by a Toon outline, is we can actually get sort of creative with the actual wireframe rendering of this. So, if we wanted to we could actually apply something like Paint Effects strokes to all of these different Toon outines and start to get some really really interesting results. So, if we were to go into the general editors and open up the visor so we can get access to some of these different Paint Effects strokes... There we are, give this just a moment to open up. Now, if we scroll down, we can drop in something like, let's say one of the glows or even some of these other really interesting ones. Let's start with the glow. Let's come in and try to grab the actual Toon outline. There we go. Now with this selected let's also grab the neon yellow. Sometimes this takes a couple of tries to actually select. So let's grab that Paint Effects stroke. There we go. If we need to we may need to press shift and select this neon yellow, which is what I'm going to use in my case. And now, with both of these selected, let's go up to Toon and assign Paint Effects strokes to Toon Lines. Alright, excellent. Now let's go back, and just so we can actually see this let's select the camera, and I'm going to set my background color back to black. And I'll select my solid shader that I applied for this and make this black as well. Let's re-render. You can see now instead of these simple wireframe outlines that we had before, we now have these wireframe outlines or these Toon outlines that are being stroked by a Paint Effects stroke. And like I said, we can actually connect any Paint Effects stroke we want to these Toon outlines. We can actually start to get some really, really interesting results very, very quickly. Now just like before if we were to check the alpha channel on this, we do have a nice alpha channel. But one of the things you will notice is that the actual alpha doesn't actually stop around the wireframe itself. It really is stopping around the outline of this character. Now, if we wanted the alpha channel to only contain the wireframe itself, what we could do is just simply go into the solid shader that we're using for this character's body, and then take the Out Mat Opacity and drop this all the way down to black. The Out Mat opacity is what we're actually seeing as a result within the alpha channel. But with this all the way down to black, this will basically make this surface shader as if it's not visible at all in the alpha channel. So now, whenever we render this you can see that the color reformation looks identical. But now, if we take a look inside the alpha channel, you can see that the surface shader is now completely invisible as far as the alpha channel is concerned now thanks to this mat opacity, which just leaves us with the Toon outlines. So now, whenever we're ready to render this out, because we do have this set up on different passes, all we have to do is go to Render and Batch Render this out. And now we'll get a completely separate pass for the color information and a completely new pass for the wireframe. So now we can come in and very easily composite the wireframe and the colorpass together, or we could just use this straightaway with some really, really interesting color effects. So that's a look at how we can start to implement some of the features found in Maya Toon in order to kind of help us cheat our way through getting a really really nice wireframe render out of Maya.