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