Maya 2011: Creating Natural Environments

Maya 2011: Creating Natural Environments

with Aaron F. Ross

 


In Maya 2011: Creating Natural Environments, author Aaron F. Ross demystifies a common challenge of 3D modeling: fashioning realistic natural environments such as landscapes, atmospheres, and foliage. Starting with flat terrain, Aaron shows how to sculpt various types of geometry and smooth out jagged, polygonal edges. The course also covers creating convincing backgrounds and clouds, populating a scene with foliage using 3D Paint Effects, and incorporating natural light. Exercise files accompany the course.

Recommended prerequisite: Maya 2011 Essential Training
Topics include:
  • Laying out the scene
  • Sculpting terrain with Soft Selection and the Sculpt Geometry tool
  • Creating 2D textures using Artisan and Paint Effects
  • Applying 2D and 3D procedural textures
  • Building backgrounds with skydomes and matte paintings
  • Shaping clouds with Maya Fluids
  • Creating non-physical daylight and casting shadows
  • Rendering with Maya software

show more

author
Aaron F. Ross
subject
3D + Animation, Modeling, Rendering, Visual Effects
software
Maya 2011
level
Intermediate
duration
4h 18m
released
Feb 22, 2011

Share this course

Ready to join? subscribe


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hi! I am Aaron F. Ross. Welcome to Maya 2011: Creating Natural Environments.
00:10In this course, I'll walk you through the basic steps in creating landscapes,
00:13atmospheres, and foliage.
00:16We'll begin with terrain modeling, including choosing a model type, laying out
00:20the scene, and adding detail.
00:22We'll get into shading with a look at the 3D Texture tool, as well as Paint
00:26Effects, both packaged and customized.
00:29Additionally, we'll explore layered maps for more complex and
00:32interesting shading networks.
00:34We'll create a sky dome and matte paintings for realistic backgrounds.
00:39I'll show you how to create clouds and atmospheres with Maya fluids.
00:42You'll see how easy it is to populate the scene with plants and other background
00:46geometry using 3D Paint Effects.
00:49Finally, we'll look at lighting, casting shadows, and rendering your scene.
00:53This software gives you everything you need to create convincing outdoor scenes,
00:57and in this course, I hope to get you off to a good start in Maya 2011:
01:01Creating Natural Environments.
Collapse this transcript
Setting up the project
00:00In this training course, I am going to use a slightly different interface for
00:05Maya, just for legibility's sake.
00:07It's a little bit difficult to read the white text on a black background,
00:12so I am going to actually be using the more traditional interface of black text
00:17on a light gray background.
00:18So I am going to show you how to do that on Windows.
00:22I am going to go ahead and shut down Maya, and I want to go to All Programs >
00:30Autodesk > Autodesk Maya 2011 to find that shortcut.
00:36I need to just modify this shortcut.
00:38I'll right-click and choose Properties.
00:43All I need to do is at the end of this line, it says Target. After the quotation
00:48mark, I'll put in a space, a dash, and the word "style," a space, and the name of
00:56the style, and the one I am using is called plastique.
01:05And then the next time I launch Maya it will have that color scheme.
01:15So as you can see, now we have a more traditional layout.
01:18I also opt to use a more traditional background for the viewport, and there is a
01:24keyboard shortcut for that, which is Alt+B, and it'll lead you cycle through all
01:28the different colors for the Viewport background.
01:31We're also going to be using some scene files and textures in this course.
01:35So if you are a Premium lynda.com subscriber, you can download those exercise
01:40files and then that will be the project that you will set Maya to.
01:45So if you want to do that, all you have to do is go to File > Project > Set and
01:51then navigate to the folder.
01:53In this case, I've got it on my Desktop.
01:55So I want to just choose Exercise Files, and now that's my current project.
02:01So if I go to File > Open, it'll take me directly to Desktop/Exercise
02:06Files/scenes, and you'll see here are all the scene files in question.
02:11If you are not a Premium subscriber and you don't have the exercise files, then
02:15you'll need to create a project for the course:
02:18File > Project > New. And I can just create another one here to demonstrate on my Desktop.
02:26I'll just call it myProject.
02:30I can browse for another location if I need to, but Desktop is fine in this case.
02:34I'll have to remember to click Use Defaults to populate all the fields with the
02:38appropriate folder names, and click Accept.
02:41So now I am set up and ready to begin learning all about creating natural
02:44environments in Maya 2011.
Collapse this transcript
Setting up the Mac
00:00If you're using Maya on the Mac, then there are a couple of
00:02special considerations.
00:04You can get the black text on a white background,
00:08but you have to jump through a couple extra hoops to do that, and I'll be happy
00:11to show you how to do it.
00:13You'll also want to check in on your System Preferences, especially your mouse
00:16and keyboard Settings, and I'll also be showing you how to set the project--
00:21which is just the same as it is on Windows.
00:23So first of all, the Maya interface scheme.
00:25Currently we've got this dark interface.
00:28I want to get a light interface.
00:29So, I am going to exit out of Maya, and go to the Applications folder.
00:34So we've got a Finder window open, here is Applications, and I'm looking for
00:38Autodesk/maya2011.
00:42You'll see that Maya shortcut is here, and if you haven't already done it, you
00:45can drag that onto your dock.
00:47We need to launch the Maya Terminal, which is a command-line interface.
00:51So I'll double-click on Maya Terminal.
00:53It takes a moment for it to log us in.
00:55Once it's logged in, I'll enter the command, which is simply "maya," a space,
01:00dash, and then the word "style," another space, and then the name of the
01:05style, which is "macintosh."
01:08That's the only one that really works here besides the default one.
01:10There are some other styles, but they are designed for Windows or Linux.
01:13This is the one we want.
01:15So, when I hit Enter here, Maya will launch.
01:21As you can see now, we've got black text on a white background, and I think
01:25that's much easier to read.
01:26For the viewport background, I can click to give that viewport focus and then
01:30use the Option+B shortcut to cycle through the different background colors.
01:36So it's Alt+B or Option+B. While I've got Maya open, I'll go ahead and set the project.
01:42I've got the exercise files on my Desktop.
01:47If you are a Premium lynda.com subscriber, you can download those exercise
01:50files. And then you just set Maya to that as your project folder.
01:56So I'll go to File > Project > Set. And on my Desktop, you'll see exercise files.
02:04So I'll just click that folder and click Set, and now Maya is set to that project.
02:11If I go to File > Open Scene, it takes me directly to the current project's
02:15scenes folder, and here are all of the Maya scene files for the course.
02:21If you don't have those files, then you can just create a new project.
02:26So we've got Maya set up. We need to finally set up the operating system and
02:31make sure our keyboard and mouse shortcuts are working correctly.
02:35So I'll quit out of Maya.
02:36I'll quite out of the Terminal, too, and I want to open up the System Preferences.
02:46In System Preferences, I just need to go to Keyboard & Mouse.
02:51In the Keyboard section, I just want to flip the switch that says Use all function keys.
02:56Use all F1, F2, et cetera, keys as standard function keys.
02:59We want that enabled so that if we want to use the function keys to, for
03:03example, go into component modes in Maya, we can do it, instead of activating the
03:09operating system commands like Expose and so on.
03:12In fact, just to be certain, I am going to go to the Keyboard Shortcuts section
03:16as well, and I want to scroll down.
03:19There is a section in here that says Dock, Expose, and Dashboard.
03:23I'll flip that switch just to make sure that absolutely none of those keyboard
03:29shortcuts are going to activate the operating system features. That's good.
03:34Now I also want to go to the Mouse section, and I want to turn off the
03:38switch that says Zoom using scroll wheel, because when that's on if you'll
03:43hold down Ctrl and turn your mouse wheel, the whole interface of your
03:48Desktop will zoom in, which is cool--
03:50It's great for teaching--but it's not so great in this case, because we want to
03:54be able to use the Maya keyboard shortcut, which is if we use the Ctrl and mouse
04:00wheel in the Expressions editor, we can make our text bigger.
04:03So again, we're turning this off to use the Maya-specific options.
04:08Also, you just want to make sure that your primary mouse button is set correctly.
04:13Most right-handed users, the left mouse button will be button one and the right
04:19mouse button will be button two.
04:21If you have more controls in here, then you just want to make sure that that's
04:24what you have, that your primary mouse button, or left button, is button one, the
04:30right button is button two, and the center wheel is button three.
04:36Those are the settings that you want to do for the Mac in order to get
04:40it shipshape for Maya.
Collapse this transcript
1. Terrain Modeling
Choosing a model type
00:00Okay, we're ready to start modeling a terrain in Maya 2011.
00:04And as you can see, I've got a slightly stylized, customized interface to make
00:09it a little bit easier for us to read, as I described in the "Setting up Maya" movie
00:14in the introductory chapter.
00:16So on the left, you'll see I have a polygon plane.
00:20If I select that plane, you'll see it says polyPlane1.
00:23And on the right, I have a nurbsPlane.
00:25And those are really your two choices for modeling terrains, either polygons
00:29with subdivisions or NURBS.
00:32Now you might ask, why would I choose one over the other?
00:35Well in general, most of the time you would probably use polygons, because
00:39they're much easier to work with.
00:41You can change the topology really easily.
00:43You can extrude. You can slice and dice and chop the model up sort of freeform mode,
00:49whereas with NURBS you have a lot more restrictions on how you can actually push
00:53the shape around into different structures.
00:56So, you would usually use polygons,
00:59but there is one case in which you might want to use NURBS,
01:02and that's if you need the ability to move Paint Effects curves around on the surface.
01:07Let me get a little bit closer in here.
01:10And you can see I've got a curve attached to this surface and I've got daisies
01:15sprouting out from that using Paint Effects.
01:18And if I select the curve--I might need to go into wireframe mode to do that.
01:23I'll hit the 4 key.
01:25If I select that curve and then right- click to go into Control Vertex mode and
01:31grab the Move tool, you can see that this is a curve on a surface, and I can
01:35actually pull that curve around on that surface,
01:37and my Paint Effects daisies will stay stuck to the surface no matter what.
01:42So that's pretty cool.
01:43If you need that ability to edit the curves on surface, then you want to use NURBS.
01:49But with polygons you don't have that ability.
01:51All you can really do is select the curve and move it around.
01:57And in fact, even that's kind of tricky.
01:59Sometimes you'll need to go into the Outliner just to select,
02:02so I'll go into the window Outliner
02:04just to show you that I've got a stroke here. There we go.
02:08That stroke is my Paint Effects curve.
02:10And as you can see, I can move that around, but it doesn't stick to the surface.
02:15So that's really the Achilles heel of polygons as a terrain model.
02:19But when all is said and done, I think that using polygons is easier and probably better.
02:25I will be using polygons throughout this lesson.
02:28We'll make a quick detour, and I'll show you how to set it up for NURBS as well.
Collapse this transcript
Laying out the scene
00:00We are ready to begin laying out our scene.
00:03We need to take special consideration around scale, because you can't just build
00:09your model to whatever scale you feel like; you've got to settle down on a scale
00:14convention before you even begin.
00:16For terrains, you are going to need to model the terrain to a miniature,
00:21in other words a scale model.
00:23Don't try to model your terrain at one-to-one scale, because if you do then
00:28you'll end up with Maya units way out in the hundreds of thousands, and you
00:33may end up with program issues--in other words round-off errors--because your
00:37scene is too large.
00:39So how do we manage that and prevent that from happening?
00:42Well, the first thing I want to show you is if you go into Window >
00:46Settings/Preferences > Preferences and the Settings Section, you'll see the
00:52Working Units, and the Linear Working Units are defaulted to centimeter.
00:57So Maya kind of wants to force you to build a very small scene.
01:01The default grid in Maya is only 12 centimeters from center to edge.
01:07Okay, I recommend actually that you leave the Linear Working Units at
01:11centimeters, although you might think it would be better to change it to meters
01:14for a large terrain.
01:16But I do not recommend that you do that, because frankly, there can be issues
01:21with Maya if you use any linear working units other than centimeter or perhaps inch.
01:27I am going to leave it at centimeter, but I'm going to just mentally interpret a
01:33Maya unit as a meter.
01:35In other words, I am going to leave the program settings alone, but I am just
01:38going to imagine in my head that it's a meter per grid square or per unit.
01:44I know that sounds a little bit non- intuitive and a little bit strange, but
01:48trust me, this is really the way to you have to do it; otherwise, you are going
01:51to have issues with the tools.
01:53So Working Units, I'll leave at centimeters.
01:56I'll set up my grid now, going into Display menu under Grid Options, and I want
02:02to model a terrain that's about a kilometer on a side,
02:06so I'll increase the size of the grid, just to bring it into that range.
02:11So this first field here is the size of the grid from center to edge.
02:16So, I'll set that to 1,000, and remember, I'm interpreting units as meters,
02:22so that means my grid is going to be a kilometer from center to edge.
02:26I'll place a major gridline every 100 meters and then a minor gridline, or
02:32subdivision line, every 100 divided by 10--or every 10 meters.
02:39I'll change the color of the grid line and I'll turn on numbers on the
02:44perspective grid on axes.
02:46So now we can see I have got a grid that's 1,000 units from center to edge,
02:53I've got a major gridline every 100 units, and a minor gridline every 100 divided
02:59by 10--or every 10 units.
03:01So I have got my grid laid out, and I can dolly back with the mouse wheel, and if
03:06I dolly back far enough, you'll see that my grid starts getting clipped off.
03:11So this is a common issue with Maya.
03:13We can correct for this.
03:14I just want to make the cameras visible and I need to just go into the
03:19Attribute editor and change the camera clipping plane, so we won't see
03:22that issue anymore.
03:25So I'll display the cameras:
03:27Display > Show > Cameras. And they are now positioned at 1,000 units, but your
03:37cameras may be positioned closer to the center of the scene. But I just want
03:42to make sure that they're moved out far enough and that their clipping planes
03:46are set appropriately.
03:48So let me tap the Spacebar and go to the four viewport layouts, and if I select
03:53the Front view and just dolly back in the Front view with the wheel, you'll see
03:57that the front camera icon is getting larger here.
04:00I'll do that in the Side, and the Top views, and I just want to make sure that
04:05those cameras have all been moved out away from the center, just out a little
04:11bit farther than the grid.
04:13Just to make sure that I don't have any issues with the clipping planes, I want
04:17to go into the Attribute editor for each camera.
04:21There are lots of ways to do that.
04:22One is to go to the View menu in the panel and choose Camera Attribute Editor,
04:27and that will pop up.
04:28What I recommend is that you change the Near Clip Plane to 1 unit and the Far
04:34Clip Plane to at least 10,000, maybe as much as 100,000.
04:39But don't take it up farther than that because you might have display
04:42corruption if you have too many orders of magnitude between the near and far clip plane.
04:47So I'll press Return there, and I'll just go around to each one of these Camera
04:52Attribute Editor and set the Near Clip to 1 and the Far Clip to 100,000 in each
04:57of these camera views. Very good!
05:07So I have got basically my cameras laid out.
05:10I can hide them now. I don't really need to see them.
05:12So I'll go back to Display > Hide > Cameras, and now I'm ready to build my terrain.
05:17Tap the Spacebar, and go back to my Perspective view, and I'll create a Polygon
05:22Primitive > Plane, and I will drag that out pretty large in the view, but I can
05:27set the exact attributes into position later.
05:31Once that's been made, I'll press the 5 key, so I can see shading and just move it
05:34up a little bit, so it's above the grid a bit.
05:37So in my Channel box on the right-hand side, I'll open up the polyPlane1 input,
05:43and I'll set the Width and Height both to 1,000 units.
05:48And in the transforms at the top of the Channel box, I'll just select the X
05:53attribute for Translate and type in a zero, and Translate Z, I'll se that to zero as well.
05:58I've got it centered. Good!
06:01So the last thing I need to do right now is just settle on a basic level of
06:06detail for this terrain.
06:08So back in my polyPlane Input, I just want to set the Subdivisions Width and Height.
06:14So, I'll set them both to 100 right now.
06:16That seems a bit heavy, but you'll need enough to be able to actually sculpt with.
06:22So if you are experiencing performance issues, you can knock that down a little
06:26bit. Maybe I'll just err on the side of caution.
06:28I'll set my Subdivisions to 50.
06:31We will be adding subdivision surfaces to this later to smooth out any
06:35jagged polygon edges, but for now I think that's a pretty good start for our
06:40scene layout.
Collapse this transcript
Creating a camera
00:00Now that we have done our basic scene layout, we need to create a camera through
00:04which we can render, and we want to create a camera early on in this particular
00:10exercise because ultimately we are only going to be building things that the
00:13camera can see, for efficiency's sake.
00:17So in order to do that, we need to have a camera first.
00:21The standard convention for 3D graphics for a sort of proscenium arch or
00:27theatrical presentation is that the camera will be facing in the -Z direction.
00:34So as you can see here, I've sort of laid that out here; the Z axis is
00:39pointing towards me.
00:40So I want my camera to be somewhere here.
00:42I am pointing in this direction.
00:43Another way of looking at that is in the Top view, your camera should be down
00:49here and facing inward. Cool!
00:52So we can create different types of cameras.
00:56I can create a Camera and Aim, and that's probably the easiest thing to do in
01:01this case because it gives me a look-at point.
01:04So that's what I'll be using for this particular exercise.
01:07So I'll create a Camera and Aim.
01:10It'll be positioned at the origin, but it will be very, very small.
01:14The camera icon itself is only 1 unit in size, and in our world here we're
01:20considering units to be meters,
01:22so this camera is only 1 meter in size.
01:25So I just want to move it back and look at it through my panel.
01:31So I will go ahead and grab the Move tool, dollying back, and I'll just move the
01:36camera back, and I can move it up in the side so it's pointing down.
01:41But as you can see, it's a little bit difficult for me to see what I'm doing.
01:44So I just want to go to the Attribute editor and change the size of the camera.
01:49I do not recommend that you actually scale the camera up, because if you do
01:53that, then you will have issues later if you are using things like clipping
01:56planes or environments,
01:58so do not scale the camera;
02:00just select it, hit Ctrl+A to get the Attribute editor up and what you want to
02:05do is scroll down in the Attribute Editor, and it's near the bottom.
02:09You are looking for a section that says Object Display.
02:13Open that up, and you'll see something that says Locators Scale.
02:18Just increase that;
02:19maybe a value of 20 will do.
02:21Now it's big enough that I can actually see it relative to my terrain,
02:25anything else in my scene. Good!
02:28So I have just made the camera big enough.
02:30Next thing I need to do is look through the camera lens.
02:33I will have to sacrifice one of my views here.
02:36I am not really using the Side view anymore, so I will just load that camera in,
02:40Panels > Perspective > camera1, and I'm looking through that camera lens.
02:47Whenever you are using cameras in Maya, whenever you are going to render a
02:50camera, you also need to make sure that you turn on the Resolution gate, as you can see here.
02:57You can also turn on the Resolution gate from the View menu, View >
03:01Camera Settings > Resolution Gate, and now this is a
03:04what-you-see-is-what-you-get situation.
03:06Anything that's outside of this line is not going to be rendered. And since this
03:11is a very camera-centric exercise, we need to make sure that that's enabled. Good!
03:17So I can use the standard controls to tumble around in here, like I can use Alt
03:22and left-mouse and I can dolly forward with Alt and right-mouse.
03:29I can also use a third-person method.
03:32For example, hit the 4 key and grab that plane, maybe move that back down a little bit.
03:39I can select that camera1 aim, and as you can see, I can move that around.
03:44Well, I really want this layout to be at ground level.
03:47I want the camera to be basically at the level of a person standing and
03:52looking out onto a landscape,
03:54so what I will do is I will set the camera and its aim point to have a vertical
03:59position of 2 meters.
04:01So Translate Y, I want that to be a value of 2, and when I open up my outliner--
04:08it's a little bit easier to select things in here--
04:10I will select the camera itself and set its Y value to 2 as well, and I'll just
04:18make sure that my ground plane is at 0.
04:22So Translate Y, 0 on the ground plane, too.
04:26So now basically, I have got my camera laid out, and I am ready to go.
04:31But before I do, I also want to show you that you can additionally use a
04:35one-node camera or a standard camera if you choose.
04:39I will just create a second camera here, just for the purposes of illustration.
04:43Create > Cameras > Camera, not Camera and Aim, and I've got camera2 here.
04:50I can quickly look through its lens as well.
04:52Let me maximize that view with the Spacebar, because I just want to show you that
04:58if you're not careful with a standard one-node camera then you'll end up kind
05:02of getting messed up.
05:04What I recommend for moving and rotating a standard camera is that you actually
05:10use the Fly tool, and this is found in the View menu and it's under Camera tools,
05:16Fly tool. And what this will allow you to do is to pan left to right, tilt up
05:22down, and you can actually move forward, too, by holding down the Ctrl key and
05:27using the left mouse button.
05:29So it acts almost like a video game, and I recommend that you use the Fly tool
05:35with a standard one-node camera rather than attempting to rotate the camera in a
05:41third-person point of view, and I'll show you why.
05:43If I tab the Spacebar, there is my camera. If I grab the Rotate tool and
05:48start rotating it around, things look okay until they don't, and suddenly, now
05:54after just a couple of brief camera moves, now I've got some issues with my
05:59horizon lines no longer level.
06:02That's called a Dutch tilt in film terminology, and you don't want that unless
06:06you are deliberately trying to achieve it.
06:09So the solution to that is to just start out with your rotation values zeroed out.
06:15Just go ahead and set this back to sort of defaults and simply use the Fly
06:23tool in the viewport:
06:25View > Camera Tools > Fly. And that's a better way of manipulating a
06:31standard one-node camera.
06:33But again, we will be using the Camera and Aim for this particular exercise,
06:38so I will go back to camera1, looking through camera1, and I am actually just
06:41going to delete camera2 because I just want to show you how to use that Fly tool
06:46to prevent getting a Dutch tilt accidentally.
Collapse this transcript
Adding detail
00:00Now we fully laid out our scene, and we've got a camera through which we can view the scene.
00:05And as you can see here in this camera view, these individual polygons,
00:09they're pretty large.
00:10We are going to be applying a subdivision surface to this later, and that'll
00:14smooth this out a little bit,
00:15but it's still not enough detail for the foreground of our terrain.
00:20The general rule of thumb, of course, is that areas that are close to the camera
00:24are going to need more detail.
00:25So I am just going to select my ground plane, tap the Spacebar, and get in close on that.
00:31And what I would like to do is just subdivide this area here and add more detail.
00:36So I'll right-click and choose Face component mode.
00:42And I can select this single polygon right near the camera.
00:47It looks like I've got soft selection turned on right now.
00:51I can tell because I've got this color coding here.
00:54I am going to turn that off with the B key--so if you've got that, then you
00:58want to turn that off--
01:00and then I just want to expand that selection out.
01:03And the way to do that is to hold down the Shift key and press the period key
01:07and that's also known as the greater-than symbol.
01:10So I can just expand that selection out a little bit.
01:16Go back to my camera view and take a look and see. Do I have enough selected, or
01:20do I have too much selected?
01:22I think I am pretty good as far as distance,
01:25but maybe I don't need quite so much on the sides here, so I can just hold down
01:30the Control key and unselect some of these polygons here.
01:35And I am just selecting the region that's really closest to the camera.
01:40And I can subdivide that just by going to the Polygons menu set.
01:45And I can choose Edit Mesh, and I am looking for Add Divisions.
01:50I'll go into the options for Add Divisions,
01:53and right now it's set to add 1 Division with quadrilateral polygons, and that's
01:59pretty much what I want,
02:00so I'll go ahead and click Add Divisions.
02:03And now you'll see I've got a little bit more detail there to work with.
Collapse this transcript
Splitting polygons
00:00We've added some detail to the foreground in our terrain, and what I'd like to
00:05do now is to turn on Smooth Mesh preview, so that we can see sort of an idea
00:12of what this will look like once it's been smoothed out with a subdivision surface algorithm.
00:17So I'll select my terrain. I am going to get in closer in my Perspective view, and as
00:23you probably know, if you press the 3 key on the keyboard, you'll get a smooth
00:28mesh. The 1 key shows you just the raw polygons, the 2 key shows you the raw
00:36polygons with the smoothing, and the 3 key shows you smoothing only.
00:41Now if you look closely on here, you'll see that we got some kind weird
00:46rounded polygons here.
00:50It'll be clearer if I just select one of these in Component mode, and I'll just choose
00:54Vertex, grab one of those and move it up, so you can kind of see this is the
01:00is the effect of the smoothing.
01:02So again, the 1 key is raw polygons, and the 3 key is a Smooth Mesh preview.
01:09Very good, but as you can see, that the topology here is not quite as clean as it could be.
01:16So, I just want to show you a little trick here where you can more elegantly
01:20transition between an area of higher detail to an area of lower detail.
01:26I'll go ahead and move that vertex back down again, and I'm just going to split
01:32polygons so that I can create quadrilaterals everywhere on this model.
01:37So that's really the golden rule with subdivision surfaces, and that is that
01:43they really should all have quadrilateral polygons.
01:47And for this example you will see this is a five-sided polygon here.
01:52So what I'm going to do is I'm just going chop through and create more edges, and
01:57then I'll go back later and delete in a sort of two-step process
02:01to create a more elegant transition between the higher detail and the lower-
02:06detail region of my mesh. So, I'll go back to the 1 key, and I just want to grab
02:11the Split Polygon tool. And once again, it's in the Polygons menu set, and
02:17I've got Edit Mesh > Split Polygon Tool, and I do want to go into the options
02:22for that, because there is an important option in here, which is the Snapping tolerance.
02:27I need to be very sure that I'm snapping to vertices, and in fact, the default
02:32snapping tolerance is only 10%, which means that there's a very high probability
02:37that you will think that it's snapped to a vertex when it hasn't.
02:41So you need to turn this snapping tolerance all the way up to 100%, and then
02:46I'll just zoom in here a little bit with my mouse wheel. And what I want to do
02:50is basically create a zigzag pattern here, clicking on each one of these
02:55vertices to create this zigzag pattern.
02:59I can press Enter to have that actually take--close my Tool Settings window here--
03:05and the tool is still active here in my toolbox.
03:08I can click that, or I can press the Y key, which will do the same thing; that
03:13will give my most recent tool. Or, of course, I can go back in the Edit Mesh menu
03:17and re-issue that tool.
03:19But basically I just want to create some zigzag pattern here. Press Enter, press
03:25the Y key, and continue. And again, the reason for this is I'm trying to create a
03:32clean transition between the areas of high detail and the areas of low detail.
03:36So I'll press Enter. And of course, I can use the Split Polygon tool in a
03:41free-form mode as well and I can sort of chop through my model and cut up parts
03:47of the model any way I want.
03:48But this is good enough for our purposes right now; the needs for topology
03:53modification for a terrain are pretty minimal. So, I'm good with this.
03:57And next, we'll just clean this up by deleting some of these extra edges in
04:01the next movie.
Collapse this transcript
Deleting edges and vertices
00:00When working with subdivision surfaces, once again, your goal is to have
00:04quadrilateral polygons everywhere, if possible.
00:07So what I've done here is I've chopped through, with the Split Polygon tool, to
00:12create these triangles.
00:13What I also need to do is to delete these edges inside here, and what that'll
00:18end up doing is creating a four-sided polygon with 1, 2, 3, 4 vertices on each polygon.
00:25Cool! So what I'll do is I'll right-click and go into Edge component mode.
00:32We can select that edge.
00:34In fact, in this case I can just delete the edge by hitting the Delete key on the keyboard,
00:40and that will actually wipe that out.
00:42In some cases, you may need to use the menus Edit Mesh, Delete Edge/Vertex if
00:51you've got associated vertices on the ends of edges that you need to remove.
00:55In this case, I don't need to, because I need to keep that vertex right here.
00:59So what I am going to do is just go around, Shift+Select on all of these, and
01:06press the Delete key.
01:08And what I've done now is I've created what I like to call a four-sided triangle.
01:12So it's in the shape of a triangle, but it has actually got 4 edges and 4 vertices on it.
01:17So I'll right-click and go back to Object mode,
01:21select it, and press the 3 key.
01:24And if you look closely, you can see that I've got a much better structure here
01:29on this side than I do over here.
01:32And this is just to keep my terrain nice and clean, so that I don't have any
01:36issues with edges popping out where I don't want them to.
01:40I've just got a nice clean transition from the high-detail area to the low-detail area.
01:47Very good, so next we're ready to start sculpting with soft selection.
Collapse this transcript
Using soft selection
00:00Now the real fun begins, and I can start sculpting my terrain in earnest.
00:04We are going to look at a couple of different ways of doing this.
00:07The first is through soft selection, which is a wonderful tool in Maya that will
00:12allow you to just select one vertex or one edge and influence the entire region around
00:19it in a very sort of elegant way.
00:22What I want to do is I want to pull up the back end of my terrain to create a
00:27hill in the distance.
00:29So what I can do is I can select a single point or edges or polygons and move
00:36them and get a nice soft effect to that transformation.
00:41So I've got a history in my scene. As you can see here, this has got a bunch of history nodes.
00:49So I might as well clear that out now.
00:52It's not a bad idea to delete the history pretty often with this type of modeling,
00:58so I'll go ahead and do that.
00:59I've got my plane selected.
01:01Edit > Delete by Type > History, and I'll go ahead and select some
01:08components, right-click and go into Vertex mode, and select the point,
01:15getting closer on that.
01:19And to activate Soft Selection, all you need to do is press the B key on the keyboard.
01:25Right now, I don't have much influence, but if I hold down the B key and then
01:30drag my mouse cursor with the left mouse button, I can increase or decrease the
01:39radius of the influence of the soft selection.
01:44So, if I go out to my Perspective View, you can see that there too, and it's color coded,
01:51so that one vertex in the center is hard selected, and then that region around
01:56it is soft selected.
01:58So if I just select the Move tool, grab that Move tool and move up, you can see
02:03I'm getting a nice soft effect. Very good!
02:07And I can select multiple points.
02:10I can hold down the Shift key and select couple of points.
02:16I can also, while I've still got the tool active in fact, I can in fact move
02:21this back down and sort of restore it back to where it was.
02:25However, once I click off that tool, I'll never be able to in fact push those
02:31topologies and those hills.
02:33I will never be able to pull those back down exactly flat.
02:36So just be aware that if you exit out of Soft Selection--for example, if I
02:42right-click and go back to Object mode, and then I go back into Vertex mode
02:49and select, and try to move this back down, it will never really go back down
02:54flat, although it feels like it's sort of doing it now.
02:56You can't really trust that.
02:57So just be aware that it's a bit of a destructive act.
03:03So another thing that you might want to do with Soft Selection is change the
03:07behavior of the tool by going into the tool Settings.
03:12In fact, it's just found in the Move tool, or any of the Transform tools, whether
03:16it would be Move, Rotate, or Scale.
03:18So if you double-click on the Move tool, for example, you'll get the Move tool
03:23Settings, and you can scroll down near the bottom and you will see Soft
03:26Selection, and you can turn it on or off here.
03:29Be aware that the settings that you do in this window, in the Tool Settings, do
03:34not actually affect the completed operations.
03:40This will only affect the next one that you're about to do.
03:43So if I change the Falloff radius here, that's sort of in preparation before I do the movement.
03:48There are all sorts of fun things here you can play around with.
03:51You can change the Falloff curve, for example if I wanted to have a
03:55sharper point to my terrain, maybe I could choose one of these other
03:59Falloff curve options.
04:00I have got these. Or in fact, I could even move the curve around or change the interpolation.
04:06If I did something like this, I would get sharper falloff.
04:12So as you can see here--let me maximize this window with the Spacebar.
04:18You can see that now I've got a much sharper falloff than I did before, just by
04:25editing the shape of this curve.
04:27If I want a rounder shape to that, I can change the curve.
04:32And it's very simple, very intuitive.
04:39It does not create any history nodes.
04:42You're just tweaking the shape.
04:44You are not changing topology, and you're not adding anything into the history.
04:49So that's the Soft Selection tool in Maya.
Collapse this transcript
Sculpting geometry
00:00Another really great way of modeling terrain is to use the Sculpt Geometry
00:05tool, and this will allow you to push or pull vertices and polygons around
00:09using a brush interface.
00:11It will work with NURBS as well.
00:14I am going to access it through the Polygons menu set.
00:17Let me select the plane first.
00:19I have got my Polygons menu set, and I'm going to go to the Mesh menu and you will find
00:23Sculpt Geometry tool.
00:25You do want to go into the Tool settings, so open up that Options box.
00:30And as I move my cursor around on the plane, you will see I am getting a brush icon.
00:36I want to give you a bit of a heads up here:
00:38if you don't have qualified video hardware, then you might have some issues with
00:43these Brush tools in Maya.
00:45So it is really important that you have an NVIDIA Quadro card or an ATI FireGL
00:50or some other professional card that is qualified for Maya, because if you're
00:55just using a standard consumer game card, like a GeForce video card, then it's
01:00very likely that these tools are going to cause screen corruption and all
01:04sorts of bad stuff.
01:06But of course, here I have got qualified hardware, so I am good to go.
01:10I will need to change the size of the brush.
01:12You can do that from within the Tool Settings dialog by increasing the Radius(U),
01:16or you can just hold down the B key and drag your mouse left to right to
01:21change the size of the brush.
01:22That's the scale of the brush.
01:25Now if I drag across here, you will see something is happening, but not much,
01:29because I don't have very much displacement just yet. And changing the
01:33displacement can be done either through the Tool Settings or by holding down the
01:39M key on the keyboard and dragging left and right.
01:42And as I do this, you will see an arrow, and it's showing me how much I am going
01:47to displace and in what direction.
01:49So that's quite a lot of displacement. That's 100 meters of displacement. So, if I
01:53drag across here, you will see it's moving quite a lot.
01:55I will hit the Z key to undo that.
01:58In fact, I don't want to be pushing down in this case; I want to be pulling up,
02:02so I can change the operation here.
02:04You will see I've got Push and I've got Pull, and now you'll see the arrow is
02:10pointing upward instead of downward. Hit the Z key to undo that once again.
02:16So a couple of other fun things.
02:18You can use keyboard shortcuts to change the behavior of the Sculpt Geometry tool.
02:24So right now I am using a Pull operation, but if I want to switch to a Push
02:29operation or switch between Push and Pull, just hold down the Ctrl key on the
02:34keyboard and then I can switch between the two modes.
02:37So that's pretty cool.
02:38Another really great thing that you can do is if you just hold down the Shift
02:42key, it will go into Smooth mode, and you see I can soften up my sculpting.
02:48That's one of the other modes here.
02:49You can see, this is Smooth.
02:51And all I have to do is just hold down the Shift key and I can smooth out my geometry.
02:56I can also erase any edits I have done.
02:59So I have got an Erase tool here.
03:01I just drag my mouse across that, and I can actually restore the terrain back to where it was.
03:07If you exit out of the Sculpt Geometry tool, then you will not be able to erase
03:11those changes once you re-enter the tool.
03:15A couple of other things to look at here.
03:17We've got another option here, which is Relax, and what that will do is--let me
03:24give you something to look at here.
03:25With the Relax tool, what that does is it's similar to the Smooth tool, but it
03:31will tend to give a different look than the Smooth tool. And finally, we've also
03:36got a Pinch tool, which is new.
03:39What that will allow me to do is to pull polygons closer to one another, as you can see there.
03:47So Relax will push them apart and Pinch will pull them together.
03:51You'll need to click several times, actually, to see that Pinch effect, whereas
03:55with Relax, you just drag across.
03:58And once again we've got the Erase tool.
04:00Before I really sculpt this in earnest though, I really want to choose the
04:04correct reference vector.
04:06When sculpting terrains, it's best to only pull or push in the Y axis, and here is why.
04:14Let's say I am pulling and I pull that up, you will notice that as I move my
04:21cursor across the terrain, the normal vector, or the line that you see the arrows
04:27sticking out, will change orientation depending upon the surface. And so if I
04:32click here, for example, and sculpt, I will start to very quickly get
04:36non-terrain-like features.
04:40This doesn't really ever happen in nature, and it's very easy, actually, to get
04:44geometry that's sort of crumpling in on itself, or self-intersecting.
04:49So let me erase that, and I'll show you the proper way really to do this. Erase
04:58all that, and in fact, I can flood- erase too just to make it easier.
05:01Let me just click the Flood button and that will erase everything all at once.
05:05What I want to do for terrains usually is to use the Y axis.
05:09So no matter what I do, when I pull upward, it will always pull up in Y, and
05:15this is actually much more efficient for terrain modeling.
05:18So I am going to spend a few minutes sculpting this model, and then when we get
05:24back in here, we're going to look at extruding polygons.
Collapse this transcript
Extruding polygons
00:00I've spent some time working on this terrain and sculpted it to my satisfaction.
00:06This one is a little bit different than the one we were looking at before.
00:10I have just reduced the level of detail a little bit, so it's not quite as
00:13heavy, but the concepts are all the same here.
00:16The next thing that I would like to do is to just show you how to extrude
00:19polygons, because that's one thing that you can really do with polygon modeling
00:24that you can't do with NURBS. And especially if you've got extreme changes in
00:28elevation in your terrain, then extruding polygons is really going to be a quick
00:33and effective way for you to model those elevation changes.
00:38So if you have got the mountains or valleys or gullies or rocks sticking out, you
00:43might need to extrude, which is going to change the topology.
00:47So, for example, here I've got a camera, and it's essentially sitting on a hill,
00:53and I want there to be a depression in the landscape between the camera and the
00:59middle ground. But I'm not really getting the look that I want here, so I just
01:03want to pull these polygons down a bit.
01:06So let me disable my grid for a moment, so I can see what I'm doing.
01:10And I can press the 1 key to turn off this Smooth Mesh preview, and right-click
01:17and go to Face Component mode and just select whatever faces I want.
01:21Looks like I've got my Soft Selection on right now, so I will just press the B
01:26key to turn that off.
01:27I'll just select some polygons.
01:31They can be contiguous--that is, they can be next to each other or not--and then
01:39just simply use the Edit Mesh > Extrude tool. So I'll click on that.
01:45And with the Extrude tool you need to be careful that you immediately move the
01:50manipulator either up or down, or wherever it needs to go.
01:53You have to do that because if you click off the object then what will happen
01:59is you will create an extrusion of zero height and these polygons all around
02:05the sides will have zero area, and that's really going to mess up your
02:09subdivision surfaces.
02:11So this is an extrusion that's done correctly.
02:13What I'd like to show you is the symptom of what happens if it's not done correctly.
02:17So I'm going to press the Z key a couple of times until there's no more
02:22Extrude node in my history.
02:25I'll verify that by going back to Object mode and clicking on the object.
02:29I've successfully removed the Extrude node.
02:33So once again here's the issue with the Extrude tool, if you're not careful.
02:36So I'm selecting some polygons and I'll do extrude, and then again you have to
02:43immediately select the manipulator and do something.
02:47And if you fail to do that, if you just, for example, click off, then it looks
02:52okay in the standard polygon mode, but once you turn on Smooth Mesh preview,
02:58you'll see that things are getting kind of strange.
03:03In fact, there is an extrusion here, but it's an extrusion of zero height, and
03:07it's created all these other polygons around it.
03:10So the moral of the story is that when you do an extrude you need to change the
03:16height of the extrusion, and the other thing, the corollary to that is that
03:21don't be fooled, don't go and try to do successive extrusions one after the
03:26other because it looks like nothing has happened.
03:29In fact, something has happened, and don't keep repeating the same command
03:33because you'll keep stacking more and more extrude nodes and getting yourself
03:37deeper and deeper into trouble.
03:39If you accidentally click off the Extrude Manipulator, you can still go back and
03:43change the extrude height by going into the Extrude Face node and turning on the
03:49Show Manipulator tool.
03:51So this is the Show Manipulator tool here, and I can go ahead and edit
03:56that extrude height.
03:57And I do have Smooth Mesh preview turned on now so I can see this smoothing.
04:01You'll notice that all it's really doing is changing this Local Translate Z
04:06attribute, so I could change that in the Channel box just as easily.
04:11So that's the simple overview of how to extrude polygons, and the do's
04:17and don'ts.
Collapse this transcript
Projecting UV coordinates
00:00Once you sculpted your terrain, you need to apply UV coordinates;
00:04you need to project UVs onto this surface. Because if you fail to do that, then
00:09you get texture stretching and all sorts of ugliness.
00:12UVs, of course, are instructions on how to apply a texture onto a surface.
00:19So I'll need to project UVs onto this terrain. So I'll do that by going to
00:23the Polygons menu set, to create UV's menu and you'll see Planar Mapping right up top.
00:30You will need to go in to the Option box for Planar Mapping, because the default
00:34Planar Mapping axis is X.
00:36That means it's going to project my texture from the right, as seen in the Top view.
00:43What I need to happen is I need to project in the Y axis, or straight down, as
00:48seen in the top view, so I want to project in the Y axis.
00:52The rest of the options don't really matter that much.
00:54I just need to make sure that I'm projecting from the Y axis.
00:56I'll go ahead and click Project, and now you can see I've got a projection
01:01manipulator on there.
01:03Now, I can move that around and all kind of stuff, but I don't really need to do any of that.
01:07All I need to do here is just make sure that my Projection Width and Height are
01:12equal. And if I go over to Channel box, you'll see Projection Width and
01:17Projection Height are about a thousand in this case, and it just so happened
01:21that it worked out that way because my terrain was a perfect square.
01:26If your terrain is not a square, if you're modeling your terrain in pieces or if
01:31you're using some other shape, then you'll definitely need to go into here and
01:35make sure that the Projection Width and Height are equal.
01:38Maya is really designed with the assumption that your textures are all going to
01:42be squares, and so to make sure that we don't have any weird stuff going on
01:47with aspect ratio or strange stretching, I need to make sure that the Projection
01:53Width and Height are equal. And it's a simple enough matter to do, so I've just
01:58set them both to be a thousand.
02:00So this is actually good enough for this particular terrain, because it's a very
02:04shallow terrain; it doesn't have very much changing elevation.
02:08But if you've got an extreme change in elevation, let's say you've got a
02:12really sheer cliff face,
02:14if you project downward in the Y axis then there's a good chance that your
02:19textures are going to stretch across that cliff face in some ugly way.
02:23So what you can do in that case is simply relax the UVs, and that will kind of soften that up.
02:29So although I don't need to do that in this case, I'll just take you through the
02:32motion, so that you can do it in your own scenes if you need to.
02:35You'll just select your object and go into the Edit UVs menu and open up the UV
02:40Texture Editor. And this is a window that shows you your UV layout, and there is
02:47a lot to do in this window, but we are only going to do one small thing here.
02:51We're going to relax the UV, so we can soften them up and sort of equalize the
02:56distance between the UVs.
02:58So the first thing I'll do is I'll right-click and go to UV Component mode, and
03:02I'll select the UVs that I want to relax. Maybe I'll just select these, for
03:07example, in this region.
03:08I'm getting closer there, and the Relax tool is found in the Polygons menu within
03:15the UV Texture Editor window.
03:18Polygons > Relax. Go into the Options, and you'll see I've got, for example, a
03:27number of iterations.
03:28If I increase that, that'll increase the strength of the Relax effect.
03:32I'll just leave it where it is for now, and I'll click the Apply button, and
03:36watch what happens in UV Texture Editor Window.
03:40Now, all of those UV points have kind of shifted around in order to try to
03:45equalize their distance, so they're all sort of equidistant from one another, and
03:49that will tend to help you when you are trying to paint onto the surface of,
03:53for example, a cliff face or some sort of extreme change in elevation.
03:58Again, in this particular example, I don't really need to do that, and it'll
04:02actually cause more problems than it solves for me in this case.
04:06So I'm going to press the Z key and undo that.
04:09I just wanted to show you that dialog and show you what you could do in that
04:15case that you had some extreme changes in elevation. But here, this one is good
04:20to go, and I'm going to go ahead and show you how to use Mesh Smooth in the last
04:25movie of the terrain modeling chapter.
Collapse this transcript
Using Mesh Smooth with the Maya software renderer
00:00We've modeled our terrain, and we've applied UV coordinates, but before we can
00:05really sign off on this as a model, we need to sort out our subdivision surface algorithm.
00:11Remember that with a standard polygon model in Maya you can press the 1 key
00:15to see raw polygons and you can press the 3 key to see smoothing, but this is only a preview.
00:23Smooth Mesh preview is called that for a reason.
00:26It doesn't actually subdivide the mesh for the purposes of the rendering.
00:32We're going to be rendering in Maya software in this title.
00:36So if I render with Maya Software Renderer right now, I will not see the smoothing.
00:42I am getting closer, so you can see this.
00:45I'm going to click Render the current frame, and you'll see that it says, "Maya
00:50Software" in my tooltip, and take a look at the window here. You can see there are
00:57lots of jagged edges and all sorts of nasty stuff.
01:00So the Maya Software Renderer does not smooth the mesh.
01:07Now you could, using Mental Ray, smooth it.
01:12It kind does that automatically. So that's the Mental Ray rendering. But in this
01:17title, once again, we're going to be using Maya Software, primarily because Maya
01:22Software works well with Paint Effects.
01:25Once again, in Maya Software we will not see the smoothing, so what we need to do here?
01:31What we do is once we've got the terrain built out and we're happy with it,
01:36we're going to actually turn off the Smooth Mesh preview by pressing the 1
01:41key, and we're going to use it kind of an old- school method to subdivide and smooth this mesh.
01:49You'll see that I've still got my Poly Planar Projection node in the history
01:54from the last movie, so I'm going to wipe that out before proceeding.
01:58I'll just Edit > Delete by Type > History, and then to provide the subdivision
02:04smoothing on here, what I want to do is use the Mesh > Smooth command, and that's
02:11going to add a node called the Poly Smooth Face node.
02:16So as soon as I do that, now you'll see Poly Smooth Face in my inputs.
02:21It achieves the exact same result as the Smooth Mesh preview, but the advantage
02:28here is that it will render as a smooth mesh in Maya Software.
02:33So I'll go back up and re-render this, and in Maya Software it's looking clean.
02:39I'll go ahead and render this other view here.
02:41I'll right-click on there, so I can show you.
02:44And in fact, it's rendering out just perfectly.
02:46If you want to change the level of detail, all you need to do is select your
02:51mesh and go into the polySmoothFace node and increase the number of Divisions.
02:58Increase that to two, and now I've got a much smoother mesh.
03:03And this is really the way to go if you're rendering in Maya Software.
03:06And once again, we will be rendering Maya Software because it plays better
03:10with Paint Effects.
03:12You don't want to delete the construction history again;
03:15you want to leave that polySmoothFace node in the history, so that if you need
03:20to, you can go back and change the number of divisions later.
03:24So that's how we model terrains in Maya 2011.
Collapse this transcript
2. Shading
Understanding Artisan and Paint Effects
00:00In this chapter on shading, we're going to look at painting on objects using the 3D Paint tool.
00:06Before we do, I just want to get you oriented around some of the basic concepts here.
00:11Essentially, Maya has a built-in paint tool called Artisan, and Artisan will
00:17also allow you to paint procedurally generated patterns from a feature called
00:22Paint Effects--so they work hand in hand.
00:26Artisan is the tool whereby you can paint onto surfaces and Paint Effects are
00:32the actual patterns or images.
00:34In this scene file, I've painted already onto this terrain, so that you can
00:39see what it looks like.
00:41So right now I'm just seeing the shading in the viewport with the 5 key on the
00:47keyboard. But if I press the 6 key, then we can see the texturing. I'll tap the
00:52Spacebar so you can get closer on that.
00:55Now, this doesn't look like much here--
00:57it looks kind of grainy--but this ultimately will be used as a sort of a
01:03background layer underneath some true 3D geometry.
01:08So at this stage, this is really just sort of a placeholder, but you can use
01:12Paint Effects and Artisan to create all manner of different effects, and in this
01:18case, as I said, we're using this sort of to make an undercoat underneath the 3-D
01:23foliage that I'm going to create later.
01:25So that's the basic concept here, using Maya to paint onto surfaces.
01:31You are best off using a graphics tablet if you've got one.
01:35It will certainly streamline your work quite a bit.
Collapse this transcript
Painting on objects
00:00Before we can start painting onto an object, we need to do a little bit of set up first.
00:05Primarily, we need to create a new shader and then paint into one of the
00:09attributes of that shader.
00:12The first step then would be to select the object and assign a new material.
00:17So I can just right-click and choose Assign New Material, and I get a pop-up
00:21window showing all the different types of shader material nodes available.
00:25And I want to choose Lambert, because Lambert doesn't have any highlights.
00:29What I'm doing now is I am creating a temporary material to hold my 3D paint
00:33texture, and then later once that textures has been saved, optionally I can go
00:37back and build another shader network around it. But for now I just want to
00:42start with a simple Lambert shader, because it won't have any highlights, and
00:46that way I won't be distracted by them, and I'll be able to see the effects of
00:49the Paint tool more effectively.
00:52So I will click Lambert. I have got a new lambert material, and I'll just go
00:55ahead and rename that right away and I will call it terrain_3d_Paint_lambert.
01:02And I want to turn the color all the way down to the black because if I paint
01:07into the color channel here, then I might get distracted by the lighting in my scene.
01:13So what I am going to do is I am going to turn the color all the way down to
01:15black, and I'll end up painting into the incandescence channel.
01:19So I've got my shader created, and the next step is for me to open up the 3D
01:23Paint tool. That will be found in the Rendering menu set. In the Texturing
01:28menu, you'll see 3D Paint tool, and the 3D Paint tool relies upon the underlying
01:33Artisan toolset, as does the Sculpt Geometry tool. So you'll see there are some
01:38similarities between Sculpt Geometry and the 3D Paint tool because they're
01:42both based upon Artisan.
01:44I'll go into the Option box, open up the Tool Settings, and as you can see, the
01:48interface is similar to the Sculpt Geometry tool. Before I can paint into my
01:53texture here, I will need to actually create a texture. So, I need to scroll
01:58down, and the very first thing I will have to do is assign a file texture.
02:03And you'll see here it says, "Attribute to paint."
02:06I want to paint into the incandescence channel rather than the color channel,
02:09once again so I don't get distracted by the lighting in my scene.
02:12So I'll choose Incandescence as the attribute to paint.
02:17Next I need to assign a texture, so I'll click on the button that says Assign/Edit
02:22Textures. It opens up a child window in which I can determine the scale of
02:28this texture. What's the resolution going to be?
02:31You will default is 256x256.
02:34That's a very low resolution, and it will not look good on an object of this
02:38size, so I want to increase this.
02:41You will notice that it actually sort of snaps to powers of two, and it always
02:45maintains a square aspect ratio.
02:47So as I drag the slider over here, you notice that it's snapping to values
02:51that are powers of two.
02:52For performance reasons, you probably want to level it out at about 2048.
02:58If you increase this value beyond that, you may encounter performance issues; in
03:03other words, you'll get some lag time when you're trying to paint.
03:06So if you need to have textures that are higher resolution then you may need to
03:10break your object up into separate pieces and paint them separately.
03:14For our purposes today, this is good enough; a value of 2048 pixels in X and Y will be fine.
03:21And once again, I do want to paint a square texture here.
03:25So, that's the way Maya is really designed, and you really should follow that convention.
03:29So I have got a square texture.
03:30You will also see the image format here.
03:33I recommend that you use the default Maya IFF file, because that's the
03:37native file format.
03:39The IFF image format was created especially for Maya, and it's the
03:43most efficient one.
03:44So, if you chose a different format here, Maya would have to do some internal
03:49translation, and it would be a little bit slower.
03:51So I'd just leave it at Maya IFF, and I will click Assign/Edit Textures.
03:57Now, I've already saved the file--as you see, I've got a file name here--but
04:02if you haven't saved your file yet, you will not be able to assign/edit
04:07textures, so just keep in mind that you'll need to save your scene file out
04:11first before you can do this.
04:13Because what it does is it creates a texture and it places that texture file
04:18into a special place, okay.
04:20I will click the Save textures button here just to finish that process out, and
04:24I want to now show you in the directory tree exactly what has happened here.
04:30When you click that Assign/Edit Textures and click Save, it creates a texture
04:35inside the special folder in your project, 3DPaintTextures. And if I open that
04:40up, you will see it now has a subfolder that says 02_02_painting_objects.
04:45That's the name of my current scene file.
04:48And if I go deeper down into that, you will see it has created a file
04:52called TerrainMeshShape_ incandescence, so the first part of that is the
04:56name of the object--
04:57my object is called Terrain Mesh-- and the second part obviously is the attribute
05:02into which we're going to paint.
05:04You don't have any control over this process;
05:06Maya will always create a folder that has the name of your current scene file,
05:12and it will always create an IFF or whatever format image file that has this
05:18naming convention, and you have no control over that.
05:22In fact, if you successively save different versions of your scene file, it will
05:27create another folder inside of 3DPaintTextures each time, and it will copy this
05:33file over into that new folder.
05:35So you may end up with many, many versions of the same texture in here, and
05:41it gets very heavy.
05:42You get a lot of disk usage from that, and Maya is very bad at
05:46garbage collection.
05:47Once you're finished creating this texture, you're probably going to want to
05:51take it out of this folder and maybe clear out all the other garbage.
05:55For now, I am just going to leave it where it is, and when I'm finished, I will
05:58actually rename it and place it into the sourceimages folder.
06:02I know that's kind of a lot to sort of digest at the moment.
06:05Maya was designed this way.
06:07This is just what you have to deal with.
06:08So I am going to go back into Maya, and we are ready to start painting.
06:12So, scrolling back up--actually before I scroll back up, notice that we've got the
06:17ability to display wireframes or not, and so that's turned off by default.
06:21So if you do need to see the wireframes, you can just turn it back on in this
06:25Display section down at the bottom.
06:27And actually while I am here, let me also mention that if you do have a graphics
06:31tablet you have the ability to map the pressure of your stylus to different
06:37attributes, such as opacity, and the radius of the brush, and so on.
06:41So we are ready to start painting.
06:43I will go back up to the top here, and you'll see I've got the Radius of my
06:47brush, and just as with the Sculpt Geometry tool, I can hold down the B key and
06:52increase or decrease the size of that brush.
06:54Be aware that the brush size can only go up so far.
06:58I think the limit is about 500 units.
07:00So if you're trying to paint on an object that's super huge, you can't make
07:04the brush big enough.
07:05So that's just another reason why you kind of need to model your scene
07:09at miniature scale.
07:10Okay, so I've got the color here of the brush, and I will just be painting white
07:16into my scene, and that looks pretty good.
07:20I can press the Z key to undo that, but you actually have to click the Z key or
07:25issue the Undo command a couple of times for it to completely undo that command. So, that's good.
07:32We've got the ability to flood, as well.
07:34I can choose a color. I have got the new Maya 2011 color picker here, and I will
07:39just pick a bright green, and I can flood that bright green across the surface,
07:44and then I can maybe paint some other color.
07:48Click on the color swatch, and choose some other color like a brown.
07:52I will switch over to Hue/Saturation/ Value in the color picker, because that just
07:57makes it a little bit easier for me to change the value.
08:00As you can see, I can paint across that surface.
08:03I can choose different brush types up here.
08:06So you'll see I have softer brushes and harder brushes.
08:10So that's much softer, and I have got a hard edge as well.
08:15I can flood this again if I wish.
08:17I can maybe erase the whole thing, and it takes me back to where I was.
08:21As long as I haven't exited out of this tool, I can continue to erase what I've done.
08:26I will go back into the color picker and choose that brown color I made before.
08:31It's automatically stored in the history, and then I can flood paint with that
08:36earth tone and then maybe go back up here and paint with a different color.
08:41Remember, if you want to undo, you will need to press the Z key twice.
08:46Once you've painted something onto your object, you'll need to save the
08:51textures, because saving textures doesn't necessarily happen automatically.
08:56So once you've got something that you like, you need to scroll back down and
08:59click Save Textures to actually store that.
09:02I will go back into our TerrainMeshShape_incandescence file.
09:08If I double-click on that now, it will open up in FCheck, and we can see this is
09:12the actual file that we've created, with a resolution of 2048X2048.
09:17And that's the basics of painting on to objects, and next we will look at
09:22painting with patterns in Paint Effects.
Collapse this transcript
Customizing 2D Paint Effects brushes
00:00Now that we've got a texture applied onto a surface, let's go a little bit
00:04deeper into Artisan, and we'll also look at Paint Effects, so we can produce
00:08patterns on the surface, instead of just flat colors.
00:12So I'll select the terrain once again and go back into Texturing > 3D Paint Tool options.
00:17And the first thing I want to show you is that when you use any Artisan brushes,
00:22you can also, instead of just having these flat colors, you can also have
00:27patterns--basically a mask to the brush or a shape to the brush.
00:31So I am going to flood paint with gray here so we can just sort of see we are
00:35doing a little bit better.
00:36And to get a brush stamp, you can click on this file browser here, and it will
00:43open up a file browser and it will take me to my Program Files directory,
00:47Maya2011\brushShapes, and if I click on these, you can see I've got different
00:52options for brush stamps.
00:55So let's try this sand. Open that up, and now when I click here, you'll see that
00:59I'm getting a pattern brush instead of just a flat color.
01:02That's pretty cool. You can play around with that.
01:05That's all there is to that. There is really not much to it.
01:07You can create your own as well.
01:09It's just a simple black-and-white image that has a square aspect ratio. Cool!
01:13Well, now we get to the really interesting part, which is 2D Paint Effects.
01:17So Paint Effects is really one of Maya's killer apps.
01:20It's a very powerful tool that will let you draw patterns on a surface, and it
01:25will let you customize that pattern so you can get different looks.
01:28So to start what you want to do is you want to load a Paint Effects Brush that
01:32already exists that ships with Maya.
01:34And to do that, in your 3D Paint tool you'll want to click on the Paint Effects
01:39Get Brush button here.
01:41That launches the Visor, which is another file browser that's pointing at the
01:45Maya Program directory, and you'll see the Paint Effects tab is highlighted by default.
01:50And there are lots of different ones in here. There's fun ones. There's strange ones.
01:54Let's go for grasses. And if I click on one of these little thumbnails, it will
01:59load the brush into the 3D Paint tool. There we go. Go ahead and close that.
02:04So if I drag my cursor across, you'll see I am able to draw, and I've got Paint
02:10Effects on my surface now, and that's pretty cool.
02:12What we want to do here is we want to customize this a little bit.
02:15So I'm just going to flood paint to erase that.
02:18We want to talk about the size and spacing of the Paint Effects brush.
02:22So up here at the top of the 3D Paint tool window you'll see there is a Scale
02:27factor and a Width factor.
02:29The Scale factor here is the overall size of the effect, including the size of
02:34the brush and the size of the pattern within the brush.
02:37So with a default of, in this case 0.3, that's the effect that I get.
02:42But if I reduce the Scale to let's say 0.1 and drag across, you'll see I've got
02:48a much smaller brush stamp and also a smaller pattern.
02:52Below that Scale attribute is a Width attribute, and this controls just the size
02:58of the brush and not the size of the pattern within the brush.
03:02So if I set this Width to 2, for example, now you'll see that we've got the same size grass;
03:09it's just being spread out over a larger area.
03:12So that's a difference between the Scale, which is a global scale,
03:15controlling the size of the brush radius and the pattern. And then we've also
03:20got this Width, which is basically a multiplier that only changes the size of the brush profile.
03:26Okay, so that's good.
03:27The next thing we want to do is we want to change the color and the orientation
03:32of the Paint Effects brush.
03:33So to do that, we'll want to go into another window, and it's called the template brush.
03:39One way to get at it is through this button here, Edit template brush.
03:43The template brush here is labeled Paint Effects Brush Settings, but don't
03:47let that throw you off.
03:48This is the template brush.
03:50And what it is is settings for the next stroke that you are about to create.
03:56So in other words, you can't change a stroke that's already been drawn. It's destructive.
04:013D Paint Effects you can change after the fact, but 2D Paint Effects here we cannot.
04:07So what we have to do to get the look that we want is draw a stroke, then make a
04:11change in the template brush, draw another stroke, and go back and forth between
04:16them until we get the look that we want.
04:18So first things first is the Brush Profile section.
04:21Let me open that up to show you the Stamp Density attribute, and this has to do
04:26with the thickness of the effect.
04:28I drag my cursor across here, with the default Stamp Density of 3, that's
04:32the effect that we get.
04:33If I increase the Stamp Density to something like 10, we'll get a thicker effect.
04:40We'll get more of these blades of grass.
04:43If I change the Stamp Density up even higher to something like 50, it will get even thicker.
04:50And this is just basically how often it's going to sample your stroke to create
04:55these blades of grass.
04:56Okay, I will flood paint to erase that.
04:59There's another way to do that actually, and it's probably maybe a little bit
05:03better way of doing it, but it's your choice.
05:06You can also open up this section that says Tubes, and Tubes actually refers to
05:11those blades of grass themselves.
05:13Within the Tubes section here, there is many, many attributes.
05:17The main one we're going to look at right now is just under Creation > Tubes Per
05:21Step, and this is, once again, sort of the thickness of the effect.
05:25So with the value of 13, it looks like that. But if I increase this to a value
05:29of, let's say, 40 and drag across, we'll get much thicker grass.
05:35And as you can see, that's a little bit more effective than using the Stamp Density.
05:39All right! Very good!
05:40So I'll set that back down.
05:42So that's how you control sort of the thickness.
05:46Now we want to talk about color.
05:48So as you can see here, that color is just sort of a dry brown.
05:52If you want to change that color to something else, you want to go into the
05:55Shading section here.
05:56So I'll open that up, and within this you will see Color and Incandescence and Transparency.
06:01So Color is the color of lit tubes.
06:06So in fact, there's fake lighting inside of the Paint Effects brush.
06:10If you want to have an evenly lit surface then what I recommend is instead of
06:15using the Color, you use Incandescence.
06:18So I'll turn the Color down to black, and I'll set an Incandescence of, let's
06:21say, a bright red, so you can see this very clearly. So there you go.
06:25I've got a very bright red color.
06:28By getting closer here, you can see though that the tips are not bright red.
06:33They are a different color.
06:34So we've actually got two colors for each tube.
06:37We have got a tip and a root.
06:40So this is the root color, which is number 1.
06:43The tip colors are found under Tube Shading, so I'll have to open that up as well.
06:48Let me set the Color down to black once again, and I'll set the Incandescence to
06:53a bright green, so we can really see very clearly that Incandescence 1 is the
06:58root and Incandescence 2 is the tip of the tube.
07:02The last thing we want to look at here, in terms of customizing a 2D Paint
07:07Effects brush, is controlling the direction of the tubes.
07:11So you'll notice that as I draw on the surface, the tubes, or the blades of grass
07:16in this case, are conforming to the direction of my stroke.
07:20And you may or may not want that.
07:22If you want all the tubes to point up in a certain direction, then you'll want to
07:28turn off this behavior.
07:29So that's a little bit of an involved process, so let's take a look at that.
07:33I am going to go ahead and erase that stroke.
07:35And to control this I want to go into the Tubes section of the template brush,
07:40and I'm looking for a couple of things.
07:43One of them here is under Tube Direction, Elevation, Minimum and Maximum.
07:49Elevation here indicates how high the tubes are able to go, or what direction
07:55they're going to point in terms of going up or down.
07:58What we want to do here is we want to actually set both of these to a value of 1.
08:02So I'll set Elevation Minimum to 1 and Elevation Maximum to 1, and if I do a test
08:08stroke to show you, it looks pretty similar,
08:12but if you look closely you will notice that the tubes are a little bit longer,
08:15because they're sort of standing up straighter, if you will.
08:18Let me go ahead and flood paint to erase that.
08:21And the more important of these attributes that you want to control is under
08:26Behavior > Forces, and here you'll see Path Follow and Curve Follow and Curve Attract.
08:33Just set all of those to a value of 0.
08:36And now when you draw on your surface, you'll see that all the tubes are
08:40pointing in the same direction, and we don't see any conforming to the shape of the stroke.
08:46So that's just a rudimentary introduction to how you can customize 2D
08:51Paint Effects.
Collapse this transcript
Saving Paint Effects brushes
00:00Once you're happy with your custom Paint Effects brush and you've played around
00:05with all the Template Brush Settings and you've drawn some strokes to make sure
00:08that you're getting what you want, you're definitely going to want to save that
00:13brush, because I've destructively painted into this texture but I have no way of
00:20getting back to those Brush Settings in the future.
00:23So we have to make sure that, first of all, we save the texture if we're happy
00:28with it, and I've done that.
00:30And then second of all, we need to save the brush itself.
00:33So let me close the Tool Settings window here.
00:36I've got all the settings that I want properly set up in the Template brush, and
00:41then I want to save to either the visor or the shelf.
00:45I recommend saving to the shelf, because the shelf is stored in your User
00:51Preferences and it's much easier to make that portable.
00:55So I've currently got my shelf hidden.
00:57So let me display it by going to the Display menu > UI Elements > Shelf.
01:03I want to use a custom shelf, so I'll go to the Custom tab here, and
01:07it's currently empty.
01:09And all I need to do is go up to the Paint Effects menu and choose Save Brush Preset.
01:15Now before you save a brush preset, you need to make sure that the
01:19settings that you want are loaded into the Template brush, because that's
01:23where it's going to save from.
01:24So when I click this button, it asks me for a label, and it asks me whether I
01:29want to save to the shelf or the visor?
01:32As I said, it's better to save to the shelf because that's going to be stored in
01:35your User Preferences, whereas the visor is in the Maya program directory.
01:40So I'll go ahead and give this a label.
01:42I'll call this aaronBrush1, and I don't necessarily need an overlay label, so
01:47I just delete that.
01:49And when I click Save it creates an icon on my current shelf.
01:53Now ironically it has not actually saved the preferences.
01:58It's created this, but it's only in memory.
02:00So I also need to go and explicitly save preferences from the File menu, and
02:05that will make sure that the document is actually saved on disk.
02:09So there it is, and if I want to get back to it, all I need to do is click on that.
02:13So I could, for example, go back to my 3D Paint tool, select the object, open up
02:21that 3D Paint tool, double-click here. And if I want to grab that brush, all I
02:26have to do is just click, and now it's loaded into the Paint Effects.
02:31So I can go ahead and start drawing again.
02:33A little bit more about this shelf.
02:36There is a new Shelf editor in Maya 2011, and it's worthwhile for us to just
02:41briefly go into that.
02:42I'm going to hold down this little arrow and go to the Shelf editor, because
02:47this is really helpful, because I can now display a text label in here by going
02:53to Options > Icon/Text Beside, and now it's actually a lot easier for me to read.
02:59Ironically in 2011 this may not be sticky between sessions; in other words, when
03:04I open up Maya tomorrow this setting may not be recalled.
03:08So you may have to go back into the Shelf Editor and do that option to show the text.
03:14Within here you can do all sorts of things, as well.
03:16You can display different background colors.
03:19It's a little bit strange because the color of the text here is derived from
03:24the background color.
03:25So if I have a background color of black, then I'll have white text. With a background
03:30color of white, then I have black text.
03:33But in any event that's how you use the Shelf editor.
03:36And finally, I just want to show you where this file is being stored.
03:40I've saved my Preferences, but if you want to get at that brush later in the
03:44future, then you're going to want to go into your Maya User Preferences.
03:48The most important one I want to show you is in Documents--that's my current
03:53Users Documents folder--Maya and then 2011 is the current version number.
04:00So, if I open that up, you'll see prefs, and inside prefs, of course, these are
04:05all the user preferences. And within prefs, under shelves, you will see any custom
04:12shelves you've made. So here it is, shelf_Custom.
04:15This is the file that you want to back up if you want to preserve that brush.
04:20So let me open that.
04:21I can open that with WordPad, and it's very simple.
04:25It's just instructions on that one shelf button.
04:28But if you scroll down, you notice that for Paint Effects there are many, many attributes.
04:32This is all just that one button.
04:34So that should give you an idea of the scale of what Paint Effects are capable
04:38of, because they have hundreds of attributes.
04:41So that is a basic introduction to 2D Paint Effects inside the 3D Texture tool.
Collapse this transcript
Managing 3D paint textures
00:00To finish out working with 3D paint textures, we probably want to do a little
00:06bit of file management, because as I mentioned earlier, the default location
00:13and behavior of the 3D paint textures is kind of opaque, and it's not really terribly helpful.
00:19So what I want to do here is illustrate to you how to sort of take apart the
00:23shader network and put it back together in a way that it actually functions and
00:27that will be useful to you.
00:28Because remember what we did here is we painted into the Incandescence channel.
00:32And if I did a rendering of this right now, it's going to render out completely
00:37lit, you know, as if it were completely self-illuminated.
00:41And I did that because it's easier to paint that way, but of course, you don't
00:44really want to render it that way.
00:46It doesn't look very good.
00:47So what we have to do is we have to find this texture that I've painted, put it
00:51into the source images folder, and then build a new Shader that uses this as the
00:57Color channel rather than the Incandescence channel, okay. So here we go.
01:01I'm going to now go into my file browser here to show you.
01:06Here's my current project folder, 3-D Paint Textures. Here are all of the files
01:11that I've saved so far, and each one of them has got the same document in it.
01:17Actually, this has got a different one, because I painted over it,
01:20did some more cool stuff to it, and made it look a little bit better.
01:22But this is currently the file in question that's my actual painted file, and if
01:27I double-click on that, we can see it in 2D. Okay.
01:31So what I'm going to do now is I'm going to copy that, right-click and just copy.
01:37I'm going to put it into the source images folder, and I'll paste it in there,
01:41because as you probably know, that's where Maya goes to look for texture files.
01:46I've placed it in there.
01:48And it's not really going to be an Incandescence channel;
01:50it just got named that because we didn't have any choice.
01:53So I'm going to double-click on that and rename it, and I'll call this one
01:57terrain_diffuse_3d_paint or something like that, so this is going to be the
02:05diffuse color or the main color.
02:07So back in Maya, I'm going to make a new shader.
02:10I'll right-click and create a new material, Assign New Material, and once again,
02:15it'll just be a Lambert material, and I'll give it a new name.
02:18I'll call it terrainColor, press Enter, and then I want to put that map into the Color slot.
02:27So I can click here to create a Render node.
02:30I get the Create Render Node window open.
02:32This is going to be a File node of course,
02:35so I'll click File, and then I'll also of course have to browse to find that
02:40file, and it takes me directly to the wrong place, as you can see here.
02:45So I want it to be in sourceimages,
02:48so let me click on sourceimages here, and there is the file in question.
02:52So I want to click that and click Open.
02:56And now it's being applied as a diffuse color, not as Incandescent. So, as I
03:01render this now, you'll see that it's got shading on it.
03:04So I know that that's a bit involved, the fact that you have to paint into the
03:08Incandescence channel and then go and dig around and find that file, and then
03:12copy it over, and create a new shader, and put the file into the Color channel.
03:17I think this is important because if you don't do this, then you're not really
03:21going to be sure where your files are.
03:23You may be painting something and be distracted by the lighting in your scene.
03:28So I strongly recommend that you follow this workflow.
03:31You paint into the Incandescence channel, and then when you're done, you'll take
03:35that file out of the 3-D paint folder, rename it, put into the sourceimages,
03:40create a new shader, and place that within the Color channel rather than the
03:45Incandescence channel.
Collapse this transcript
Creating layered maps
00:00Now that we've got sort of a handle on 2D Paint Effects using the 3D Texture
00:05tool, what I'd like to do now is show you how to create a layered map, because,
00:11for example, you may want to have one color in one region of your terrain and
00:16another color in another region.
00:18And although you can use the 3D Paint tool to do that, you may want to use
00:24other methodologies, like, for example, in this case I can use procedural maps
00:29to control the color, but then I'll want to sort of mask those maps off to different areas;
00:35in other words, I might want to have one procedural map in one area and
00:39another procedural map in another area. And the way to do that is to create a layered texture.
00:44So my first step will be to create a shader once again, so I'll select my
00:48terrain and right-click and choose Assign New Material. And once again, it can
00:52be a Lambert material--that's fine--and I want to actually paint a mask before
00:59I build the texture.
01:00So I'm going to start with this is a temporary material that's going to have a
01:04mask, and where I paint white, I'll have one material, or texture rather, and then
01:10where I paint black, I can have another texture.
01:13So I'll start out by turning the Color down, and I'll rename this.
01:18I'll just call this one terrainMaskTemp, because this is going to be
01:24a temporary material.
01:26Just as we saw before, it's really a good idea to paint into the Incandescence
01:31channel and then take that file and put it into a shading network later.
01:36So that's where I'm going to start here.
01:37So I'll press Enter, and I want to directly go into Texturing > 3D Paint tool
01:43options, and I want to paint with white.
01:47Go ahead and click here and choose White as my color.
01:51By the way, I'm using just the Artisan tool.
01:53I'm not using the Paint Effects. And I'll make my brush smaller with the B key,
01:58holding down B, and I'm drawing across here.
02:01I am not seeing anything, and you know why is because I have not yet saved the texture.
02:05So I have got to go ahead and do that, scrolling down.
02:08I'm painting into the Incandescence channel, but I need to assign/edit textures.
02:13I'll do it, once again, a 2K texture, 2048x2048.
02:17Click Assign/Edit, and now I should be able to paint. There we go.
02:22So I am just painting into certain areas with white.
02:26Let's minimize some of these windows.
02:28I'll tap the Spacebar, and I can go into my camera and so I can sort of see what I'm doing.
02:34Now, you can see here that I'm not seeing the texturing here,
02:37so I'll need to press the 6 key on my keyboard. And if you're having trouble
02:42seeing because you've got these wires in the way, remember you can, for each
02:46viewport, go down into the 3D Texture tool, scroll down, and you can turn Show
02:52wireframe on or off for each viewport.
02:55Now I can actually paint into one view and I can kind of see the result in the
02:59other view, and of course I can also paint in this view as well.
03:03So I'm just creating a very simple mask.
03:05There is nothing fancy.
03:06Once I've got that mask created, I want to save it,
03:09so I've got to click Save Textures. And now it's been saved out into the usual
03:13place, in the 3dPaintTextures folder in my current project, and you'll see here
03:20this is the name of the current file that I've got opened, creating layered maps,
03:25and inside that now I've now got that Incandescence channel.
03:29Okay, so far so good.
03:30The next thing I want to do is I want to create a new shader for my terrain, and
03:34I'm going to use a layered map. Cool!
03:38So I can close out these tools, select the model once again, and I'll assign a new material.
03:44So right-click, Assign New Material, and once again it will be a Lambert
03:48material. And I will now call this one terrainlayeredMap. Press Enter.
03:54So into this Color Channel now, instead of just putting a file, I'm going to
03:58create a layered map.
04:00So I can click Create Render node, and I'm looking for a layered map, and it's
04:05actually found under Other Textures.
04:08There we go. And once I click that now, my Attribute Editor window changes to
04:14show me the layered texture attributes.
04:17So this might be a good time to open up the hypershade to just take a look at
04:20the structure of this material so far.
04:23So I'll go to Window > Rendering Editors > Hypershade, and you'll see I've got
04:30terrainMaskTemp, and I've got terrainlayeredMap.
04:34So this is the one I'm currently working on.
04:36I can go ahead and select that, and that will let me navigate through the
04:41Attribute editor, and I can also right-click and graph the network,
04:45and now I can see the structure of my material so far.
04:49And all it is is this layered texture feeding into the Color channel of my
04:54material. And if I hover the mouse over that connection wire, you can see
04:58layeredTexture1.outColor is going into terrainlayeredMaplambert.color.
05:05So the color output of this texture is feeding the color input of the shading
05:10node. Okay, very good.
05:11So we've got to handle on sort of what's going on here so far.
05:14The next thing I want to do is I want to create a couple of different layers in this texture.
05:20So, move this over little bit here.
05:22Currently I've only got one layer, and this is the top layer.
05:26So as I add layers, they are going to actually read from right to left.
05:31So layers to the right are going to be below layers to the left.
05:37So to add a new layer, I'll just simply click.
05:40Be careful about this, because if you click a bunch of time, you'll be creating a
05:43whole bunch of unnecessary layers-- and I really only want two this time.
05:47So I can get rid of these by Xing them out.
05:50But just be aware that as you go forward, Maya is actually creating new
05:56attributes in this layered texture, so it's actually now got like six inputs
06:01because I just clicked on there.
06:03So you're going to have to kind of fumble around a little bit and try to find
06:06which inputs you are dealing with, because they are not labeled terribly well.
06:09So let's just play around with basic colors at first, and then we'll place some
06:13textures into those colors.
06:15Let's say this is my top layer, and I can make that maybe brown.
06:20I'll go to HSV mode and just dial that down.
06:23Okay, so you can see my top layer is completely overshadowing or overriding my bottom layer.
06:29So, you can see we just got only the brown color here.
06:33So, the next thing I want to do is I want to place a mask onto this top layer
06:39so we can just let some of the bottom layer through. And one way to do that is
06:44just to simply select that top layer and then go to the Alpha channel here, and
06:50I want to add a map, okay.
06:53But before I do that, you need to think this through, because remember that the
06:57masked file that I just created is in that 3D textures folder and that's not a
07:02good place for it to be, really.
07:04I want to grab that file and place it into sourceimages and rename it so I know what it is.
07:09It will be called Layered Map Mask or something like that.
07:12So let me go back to my file browsers.
07:15This is the file in question.
07:17That's my mask file.
07:19So, if I double-click on that, I can prove it to you. Here's the mask.
07:22So, let me grab that. I'll copy that.
07:26I'll put it into sourceimages in my current project, I'll paste, and I want to
07:32rename this because currently that name doesn't make any sense.
07:35So I'm going to call this one terrainlayeredMask, and where this is white, it
07:42will allow that top layer to show through, and where it's black, the bottom
07:46layer will show through.
07:47Back in Maya, here's my alpha channel for the top layer.
07:51I'll go ahead and click the Create Render Node button.
07:54This is going to be a file node once again, and I'm going to browse once again,
07:59and it's taking me to the sourceimages folder this time, and I can select that
08:03mask file and click Open.
08:05Now if you look in the hypershade, you can see that there is more stuff going on
08:09in here, and I can graph that network once again.
08:13You can see that there is now a Texture Placement node and a File node, but if
08:17we look in the viewport, we're not seeing the mask, and that's because the
08:21default viewport renderer is not capable of displaying layered textures.
08:26You actually have to go into the Renderer menu and choose High Quality
08:32Rendering, and then and only then will you be able see the effect of
08:36the layered texture. Okay, very good!
08:38So let's go back to my hypershade, and we'll just sort of travel through this shader tree.
08:46So here's the top level or the sort of end output.
08:50That's the shader or Material node.
08:52Then we've got the Layered Texture node, and it's got two layers, right;
08:57there is a layer here and a layer here. And then layer 1 is being masked by this file texture.
09:04And you know, I could stack more of these on here, but that's all I need to do right now.
09:07So that's how layered textures work, and of course if I render this, it
09:10should come out just fine.
Collapse this transcript
Applying 2D procedural textures
00:00We have got a layered texture.
00:02Let's play around a little bit with the layered texture attributes just by
00:06maybe dragging these around, like
00:09if I middle-mouse drag a layer, I can change the layer order, and I'll need to
00:14reassign this alpha map, so that it will be masking off the top layer rather
00:19than the bottom one.
00:20So let's go back to the hypershade.
00:21I have got it minimized down here.
00:24What we can do is we can instead of piping that file texture into one of the
00:29inputs, we can pipe into the other input.
00:32So if I hover my mouse over this, you'll see it says, file2 outAlpha->
00:35layeredTexture1inputs(2)alpha.
00:41Well that's a bit of a mouthful, but what's going on here is that there's more
00:44than one input to the layered texture.
00:47There are several inputs.
00:48Now they're not labeled in any kind of way that makes any sense.
00:51They're just labeled by number and the order that they are created.
00:54So the first layer is called layer 1, the second one I make is called layer
00:592, but that does not indicate where they are in terms of which is in front
01:04and which is behind.
01:05They are just numbered based upon the order in which they were created.
01:08Okay, so first thing I want to do if I want to reassign this to be the mask for
01:13the new top layer is I want to select and delete this connection wire.
01:19So to create a connection in hypershade I want to right-click and choose the
01:24output, and then I can go to the input section here in right-click and choose the input.
01:29But the input that we want is not listed here.
01:32What we want to put it into is actually input1Alpha.
01:38So I want to go to Other here, and that's going to open up the Connection editor.
01:43This gets a little bit tricky here because you've got to sometimes reselect
01:47things and reload them, go over here and maybe reload it.
01:50But what I want to connect here is outAlpha from the file node to an input, and
01:55you'll see there is inputs(1) and inputs(2).
01:57input(1).alpha. But I will just highlight that and that creates the connection.
02:02Let's see if I have done this right.
02:04It looks like I have.
02:06So we will see here, this actually has a connection in Alpha here, and I can tell
02:11because that's highlighted in yellow. And if I go to this other layer, it does not
02:14have an incoming connection because it's not highlighted in yellow.
02:17So now I have done it. I've successfully changed the order of the layers, and I've also changed the Alpha as well.
02:25So now you'll see we have got blend modes as well.
02:28We have got to change this to Over. There we go.
02:30So now I've got a reversed effect.
02:34Okay, so that's great, but we also have a pattern in here, not just a flat color.
02:38So I will go back to the hypershade, open that up, and I can create a 2D
02:43procedural texture and plug it in to one of the color channels in my layered texture.
02:49Okay, so here we go.
02:50I've got 2-D textures.
02:52I will just create it actually from the hypershade. Cool.
02:56So what do we got here to play with?
02:57Well there is Noise, and there is Fractal.
03:00Maybe I'll choose Fractal,
03:02maybe give me a little bit more option to play with.
03:04So when I click this button here, I get a node created--
03:07actually, I get two nodes created.
03:09I have got a texture placement node, and what I want to do is I want to take this
03:13Fractal color and map it to one of the layered texture inputs.
03:19Okay, so let's try that.
03:20So I will select my layered texture node, and I can connect it through the manual
03:26method that I just showed you.
03:28There is another way, too, which maybe a little bit quicker, which is simply to
03:31middle-mouse drag and drop from the hypershade to the Attribute editor, and when
03:37I release the mouse then that connection is being made.
03:40I will hover my mouse over here and it says, fractal1.outColor->
03:45layeredTexture1.inputs(1).color.
03:48Okay so there you see I've got a fractal texture on there, and this is a 2D texture.
03:53It is procedural, meaning that there's no file associated with this,
03:57but it is a 2D map, which means that you have got to have good UVs on your object.
04:02So far so good.
04:03We have got color on there, but it is not really a good color.
04:07I mean we could really make that better, couldn't we?
04:09So if we go back to hypershade and select the Fractal node, we will see its
04:14attributes here, and there's a couple of things you could do.
04:17One would be to try to play around with this color balance, and that might get
04:21you somewhere. Like, if I click on Color Gain, I could try choosing a different
04:26color here, and that's kind of working in this case. But you know what?
04:29There is a more finessed way of doing this that's going to be more fun, which
04:32will give us more control.
04:34What I'll do is I'll take that fractal output and pipe it through another node,
04:39which will allow me to remap the value, or remap the color, and it's quite fun.
04:45So what I am going to do here is I am going to delete that connection that I
04:48just made, just highlight it and press Delete, and I am looking for something
04:52called a Remap Value node, and this is found in Utilities.
04:59Scrolling down, down, down, down, down. Remap Value,
05:02I will click that, and it is created in the hypershade, and Remap Value will only
05:08accept a single floating- point number as its input.
05:11In other words, it can't accept a color directly.
05:14Remap Value only works with single floating-point numbers, so I can't send an
05:19RGB into Remap Value.
05:22But I can send the Alpha output of this Fractal node into the Remap Value node
05:28and then add color to that.
05:30So that's what I am going to do.
05:31So I will right-click and choose outAlpha, and then I'll right-click and choose
05:36inputValue, and that's made that connection.
05:39So the alpha of Fractal 1, which is just its black-and-white grayscale, is being
05:45sent to remapValue1.
05:47And then remapValue1 in turn I am going to send to the layered texture.
05:51So I will select like that layered texture so I can see its attributes here.
05:55So now I am going to middle-mouse drag this Remap Value node onto the color of that top layer.
06:02It looks pretty much the same now, but wait, there is more.
06:05If I select that Remap Value node and I go into the Attribute Editor, watch this.
06:11As I move these flags around here, I am able to change the contrast and the color.
06:16I can go in here and I can change that color to something else. I can change this
06:22other flag to something else as well, and this gives me a lot more control than
06:27just going into that Fractal node and playing around with its color balance.
06:32I can create really subtle effects here, and I can create lots of flags in here.
06:37I can even open up this gradient and make it big and play around with it and
06:42get different looks.
06:43So this is a really useful technique to take the alpha out of one of these
06:482D procedural maps,
06:50pipe that alpha through a Remap Value node, and then use it for something else--
06:55in this case placing it on to a layer in my layered texture.
06:58So that a little bit about using procedural textures.
07:01One last thing: I will just go into the fractal node once again and show you
07:05that there are some attributes to play around with in here, such as the Ratio,
07:11which is sort of the level of detail of the Fractal--
07:14lower ratios will give you sort of softer effect--and then Frequency Ratio, which
07:19is sort of the overall size of the effect.
07:22There is lots of things you can play around with here.
07:24You can just experiment with it and see what it does.
Collapse this transcript
Applying 3D procedural textures
00:00We built a shader network with a single 2D procedural texture, and I have gone
00:05and just played around with the Remap Value node a little bit to add some
00:09color to this, and now we're ready to add another procedural texture to the ground here.
00:16And I will take this opportunity to create a 3D procedural texture, and the
00:21procedure for that is similar, except with 3D textures you don't have to have
00:26a 2D Placement node.
00:28You will have a 3D Placement node, as you'll see.
00:31So I want to create a 3D texture, so I am back in my hypershade, and I'll go to
00:35the 3D Textures section. And one of them, for example, is the Cloud texture,
00:42so I will go ahead and click on that to create the Cloud texture and the 3D Placement node.
00:47So let me just move those around.
00:49I will Shift+Select these and just move them out of the way, so you can see,
00:53they're not connected to anything yet.
00:55I want to take that cloud and I want to pipe it through a Remap Value node,
01:00because I want to impart some color to it.
01:02However, it won't work if I try to use the Alpha output of this.
01:05If I right-click on here and try to do that, it doesn't really work with
01:09this particular shader.
01:10So what I'll do instead is I'll just take one of the three color channels.
01:15I can take the green color channel out and pipe that through a Remap Value.
01:19So I'll go back to Utilities, going down, looking for Remap Value. Here it is, boom!
01:24I've got another one.
01:26And then as I said, I want to take just one of the color channels out of this
01:29cloud texture and set it to the Remap Value input.
01:33So I will right-click and choose outColor, and you'll see I've got several.
01:37I'm going to take the green channel and then right-click here and send that to the inputValue.
01:44And then finally, this Remap Value node is going to end up on the bottom layer
01:51of my layer Texture.
01:52So I'll just give myself a little bit more real estate to work with here.
01:56So here is the layer texture.
01:57I'll select it, and in the Attribute editor, I will see all of the
02:02appropriate attributes.
02:04I want to send this Remap Value node to the bottom layer.
02:08So I want to select that bottom layer and then middle-mouse drag the Remap Value
02:13node onto the color swatch here, and now you'll see I've got something.
02:17It doesn't look like much, and the reason being that my cloud texture is
02:22very, very small right now. So, I just need to increase the scale of that cloud texture.
02:28So how can we accomplish that?
02:30Well, with a 3D texture, you don't need UVs.
02:34In fact, if I was using only 3D textures here, I wouldn't have needed to do the
02:38UV mapping on this at all.
02:40But in place of UVs, you have a 3D Texture Placement node in the viewport, and
02:46it will be at the origin. By default, it will be very, very small.
02:50So you may not even be able to see it.
02:53So what I am going to do is I am going to minimize the hypershade and open up the Outliner,
02:58Window > Outliner, and here it is, place3dTexture1.
03:00So I will select that.
03:04And I need to scale it up because it's so very small.
03:07So in my Channel box, I will just go over here and highlight these and type in a
03:11value of, let's try 10.
03:13And as soon as I do that, you can see the pattern change on my terrain.
03:17How about a scale of 100?
03:20And now you can see the actual Texture Placement Node icon.
03:23So I can move that around.
03:25My performance might be a little bit slow when doing this, so don't be alarmed,
03:29but it's actually moving that texture through the surface of the model.
03:36So this is a true 3D texture that does not require any UV mapping.
03:42So all I need to do to change the placement of this texture on the surface is
03:47play around with the transforms of this Texture Placement node. So, I can go back
03:51and scale it down maybe, and I can play around with rotation, too, if I want. I'll
03:56grab the Rotate tool and spin that around.
03:59You will see that it's having an effect.
04:01But basically the important thing you need to do is just adjust the scale.
04:04And then finally, I can go back into hypershade, back to that Remap Value node
04:09and I'll hit Ctrl+A to get the attributes, and then I can play around with the
04:14Gradient to change the colors.
04:16So let me minimize some of these other views, and I'll make this bigger so I can see it better.
04:22And I can just start changing up some colors.
04:24I can make this one brown, go over here, make that one kind of orangish, and
04:32that's how I can control the basics of this 3D texture.
04:35And then finally, I probably want to play around with the cloud attributes proper.
04:39So I will go back to my Attribute editor, I'll select that Cloud node, and I can
04:44play around with, for example, the contrast.
04:46And you will see that that is having a kind of subtle effect here, but it is
04:50sort of affecting it.
04:52Most importantly though, I have the Depth, and this is the level of detail of the texture.
04:57So if I set this Depth value to, let's say, 2, I will get a very soft look.
05:02If I increase this up by integers, what I am doing is I am increasing the number
05:06of iterations that this fractal algorithm is calculating. So, the higher this
05:11number, the more detail you will find on the surface.
05:14There are other things you can play around with here; for example, like this
05:17Ratio, this also impacts the level of detail.
05:21And essentially, that's really all you need to do to create a 3D texture.
Collapse this transcript
Baking textures
00:00We've learned about creating procedural textures and placed them into layered
00:05maps, and that's great if we're rendering in Maya.
00:08But if I want to export this asset to a game engine or any other software
00:14other than Maya, I'll have to convert those procedural textures into files, so
00:20that they can actually be used.
00:22So to do that, it's quite simple actually: All you need to do is open up the
00:27Hypershade, Window > Rendering Editors > Hypershade.
00:30You'll need to select the material in the hypershade and you'll also need to
00:35select the object, so I'll Shift+Select my terrain here.
00:39I need to do that because the UVs of this object are relevant to the baking process.
00:45So I'll go down to the hypershade and in the Edit menu, you'll find Convert to
00:50File Texture (Maya Software). That means it's going to use the Maya Software
00:55Renderer to convert the Procedural texture to files.
00:58Now there is an analogous process using Mental Ray, but in this lesson we're
01:02just going to use the Maya-native tools.
01:06Okay, so I definitely need to go into the Option box for this because I'll need
01:10to change their resolution and the file output type.
01:13So down at the bottom of this dialog are really the only important attributes at
01:18this time: the X and Y resolution and the file format.
01:22So I'm going to choose a X resolution and Y resolution of 2K or 2048 pixels, and
01:29for the file format, I'll choose the standard Maya IFF native file format.
01:35Now I'll click Convert and Close, and it's going to have to think about it for a minute.
01:38There are some calculations that need to be done, and I've got a fairly high-
01:42resolution texture here, so it'll take a minute or two to think about it.
01:46When it's done, it's going to do two things: one, it's saving the file out into
01:50my sourceimages folder, and two it's created a new material and assigned that new
01:56material to the object, and you can't change that behavior.
02:00Whenever you bake through the hypershade, it's always going to create a new
02:04material, and it's always going to assign that material to the object.
02:08So let's take a look at what's happened here. So, here's my new material, and if I
02:12right-click and graph that network, you'll see that it's very simple. It's just a
02:16Lambert shader with a single file going into the color.
02:21So if I hover my mouse over that, you'll see file4out Color.
02:25Contrast that with my original shading network.
02:28If I graph that network, you'll see there's a bunch of going on in there.
02:31I've got procedurals, I've got a mask, and I have got a layered texture, and all
02:35of that now has been converted to a single map.
02:39So actually, once I've done that, I should be able to view that texture in just
02:45standard Render mode in the viewport;
02:48I don't need to be in high-quality mode anymore.
02:50So I'll switch it over to Default Quality, but there's one more little thing
02:54I've got to do in order to see my texture, and this is just one of the quirks of
02:57this software--one among many.
02:59I'll have to select it, go into its shader, and scrolling down, down, down,
03:05under Hardware Texturing, I need to choose which channel I want to be
03:10displayed in the viewport.
03:11And now I've turned on the color channel, so what I'm seeing here is the baked version.
03:16Let's just quickly take a look at the file that was created.
03:20I'll go into my sourceimages folder in my current project, and here it is.
03:24It's called layeredtexture1-terrainMesh. Double-click on that, and this is what I've got.
03:29That's my baked texture.
03:31And that's suitable for use in any game engine.
03:33I might have to convert it to a different file format, maybe TIFF or whatever
03:37my game engine wants, but essentially that's the process of baking textures in Maya.
Collapse this transcript
3. Backgrounds
Understanding backgrounds and matte paintings
00:00In this chapter on backgrounds, we're going to look at simulating geometry in
00:04the distance, because you know, it's really not practical to model a scene that's
00:08larger than, let's say, a couple of square miles in area.
00:12So, in this particular image, you can see that I've got mountains in
00:17the background here.
00:18That's just matte painting.
00:19It's an image that's been placed on a plane in the background, and it looks fine,
00:25and it's actually constrained to the camera, so that camera can move around.
00:27It will always look like this geometry is at an infinite distance from the camera.
00:33So let's play this. So, you can see I've got some time lapse here with the fluid clouds.
00:39This particular scene was modeled using the same techniques as we saw in the
00:44first chapter. It's just a polygon mesh that's got subdivisions, and I used all
00:50those same techniques of sculpture that we saw before.
00:53And additionally, it's got a texture applied onto the terrain that uses similar
00:58techniques as we saw in chapter 2,
01:01with the Layered texture and Procedural textures; the only difference being
01:06this one is a Procedural 2D mountain texture, which is specifically designed
01:11for this type of scene.
01:13So that's the end result of what we're going for here.
01:17And now let's take a quick look at how this is laid out.
01:19So let me go into the Perspective view in Maya.
01:22I'll tab the Spacebar, and you'll see I've got my terrain here in the center, and
01:28that's real geometry. And I used this standard Sculpt Geometry tool to model
01:35that, and then additionally, you will see these are the so-called matte
01:40paintings placed onto polygon planes and self-illuminated, and also with
01:47transparency here, so that we can see the skydome in the background there.
01:53So it's a little bit rough-and- tumble to see in the viewport.
01:56You can't ever really see full quality in the viewport, no matter what, but you
02:01can get a good enough idea of what it's going to look like, and then when you do
02:04a full render you can test to see if the quality is working for you.
02:08So that's the basic idea of this chapter:
02:11we're going to create backgrounds, we'll make a skydome, and we'll apply some
02:15images onto these matte paintings.
Collapse this transcript
Creating a skydome
00:00There are a lot of different ways of creating environment backdrops to simulate
00:04geometry in the distance.
00:06In this chapter, we will look at a couple of them.
00:08We will create a skydome for the sky, and we will also create some matte
00:12paintings to represent the mountains in the distance.
00:15You can see here that I've got my terrain visible, and I can usually see the
00:19texture here, but that's just because I'm in High Quality Rendering mode in the viewport.
00:25However, you'll find that it's not really practical to have that on all the time
00:29because you might have display glitches,
00:31so I am just going to turn the Renderer back to Default Quality Rendering. And I
00:36won't be able to see that texture, but I got a sense of what it looks like, so I
00:41can proceed from there.
00:42So I want to create a skydome, and that's going to represent the sky of course,
00:47and I will place a ramp texture on it, so that I can make it fade out from top to bottom.
00:53So let's start by creating a polygon sphere: Create > Polygon Primitive > Sphere.
00:59I will just drag that out and make that nice and big, bigger than my terrain.
01:05I will go into the Channel box and I will change up some attributes, like, for
01:10example, let me just center it, giving it values of zero in all three axes.
01:15I will go into the polySphere1 node, and I can change up things like the Radius
01:20and so on. Maybe I will make that an even 10,000 units in radius.
01:25And now the subdivisions, I want to think about this for a second.
01:29If I go down into my scene and sort of go down to sort of eye level--you might have
01:36to play around with this little bit to get down there--but if I get down to
01:40approximately around where I want to be, you can see that the squares of my
01:47skydome, these polygons, are kind of big, so I probably wanted to increase the
01:51level of detail of the skydome.
01:53So, I will set the number of subdivisions in axis to, let's say, 60 and I'm best
02:00off with square polygons, so I will increase in subdivisions in height as well to, let's say 30.
02:06That looks pretty good.
02:10Okay, so I've got a skydome.
02:12I want to delete the bottom half because I really don't need that.
02:15It's just kind of cluttering up my scene.
02:17So I will tap the Spacebar, go over to one of the Ortho views, right-click, and
02:22go into Face Component mode and just select all those faces, and delete.
02:28Right-click and go back to Object mode.
02:30So now I have got a hemisphere. Cool!
02:35Well it would be a little bit easier to see what I was doing if I could see
02:38through the hemisphere,
02:40so that's what I want to do here.
02:42I want to actually flip it inside out, and you know in the terminology of 3D
02:47graphics, that's called reversing the surface normals.
02:50In order to see the reversal of the surface normals, I also need to enable a
02:55switch called BackFace Culing.
02:58So to do this I will select the mesh, go to Ctrl+A, Attribute editor, and I want
03:04to go to the Mesh Shape node, so I am just going through the attributes and I'm
03:08looking for the Shape node. Here it is, and it's the Mesh node, and I want to go
03:14into Mesh Component Display here, and under BackFace Culing, I want to turn that
03:20to full. And what that means is that one side of the sphere will be invisible.
03:27So, that's the usual way of a polygon surface in 3D that only one side is visible.
03:35So BackFace Culing is on now, so I can see the outside of the sphere but not the inside.
03:41So now I want to flip those surface normals around, so I can see the inside
03:45but not the outside.
03:47So with the sphere selected, I will go to the Polygons menu set, and I'm looking
03:53for the Normals menu, and I will just choose Reverse. And I'm actually sort of
04:00dropped into Component mode.
04:01If I click, I can sort of exit out of that.
04:04And now you can see with BackFace Culing on and the normals reversed, I can see
04:10the interior of my skydome, but I cannot see the exterior.
04:15So that makes it a little bit easier for me to work.
04:17Very good. So, there is one or two other things I also want to do in the Mesh
04:23Shade node because when I put lights into this scene I want to make sure that the
04:29lights don't cast shadows from the skydome; in other words, if I have a sun in my
04:35scene, that'll be a directional light, and I have already got the lights in the
04:38scene on my display layers here. So, let me just make that visible for you.
04:43I have got lights in the scene, but if I try to render this right now, the
04:48skydome would cast a shadow onto the terrain, and that's certainly not what we want.
04:55So I want to turn off shadows. So, I will select the skydome, go back to
05:00Ctrl+A, Attributes, and once again in the Mesh Shape node, I now want to find
05:06Render Stats. Cool!
05:09So I open up that, Render Stats, and I want to just make sure that Cast and
05:14Receive Shadows are turned off,
05:17and that way I won't have any issues with shadows being cast from the skydome
05:22onto the surface of the terrain.
Collapse this transcript
Shading the skydome
00:00Now that we've built the skydome geometry, we need to shade it, so it will
00:04actually have some color.
00:06So I'm going to assign a new material to the skydome.
00:09Instead of a Lambert shader, I'm going to choose a Surface shader, because a
00:14Surface shader will not respond to light, no matter what.
00:17If I use the Maya Software Renderer and a Surface shader then that surface
00:21will always be rendered at exactly 100% brightness, and it will not respond to light in any way.
00:28So that's what I want for a backdrop.
00:30So I'll right-click and choose Assign New Material, and this time instead
00:36of Lambert, I'm going to choose Surface Shader, and I'll just go ahead and
00:40rename that right away.
00:42I'll call this skydomeSurfaceShader. Press Enter.
00:49So the Surface shader is very simple, and really the only thing I need to worry
00:53about with the skydome is the Out Color.
00:56I'll just place a ramp onto this Out Color.
00:59So I'll go ahead and click on the Create Render Node icon, and it's a 2D texture ramp.
01:06Now, you can see the ramp actually in the view.
01:12So let me press the Spacebar so you can see that a little bit better.
01:17But you'll notice that we're not seeing all the colors of the ramp.
01:21You'll see here that there's actually red in the ramp,
01:24but we're not seeing that in the skydome.
01:27So what we have to do is we have to project new UVs onto this hemisphere, because
01:34it just had default UVs from the sphere, and if it was a full sphere, then the
01:39bottom of the sphere would be red.
01:41So I just need to assign new UVs.
01:44So I'll just go ahead and select it, and then go to Create UVs > Planar Mapping, Options.
01:51In this case, I actually do want to project from the either X or Z axis.
01:56It doesn't matter which.
01:58But I want to project from the side, and I'll click Project.
02:04And there is a bit of a quirk with Maya, when you see this the first time, it
02:08kind of looks like it didn't project correctly.
02:11Don't let that fool you;
02:13that's actually just a glitch in the program.
02:15And in fact, if I go back to High Quality Rendering, I can see that it's
02:21actually distributed the texture across the entire surface as we would expect that it should.
02:28So again, it's just a little quirk of the program that sometimes you don't see
02:33the UV projection correctly the first time around.
02:37You might go and switch to Shaded mode with the 5 key, and with the 6 key
02:42go back to Textured.
02:43Let's go back to Object mode as well here.
02:46You kind of have to sort of do a little dance here to try to make this work, but
02:51it may not actually ever display correctly in the viewport.
02:54So you may have to be in High Quality Rendering mode just to sort of see what you're doing.
03:00So there it is, and then back in the shader, let's go back to the Attribute editor.
03:06And here's the Surface shader. Here's the Out Color.
03:09I'll just drill down into that ramp, and I just want to change up these colors.
03:13So I don't need this green.
03:16I'll just X that out. And the red one maybe I'll make a very light blue.
03:22I like to use Hue/Saturation/Value, push that over a little bit and maybe make a
03:27little bit brighter.
03:30Likewise, with this color swatch, I can maybe bring that down somewhat, and
03:36maybe go into its color as well and reduce its saturation, because it's a bit too oversaturated.
03:42It also looks better if I instead of using a linear interpolation here, I can use
03:50exponential interpolation, and that just changes the shape of the transition
03:56between these two color flags.
03:58So for the top flag here, the top color swatch, I've chosen Exponential Down as
04:05the Interpolation type.
04:08That should look pretty good when we render that.
04:10So I'll switch this back into default quality rendering, and now you'll notice
04:14that ironically it's displaying correctly now.
04:17So it probably has to do with the fact that I changed the ramp.
04:21So I've got a skydome, and I've got it shaded, and it's actually pretty good
04:25and ready to render.
Collapse this transcript
Creating matte paintings
00:00In this movie, we are going to be looking at creating matte paintings for the
00:04background geometry.
00:06We don't want any real geometry back there;
00:07we just want a picture of the geometry.
00:10So, what we're going to do here is we are going to create some planes that sit
00:14beyond the terrain out here, but not quite out as far as the skydome.
00:21So, I want to leave a little bit of room to place my matte painting,
00:24so what I'll do is I will select my sky dome and just scale it up a little bit--
00:28maybe I will scale it by a factor of 2.
00:31And I've also got a construction history here as well, as you can see on that skydome.
00:37So I should go ahead and delete the construction history on that,
00:40just to keep things nice and clean, and I will also take this opportunity to
00:44just rename the object skydome, and I have got a display layer here already
00:49called background layer.
00:51I can just select that, and with the object selected, right-click and add
00:55the selected object.
00:56That way, I can easily change the visibility.
00:59Of course, if you haven't used display layers before, if you want to create a
01:03new layer, you can just create a new one from this button here.
01:07Okay, so we are ready to create our matte painting, but before we do, we need to
01:10do a little bit of homework.
01:11I have got to figure out, what's the aspect ratio of the image we are going to
01:15be using before we build the geometry, the plane upon which that image will be placed?
01:20So, let's take a look at it.
01:21If I go to the File menu in Maya, I can go to the View Image menu item, and
01:26that will launch a file browser that should take me directly to my current
01:30project's source images.
01:32And you'll see there are several matte paintings here.
01:36Go ahead and open that up, so we can take a look.
01:38It opens in FCheck, and what you see here is actually a Maya rendering that I
01:42prepared in advance.
01:44The most important thing about this actually is that it's got an alpha channel.
01:49It's got transparency in the image, and I can see that here in FCheck by
01:54clicking on the Mask button.
01:57So, of course with an alpha channel, the white pixels will render and the black
02:01pixels will be transparent.
02:04What I did to create this, actually, was I just created a camera in the center of
02:10my terrain here, and I set the camera's angle of view, or field of view, to
02:14exactly 90 degrees to take in that entire region.
02:19And I just rendered out a wide panorama, and then I rotated the camera at 90 degrees
02:24and rendered out another panorama.
02:27And I just rendered out all four,
02:29one from each of the cardinal directions of the compass.
02:32Now, of course, you can create matte paintings any way you want.
02:35You can use real photographs,
02:36you can use Photoshop, and whatnot.
02:39The important thing is to know what the aspect ratio is.
02:43In this case, I know that it's exactly 4 to 1.
02:46So, my image is four times as wide as it is tall.
02:50So for best results, I want to create my geometry to that same aspect ratio.
02:54I will do that in Orthographic views. Tap the Spacebar.
02:59Go over to the Front view and I am just going to create a polygon primitive plane.
03:06Go ahead and drag that out, and I will just zero out its position.
03:11Select all those Translate channels and type 0.
03:15And so let's go into the INPUTS, and I've done this already, so I kind of know
03:21what I want, but in your own scenes you might need to sort of play around with
03:24it and figure out what scale you want things to be.
03:28I know that in my scene, I want the width of my plane to be 16,000 units and the
03:34height to be 4,000 units, for an aspect ratio of 16 divided by 4, or 4.
03:41And since I want this to be laid out in a perfect square, that means I need to
03:44push this back by 8,000 units.
03:50So, that'll be, in this case, in the negative Z axis.
03:53So, Translate Z, I give that -8000 units, and I will rename the object,
04:01double-click, and call that mattePainting1.
04:07If you want, you can increase the number of divisions on the plane.
04:12We want to apply a Surface shader because that won't affect the lighting or the
04:16rendering in any way.
04:18So, I will just make sure it's selected and right-click and choose Assign New Material
04:24and once again choose a Surface shader.
04:27I will go ahead and rename that right away.
04:30We'll call that mattePaintingShader 1.
04:36Right now, I'm only concerned with the Out Color.
04:40So, I will go ahead and click to create the Render node.
04:43It will be a file texture, and in the Attribute Editor, I will need to browse for
04:49that first matte painting image. Click Open.
04:54So, as you'll see, it doesn't necessarily look right at first.
04:59And this is just one of the quirks of the program--one among many--and that is
05:02that the UVs on this plane are not really laid out properly by default.
05:08So, I can fix that really easily.
05:09I will just go ahead and select that polygon plane and scroll down into its inputs.
05:14And the setting in question here is to Create UVs attribute.
05:19And what I want to do is choose Normalization Off, and what that will do is
05:24it will cause the image to stretch across the surface so that it will fill the entire plane.
05:31Now, don't panic if you see, once again, that the UVs don't look quite right;
05:35it's a bit of an illusion.
05:37It's actually fine, and if we go into the File node and maybe play around with
05:43some of these things, we might be able to get it to refresh or not.
05:47It's just one of those mysteries.
05:50Eventually it will sort of wake up, and we will see a better approximation of how
05:56this image is going to be applied.
05:58So there are a lot of mysteries in Maya.
05:59You know Maya is the Goddess of Illusion, and so there are a lot of things in
06:03Maya that you may be scratching your head about and wondering, what's going on?
06:06When in doubt, you can always do a rendering and see what's really going on.
06:10Another thing about this is that you really don't have the ability to increase
06:13the quality of this preview in the viewport.
06:17But if you do a full rendering, it will look fine, because remember this texture
06:20is quite large; in fact it's almost 4,000 pixels wide.
06:24So, there are a few other things that we have to do,
06:26a few more things we've got to sort of get lined up in order for this to look
06:29right if we are going to render it, and these will be found mostly in the File
06:34node and in the Texture Placement node.
06:38So, in the File node, first of all, I want to disable filtration.
06:42So, the renderer actually filters textures twice.
06:46It filters them once when it sort of applies it onto the surface, then it
06:50filters it again during the render process.
06:54So, we want to disable that first filtering process.
06:58I will turn Filter Type off here, because if I don't do that, I am likely to get
07:02pretty fuzzy imagery in my final rendering.
07:05So, I am going to turn filtering off in the File Attribute, and a couple other
07:09just strange quirks we have got to cope with here, particularly in the
07:142dTexture placement node.
07:16We will want to turn wrapping in U off, and Wrap V off also.
07:24Because if you don't do that, it's very likely that you'll get some fuzzy, weird
07:29lines around the edges of your matte painting, because the image is actually
07:33wrapping around to the other side, and it gets kind of funky.
07:37So, we need to turn off wrapping.
07:40Even though we don't see any difference here, you'll have to trust me that that
07:43will help protect you from some weird rendering issues when you go ahead and do
07:48your final rendering.
07:50So, we have got all of those set up, and then one more thing we have to do around
07:54this is we've got to get transparency working, because if I render this right
07:59now, it would just have this black background.
08:02I don't currently have transparency in my matte painting.
08:06So, to do that most effectively, I am going to go over to the hypershade.
08:13Window > Rendering Editors > Hypershade.
08:16And I'll want to graph that network, so here is my mattePaintingShader 1.
08:20I will right-click and choose Graph Network.
08:25And you will notice, by the way, that I've got lots of connections here.
08:29In your scene, you may only see one connection. That's just because I've gone
08:34to the Options for the hypershade, and what I am looking for here is this
08:39Merge Connections option.
08:41So, that I've currently got turned off,
08:44so that's why I'm seeing lots of lines instead of just one.
08:48So, what we need to do is we need to have transparency from the file go to
08:53transparency of the actual Shader node.
08:57So, I can right-click on the file output and choose outTransparency > outTransparency.
09:06And I can right-click on the Shader node, and you will notice that the
09:09in transparency or out transparency are not listed here,
09:13so I will have to go to the Connection editor with this Other option.
09:18And I'll probably need to reload it once again, and sort of find what I am
09:22looking for here outTransparency. Here it is and we've got outTransparency on
09:28the shader as well.
09:30So once those are connected now, when we do our rendering, we won't see this
09:34black in the image, but instead it will render as transparent, and we will be to
09:39see the skydome behind it.
09:40So, I have got one matte painting built correctly.
09:44I'll just create one more, just that you can sort of the general process.
09:48I have got one of them built, and what I want to do is make a duplicate of that.
09:52So, the easiest way to do that is Ctrl+D on the keyboard, and I have got a new object now.
10:00Its called mattePainting2.
10:03I just want to rotate it exactly 90 degrees,
10:07so I will turn it around so it's facing inward and set this rotation value to -90.
10:14And I will set Translate Z to 0, but in this case, I want to change Translate X to 8,000,
10:20so, I can push it over to the right.
10:23Now, it's lined up just right.
10:25It's lined up perfectly here.
10:28Okay so, so far so good.
10:30I also need to duplicate the shader, because as you saw, I made some
10:34adjustments to the File node and the Texture Placement node, so I don't want
10:39to have to do all that again.
10:40So, what I will do is go back to my hypershade. It's minimized.
10:44There it is. And I can just duplicate this entire shading network.
10:48So I can select mattePaintingShader 1 and go into the menus up here and you
10:54will see in the Edit menu, Duplicate, and I want to duplicate the entire shading network.
11:00And what that means is it's going to duplicate the File node and the Texture
11:04Placement node with their current attributes.
11:07So, that's really helpful.
11:09So once I've done that now, I've got mattePaintingShader 2.
11:13So, I will go ahead and graph that network.
11:15Now, we are seeing a mattePaintingShader2, and it's duplicated those nodes
11:20with the same attributes from the first one, from the first shader network that we built.
11:25And I just want to swap out this file texture for a different texture. Pretty simple!
11:30So I will select that File node and hit Ctrl+A to get the Attribute editor, and
11:36then I'll just browse for the next image, and that's mattePainting2, and that's
11:43all there is to that.
11:45So duplicating the shading network saved me a lot of time,
11:47so I don't have to back in there and change all those attributes again.
11:54And that's the essentials of creating matte paintings in Maya.
Collapse this transcript
Constraining backgrounds to the camera
00:00I've constructed all my matte paintings, and I want to do one more thing which is
00:05kind of clever, and this will help you, especially if you want to build a scene
00:10that's a little bit smaller than mine.
00:12Mine's in the range of tens of thousands of units.
00:15You don't necessarily have to build something quite so large and still make it
00:19feel big from the point of view of the camera.
00:23The trick here is that objects in the far distance don't appear to move much
00:28when the camera moves.
00:29So I can kind of illustrate that for you a little bit.
00:32Let me go to my Top view and zoom in.
00:34I have got a camera in my view, but it's currently hidden,
00:38so I will go ahead and try to find it.
00:43I will go to the Outliner, Window > Outliner, and here is my camera.
00:48It's just really small.
00:54So, currently if I move my camera a lot-- I mean, that's moving a quite a lot,
01:01I mean I am moving it like hundreds of meters in that range--
01:06it looks kind of okay. But if you notice the matte painting in the far distance
01:12is moving along with these mountains, this geometry in a middle distance.
01:17Well, in fact, objects that are more than a few miles away don't really appear to
01:22move at all if you move side to side or laterally.
01:26You might have had the experience of riding in a car and looking out the side
01:30window, and the trees and bushes next to the road are moving really quickly, the
01:35mountains in the distance aren't moving very fast. And apparently the sun and the
01:39moon and the sky don't move at all from your point of view.
01:42That's the sort of thing that we are trying to achieve here.
01:44We want to make it so that those matte paintings move with the camera, and
01:48the skydome as well.
01:50So it's very simple.
01:52All we do is we just group all those pieces of geometry together and then
01:56constrain them to the camera. So, here we go.
02:00So I have got these matte paintings.
02:02I will go ahead and Ctrl+Click or Shift+Ctrl+Click on all those and the skydome
02:07as well, and I'll go ahead and group them together. Edit > Group, and I want to rename that,
02:14so I will just call it BackgroundGroup, and that now is a unit.
02:23They will all move together.
02:25Hit Z to undo that.
02:28I simply want to constrain them to the camera, but actually before I do that, what I
02:33would like to do is move these matte paintings up a little bit, just so that we
02:37can see them a little bit better in the view.
02:39So I am just going to select them.
02:44Just move them up little bit so we can see that little bit better. Okay.
02:48So they have been grouped together, and I want to constrain the group to the camera.
02:52It's easiest to do this in the Outliner,
02:54so I will open up Window > Outliner. And with constraints you want to select the
03:01leading object first and the following object second.
03:04So in other words, the camera is going to be the leader here, and then we want to
03:10select the group, which is going to be the follower, second.
03:14So what have I got here?
03:14I have got camera1.
03:15I will select that first, and then somewhere in here I should see the group. Here it is,
03:23backgroundGroup. I will go ahead and Ctrl+Click on that.
03:27So the second object that you select is going to have the Constrain note
03:30applied to it and the first object that you select is going to be the
03:34constraining object.
03:35So the Constrain R first and the Constrain E is second.
03:38Then I will go to the Animation menu set and choose Constrain > Point.
03:46I want to double-check in options and make sure that we're using just
03:49the default settings.
03:50So I will reset that and click Add.
03:54Now, if I open up that backgroundGroup, you'll see that there is a constraint
03:58note attached to it, backgroundGroup_ pointConstraint. And if I select that
04:02constrain node, you will see in the channel box it's got one weight channel,
04:08which is labeled Camera1W0.
04:11So that's telling me now that the group is currently constrained to the camera.
04:16So if I now select that camera and move it in the Top view, look what's
04:21happening in the camera lens here.
04:23You can see that the matte painting and the skydome are both sort of glued to
04:29the camera. And this is very helpful in a lot of cases because you can basically
04:35build a fake environment that looks like it's at an infinite distance away from
04:39the camera simply by point constraining it.
04:42By the way, I do want to point- constrain and not parent-constrain, because I
04:46want the position of the background objects to follow the camera, but I
04:51certainly don't want their rotation to follow the camera.
04:55So if I go to my Camera view and choose Camera Tools > Fly Tool, I can pan
05:02around and tilt around in my view, and that will behave normally.
05:07It won't do any weird things.
05:08It will look just fine.
05:10Whereas if I had parent-constrained or linked the background objects to the
05:15camera, they would rotate with the camera, which is of course not the result
05:19that we want to get.
05:20So that concludes our chapter on creating backgrounds.
Collapse this transcript
4. Fluid Clouds
Creating 3D fluid containers
00:00In this chapter, we are going to create realistic clouds using Maya fluids, and
00:06fluids are one of the most amazing parts of Maya, and they are very, very deep.
00:11The feature set is so deep that we could easily spend five hours training and
00:16barely scratch the surface on what it can do.
00:19In this particular chapter, we are just going to use maybe 1% of the
00:23capabilities of Maya fluids, but even that will get us in a pretty good place.
00:29First thing I would like to share with you is how to load a fluid preset into
00:33Maya, because thankfully some commonly required effects are shipping with Maya.
00:41So what you want to do, just so you can sort of browse these presets, is go to
00:46Window > General Editors > Visor.
00:49We saw the visor before when we were looking at 2D Paint Effects.
00:54Now I can browse through all the different folders in the Maya program directory
01:00that contain these preset files, and you'll see Fluid Examples.
01:05And there are lots of then. There's fire.
01:07It's very realistic.
01:08You do have to spend a lot of time to get it to look just right, but it's quite
01:12realistic and quite convincing for film-quality effects.
01:16There is fire and smoke and all sorts of cool stuff.
01:19We're going for CloudsAndFog right now.
01:21So you'll see that there is a bunch of cloud presets.
01:25So, for example, we've got these billowy clouds.
01:28Let's take a look at one of these.
01:29I'll just go ahead and load that into Maya.
01:32The process is just to simply middle- mouse drag that into the viewport, and that
01:36will merge into the current scene.
01:39I'm getting an error here, but don't panic; Maya will show all sorts of errors
01:44all the time, and the reason that this is showing up is probably because this
01:49was created in an earlier version of Maya.
01:52But don't panic when you see error messages in Maya because most of the time
01:57it's nothing to worry about.
01:59So I've got that loaded in.
02:00I will go ahead and close the visor, and I will just dial in closer so we can see
02:04what we are looking at here.
02:07You will notice that this preset has got a camera in it, and it may have
02:11lights in it as well.
02:12So the visor is useful for sort of seeing what you can do, but if you want to
02:18use these files, I need to do some cleanup and remove all that extra stuff in
02:21there that's not needed.
02:23So this is a 3D fluid container we are looking at, And if I press the 5 key on
02:28my keyboard, we can see it shaded, and if I press the 6 key, we will see shaded
02:33and textured, and just as I predicted. In fact, there is a bunch of extra stuff in here.
02:37There is a camera and a light.
02:39I will just go ahead and delete that camera really quickly.
02:43So this is a 3D container, and it's currently populated with clouds.
02:49These are non-dynamic clouds, and that's the technique we will be exploring in this chapter.
02:54Fluid effects have the ability to actually flow through this container.
03:01So in fact, you can get all sorts of interesting effects, like lava and fire and
03:06so on, that are truly dynamic.
03:09But this is not a dynamic fluid;
03:11in fact this is just a texture.
03:13I can do a quick render of that to see what that looks like.
03:15So we are seeing clouds against the background here, nothing too fancy.
03:20But we're just getting started here.
03:22So if you want to start from a visor preset, that's the process for doing it.
03:27You just middle-mouse drag into the viewport, and then if you wish you can start
03:31making changes to the fluid container.
03:33So let's look at another way of doing this.
03:36I am going to go ahead and create a new scene.
03:39Just blow that away. And if you want to create a fluid container from scratch,
03:47what you will do is go into the Dynamics menu set and here you will see Fluid
03:53Effects as a menu and you can create a 3D container.
03:57I am just going to create it with the default settings, and it will be created
04:02very small with a size of about 10.
04:06There are some more presets included with Maya.
04:08They are actually in the program directory and you can access those through
04:13the Attribute editor.
04:15So I've got my fluid container selected, and I'll hit Ctrl+A on the keyboard to
04:19open the Attribute editor. And currently the fluidShape node is selected, and we
04:26will be looking at some of these controls.
04:28We won't have time to explore it in detail.
04:32Right now, all we want to do is load in a preset.
04:35So you will see in the Attribute editor there is a button that says Presets, and
04:39if it's got an asterisk next to it, that means that there are presets present for
04:45this particular node type.
04:48So presets are only valid for a single node at a time, and the fluidShape node, in
04:55a way it is both a model and a shader, so it's a sort of a self-contained node
05:00that doesn't necessarily need to connect anything else.
05:03So that gives me the ability, actually, to click Presets here and choose one of
05:07these other options and just load that in.
05:10So you'll see here--here is one-- cloudBank, and if I want to just completely
05:15replace the current attributes for this node, I will just choose Replace. Boom!
05:21And now I've got a cloud bank in my view. And if I want to see that, once again I
05:26want to press the 5 key to see shading and the 6 key to see texturing.
05:32Now, there are no lights in my scene or anything; it's just merely only the fluid
05:38container. And the appearance of lighting here is controlled completely from
05:43within the fluid shading node.
05:46So it's pretty small.
05:47If I wanted to actually use this in a landscape scene, I would want to scale that up.
05:52So the best way to do that is simply select it, go over to the Channel box, and
05:57scale that up by a factor of ten, a hundred, or a thousand, or whatever.
06:01So if I scale this up by a factor of 100 in all three axes, now I have got
06:07a larger cloud bank.
06:09We can play around with some of the attributes for this and try to push it into
06:13shape to make it look better.
06:14But ultimately I think it's more effective for us, in terms of learning, to
06:19actually start from scratch and build up a fluid cloud from nothing, because
06:26it takes just as long to take one of these presets and push it into something you like.
06:31So that's what we will do next.
06:32We will start from scratch, and we will build up a fluid shader from zero.
Collapse this transcript
Choosing fluid options
00:00In this movie, we are going to start the process of building a 3D cloud bank
00:04from scratch, and we are only going to be using the texturing aspects of the 3D fluid container.
00:10We won't actually be making it dynamic, although it will look dynamic.
00:15I am going to go ahead and start by going to the Dynamics menu set and going to
00:20Fluid Effects > Create 3D Container.
00:23I will just create it with the default attributes once again.
00:26It will be very small. It will be at the center of my world here. If I go on
00:30my Top View, I am getting closer.
00:33I can see that container now.
00:34I will just go directly to the Attribute editor,
00:37Ctrl+A, and we will start playing around with some of these
00:42different attributes.
00:43I will go to my Perspective view and press the F key, so I can get in closer
00:46there, too, and press the 4 key so I can see wires.
00:50So in Maya 2011 we now have this wonderful switcher that says Keep Voxels Square,
00:56and that's kind of important.
00:58Basically, the way that a fluid container works is that it's a 3D grid, or
01:03lattice, and each one of the cubes in that lattice is called a voxel.
01:10So we're only seeing the bottom of the container right now,
01:15but if I scroll down a little bit, I can show you just so you can see this
01:18a little bit better,
01:19if I go to the Display section here, and within here I will choose Boundary Draw > Full.
01:29So we can see these are the so-called voxels, and a voxel is a volume element, and
01:36it's analogous to a pixel, which is a picture element.
01:39So if this were a dynamic fluid, then different attributes such as density and
01:44temperature could actually travel through the voxels to give me interesting
01:49dynamic fluid effects.
01:50I am just going to go back over here and change the Boundary Draw to Bottom once
01:56again, so we are not distracted by all of that.
01:59The reason I am telling you all this is because this Keep Voxel Square is really
02:03important whenever working with fluids.
02:06The voxels need to remain cubes, and as long as this switch is on, then you
02:11can change the size however you want and it will maintain square voxels, or cubic voxels.
02:18So, all I want to do here is change the aspect of this rectangle here,
02:23so I can change the size in X to, let's say 50 and the size in Z to 50 as well,
02:32something like that, and now I've got a more oblong box. And maybe I can reduce
02:38the size in Y to maybe something like 5.
02:41That's about the right shape, and then I just want to scale it up so it is big enough.
02:47So I will scale it up.
02:48Let's try a factor of a hundred. Not quite.
02:53Let's try factor of 200.
02:54Now, it is big enough to enclose my geometry. It doesn't need to enclose my
03:02background matte paintings or anything like that.
03:04You will see I have got in my background layer.
03:06I can turn that on and off so that 3D fluid container is just big enough to
03:11cover my actual terrain.
03:14So now I will go into the Attribute editor and start setting up the most basic
03:19parameters for this container.
03:22So I will hit Ctrl+A and open up the Attribute editor, and the first thing I want
03:28to point out to you are these Contents Method attributes.
03:32So what we want in this case is a non- dynamic fluid that's only driven by texture.
03:38So we don't need Density or Velocity or any of these other attributes to travel
03:43through the grid here.
03:45So I will just set these all to off.
03:48Density, Velocity, Temperature, Fuel, all off.
03:52Scrolling down here a little bit, we need to control the shading of this, because
03:58right now we won't see anything if we render it.
04:00So I want to scroll down a bit, and I want to go into the Shading section in the
04:05Attributes, and what I'm looking for is Opacity.
04:10So for each one of these different attributes, like Opacity and Incandescence and
04:15Color and so on, they have an input.
04:19Currently the Opacity is being driven by Density, but we don't have any Density.
04:25So what we want to do is just change this Opacity input to Constant. And as
04:29soon as I do that, I can start to see I am getting particles showing up in my wireframe view.
04:36If I press the 5 key in my viewport, I'll see that I'm getting actual fog, and
04:44that's because my Opacity input is now set to Constant.
04:47We will be playing around with that and making it pretty later, but before we do
04:52that, we just have a few more basic attributes we've got to set.
04:56The next thing is we want to turn on lighting, because in the examples we saw in
05:02the last movie the lighting was actually built into the fluid shader, and that's
05:07great because it will render really quickly.
05:09It has built-in lighting, and it looks pretty good. In Maya 2011 they've added
05:13a whole bunch of new bells and whistles to it.
05:16However, the effect that we want to achieve in this particular scene is we want
05:19shadows cast onto the ground.
05:21In order to do that, we need to have real lighting and not the fake built-in lighting.
05:26So I will go under the Lighting section here, and just a couple of things I want to switch on.
05:31I want to turn on Self Shadow, which means that if there is lighting in the
05:36scene, the clouds will cast a shadow onto themselves.
05:39Then also we want to make sure that Real Lights is turned on.
05:42That might be turned off by default, but just make sure that it is on.
05:47Right now, I am not seeing much in my view, but we are going to work on this
05:51and make it better.
05:52Another thing we want to do is in the Render Stats--
05:56let's close up the Lighting section and open up the Render Stats section--
06:01we just want to make sure that Cast Shadows and Receive Shadows are on.
06:04Particularly, we want cast shadows on, because eventually I am going to want to
06:08have this cast shadows onto the ground plane. So, that's cool.
06:14So I have got basic parameters set up, and next we will take a look at setting up
06:19some of the more obscure parameter, some of the cool stuff like transparency
06:24and color and so on.
Collapse this transcript
Adding atmosphere
00:00Before we dwell too deeply into fluid shading parameters, I want to just add an
00:05atmospheric effect to this scene.
00:08So one of the indicators of distance in landscape is haze,
00:13so that's atmospheric perspective in our terms.
00:16I am just going to do a little bit of scene management first before I add that haze.
00:22I will select this fluid, and I'll rename it. I will call it cloudsFluid.
00:28I will put it on its own display layer, clicking here, create a new layer.
00:33I'll rename that layer, and I will call it cloudslayer.
00:36I've already set up some of the basic parameters for that fluid,
00:41so I can just go ahead and hit Ctrl+D to make a duplicate, and I will move that
00:47up, and this new one I'll rename and I'll call it hazeFluid.
00:52I will put it into its own display layer, once again.
00:58We will rename that hazelayer.
01:03That way it's easier for me to keep track of everything I'm looking at here.
01:07So I will turn off the clouds, I will turn off the lights and the terrain, and I
01:12am just only looking at this haze right now.
01:13So I am ready to start playing around with some of its basic attributes.
01:17I will hit Ctrl+A and get the Attribute editor open.
01:21This one I don't need it to be lit at all, and I don't need it to cast shadows at all,
01:26so in fact in this one I can go into Lighting and I can turn Shadowing off, I
01:31can turn the Lights off, and I can go in the Render Stats, and turn Cast and
01:36Receive Shadows off.
01:38If I had all those things on for this haze layer, it would really slow down the rendering,
01:43so I don't want that to happen.
01:45This is just supposed to impart a little bit haze into the scene, and it's not
01:48supposed to be a compositional element.
01:51Now we are going to work on some of the look of this particular haze layer.
01:56So, first things first.
01:58Actually, you'll notice that as I tumble around in my view that I see kind
02:02of these funny lines.
02:04Don't let that distract you.
02:05When it renders, you won't see that.
02:07If that bugs you, you can go into the Display section here and you can increase
02:11the number of Slices per Voxel, and that will just make it look a little bit
02:16better in your viewport.
02:18Scrolling down here, I want to start playing around the Shading attributes.
02:22So I will open up Shading here.
02:24Now I've already played around with this scene quite a lot and sort of figured
02:27out what all the optimal settings should be for this particular scene,
02:32so you should use these settings as a guide for your own scenes, but don't
02:36follow this precisely in your own scenes.
02:39This is really just a jumping-off point.
02:40So the first thing here is the transparency.
02:44I want it to be a very transparent,
02:46so I will go ahead and click on this, and I will set the Transparency value here
02:51to about, let's say, .8.
02:54I might not see much in the viewport.
02:56If I do a rendering, I might be able to see that little bit better.
03:00It still looks very thick, but interestingly, with Maya there's actually more
03:06than one Transparency attribute.
03:09In fact, there's a Transparency attribute, and then there's also, down here, the Opacity.
03:16What you're seeing here is a graph, or a line, indicating how the Opacity input is being mapped.
03:25In other words, I could have Opacity come from let's say instead of a constant
03:30it could come from a Y gradient. And then this graph now will control how that Y
03:37gradient is affecting the fluid opacity.
03:44So as I move that around, you can kind of see how that's affecting it.
03:47Well, this is just a simple haze block of fog,
03:52so I don't actually need any of that.
03:54I can set this to Constant, and I can delete all these flags, and I can just set
03:59this up to a value of about maybe like .2 or .3.
04:04So now I can go up here and start playing around with the Color and Incandescence.
04:09You might think that you'd want to have the color be blue for atmospheric
04:14haze, but in fact you're better off making the Incandescence the color that you
04:20wanted to render as.
04:21So this is one of the ironies here.
04:23I don't want this to be affected by lighting, and color is the diffuse color
04:27that's affected by light.
04:29So I want the color, in fact, to be black.
04:32So I will click here and just set that to black, but the Incandescence I want
04:37to be a light blue.
04:38You will see that there is already some information here in this gradient,
04:44so I want to just delete these little color flags here and just have only one
04:50flag, and I will set that to a light blue. And very, very light blue.
05:00Those are some basic attributes for setting that haze.
05:06That's, again, just a starting point, and you can always go back in and change
05:10things, like the Transparency and the Opacity, to get the look that you want.
Collapse this transcript
Adjusting fluid shading attributes
00:00Now that we've got some basic haze in our view, we want to start really working
00:04on the clouds in earnest.
00:06So I've got my hazeFluid here.
00:08I'll just move that back down so that it's at ground level, essentially.
00:14And I'll just hide it, by turning off its display layer, so we can focus on the clouds.
00:20So right now I'm in display mode 5, which means shading, and because of that,
00:28we're not seeing the terrain. But if I hit the 6 key, we'll actually see the
00:32terrain, although we won't see the terrain texture.
00:34Let me just get in a little bit closer down here, so you can kind of get a feel
00:39for what we're going for here.
00:41I'm going to start playing around with these fluid attributes, but I wanted to
00:46just reiterate that it took me a long time to sort of play around with these
00:51attributes and find the exact sort of magic sweet spot for all these attributes.
00:58So I just want to give you a heads-up that it's a very time-consuming process,
01:03and it's a commitment.
01:04So, if you want to get good results with these tools, you've got to spend many
01:08hours drilling down into all the attributes and experimenting with them and
01:11seeing what they do, reading the documentation, just trial and error
01:15essentially, until you get what you want.
01:17So you never step in the same river twice in this, so you'll just have to sort
01:23of roll with that and do your best.
01:25As I said, I've already done the hard work here in this particular scene and
01:30sort of figured out what the optimal settings would be.
01:32I'm going to go ahead and select my fluid, and if I did a rendering right now,
01:38it would just render as a big block of white fog.
01:43If I do any renderings, by the way, as I go forward, I really need to knock
01:47the Render Settings down quite a lot, because fluids historically are very,
01:52very slow to render.
01:54In fact, in the movie that we saw of the time lapse, that actually took about,
02:00I would estimate about somewhere between 10 and 20 minutes per frame, so it was very slow.
02:04It took about 12 hours to render out eight seconds of footage.
02:08But it looks really good, so that's what we're working with here.
02:11I'm going to go ahead and do a quick rendering here. But as I said, I just
02:15need to knock the Render Settings down to something that we can deal within a preview.
02:20So I'll open up the Render Settings window, and I just want to knock the
02:25Resolution way down here to, say, something like 320 x 240.
02:30And I'll also go into the Maya Software tab and knock the Quality down to
02:34Preview quality. That way we'll have a fighting chance of seeing these
02:38renderings in real time here.
02:40So I'll do a quick render and see what we get.
02:43It looks like nothing, and you know why, actually, it's because my lights are turned off.
02:47So I'll turn the lights back on.
02:50And another reason why I'm not seeing anything is in fact my fluid is kind
02:56of nothing right now.
02:59I've just got a standard fluid with full density, so it doesn't look like much.
03:05So I'll go into the attributes and start playing around with those until we
03:08get something good.
03:09Ctrl+A. And the first thing I want to do is just set, just as we did with the haze,
03:17you want to set the basic Shading parameters.
03:20We want to have these sort of thick billowing clouds, and that means that the
03:24Transparency is going to be very low.
03:27In other words, we're not going to have much transparency.
03:30So that seems kind of counterintuitive, but basically I want to have thick
03:35clouds that aren't see-through.
03:37So I'm going to set the Transparency way down, to something like .05.
03:43The Transparency interacts with Opacity, so if I go into Opacity now, I want to
03:49play around with some of this, too.
03:50Tell you what, I'll make the Opacity input the Y Gradient, and let me back out
03:56here so we can see that a little bit better.
03:58I can't really see much of an effect here until I start playing around with the graph here.
04:04So I'm using the Y gradient.
04:06But I want it to be essentially a block here that's just fading out from top to bottom,
04:12so I'll go in here and I'll actually delete these flags, and I'll set this to a
04:18value of, let's say, about 0.6 or 0.7.
04:24Then next, I want to start playing around with the Color and Incandescence.
04:28Once again, in this case, we need to think ahead here.
04:31The Color in this case I want to have not quite white, but maybe 75% white,
04:39so I'll click on that and set this to a value of maybe 0.75.
04:45And then Incandescence, I don't want any Incandescence much.
04:49I could put some Incandescence here, but I do want to be really
04:53conservative about that.
04:54So I'll go ahead and maybe move these around a little bit and set these to be,
05:00let's say, a value of 0.3-0.6, something along those lines.
05:08Set this one to a value of, let's say, 0.6.
05:14And the Input here I want to be the Y Gradient.
05:18So now you'll see the bottom is a different Incandescence than the top.
05:23So let's just reduce the Saturation of that because we don't want red clouds, and
05:30I can reverse these so that the bottom of the cloud will be darker than the top.
05:35And those are some of the basic parameters.
05:38We haven't actually added texture yet, but we've sort of set up the color and
05:42the incandescence and the opacity in advance.
05:46And I'm doing it in this way just for expediency in the training materials here,
05:52but you do need to be aware that these all interact with one another in kind of
05:57unpredictable ways, and so you will find yourself moving back and forth between
06:01all of these and changing very small attribute values in very small increments
06:07and seeing quite a lot of change on the screen.
06:10And the overall sort of parameter space of fluids is very large.
06:15In other words, there are many, many, many possible combinations, and in that
06:19parameter space, most of it is not good.
06:24So you'll have to sort of genetically and iteratively go through this and change
06:32one little thing, do a rendering, see what it does, change something else, do a
06:36rendering, see what it does, and as I said, it's quite time consuming.
06:40But it's worth it, because it looks really good.
06:43One more thing I want to do in here before we move on to texturing, and that is I
06:47just want to show you the Shading Quality section here.
06:51So Shading Quality is an attribute that, as the name implies, controls the
06:56quality of the rendering, and that is independent of the setting in the
07:02Render Settings window.
07:03So if I go back in there and show you once again, we have the Anti-aliasing Quality
07:08in the Render Settings and we also have the Fluid Shape Node Quality.
07:13So in fact, you can actually get away with fairly low quality in some cases in
07:19the Render window but then just increase the quality over here.
07:24So a good range for this quality setting is somewhere between 1 and maybe 3.
07:30If you increase it beyond about 3, it's going to be very, very slow to render.
07:36So I'm going to leave that at, let's say, 2, which is sort of splitting
07:39the difference for now.
07:41One more thing that can come in handy is to switch out this Render Interpolator.
07:46Basically, it will produce a smoother result if you switch this over to smooth.
07:51So those are some basic parameters for shading a non-dynamic fluid, and
07:56next we'll move on to texturing the fluid to actually create the pattern of the clouds.
Collapse this transcript
Controlling fluid texture
00:00So far, everything we've done has really been just a warm-up, and now we are
00:04really going to begin in earnest with playing with the texture to get a look to our clouds.
00:10So I want to scroll down, and I want to look at the Textures section.
00:15Let me open that up. And you'll see you have the ability to texture the color,
00:20the incandescence, or the opacity.
00:22Now, you don't have the ability to assign a file texture or a Maya procedural
00:27texture in the way that you may be used to, but there are procedural textures.
00:32There is a single procedural texture built in to the fluid node.
00:37So all you really need to do is use that.
00:40So I can turn on Texture Opacity here, but I need to do a couple more things in
00:45order to see the result in the view.
00:47First of all, I need to make sure I have hardware texturing turned on in the viewport.
00:52So if I press the 4 key, it's wireframe; 5 key is shaded;
00:57and the 6 key is shaded and hardware textured.
01:01So now I will be able to actually see some changes once I set up the
01:05attributes properly.
01:07So the next thing I need to do is to go over to this opacity gradient and move
01:12these around and create some flags in order to determine how the texture should
01:18influence the opacity, because right now we just have a flat-lined opacity with
01:23no actual graph to it.
01:26So I am going to create a couple of points here.
01:29Let's create one there, and let's move this down and around.
01:34And you can see now that I've got some texture happening.
01:41If I make these two very close to one another, then I'll get a really sharp
01:45edge to my texture.
01:46In fact, let's look at this through the camera lens,
01:51Panels > Perspective > camera1 and we'll do a quick preview render and see
01:58what that looks like.
02:00So we are actually starting to get something here, and as you can see, it's
02:04casting shadows onto the ground plane and we're getting a darker look down at
02:09the bottom of the clouds.
02:11So, we're well on our way to getting something good with our textures. Great!
02:16So, tell you what, I'll save this, so if I want to I can compare my
02:20later renderings to that.
02:21So I'll just go ahead and click Keep Image.
02:24So let's play around with some of the parameters.
02:27There're different types of texture built in.
02:30I prefer actually the Billow texture for this particular example.
02:34Tell you what, I'll go back into my Render view and I'll just render a region,
02:40so we can see the difference between the Billow texture and that default, Perlin texture.
02:45So I am just doing a region render.
02:49The Billow texture is a lot better for these sort of cumulous clouds that we
02:53are trying to achieve.
02:55So I'm just scrubbing through here so we can see the difference between, that's
02:59the Perlin texture and that's the Billow texture.
03:04So moving on, let's play around with some of these attributes here.
03:08So there are many, and you'll have to spend a lot of time on this, once again.
03:12But we'll just go through and I'll set them to some values that I know are going to work.
03:18So first of all, I've got the Opacity Texture Gain and that's how much the
03:22texture will influence the opacity.
03:25So I'll just leave that at its value of 1, or maybe knock it down a little bit
03:29to maybe like 0.8 or something like that.
03:31And that way the texture is kind of dialed down a little bit, not quite as strident.
03:39Additionally, in my tests earlier, in setting this up in production, I had
03:43decided that I wanted to texture the incandescence as well, so that we can have
03:48a little bit more highlights on the clouds.
03:51And you'll see as soon as I turn that on, I have an Incandescent Texture
03:54Gain attribute as well.
03:55So I am going to leave that at 1.
03:58And going down here, you'll see that I've got the Amplitude of the texture, and
04:02that's its overall strength.
04:04So if I reduce that Amplitude down, basically all my clouds are going to go away,
04:09and you can kind of see that in the viewport.
04:11Once again, if you're not getting a good enough preview in the viewport, you can
04:14go back up into the Display section and increase the number of slices per voxel
04:21and that will give you a better approximation in the view.
04:23So I've set that to about 8.
04:26Scrolling back down to my Textures, as I increase or reduce the Amplitude, you
04:30can see that we're getting more effect from the texture or less effect from the texture.
04:38And that's not just the gain of the texture, that's the actual look of the texture.
04:42So I'll set that to, I don't know, like 0.7 or something like that.
04:47Next, we've got the ratio.
04:49So Ratio is the overall level of detail for the texture.
04:54It's the fractal ratio, and the higher the value, the more detail you'll have.
04:59So if I go back to my Render window and I do another region render with
05:04these current settings, we can play around with the Ratio, so we can see the difference.
05:10So with a Ratio of 0.7 approximately, this is the look that we're getting.
05:14And you'll see there's a lot of grit around the edges here.
05:17Don't panic around that because, again, that's just because I've got
05:20preview-quality rendering.
05:22So I'll store that.
05:24If I reduce the Ratio down and do another region render, we'll see that we get a
05:30lot less detail overall, and essentially that's making the clouds kind of stick
05:35together and make bigger blobs.
05:37So that's a Ratio of 0.7 and that's a Ratio of 0.2.
05:42So in this case, I had decided that I was going to use a Ratio of about 0.5.
05:47Next, we've got the Frequency Ratio, which also relates to the level of detail.
05:53And this is a little bit more difficult to explain, but basically the way that
05:57this fractal is calculated is it runs through the algorithm more than once, and
06:03each time it does that it adds more detail.
06:06This Frequency Ratio is essentially the scale of each iterative calculation.
06:14So in other words, higher frequencies are going to give us a greater
06:18differential between each of the sort of waves within the fractal.
06:22It is very difficult to describe, and you are going to have to sort of play
06:25around with it yourself.
06:27You can look in the documentation, but it doesn't give you any information,
06:30so you just have to sort of wing it.
06:32I had played around with this, as I said, and I had decided that a Frequency Ratio
06:36of about 2.5 worked for me.
06:38So I'll do another preview render of that and see what it looks like.
06:42So it's starting to shape up, and we can scroll down a little bit farther.
06:46You will see there's a Depth Max.
06:48This is the number of iterations that will be calculated.
06:51So currently it's only set to 2.
06:53In my tests I ended up turning it up to about 6 or 7.
06:57Scrolling down a little bit farther in the panel, we've also got the
07:02Frequency attribute, and that's the overall scale of the texture within the fluid container.
07:10Higher values will give you smaller clouds in this case.
07:14So with a Frequency of 1, this is the result that I'm getting. But if I
07:18increase the Frequency to something like 4 and do another region render, we
07:23should see smaller clouds now.
07:24We are starting get a lot of detail in them.
07:27Again, don't panic about the quality of this;
07:30it's looking pretty poor here, but again, it's because I have my Render Settings
07:34in Maya set to Preview Quality, and I kind of have to do that because of the
07:39constraints of time.
07:40So going down a little bit farther here, you'll see there are also these Billow
07:44attributes, like Billow Density and Spottyness and so on.
07:48So the Density is, as the name implies, it's sort of the thickness and how well
07:53packed the billow is.
07:56And then Spottyness creates holes in it.
07:59So I am going to set that down to 0 actually.
08:03Size Randomness, I can leave that where it is, but Randomness, definitely I want
08:07that up all the way because if this Randomness is down too low, you'll
08:12basically get big circles instead of clouds.
08:15So these are pretty optimal values for the Billow texture.
08:19I also like to set this Falloff to Smooth, and what that's going to do is
08:23produce a little softer texture.
08:26As soon as I did that, if I look in my view, it looks like my texture has
08:30completely gone away.
08:32But if I just go back up to my Opacity and start playing around with this curve,
08:37I can get my texture back.
08:39These are very, very sensitive attributes, and so to get full control, you may
08:45want to open up the gradient to a larger window, so that you can kind of see a
08:50little bit better what you are doing and get more precise.
08:53So if I make this a very sharp cutoff, what that's hopefully going to achieve is
08:57some very thick clouds.
08:59Note, by the way, that if this first gradient flag value is not set to 0, then
09:06I'll have a basic constant block, and I definitely want this down at 0 because I
09:11want to see blue sky behind my clouds.
09:15So let's take a quick look at that and see where we've gone.
09:19It's looking okay, but I think I can even just reduce the Opacity even greater.
09:25So if I want these clouds to be a little bit less thick, I can just reduce
09:29these Opacity values. Bring this down.
09:33I'll need to watch in the viewport while I do this, so I can get a better
09:36sense of what I'm doing.
09:39There is a very narrow range of good values in here,
09:42so you'll kind of have to sort of feel your way through it.
09:47And again, the display in the viewport is not really a good indicator of what
09:51it's going to look like in the rendering,
09:52so you basically have to make tiny small adjustments here and then do a region
09:57render and get a sense if you're in the ballpark.
10:00If you feel like that's looking okay in terms of this low-quality preview,
10:05then you might want to go back into your Render Settings, go back into your
10:10Software render tab and increase it up to Production Quality, and just do a
10:14very small region render, because otherwise you'll be waiting all day for it
10:18to finish rendering.
10:20So hopefully this is enough to sort of get you started in getting clouds to look
10:24good and to cast shadows on the ground.
10:26We can take a quick look once again at the image that we're trying to go for.
10:32I've got here in my images folder.
10:36So this is where I ended up, and after hours of tweaking around on this, I got
10:42some pretty good-looking clouds.
10:44So that's enough to sort of get you started on the basic texture parameters.
10:49And then finally, the last thing we want to do in this chapter is to animate the
10:52clouds so we can get a time-lapse effect.
Collapse this transcript
Animating fluid texture
00:00Now, we are going to animate our clouds and make them move and churn
00:04in interesting ways.
00:07In this case, I'm doing a time-lapse effect, so the clouds will be moving very
00:10quickly, but in a standard live-action context, you'd probably want to have them
00:16move a little bit more slowly.
00:17But I'll be showing you how to control that speed.
00:19First thing I want to show you just briefly is in the Textures section of the
00:23fluidShape node one other thing that I've done to customize my look is to play
00:28around with the Texture Scale.
00:30So that scale currently is set to 1, 1, 1 in X, Y, and Z. This is a result I got
00:38from having values of 1, 1, 1.
00:41If I change the texture scale, let's say, to .5 in Y, basically it's going to
00:48compress the texture, and I've already rendered that in advance, and this is
00:52what it looks like.
00:54This is a Y value of 0.5.
00:56So basically the clouds are all squashed vertically.
01:01This is really the way that you want to do this.
01:03You never want to scale your fluid container non-uniformly, because that's going
01:08to cause other problems, especially if you're using dynamic fluids.
01:12So the proper way to do this, if you want your clouds to stretch in a certain
01:15direction or whatever, is to change the Texture Scale here.
01:20Another thing that we can play around with, too--and we can even animate this--is
01:25the Opacity Input Gain.
01:27So if I scroll back up here, you'll see here opacity, Input Bias.
01:33As I adjust this, I can basically make my clouds become thicker or thinner.
01:39So essentially it's accomplishing the same thing as moving these flags around in
01:44here, but we don't have to move them or animate them one at a time.
01:48We can do it all globally here.
01:51In fact, I could animate this as well, if I want my clouds to get thicker
01:54or thinner over time.
01:56All you need to do, as with anything in the Attribute editor, if you want to
02:00keyframe this, you just right- click on it and choose Set Key.
02:03I'm not going to do that now, because that's not the effect that I want to
02:06achieve, but what I do want to achieve is I want the clouds to be moving.
02:11So scrolling back down to the Texture section, you will see a couple of things.
02:17One is Texture Origin, and this is how you can effectively make the texture flow
02:22through the container. And I could keyframe this directly just in that same
02:27method, by right-clicking and choosing Set Key in the usual way, but a more
02:33finessed way of doing this is to create a simple expression.
02:37So an expression is just a line of MEL code, Maya Embedded Language script code,
02:42that can simply do some work for us.
02:45So Maya is great for scripting and expressions, and it's really quite easy, so
02:49don't be intimidated by it.
02:51It's very simple to make the clouds move over time.
02:56All you have to do is type in a simple expression into one of these
02:59Texture Origin fields.
03:01Let me just show you what the Texture Origin does, and then we'll make the expression.
03:06Let me maximize this Perspective view, and let's say I change the Texture Origin
03:12to let's say 10 in Y. That's going to cause the clouds to move up and down, but
03:20you don't really see much effect there.
03:23But if I move it side to side, we'll see that more clearly.
03:25So let's try moving the Texture Origin in X by a value of, let's say, 100.
03:33It has to think about it for a second, but the clouds are all going to
03:36shift over a little bit.
03:38Let's try a value of 10.
03:41So it's a bit difficult to see in the viewport, because of the low resolution of the display,
03:47but the texture is actually moving through the container as I change these values.
03:54So I will just zero that back out again.
03:56So what I am going to do here is I am just going to drop an expression into one
03:59of these fields here.
04:01So Texture Origin is the position of the texture within the container, and in
04:08this case I want to animate the X attribute, and all I have to do is just
04:13type something in here.
04:15So if I type in an Equal sign and I want to make this move in -X,
04:22so I put in a Minus sign, and I'll put in a parenthesis, and I'll say time/20 and
04:31then a close parenthesis.
04:33That's a very simple expression that's just saying control the X position
04:39according to time, but move it slowly by dividing time by 20.
04:45So when I press Enter here, that expression has been created.
04:49If I rewind and play back in my view, I should start to see some movement,
04:54but it's very, very difficult to see this movement in the view because it's
04:58very slow to calculate.
04:59I mean it literally will take at least a second to calculate each frame.
05:05So, you can see now that they are actually moving.
05:09It's difficult to see the accuracy of that, so you will want to do a full rendering.
05:15Go back to my Camera view, and I would want to do an actual full-animation
05:21rendering, but it takes so long to do this test rendering that I really
05:26recommend that you go back into the Attributes and turn off Shadows and set it
05:32to extremely low render quality settings, because otherwise you will waiting for
05:36hours just to see your test render.
05:39Really, all we are trying to test here is the movement.
05:42So, I'll leave that as an exercise for you.
05:45Just remember if you are doing test renders, just dumb that rendering down to as
05:49simple and as low-quality as you can possibly stand, because all you're doing is
05:53testing for movement.
05:55So that's the movement in one dimension.
05:57It's moving actually in the local X, so it's exactly pushing towards me in the view here.
06:04The other thing I want to do is make the clouds actually churn and change shape--
06:09not just move, but actually change shape like real clouds would.
06:14So I will go back into the Attributes, and the magic attribute here that we
06:18want to play with is Texture Time. And if I just move this slider a little bit
06:23and sort of wait for it to catch up with me, you'll see that it's changing the pattern of clouds.
06:30If I just move it just a little bit, you can kind of see that it's changing
06:33the pattern of clouds.
06:35We can move the clouds through the container, and we can also change their pattern.
06:40So I can put another expression here in Texture Time.
06:43And this one I'll just set equal to time/3, and press Enter.
06:50Now if I rewind and play back my animation in the view, we will start to see that
06:57in addition to the clouds moving towards the camera, or in this case maybe moving
07:01to the side, but in any event, the clouds are moving and are also changing shape.
07:08Now, if you need to edit those expressions--let me go back to the Attribute
07:12Editor, Ctrl+A--if you wanted to edit these expressions then you will want to
07:18right-click on the name of the attribute and choose Edit Expression.
07:21That will open up the Expression editor, and here you can make changes.
07:25So, for example, you wanted the clouds to move more slowly, you could divide by a
07:30larger number, so I can type that in.
07:34And just remember to click the Edit button so that it will actually take your changes.
07:40Same thing here if I wanted to change this behavior, like, let's say I wanted to
07:44move it in Z instead of Y. Well, I can right-click here and choose Edit
07:49Expression, and I can actually just copy/paste this little section here.
07:53So I can just select that and hit Ctrl+C. I've got that copied into my clipboard,
07:59and I can delete that expression, and then I can just paste it into Origin Z. So
08:08hit Ctrl+V and press Enter, and now I have it moving in the Z axis instead of X,
08:14so the cloud should be moving towards me in the view.
08:19That's pretty straightforward and pretty simple, and Maya makes it really easy
08:22for you to add those expressions in there, and you don't need to worry about
08:25keyframes or anything like that.
08:27You don't have to bake this or anything.
08:29It just happens, and it's wonderful.
08:31So let's take another quick look at our final product,
08:34so we can see the fruits of our labors.
08:37Again, it's quite a long process that will take you quite a while to get
08:41oriented around how to get good results, but it's a process that really pays off
08:47in the end because you can get photorealistic results for fluid clouds in Maya.
Collapse this transcript
5. 3D Paint Effects
Understanding 3D paint effects
00:00In this chapter, we are going to be looking at 3D Paint Effects, which are
00:04really one of the shining achievements of Maya, and will greatly streamline
00:10your workflow, because you can easily populate a scene with things like foliage
00:15and rocks and background geometry that would be too time consuming for you to model by hand.
00:21So what I've got here in this scene is a camera-centric layout in which the
00:26camera is just locked down, and I've painted Paint Effects onto this ground
00:31plane in just the areas that the camera can see.
00:34So if we look in the Perspective view here, that'll be a little bit clearer.
00:38Press the 5 key, so I can see shading.
00:42So my camera is here, and I've got Paint Effects only in the regions that
00:46the camera can see.
00:47So, for example, in these valleys here, the camera can't see that, so I didn't
00:51bother painting. And also in the background here, in the distance, it would be
00:57overkill for me to put Paint Effects up there,
01:00so I've just used a texture instead.
01:02So if I press the 6 key, you can see that underlying texture that I painted earlier.
01:07Go back to 5 key to look at shading.
01:10So Paint Effects is pretty amazing, and it gives you quite a lot of power and
01:15it's fairly intuitive, but just like fluid, it's going to take a while for you to
01:18get familiar with it.
01:20It's a monolithic node that has many, many attributes--probably hundreds of
01:25attributes for you to play around with, which means you can customize it
01:28endlessly and pretty much get almost any plant or background object that you
01:33would want to achieve.
01:35But again, it will take a substantial time investment to get there.
01:41Okay, and also let's take a look at the rendered image.
01:45So if I go to File > View Image, in my Images folder in the current project, you
01:50can take a look at this green_hills image.
01:53So this is the actual rendered image from the scene that we just saw, and this
01:59particular still image took about 15 or 20 minutes to render the single image,
02:05so be prepared for some long waits on your rendered times when populating a
02:09scene with this much geometry.
02:12However, that's even faster than it would be if you were using traditional
02:16modeling techniques.
02:18Paint Effects have a special pipeline into the Maya software renderer that kind
02:22of bypasses a lot of the usual calculations, and is much, much faster than if
02:28you'd modeled with traditional techniques.
02:30A couple other points around this.
02:32You'll notice that it looks a little bit cartoony, and that's because I've got
02:36some very simple lighting in this scene.
02:39You can actually use more advanced lighting techniques.
02:42We will talk about that a little bit later. But for now, just keep in mind that
02:46using the Maya Software renderer and simple lighting, this is about the best
02:51that you can achieve with Paint Effects, and it looks a little bit cartoony, but
02:55it's good enough for our purposes in terms of training. Cool!
02:58So let's take a look at building Paint Effects.
03:01So I will just create a new scene, and in my Perspective view, I'll just turn on
03:07the grid so I can see it. And I am going to hide this Panel toolbar, so I can
03:11just get rid of some of the visual clutter. That's Ctrl+Shift+M. One way to
03:16create 3D Paint Effects is from the shelf.
03:19So if you don't see the shelf, you can turn it on from Display > User
03:23Interface Elements > Shelf.
03:27You'll see that there is a PaintEffects tab, so I'll go ahead and select that.
03:30And I will need to get in much, much closer to the grid because the default
03:35Paint Effects are very small.
03:37So if you want to just draw a Paint Effects onto a blank scene, it's very simple;
03:41you just choose one of these presets and start drawing.
03:45So, for example, let's go down one notch here. One of the classic perennial ones
03:50is the Raw Meat brush.
03:52We can't live without the Raw Meat brush.
03:55There it is, and it won't actually look like much in the viewport.
03:59Even if I hit the 5 or 6 keys, I won't see the texture.
04:02But if I do a quick test rendering of that, there you go. Pretty amazing, okay.
04:09How about something else? Let's delete that.
04:11Let's go back up a little bit in our shelf, and another good demonstration one is the Daisy.
04:17So I will click on that, and just draw out a few daisies in my scene, and
04:23notice how small they are.
04:24They are all about one unit in size.
04:27Get in a little bit closer on those, we can kind of see some texturing on that.
04:33So I just want to take a moment and talk about the basic concepts around Paint Effects:
04:36first of all, the difference between a brush and a stroke and a tube.
04:41So the brush is the tool.
04:44So when I click on this button here, I am loading a brush into the Template brush.
04:51We saw this in an earlier chapter when we were talking about 2D Paint Effects.
04:55The Template brush is sort of a staging area where you can load in some
05:01attributes into the next stroke that you are about to draw. So that's here,
05:07Paint Effects > Template Brush.
05:08Let me just open this up, so we can see this a little bit better, some of these attributes.
05:15If I choose a different brush, let's say I click here, it will load all of that
05:20into the Template brush, and go back to the Daisy.
05:24So the brush is the tool, and the stroke is the object--that's the actual
05:29line that I've drawn here--and the tubes are the geometry that sprout out from the stroke.
05:36So you've got all three with 3D Paint Effects:
05:38you've got the brush, which is a tool;
05:40you've got the stroke, which is the line or curve; and you've got the tubes, which
05:45is the actual 3D geometry.
05:47So what else do we want to do here?
05:49We also want to play around with some of the more basic attributes of a stroke,
05:54such as how it's displayed.
05:56If you've got a really heavy scene, you cannot effectively display all of
06:01these at once like this,
06:03so you have to kind of simplify things.
06:06So, you'll see, when you select the geometry with the Select tool or any other
06:11Transform tools, you can go into the Channel box and you'll see Draw As Mesh
06:16and Display Percent.
06:18So almost always you'll have to turn these down;
06:21otherwise, you'll have a super, super slow performance in the viewport.
06:25So Draw As Mesh is really important.
06:26If I just set that to 0 or off, then we will see just wireframes, and that's
06:32regardless of whether you're in Shaded mode in the viewport or not.
06:36You'll always see wireframes here.
06:38So that's pretty important.
06:39Then you have also got this Display Percent.
06:42If I knock this down to 50%, you will see a much simpler approximation of our Paint Effects.
06:48But note that when I set it down to 50%, it looked like some of my
06:51daisies disappeared.
06:53But in fact, they did not disappear;
06:54they are still there, as you can see in this quick rendering.
06:58So this is just for the purposes of the viewport.
07:02Turn that back to 100%.
07:04Another thing that you'll want to do is to control the Paint Effects tool
07:09itself, so that, for example, you will always draw with Draw As Mesh turned off.
07:16That's pretty important.
07:17So if I go into the Rendering menu set in Paint Effects, I can go into the Paint
07:23Effects Tool options and right up top here, you'll see Draw as mesh.
07:29If I disable that, then whenever I draw any Paint Effects in the view, they will
07:36be defaulted to Draw as mesh off.
07:40So with it off now, if I choose some other brush, like this clump of grass,
07:45and I draw in here, you notice that it immediately turned that Draw as mesh attribute off.
07:51So when I draw the first stroke here, it draws this mesh for a moment, but then
07:56when I release the mouse, it turns into wireframe.
07:59So that's a lot more efficient.
08:01We could also play around with things here like the Display quality.
08:04If we wanted to do that, we can say oh, let's only display those at 10%
08:08quality from now on.
08:09Let me draw, and that'll knock that way down.
08:13Additionally, by the way, if you select more than one stroke in the view, you
08:17can change those attributes all at once in the Channel box.
08:21So, for example, if I select these strokes, grab my Select tool, and if I select
08:26these strokes, I can go in here and change their attributes all at once.
08:31So, for example, I can turn Draw As Mesh back on again with a 1.
08:35I can change the Display Percent back to 100.
08:37Those are some basic concepts around Paint Effects.
08:42There's one more thing that we want to just play around with really quickly,
08:45which is there is another option dialog in the Paint Effects menu which is
08:50Paint Effects Globals.
08:52So I want to go in there and open up the Scene section, and this is an overall
08:59scale multiplier for your entire scene.
09:03So, any Paint Effects that you draw will be multiplied by this scale, and it
09:09doesn't do anything to the existing Paint Effects;
09:11It only affects the next stroke that you draw.
09:14I like to set this to a value of 1.
09:16That way I know that this scale I have in the actual Brush settings will not be
09:23altered by this Paint Effects Global setting.
09:27And just to show you what I mean by that, if I select one of these single
09:31strokes, and I go to Ctrl+A, Attributes, you'll see I have got a stroke node
09:36here and that corresponds to what we see in the Channel box.
09:41But I've also got a Brush node, and those are the actual settings for the look, as
09:48we saw in the earlier chapter on 2D Paint Effects.
09:52You'll see that there is a Global Scale attribute here, and this will
09:55control the overall size of that Paint Effect stroke that's connected to the current brush.
10:02That's just a basic overview of drawing Paint Effects in your scene.
10:06We are going to go into a lot more depth in the following movies.
Collapse this transcript
Working with strokes
00:00Now, we'll look at editing basic brush attributes for 3D Paint Effects.
00:05I'm just going to get in a little bit closer to the grid, and I'll go into the
00:10Paint Effects Tool options and just reset that, because I've played around with
00:14that a little bit previously.
00:16So now we'll see meshes, and they'll be displayed at full quality.
00:20I'll go ahead and click on the Daisy Large Brush, because that's a good one for
00:24training purposes, drag across to create one stroke, and I'll drag to create
00:30another stroke, and now I've got two strokes.
00:32When you create strokes in this manner, you will actually have two different
00:36brushes in the Maya scene. So, currently I've got two strokes, and each stroke has
00:43got a separate brush attached to it, so that means I can control the settings
00:47for either one of these separately.
00:50So I will go ahead and hit Ctrl+A to get the Attribute editor open, and you'll
00:54see I've got a stroke node, which includes things like the display quality, and
00:59I've also got the brush node here and this is where really all the magic
01:04happens in Paint Effects.
01:06So one of the most basic things I can do here is change the Global Scale, as you can see.
01:12So I've got two different strokes and two different brushes, but usually
01:16when you're creating foliage like this you probably want all the strokes to
01:20share the same brush,
01:22so if you make a change to one of them it will reflect in all of the strokes.
01:28So if we want those changes to propagate, we need to share one brush.
01:32So all you have to do to enable brush sharing is just simply select two or
01:36more strokes--so I can Ctrl+Shift+Click on this one--and now that I've got two of them selected,
01:43I can go to the Rendering menu, Paint Effects > Share One Brush. And when I
01:51issue this command, all of the selected strokes will assume the settings of the
01:57last selected brush.
01:59So that one that's highlighted in green here,
02:01that's the lead object. All of the selected strokes will assume that brush.
02:07So now they're sharing the same brush, so if I select one of them, go back to
02:12Ctrl+A Attribute editor, and I adjust the Global Scale, for example, they will
02:16both be affected. If to go back to this one and do the same,
02:20you'll see they're all sharing the same settings.
02:23Now, they still have two different strokes, so they have random patterns to the
02:28Paint Effects tubes, and if I go to the stroke node here, I can change this Seed
02:34value, and that will alter that random pattern, so we'll get a different
02:39distribution of tubes.
02:40So this is how we can kind of vary the look of our Paint Effects strokes. Cool!
02:45Now there is another thing you can do here, which is you can also get the
02:50settings from a stroke.
02:52So, for example, let's say I drew something completely different, like let's
02:56say this clump of grass, and I draw that out on here.
03:01If I want to, I can grab the settings from that stroke and plug them
03:06into another stroke.
03:08So all I have to do is just select the stroke that I want, go up to Paint
03:12Effects, and Get Settings from Selected Stroke. And what that's going to do is
03:17it is going to load all those settings into the Template brush.
03:21The Template brush, of course, is the staging area that holds attributes for Paint
03:26Effects brush. So, I'll click on Get Settings from Selected Stroke, and then I'll hit
03:32the Q key to get my Selection tool.
03:35I'll select the other stroke over here and then in the Paint Effects menu, I can
03:40apply settings to selected strokes, and now you'll see they both have changed,
03:46because remember, these two were sharing the same brush.
03:49So that's how you can grab the settings from one stroke and apply them to another stroke.
03:55That's just some basics about how to manipulate strokes with Paint Effects.
Collapse this transcript
Painting objects
00:00So far, we've just drawn Paint Effects strokes directly on the grid, but
00:05of course you're going to want to draw those strokes onto a terrain or other object.
00:09There is essentially two ways of going about this, and I'll show you both ways.
00:14One is to make the object paintable, and that's the one you want to use if you're
00:21not going to need to move the Paint Effects strokes around on the surface.
00:27So if you are just drawing a stroke and then it is just going to sit there and
00:30you will never have to move it or do anything to it, then you can just paint
00:33directly on the object.
00:34So I can select the object here.
00:37This is a polygon plane currently. And I will simply go up to Paint Effects >
00:42Make Paintable. And I can grab a brush now.
00:47Tell you what, I will go to the visor,
00:49Window > General Editors > Visor, because they are a lot more Paint Effects
00:55brushes in here than they are on the shelf.
00:58So, for example, I can scroll down, and we've got grasses.
01:04Let's try grassClump.mel.
01:08So this object is now paintable.
01:09I am going to get in a little bit closer. Dolly forward. And then if I drag my cursor
01:18across that surface, you'll see that that stroke is conforming to the surface. Cool, all right.
01:24So I'll tumble around and show you.
01:27That's now stuck to that surface, but it is not truly stuck to the surface,
01:31because in fact I can select that stroke and move it around.
01:36So if I grab the Move tool, you'll notice that the pivot point of the stroke is at the origin.
01:45That can be a little bit inconvenient.
01:47If you need to move a stroke around, you might want to use Modify > Center Pivot.
01:52That will send the pivot to the average location of all the points on that stroke.
01:58So now if I move that, you can see it's not actually stuck to the surface.
02:02I will hit Z to undo that.
02:05So that's fine if you don't need to edit the strokes;
02:07all you do is you just simply select the object and make it paintable, select a
02:13brush, and then go ahead and draw on that surface.
02:17But you can also set it up so that you can move the Paint Effects strokes
02:23around on the surface.
02:24The way to do that is to start from the NURBS surface.
02:27So that's what I have got here.
02:29So I made a NURBS plane, and I will just push it around a little bit so it will
02:33have some shape to it.
02:34With a NURBS plane, what you want to do is you want to make the object live
02:39and then draw your NURBS curve on the surface and then attach the brush to the curve.
02:46So the first thing then is to make it live.
02:48So Make Live is found on the status line up here, that main toolbar on the top
02:53of the Maya interface. And you will see there are a bunch of magnets, and the magnet
02:58that doesn't have any adornments on it, just a straight magnet, that is the Make Live button.
03:04So I have selected my ground plane and I click that magnet, and you'll notice that
03:09the wireframe changed color.
03:10That's an indicator that this object is now live.
03:13So if I start building things on that surface, they will be stuck to that
03:18surface permanently.
03:19So I will go into the Create menu, and I can use any of the Curve tools, such as
03:23CV Curve tool, and draw directly on that surface.
03:27So I am just clicking to create control vertices, and when I have what I want,
03:32I will press Enter.
03:33Now that's a curve-on surface, and it is stuck to that surface forever. And if I
03:38want, I can actually move the control points around and it will always stay
03:42stuck to that surface.
03:43The tricky part is actually going into Component mode.
03:47Before I do anything of trying to move this around,
03:49I probably want to turn the Make Live feature off.
03:53So to turn Make Live off, what you have to do is select nothing.
03:57Make sure nothing is selected--maybe just click on an empty spot in your
04:00viewport--and then click the Make Live button again and you're making nothing live now.
04:08Now, I can go ahead and try to move this curve around on that surface.
04:12The tricky part is to actually select the curve and go into Component mode.
04:17So I advise you might want to go into wireframe mode with the 4 key and then
04:22you will be able to select that curve and then right-click and choose Control
04:28Vertex or Edit Point mode.
04:30I prefer Control Vertex.
04:32I will hit the 5 key to go back to shading
04:35so we can see this, and I will select a control point and move it with the Move
04:39tool, and you'll see that that curve is now permanently stuck onto that surface.
04:47So that's pretty helpful, because I can actually sort of direct my stroke
04:52after I've drawn it.
04:54So that's pretty helpful. So that's good.
04:58I will go ahead and right- click and go back to Object mode.
05:01You might need to go to wireframe in order to do that.
05:04So 4 key go to wireframe, right-click, and go back to Object mode, and I just
05:09want to select that curve object.
05:12Now here is the magic.
05:14Go back to Shaded mode with the 5 key.
05:17What I want to do here is select a brush and then I can attach that brush to the curve.
05:22So I will just click on any brush, either in the visor or in the shelf, to
05:27activate that brush.
05:29Then I'll go up to Paint Effects-- and this is a very useful command.
05:33It's kind of buried in the interface.
05:35It is under Paint Effects > Curve Utilities > Attach Brush to Curves.
05:42Now, how cool is that?
05:43So now I can go back into Component mode--
05:45again, I might have to go into wireframe with the 4 key--select that curve,
05:50right-click and go into Control Vertex mode, and now I can use the Move tool to
05:56move these control points around.
05:58I will hit the 5 key so we can see shading once again.
06:01My Paint Effects are permanently stuck onto that surface.
06:06So that's pretty useful, but remember it has to be a NURBS surface for that to work.
06:11So those are your two main ways of drawing onto a surface, either with Make
06:16Paintable or Make Live, in conjunction with Attach Brush to Curves.
Collapse this transcript
Customizing brushes
00:00Now, we are ready to actually start customizing our brushes.
00:04What I advise that you do is start from an existing brush that looks kind of
00:07similar to what you are trying to achieve, and then push that into shape.
00:13So in my scene, I've got a terrain, and I want to have some bushes lined up kind
00:17of like hedgerows. And the closest thing that I can see that will give me what I
00:23want is actually this Bubbles brush up here on the shelf.
00:27So I'll select the object and make it paintable,
00:31from Paint Effects > Make Paintable.
00:33I'll get in closer in my Top view and press the 6 key so I can see the texture,
00:39so I can kind of follow the contours of that texture, and I'll grab the Bubbles brush.
00:45Now, when I draw this, I won't really see much because the brushes are all set
00:49to be very, very, very small.
00:52So I'll need to get in really close, and once again, I can hit the 5 key, and all
00:57I see is just barely see a little bit of a stroke there.
01:01So I'll immediately go to the Ctrl+A Attribute editor and go to the Brush node
01:08and increase that Global Scale.
01:11It's barely even showing up here with a scale of 10.
01:14I may need to have a Global Scale up to as much as 50 or 100. Let's try 75.
01:22Cool! So we've got some bubbles on there and they are about the right scale for my scene.
01:26Let me verify that.
01:28Tap the Spacebar, go back out to the Perspective view, and take a look.
01:34So that appears to be about the right size.
01:38You'll see that they are kind of spread out here.
01:40What I want to have is just a line of bushes.
01:45So I'll go ahead hit the Q key so I can get my Select tool,
01:48select that stroke,
01:50go back into the attributes for the brush, and I can go into the Brush Profile
01:55section and change the width of the brush. And I can make those tubes spread out
02:02or come closer together.
02:03So I'll give that a Brush Width of almost 0.
02:09There's a lot of other fun things I can play with.
02:11I'll go down into the Mesh section here, and I can change the level of detail.
02:18So I've got Tube Sections.
02:20So I'll change that.
02:22So you can see Tube Sections basically is the level of detail radially around the tube.
02:28The level of detail along the length of the tube is actually found in the Tubes section.
02:34So I'll open that up and scroll down, and under Creation you'll see Segments.
02:40So this is the level of detail along the length of the tube.
02:44This is background geometry that's going to be pretty far away in my camera shot,
02:48so I don't need to have a lot of detail, and this is probably sufficient.
02:51So the next thing I want to do is change up the shape of this, because it's
02:56actually a bubble and I want it to be more like a bush.
02:59So if I scroll down in my Attribute editor, you'll see Width Scale, and this is
03:05the curve that indicates the shape of the tube.
03:09So on the left is the root of the tube, and on the right is the tip of the tube.
03:15Let me make this bigger, so I can work with this a little bit better.
03:19So if I bring this down, bring this flag down here--I don't want to
03:23create another one;
03:24I just want to bring the one that I have down--
03:26you can see now that I have changed the shape so that it's narrower at the bottom.
03:31I'll press the 5 key so we can see that a little bit better.
03:34So this is how I can control the overall scale of my tubes.
03:43And then I've got sort of Random Size, and I can play with that as well.
03:50There's a lot of attributes in here, and one of them is Tube Random.
03:55If I reduce that Random factor, they'll kind of move a little bit closer or
04:01farther away from one another.
04:02So a higher Random factor will kind of spread them out a little bit more randomly.
04:06Then I've also got the Width Random, and that's the overall scale.
04:11So if I bring that to a lower value, they'll kind of conform to be more
04:15along the same size.
04:17There's also the Tubes Per Step, which is the overall number of tubes.
04:22So if I increase or decrease that, you'll see you'll get more or fewer tubes.
04:27So that's a start, at least, towards getting a good result.
04:32I also want to play around with the color, and right now I don't see much in the way of color.
04:38And if I hit the 6 key to see texturing, they are still showing up as white.
04:43Well, that's because these are bubbles and they are supposed to be transparent.
04:47We are not really seeing the Transparency in the Viewport, but I have done a
04:50rendering already, and if I open that up, you can see that they are bubbles and
04:55they are transparent.
04:57So I want to change the Shading attributes.
04:59Go back into the Attribute editor, Ctrl+A, and scroll back up, and I am
05:04looking for Shading. Here we go.
05:06So you see there's Color, Incandescence, and Transparency.
05:09Well, clearly Transparency should be 0, so I'll bring that all the way down.
05:14These #1 colors are for the root of the tube, and then if I open up Tube Shading
05:20here, these #2 attributes are for the tip.
05:26So I want the Transparency to be 0 on both the root and the tip.
05:32And then for Colors, I'll just click on the color swatch. And for the bottom
05:37I've got a dark green--got it already in here--and for the top or the tip of
05:42that tube, I'll click and do another dark green, but vary it a little bit
05:47because I don't want it to be totally uniform.
05:49So I'll make it a little bit brighter on the top.
05:53And now you'll see I've got some green bushes here, but you'll also see that I
05:58am getting some highlights.
05:59So I probably want to get rid of that.
06:02Before I do, I can also play around, just briefly, with this Random factor here.
06:06I've got Random Hue. I have Random Saturation. You can see that in the viewport.
06:13Random Value and so on.
06:15The Specular component of this is found down in Illumination.
06:21So if I open that up, you will see some options, such as to use real lights,
06:26which is what I want here because I want these to actually cast shadows on
06:29the ground, and you'll see Specular, so I can increase or decrease the Specular amount.
06:36And then Specular Power here is the intensity of that highlight, or the spread of the highlight.
06:43So here Specular Power.
06:46So, with a low power, it's going to spread out a lot.
06:50With high power, we are going to get a very intense, focused highlight.
06:54So basically I want this to have sort of a pseudo-specular effect.
06:58I want it to be kind of as if it were lit a little bit brighter in the direction
07:03that's facing the sun.
07:05So I want to have a very low Specular amount and a very low Specular Power to
07:11get the shading that I am trying to go for.
07:13If I wanted to, I could put in a different color for the Specular Color.
07:16It's not something that I want to do right now, but I could.
07:20I'll just leave it at white.
07:21And then finally, for Texturing, I can go into this Texturing section, and
07:27you'll see here Map Color, Map Opacity, Map Displacement.
07:31So Paint Effects actually has a built- in fractal texture just like fluids.
07:36So if I want the color to vary across the surface, I'll just enable Map Color.
07:41And I may or may not be able to see it terribly well in the Viewport.
07:43Even if I get in really close, it may not be really very clear.
07:47So I'll probably need to do this with an actual true blue rendering.
07:52So to make that go more quickly so I don't have to wait very long for the
07:55rendering, I'll go into my Display Render Settings window.
07:59I'll just reduce the Resolution.
08:02I'll bring this down to 320x240, and in Maya Software tab, I'll reduce the
08:10Quality down to Preview.
08:11I'll just do a rendering of this so I can kind of see what the color of that
08:18texture is going to look like.
08:20So it looks like I've got too much specularity,
08:22so I can go back and play around with that,
08:24Ctrl+A. And in fact, I can just maybe turn specularity completely off, and
08:31that's going to be found under Illumination.
08:33So let's bring that way down, if not completely off.
08:36Do another quickie render.
08:45So, I've got reflections on here as well
08:48So that's really what I need to turn off.
08:50So that's going to be actually way back up here.
08:52Remember, these were bubbles when they were first created.
08:56So back up near the top, you'll see Mesh Environment Reflections.
09:01I just want to turn that down to 0.
09:04And I'll do a Region Render here to see if I can get that reflection. There it is.
09:08It's gone now. Cool!
09:10So you can kind of see that there is a texture there.
09:12It's not immediately obvious. But if I go back down into the Texturing section,
09:19I can choose different types of textures, like a Fractal or a Checker, or even a File map.
09:24I can put a file in there, too.
09:26I'll just use a Fractal, but I need to control the repeats,
09:31so that's why, if you look closely, you can see that it's kind of like striped.
09:35Let me get in really close on that and do a render.
09:44So we are getting some stripes.
09:47So that just means I need to control these Repeat U and Repeat V parameters.
09:51So if I set them both to 1 and 1 and just do a region render here, I can see
10:00there is a fractal pattern there now.
10:02You'll see here that the texturing is not quite hitting the top of my Paint
10:07Effects tube, and that actually has to do with the shape of the tube.
10:11And if I go back and play around with Width, Scale, Curve, I can kind of get rid
10:17of that a little bit.
10:18But again, this is going to be background geometry, so it's not really critical
10:21that it look perfect.
10:23So those are some basic attributes to customize brushes, including the scale,
10:28the shape, and the color and texture.
Collapse this transcript
Customizing tubes
00:00Now, we are ready to create some grass, and that will help us learn more about
00:05customizing Paint Effects tubes.
00:08So I have got my objects selected and I have made it paintable.
00:13I can go now into Window > General Editors > Visor and look at the grasses
00:20presets, and you will I have got different types;
00:23for example, grassClump. Let's try that.
00:27So click on that, which loads that brush into the Paint Effects tools
00:33template brush. And you will note that if I draw a stroke here on this surface,
00:40it's very, very small.
00:42So I want my grass to be taller than that.
00:44I will just go ahead and hit the delete key to delete that.
00:47One what that I can make my brush larger is to simply hold down the B key and
00:52then drag and I have got a larger brush, and what that does is it controls the
00:57global scale of the Paint Effects brush.
01:00So now I have got some nice clean grass to work with.
01:05So, obviously when I draw that stroke it's conforming to the direction of the
01:11stroke, and that may or may not be what you want.
01:14If I want to change that behavior, just as we did for 2D Paint Effects, we will
01:21need to go into the Brush settings.
01:22So I will select that stroke. Hit Ctrl+A. Scrolling down, I want to find Tubes
01:33and Behavior > Forces, and you will see Path Follow and Curve Follow, so you will
01:44see Path Follow is causing those blades of grass to bend over according to the
01:51direction of my stroke.
01:55So if I set Path Follow to 0 then they will stand up a little bit straighter.
02:00I can set some of these other things to zero too, but they are not actually doing
02:05anything right now, because Curve Follow is a little bit different because it
02:08relies on a guide curve.
02:10I could actually create a secondary curve that went around corners and that
02:13would cause my Paint Effects tubes to conform to that.
02:17So Path Follow, I will set to zero; the rest don't really matter.
02:20But you will see that it's still leaning over, so I want to go back up into
02:26tubes Creation, and I want to play around with these mysterious Elevation
02:32and Azimuth attributes.
02:36So you will see as I control this, you will see I am able to get different effects.
02:40So elevation is basically what direction it's pointing relative to the ground
02:45plane, or relative to the normal of the surface.
02:49So if those are both set to one that means that the tubes are going to be
02:53sticking straight up.
02:57If I set elevation minimum down to zero, then some of them will be pointing
03:02along the length of the half, and some of them will be pointed straight up.
03:06So Elevation is how far it's leaning over, and then Azimuth is the direction
03:13that it's leaning over.
03:14So if I change these Azimuth attributes, you can see I can kind randomize the
03:18direction that they point in.
03:21So, if I have Azimuth set to one and negative one, then we can kind of create
03:28really chaotic grass.
03:30So usually you want more conservative settings than that,
03:34and usually you probably want the elevation to be basically, nearly one and
03:40one. And that way you can get a nice sort of cleaner look to your grass, and it
03:46won't lean over according to the stroke that you've drawn.
03:50Very good, so what else can we play with here?
03:53Well, we can make trees as well, so let's make a tree.
03:58And I will go back into a Window > General Editors > Visor, and you will see
04:06trees and plants and all sorts of good stuff.
04:09Notice that some of these say Mesh next to them and some of them don't.
04:14So a Paint Effects brush can either be a brush stamp or an actual piece of
04:213D geometry that renders in a usual way.
04:24So that's a difference between trees and trees mesh, but you can always convert
04:29from one to another at will.
04:31So the one I want is actually going to be under treesMesh and let's see.
04:36We've got oakWhiteHeavy and oakWhiteMedium and oakWhiteLeafy.
04:43Let's do this one, oak white medium.
04:47And I will just simply drag out in my viewport, and it's created the tree, but
04:53it's, again, very, very small. So tell you what.
04:55I will hit delete that, and I will hold down the B key and drag out to
05:00increase the size of my brush, release the B key, and I can click and drag to create my tree.
05:06Wow! Now, how magical is that?
05:09If you were a model this with traditional techniques, it would take you a
05:11very, very long time to do.
05:14But with Paint Effects, it's almost instantaneous.
05:18So now that we've got that there, we can start playing around with the brush
05:21attributes, like obviously the Global Scale. Bring that up or down.
05:26I will go to my Perspective view, and press the F key, so I can see that more
05:33clearly. And just so that we're not being bogged down in this heavy scene,
05:40I will go to the stroke node and I'll turn off Draw As Mesh.
05:48Turn that on and off at will. So, this is actually going to render pretty quickly.
05:52If I do a quick render of this, it's not going to take long, even though
05:58it's a very heavy piece of geometry.
06:00Because Maya's Paint Effects are very efficient, and you will see it's
06:04even casting shadows.
06:07If I get in really close, it kind of breaks up. So, Paint Effects are great for
06:12background and sort of middle-ground geometry, but if you get up too close to
06:17them, it kind of loses its convincing-ness.
06:21Now you can see that we have got actual leaves, and those are file maps with
06:26transparency on them.
06:28And that's all built into this particular brush. Cool.
06:31So what else can we do here?
06:32Well, we can change the structure pretty easily.
06:36I will go back to my brush node, and back into Tube. And, for example, in the
06:43Growth section, we can enable things like leaves and twigs.
06:47We can turn those on or off.
06:49There are flowers as well.
06:52Those flowers don't seem to be really working well with this particular tree,
06:55but you can play around with it, and have a great time with it. And then if
06:59you drill down into these settings, it's almost bottomless that there's so
07:02much going on in here.
07:04Like, for example, you can change the number of branches. Knock that down to maybe like one,
07:12so we're getting a much more sparse tree.
07:16We can go into maybe Twigs and play around with the number of twigs in a
07:22cluster, so we are kind of reducing the overall global level of detail.
07:30You've got the position of the twigs, and leaves as well.
07:33So that's controlled through these Twig Start and Leaf Start attributes.
07:40So if I increase this, you'll see the twigs will appear really only at the ends
07:45of the tree. But if I reduce this, the twigs will kind of start earlier.
07:53So, same thing with the leaves.
07:55I can control the start of the leaves, and that's a little bit farther down here,
08:01Leaf Start. And so if I reduced this, you'll see the leaves are kind of
08:05moving down the trunk, so they're starting earlier or closer to the root.
08:10And if I increase the Leaf Start, they will move out farther towards the end,
08:15and so we will get leaves only at the very ends of the tree.
08:20There are many, many other activates you can play with. For example,
08:24you've got Gravity. So, if I scroll down a little bit further, under Behavior >
08:31Forces, you will see Gravity. And if I increase the Gravity, it may take a
08:38moment for it to catch up.
08:40It's a fairly heavy tree,
08:41so I'll probably want to go in and reduce the display quality, just for
08:46demonstration purposes. I will set that to maybe 30% or something. And now when
08:53I play around with this gravity attribute, you can see what it's doing.
09:01There are many, many attributes within Paint Effects, and we don't have time to
09:05even barely scratch the surface, but if you're like me and you love tweaking
09:09around on these little attributes and seeing what they do, then you've got your
09:12work cut out for you here, because there's lots and lots of stuff to play with.
Collapse this transcript
Animating turbulence
00:00One of the many wonderful things about Paint Effects is that it has animation
00:04built into it, so that your trees and grass can blow in the wind and you
00:08don't need to keyframe it or write any expressions or anything. So, that's pretty great.
00:12So, all you have to do is select your brush--go to the Attribute editor and
00:17activate that brush--and you're looking for a section under Tubes > Behavior > Turbulence.
00:29So Turbulence is an effect that's applied to the stroke, and the Turbulence
00:35does not, by the way, does not respond to any of the dynamics in Maya. So, this
00:42is completely self-contained within the brush node, and it doesn't know anything
00:46about any dynamics fields or anything else that you might have going on in the scene.
00:51So I've got my stroke selected, I've gone to the brush node, and I have got
00:55Turbulence here. And you'll see it's turned off.
00:59And I can just go ahead and turn it on.
01:01You'll see that there's a bunch of options here, but really the only two options
01:04that you care about are Grass Wind and Tree Wind. So, I will activate Tree Wind.
01:10And it will have to think about it for a minute. And then what you want to do is
01:15go ahead and press the Play button and make sure that it's actually working.
01:18So let me move this around and press Play in my Timeline to see if it's
01:22actually playing back.
01:23And it can be very slow.
01:25You will notice that it is playing back.
01:27It's taking a couple of seconds, maybe a second or so, to calculate each frame.
01:33And if that bugs you, of course you can just go and turn off Display As Mesh in the stroke.
01:39So I will go down here into the stroke and turn Draw As Mesh off and wait for it
01:46to think about it for a minute.
01:47And I can maybe reduce the Display Quality, too, because all I'm really testing
01:51here is the movement. Okay.
01:55So, that's good!
01:57So, I will try playing this back, and it seems to be working.
02:01It's not beautiful, but it's doing something.
02:04I'd also like to mention that it's very common that when you turn Turbulence on
02:09that in fact it will not immediately activate. So, it's just a little unfortunate
02:15fact that sometimes when you turn this Turbulence on and then press Play, then
02:21you'll see nothing happen in the viewport.
02:24When that happens, just save your scene, shut down Maya, and reopen it, and
02:29Turbulence will be working.
02:32So, in order to get the right speed here and make sure that it's really playing
02:36back and looking good, I need to make sure that actually my viewport is playing
02:40back at the correct speed.
02:42So, whenever working with any kind of animation, I always go up to the Display
02:47menu > Heads Up Display > Frame Rate.
02:52In fact, when you are doing any animation, that should always be on, because
02:56that's the only way you'll know if what you see in the viewport is actually
02:59real-time playback.
03:01The default time base in Maya is 24 frames a second, so when I press Play here, I
03:06should be seeing 24 FPS.
03:10But you notice that that is not what I'm seeing, and that's because the
03:13default behavior of Maya is not to play back at real time, but to play back as fast as possible.
03:20So since I've set my Display Settings down for this stroke, it's able to play
03:27back at faster than real-time speed.
03:30So I'll also need to constrain play back to real time.
03:34The easiest way to do that is simply right-click on the Timeline and go to
03:38Playback Speed and you want to choose the third option, Play Every Frame, Max Real-time.
03:46What that means is it's going to play every frame and it's not going to skip
03:51frames in a heavy scene.
03:52If you've got a lot of geometry or a lot of dynamics or lot of stuff going on in
03:58the scene, then in order to maintain playback speed it could drop frames.
04:05But with Play Every Frame it will not drop frames.
04:09And then additionally, Max Real-time means it will never exceed the current
04:14animation time base.
04:16So ironically, you might think that you would want to have it in real-time
04:19mode, but that's actually not a good idea because in a heavy scene it will skip frames.
04:25The best option, in all cases, is Play Every Frame, Max Real-time.
04:30So when I rewind and play this back, I should be seeing approximately 24 frames a second there.
04:35Okay. So, that's much better.
04:37Now, we can actually start playing around with the parameters of the animation
04:42here and know that what we see is what we get.
04:46So the first thing is the Interpolation.
04:48You'll see that this is looking kind of jagged.
04:50The motion is not very smooth.
04:53You will see that it suddenly sort of changes direction in kind of weird,
04:56robotic kind of ways.
04:58Just change the Interpolation to Smooth over Time and Space, and play that back,
05:04and that will be a lot smoother.
05:06Big difference there, actually. It looks a lot more realistic just doing that one thing.
05:11Then you can start playing around with the strength of the turbulence, so that's
05:14what this attribute is.
05:16That's the intensity, or the amplitude.
05:19So if I had a very high Turbulence value, then my tree is really going to
05:23blow around quite a lot.
05:27Usually, you will probably want this down to be somewhere around like 0.1 or 0.2.
05:32Then we have the Turbulence Frequency, which is the scale of the effect.
05:37So higher values will cause more sort of kinks in the Turbulence;
05:42it will cause the pattern of Turbulence to be smaller.
05:46So higher Frequency equals smaller.
05:50So if I increase this Frequency up really high, then it's going to start to
05:55jitter around a little bit more.
05:57I could even push this farther, but you would never really do this.
06:01But if I increase this up pretty high, then it will start kind of jittering
06:06around in kind of unnatural ways.
06:09So I will bring that Frequency back down to about maybe 0.5.
06:12And then finally, you have got the speed of the turbulence, and that's pretty
06:16self-explanatory. Higher speed means it's going to jump around faster.
06:22And so it turns out actually that the Turbulence Speed is really important,
06:26because that is what sort of gives us the impression of the speed of the wind
06:31that's blowing the trees around. Very good!
06:36I have got a brush that I like, so I don't want to forget to actually save that brush.
06:40It is stored in the current scene, so if I wanted to, I could always go back and
06:46Get the Settings from a Selected Stroke. But it's better to just save the brush
06:52to the visor, or even better, to the shelf, and we actually covered that earlier
06:58in chapter 03, movie #4, "Saving Paint Affects Brushes." The process is exactly the
07:04same for a 2D Paint Effects versus a 3D Paint Effects brush.
Collapse this transcript
Controlling polygon output
00:00The last thing we like to explore here in chapter on Paint Effects is how to
00:04control polygon output.
00:06We saw this a little bit earlier when we were looking inside the Brush Settings
00:10to control the polygon level of detail.
00:13But we need to take a second to look at this and explore a couple of
00:17special-case scenarios.
00:19First of all, not all Paint Effects tubes are actually built out of polygons.
00:24You'll see polygons in the viewport, but the renderer doesn't necessarily see it that way.
00:30For example, the Daisy Large Brush that I got from the shelf doesn't draw
00:36polygons when it renders, by default.
00:39So if I render this now, you'll see, in fact, that it's built out of a whole lot
00:43of little circular paint stamps.
00:46So, this is one reason why you don't want to get up too close to these Paint Effects.
00:50So, this is using a Paint Effects type called Paint, and this is very efficient.
00:56It renders very quickly.
00:58But it's got some limitations, like, for example, it's not capable of
01:01casting true shadows.
01:02I am going to go ahead and store that so you can compare it to the mesh
01:06version. I'll minimize it.
01:09I'll select my stroke, and go to the Brush node, and right up top, you'll see
01:13Brush Type, and it's defaulted to Paint for this particular brush.
01:17But if I swap that out to Mesh, you'll see that it changed in the viewport,
01:23not significantly but it changed somewhat.
01:25But the rendering will look a lot different.
01:27So I'll go back to the Renderer and do a new render, and that is the difference
01:33between Mesh and Paint.
01:36So if you are using the Paint type Paint Effects brush, then these attributes,
01:43like tube sections and so on, may or may not have any influence.
01:47If I switch this back out to Paint and I minimize this for a second, you can
01:52see, I can drag around on this all day long, but using the Paint type, it won't
01:56make any difference.
01:57But if I scroll down to the Tubes, by the way, keep going down under Creation and
02:03play around with Segments,
02:06this actually will change the level of detail for the Paint type. And this is
02:12actually globally changing the number of segments in this object.
02:17So I'll set it back to where it was, which was 24.
02:20So that's a little bit strange and unusual, that behavior,
02:24but you get use to it pretty quickly.
02:26You want to use the Paint type for extreme background objects and things that
02:30don't need to cast shadows and don't need to respond to light exactly
02:35perfectly, but for foreground geometry or middle-ground geometry you probably
02:39want to use the Mesh type.
02:41Another really important thing to consider is that Paint Effects do not work in Mental Ray.
02:46So if I go back up to my Render window and I try to switch this over to Mental
02:51Ray and render it, I'll get a black screen, because Paint Effects is
02:57specifically designed to work with the Maya Software renderer, and has a
03:00special pipeline into that renderer, which is much more efficient than the
03:04usual way of doing things.
03:06So for that reason Mental Ray does not recognize Paint Effects at all.
03:11However, as usual, there is a workaround.
03:13It's the simple matter.
03:14All you have to do is simply select your stroke and go to the Modify menu and
03:20choose Convert > Paint Effects to Polygons.
03:24If you want, you can go into the options for that.
03:27You do have the ability to set an upper limit on the number of polygons for
03:32the current stroke.
03:34So it's defaulted to 100,000 polygons, which is high enough for a tree usually.
03:39So I'll need to convert to polygons if I want to render in Mental Ray.
03:44So I'll go ahead and click Convert.
03:47You'll see it's changed the structure quite a lot, and it may also mangle
03:53the textures if any.
03:54So converting Paint Effects to polygons can kind of get you into trouble
03:59if you're not careful,
04:00so I definitely recommend saving before you do it.
04:04So I'll go back to my Render window and I've got Mental Ray as my renderer.
04:07I will go ahead and click Render, and you'll see it's rendered, but it's not very beautiful.
04:14We're losing a lot of information in here.
04:17So it's the best we can do under the circumstances with Mental Ray. Again, for
04:22background, geometry it's probably fine.
04:24So that is the basic introduction to Paint Effects in Maya and the sort of need-
04:29to-know information.
04:31You can take that and run with it and really explore it and go really deep into
04:35it and spend a lot of time and get some really good results in it.
04:38This is just a basic introduction, and I hope that you've learned a lot.
Collapse this transcript
6. Lighting and Rendering
Creating non-physical daylight
00:00In this chapter, we are going to look at creating non-physical daylight to light our terrain.
00:06Now we could be using Mental Ray physical sun and sky, but of course that's
00:10going to incur a lot of other situations that we will have to deal with--
00:14like, for example, that Paint Effects don't render in Mental Ray, and you would
00:17have to convert them all to polygons and assign new shaders and all sorts of
00:21stuff, and it's very, very time consuming.
00:24So although it is possible to light Paint Effects with physical sun and sky in
00:28Mental Ray, it's not a trivial operation.
00:31What I am going to opt to do here is just to use the default Maya Software
00:35renderer and standard Lighting tools to give an effect of daylight.
00:40So right now I have got no lights in the scene, and if I go to my Camera view and
00:46press my 7 key, you will see that the terrain disappears, because as you probably
00:51know, if there are no lights in the scene and you press the 7 key, then your
00:55surfaces will all render as black in the viewport.
00:58So 5 is shaded, 6 is textured, and 7 is textured and lit.
01:03So, I will leave it on 7 for now.
01:06Note by the way, that the Paint Effects don't go black because they're currently
01:09being rendered without lights in the viewport because they're all being
01:14displayed as wireframes.
01:16For sunlight, all I need is a directional light. Create > Lights > Directional
01:23Light, and this will be the sun.
01:25Go ahead and select that.
01:27It's created at the origin very, very, very small.
01:31It's only about one unit in size.
01:34I do not recommend that you scale the light.
01:36I recommend that you select it and then go to Ctrl+A, Attributes. And just like
01:43with cameras, you can go into Object Display and increase the Locator Scale.
01:48So if I set that to something like 50, now my light is big enough for me to see.
01:53I will grab the Move tool and move it off to the side.
01:56The position of a directional light does not affect the illumination.
02:00A directional light is a light source that comes from an infinite distance
02:05and has parallel rays.
02:07So, it's perfect for a sun.
02:09So, all you have to do is just rotate it. And of course I want to make sure I
02:17rotate it so that it's turning down, or pointing down.
02:21So I will look in different views and see what I've got.
02:24So in the Front view, let's turn it so it's facing downward, so these little
02:28arrows are actually pointing down.
02:32So that was easy enough, and now we can actually see some illumination on the
02:36ground plane. And to test that, I can turn the light on and off.
02:40So I'll go over the Channel box, and I will just temporally set the Intensity
02:45down to zero, just to make sure that it's actually doing what I think it's
02:48doing, and in fact it is.
02:51Turn that back up to one.
02:52Then I will go into the Attributes for the light, Ctrl+A, and I just want
02:56to change its color. Sunlight will probably be a golden color, or at least little bit yellow.
03:03So I will click on that color swatch and switch over to HSV mode, and have just
03:09sort of desaturated orange or yellow color for the sunlight.
03:14So that's a directional light for the sun, and there's nothing more to that.
03:18But if I want to get good results, I want to have shadows, and I also want to have
03:23some ambient light in the scene.
03:25Well, we will talk about shadows in the next movie.
03:28Let's look at Ambient light.
03:30Well, the thing is that as you may know Maya has an ambient light built-in.
03:35If I go to the Create menu, I can see lights, and one of them is Ambient, and
03:40ambient is really useful in lot of cases because it's an all-over light source
03:44that comes from everywhere and nowhere, but you can give it some directionality
03:48if you need to, and it's very helpful.
03:50Unfortunately, in my tests I found that ambient light does not work with Paint Effects.
03:56It also does not work with fluids at all.
03:59So, I cannot use the ambient light.
04:01All I can use are a bunch of point lights.
04:05So, I'll create a few of these--maybe four.
04:07So here is a point light, and I want to move it back sort of behind the camera
04:14and maybe up, because it's supposed to be light that's coming from the sky.
04:18And you will note that it's very bright.
04:21So I want to go back into the Attributes and reduce its Intensity down
04:26to something like 0.2.
04:29The Contrast in your scene can be expressed as the ratio between the direct
04:35light, which is coming from the sun, and the indirect or ambient light that's
04:39coming from everywhere else.
04:40So if you have a high intensity to your ambient light then it's going to be a
04:45very a low-contrast scene, but if you have a low intensity to your ambient light
04:50it will be a higher-contrast scene with darker shadows.
04:53I can also go into the Color here and give that a complementary color of light
04:58blue, because it's supposed to indicate the light coming from the sky, because
05:04the sky is actually a light source in itself independent of the sun.
05:07So I have got a single point light, but the thing about a single point light is
05:12it's not really good enough to give coverage,
05:15so I'll need to make a couple of duplicates of this and kind of scatter them
05:18around a little bit.
05:20So, once I have got those attributes set more or less the way I want them, I
05:24can hit Ctrl+D to make another one and sort of push that around and randomize it a little bit.
05:31I don't want it to sort of be light all coming from the same direction, so I
05:35want to sort of move these around so that they are kind of offset a little bit.
05:39And maybe I will do Ctrl+D and do another one, and Ctrl+D once again to do a
05:47fourth one. And I'm just playing with those in different views.
05:52Maybe I'll go to my Perspective view and tumble around and try to get a sense of where I am at.
06:00The exact position of these is not terribly critical. The important thing is
06:03that I've got more than one of them, so that I have kind of got a good wash
06:08going across the whole scene.
06:09This is a very simple lighting setup. Not much to it.
06:14If you want to change the color or intensity of these lights, you will have to
06:17do them all individually because in Maya there is no way to instance lights.
06:23So, there's no way to actually control one light and have them all reflect that,
06:28unless you set it up by directly connecting those attributes yourself through
06:32the Connection editor.
06:34But, in any event, this is enough for us to get a basic lighting setup for a
06:38simple natural environment.
Collapse this transcript
Casting shadows
00:00Before I start doing test renders to see if my lighting looks good, I am
00:03probably going to want to hide my Paint Effects, or at least most of them, because
00:08this is a moderately heavy scene and rendering this with lighting and shadows
00:13could take as long as 15 or 20 minutes per frame.
00:17So, I'm going to just close my Attribute editor and go into these display layers
00:22I've made in advance. And I am just going to toggle the visibility of the grass,
00:28the trees, the bushes, and the ground cover.
00:31I will leave this Hedgelayer alone because that's not very heavy, and I want to
00:37be able to test to see if it's casting shadows correctly.
00:40So having turned off all of those Paint Effects layers, I'll go ahead and do a
00:44quick rendering of my camera1 view.
00:48As you can see, it's kind of over-lit.
00:50It's pretty bright.
00:51So I probably want to go and turn my ambient lights down.
00:55So I'll go ahead and save this into RAM, into the buffer here, so I can go look
01:00at that again later, and I will need to go back into each one of these lights
01:04and reduce each one's intensity.
01:07So, I'll just set this one to 0.1 and set them all to 0.1.
01:15I may actually need to reduce the intensity of my directional light as well, but
01:19I'll start by reducing these.
01:23Back in my Render view, I'll do another render of that Camera view, and that's
01:28a little bit better.
01:29So as I move through here, you can see that's with the point lights all set to 0.2 and 0.1.
01:36Very good! So the next thing we want to do is turn on shadows.
01:41We don't want the point lights to cast shadows because those are supposed to be
01:45light coming from the environment.
01:48Really, we only need shadows on the sun, or the directional light.
01:53So, I'll select that directional light and go back to the Attribute editor,
01:56Ctrl+A, and opening up the Shadows section, you'll see that there are two
02:02types of shadows in Maya.
02:04There are Depth Map Shadows and Raytrace Shadows.
02:10Unfortunately, if you are using Paint Effects, raytrace shadows do not work,
02:16so you have to use the depth map shadows.
02:19So I'll enable that for the directional light and I will do another test rendering.
02:25Maybe I'll just do one little section.
02:27I'll just select one little area here, and click Region Render, and we are
02:34getting a not very good-looking shadow there.
02:36Why don't I go into a Perspective view and get in a lot closer on that, so
02:40we can really see it?
02:41Get in really close, so we can see those shadows and whether they're working or not.
02:50I'm trying to see if my shadows look good, and they don't look terribly good.
02:54I am getting a shadow, but it's looking really choppy and really blocky and ugly.
02:59The reason is that the so-called depth map shadows are pixel-based, and we just
03:06don't have enough resolution to resolve a good-looking shadow.
03:10So I'll store that in the buffer.
03:12I'll go back into the lights Depth Map Shadow Attributes, and I want to increase
03:18that resolution quite a lot.
03:20I recommend a value of about 4K, or 4096.
03:25That's kind of high, but that's what you need in order to get good results on
03:30a terrain like this.
03:32So I'll go back and do another render of that with a higher resolution to
03:37the depth map shadow.
03:39Now, we've got better-looking shadows.
03:41They are not perfect, but they're good enough to look all right from a distance.
03:46If I move my light around, if I rotate it around, I can make those shadows
03:49stretch across the landscape a little bit better.
03:53So, I'll go back to my real true blue camera view, and I'll rotate this light
03:59around a little bit so that it is coming in at a more glancing angle.
04:03That will make it a little bit more visually interesting.
04:07So, now as you can see, I've got shadows on my landscape being cast from these
04:11Paint Effects tubes.
04:12I have just got preview quality rendering at this time, so that's why that's
04:15looking a little bit jagged.
04:16But we are actually in a good place here with our shadows.
04:20Now, this method works if you're using Paint Effects Mesh brushes, but if you're
04:26using the Paint Type brush then these cast shadows won't show up.
04:31So there is a little bit you have to do around that.
04:35If I select my Paint Effects brush and go into the Attribute editor, there's the Brush node.
04:41You will find Shadow Effects when you open that up.
04:46So if you're using the Paint type Paint Effects rather than Mesh, then you'll
04:51need to have a fake shadow rather than a real shadow.
04:56So this is where you would go in and choose a 3D cast fake shadow or 2D
05:01offset fake shadow.
05:04And additionally, you've got these other options here, which are kind of helpful.
05:09Back Shadow will make the surfaces of the paint that are kind of pointing
05:13away from the camera,
05:14it will make those darker.
05:16Center Shadow is good for grass that you are rendering as a Paint Type brush,
05:22because what that will do is it will make the center of the clump of grass be
05:27a little bit darker.
05:29Also, needless to say, Cast Shadows needs to be turned on if you want to have
05:35cast shadows for a Mesh type brush.
05:39And if I switch this off, in fact, it won't matter whether I have shadows turned
05:43on in the light or not;
05:45we won't get shadows on those Paint Effects.
05:49That's how you control shadows for Paint Effects in Maya.
Collapse this transcript
Rendering with Maya Software
00:00We have modeled our scene, populated it with Paint Effects, and done some simple
00:05lighting, and now we are ready to render our final output.
00:08The first thing I want to show you is that you probably want to turn on
00:13Oversampling for your Paint Effects.
00:17So I'll go ahead and open up the Render Settings window and show that to you.
00:22In the Maya Software tab, down at the very bottom, the very last section, you'll
00:27see Paint Effects Rendering Options, and Oversample is off by default.
00:33Although actually, in all of the scene files that we have been using so far, it
00:37has been turned on, just so that we wouldn't see ugliness in the lessons.
00:42So Oversampling is off by default, but you really do need to turn it on.
00:46So, let me show you why.
00:48I have got two renderings that I've prepared in advance.
00:51So this is with Oversampling turned off, and you'll see that we are getting some
00:56serious aliasing issues, some really bad sort of jaggy-ness.
01:02In fact, that is not affected by the state of the anti-aliasing in the render
01:11globals, or the anti-aliasing Quality at the top of the Maya Software tab here.
01:16So once again, it doesn't matter if you have a high Anti-aliasing setting up here;
01:21your Paint Effects are going to come out like this.
01:24So you do have to turn on Oversample. And once you do, it will take a lot longer
01:30to render, but it will look a lot better.
01:32So this is with Oversampling off and on. Off and on.
01:40So you can see that pretty clearly.
01:42In fact, I can even zoom in closer with the mouse wheel, so you can really see
01:46that there's no question.
01:48Oversampling off looks really jagged, and Oversampling on is a lot softer and a lot better.
01:58So that's pretty much required whenever rendering Paint Effects in Maya Software.
02:01I am also going to show you how to apply some fog to the scene, to give some
02:06atmospheric perspective.
02:09In the chapter on fluids, we actually used a 3D fluid container to give
02:13the effect of haze.
02:15However, unfortunately if you have Paint Effects inside a fluid container, the
02:20Paint Effects will actually render funny.
02:23They'll actually render on top of the fluid, and not inside it, and that's because
02:28Paint Effects is actually rendered as a post-process and sometimes you can even
02:33see that happening during the rendering, that Maya will draw all the regular
02:37geometry first and then go back in a separate pass and render the Paint Effects
02:42and then sort of seamlessly composite them together.
02:46Because Paint Effects is a post- process, it doesn't work well if your Paint
02:51Effects are embedded inside a fluid.
02:53So, that effectively means that you can't use that fluid technique to get
02:58atmospheric perspective with Paint Effects.
03:00So what you can do, however, is to use the Maya Software renderer
03:04built-in environment fog.
03:06You will find this under Render Options, and here it is, Environment Fog.
03:12Currently there is no environment fog, because if there were, I would see the
03:16name of the node listed here.
03:19You'll see that there is a check box here that says Apply fog in post, and it
03:24will work whether that's on or off, but I prefer to leave it on, because I
03:27think it looks better.
03:29To create the Environment fog node, I will just simply click here to create the
03:33render node, and there it is.
03:35It says environmentFogShape1.
03:38Now, I will need to go to the Attribute editor to control the parameters of
03:43this environment fog.
03:45So to get to the Attribute editor, one way to do that is to simply click here,
03:51and that will open the Attribute editor and show me the environmentFogMaterial.
03:55I could also go to the hypershade and select it there. So here we are.
04:00We got Environment Fog, and there is Simple Fog and then there's Physical Fog.
04:04I am just going to do Simple Fog today,
04:07so Physical Fog is checked off.
04:10We've got Color, Saturation Distance, and then down here, very importantly, we
04:15have the Clipping Planes.
04:17So clipping planes are the extent of the fog away from the camera.
04:23So fog in this case will only exist up to 200 meters, or 200 units, away from my camera.
04:31So if I want that to extend farther into the scene, I will need to increase
04:35the Fog Far Distance.
04:37So, let's try value of about 2000.
04:42Back up here, we've got the Saturation Distance.
04:46So that's the distance at which it reaches full intensity.
04:49So, you can set that to 2000 as well, or set it to whatever you like.
04:54But if you set it down too low then basically the fog will completely cover your scene.
05:00So let's see what that looks like.
05:01I will set this to, let's say, 200, and so we don't have to wait very long for the rendering,
05:07I am going to turn off the Paint Effects and just do a test render now from my Camera view.
05:14So you can see with my Fog Saturation Distance set to only 200, it looks like a
05:22very, very foggy day.
05:26So I want to increase that Saturation Distance. Let's try 1,000.
05:35That's a little bit better, but I think I could even push that a little bit farther.
05:39Before I really do that though, let me just adjust the color, because of course I
05:43want to do kind of blue haze here.
05:45So I will just click on the color swatch and set that to a light blue.
05:52You'll see that there is Color Based Transparency. That's a switch that's on
05:56by default, and you usually want that turned on when you are doing a haze effect.
06:01If you're trying to create a night shot and give the illusion of a scene where
06:08things in the distance are darker, then you would want to turn Color Based
06:12Transparency off and set the color to black.
06:15But in this case we want it on.
06:18Let's store that image and do another rendering.
06:22Let me show you the difference between this is the white fog and the blue fog.
06:29Notice, by the way, that it is also fogging out my backdrop.
06:33I have got a matte painting back there, and that is being affected by the fog as well.
06:40If I didn't want it to be effected by the fog, then I would want to do something
06:43else, like put the backdrop in and composite it in 2D.
06:47But this is fine for now.
06:49So that's basically how you would control the fog.
06:51If I want to make this with more subtle effect, I could increase that Saturation
06:54Distance out to 2,000. We'll store that and do another rendering.
07:01That's giving me a pretty good impression of daylight, and a pretty far distance.
07:05This represents about one kilometer in distance now.
07:09So that's how we can control the quality of our Paint Effects, and how to add
07:14atmospheric perspective in conjunction with Paint Effects.
Collapse this transcript
Conclusion
Next steps
00:00That concludes our course in Maya 2011: Creating Natural Environments.
00:05I'm Aaron F. Ross, and I want to thank you for watching.
00:08I hope that you've learned enough that it sparks your interest to explore
00:12further into Maya's wonderful tools, especially Paint Effects and fluids.
00:18If you're really interested in learning more about this, check back at lynda.com
00:22as we add more titles.
00:24I can also recommend there is a wonderful blog on area.autodesk.com. There is a
00:29blog by one Duncan Brinsmead, who is a principal scientist at Autodesk, and he is
00:35the author of Paint Effects and primary author of Maya fluids.
00:39So it's really a good blog, and there is a lot of developing information in there
00:43about new features and how to integrate things in really advanced ways.
00:46So once again, I hope that you've learned everything that you wanted to learn
00:50here, and I hope that inspires you to take it further and to create incredible
00:55games, films, TV shows, illustrations, and all forms of media, using Maya's
01:03incredible tools for modeling, animation, and rendering.
Collapse this transcript


Suggested courses to watch next:

Maya 2011 Essential Training (9h 8m)
George Maestri


Photoshop CS5 Essential Training (11h 15m)
Michael Ninness


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 98,718 instructional videos.

start free trial learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 1,899 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.


site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked