IntroductionWelcome| 00:04 | Welcome to Creating Fluid Effects in Maya.
| | 00:07 | My name is Aaron F. Ross.
| | 00:09 | In this course will explore the
Maya Pond and Ocean features to create
| | 00:13 | convincing surfaces of water and other liquids.
| | 00:16 | Here are a few of the topics we'll cover:
| | 00:19 | understanding fluid node attributes,
simulating dynamic ripples with a fluid
| | 00:23 | pond and wake, testing simulations
with interactive playback, previewing an
| | 00:30 | ocean in Maya viewport, rendering
water surfaces, controlling render
| | 00:37 | tessellation, floating objects
dynamically, driving a dynamic motorboat, and
| | 00:45 | rendering an underwater scene.
| | 00:46 | Maya's pond and ocean tools make
it easy to create complex shots that
| | 00:52 | require liquid surfaces.
| | 00:54 | These features of Maya are essential
to a visual effects artist's toolkit.
| | 00:59 | So let's get our feet wet
in the Maya Pond and Ocean.
| | Collapse this transcript |
| Using the exercise files| 00:01 | If you are a premium subscriber to lynda.com,
then you can download the Exercise
| | 00:05 | Files that are included with this course.
| | 00:08 | If you don't have a premium subscription,
then you'll need to create a Maya
| | 00:12 | project and build your own assets
as you progress through the course.
| | 00:15 | Let's take a quick look at
building a Maya project folder.
| | 00:20 | We'll go to the File menu, and choose
Project Window. This shows me the
| | 00:25 | Current Project, it's just the default project.
| | 00:28 | We want to build a new one then will
click New, and then will give it a name,
| | 00:32 | then I'll call it fluid_effects_Project.
I just created in the default
| | 00:39 | location here in my documents Maya projects.
| | 00:43 | If we needed to place it somewhere else
we could browse for different location.
| | 00:47 | And now the Maya project folder
structure has been created, and all the scene
| | 00:51 | files that you build we saved
into that project folder structure.
| | 00:56 | If you download the exercise files,
then you'll need to point Maya at that
| | 01:01 | folder; the project folder of course in
Maya is the home base for all of the assets.
| | 01:07 | If you've got the exercise files
then you can set the Maya Project.
| | 01:10 | We'll go to the File menu, and
choose Set Project, and then navigate.
| | 01:16 | In this case I've got the files on my desktop,
select Desktop, and then choose exercise files, and Set.
| | 01:25 | And now Maya is going to look into that
exercise files folder to find any assets.
| | 01:32 | Now if I go to the File menu and choose
Open Scene it takes me to exercise files Scenes
| | 01:37 | and here all the seen files for the course.
| | 01:42 | I mention one more thing in passing,
which is that you may notice my Maya
| | 01:46 | interface is a light color.
| | 01:48 | It's got a light gray background with
black text. That's not a requirement for
| | 01:53 | the course its just a preference of mine.
| | 01:55 | If you want to use a different Maya Interface,
then you'll do that by modifying
| | 02:01 | the Maya shortcut, and I cover that in
a different course, which is Maya 2011
| | 02:06 | Creating Natural Environments. All right.
| | 02:09 | With our preliminaries out of the way
we can go ahead and get started with
| | 02:13 | Creating Fluid Effects in Maya.
| | Collapse this transcript |
|
|
1. Fluid Pond SimulationSetting up the scene| 00:01 | Let's take a look at this scene file
that I have created for the first exercise
| | 00:05 | in fluid pond simulation.
| | 00:07 | I just want get you oriented to best practices
for Maya dynamics so that you'll
| | 00:13 | have a minimum of issues
when you build your own scenes.
| | 00:16 | The first thing I want to point out is scale.
| | 00:19 | In this scene I've built my models to
one-to-one scale and that means that the
| | 00:26 | bathtub is approximately you know
150cm wide. Let's take a look at the
| | 00:33 | Preferences for that.
| | 00:34 | I am going to go into Window Settings/
Preferences>Preferences and go to the
| | 00:40 | Settings Section here, and you'll see
that the Working Units are set to Linear
| | 00:44 | centimeter and in fact it doesn't matter what value
you choose here in the linear working units.
| | 00:51 | You could choose a different value
such as inch, and what that will do is, it
| | 00:55 | will just make Maya interpret a grid
line as 1 inch long and you'll see it
| | 01:01 | doesn't change the scale of the scene itself.
| | 01:04 | I just prefer to work in centimeters, its just easier.
| | 01:07 | The next thing I want to point out is just
the grid itself. Having a grid setup
| | 01:12 | properly makes it a lot easier for you
to understand how large something is in
| | 01:17 | your world just at a glance's.
| | 01:18 | So let's go into the grid settings,
Display>Grid Options. I've already set
| | 01:24 | them here and you'll see I've got a
Length and width of 200 units; that's just
| | 01:28 | the size of the grid in the perspective view.
| | 01:30 | So if I dolly back in the perspective
view here you'll see it only extends to
| | 01:34 | 200 cm from center to edge.
| | 01:37 | Then we've got a Grid line every 100 units,
or 100 cm, so a major grid line every 1 m,
| | 01:43 | and then Subdivisions of 10.
| | 01:47 | So in other words we have a major grid
line here every 100 units, or 100 cm and
| | 01:53 | then the minor grid line or Subdivision lines every 100/10.
| | 01:58 | And so that means that each one of
these minor lines is 10 cm apart.
| | 02:05 | I have set the Subdivision lines to be a different
color than the Grid lines to make that clear.
| | 02:11 | So that's how I know that my world is
built at one-to-one scale, because if a
| | 02:17 | centimeter are my working units and
the grid is setup to display in decimeter
| | 02:22 | scale here, decimeter is 1/10 of a meter.
| | 02:26 | I can tell just by looking at a glance that my
bathtub is a little bit more than 150 cm wide.
| | 02:34 | Next let's look at our animation preferences.
The first thing we need to make
| | 02:38 | sure is that our timeline is playing
back at the correct speed, and this is a
| | 02:43 | universal consideration for all dynamics.
| | 02:46 | You get go down to your timeline and
right-click on it and go to playback speed.
| | 02:50 | You'll see there are three options.
| | 02:53 | The option that you never want to chose is a Real-time.
| | 02:57 | The Real-time mode will actually skip frames
in a heavy scene, so if you've got a
| | 03:01 | calculation intensive scene and you
choose Real-time then what will happen is
| | 03:06 | your dynamic simulation will break,
because Maya will skip frames in order to
| | 03:12 | maintain an overall playback speed
of approximately 24 frames a second.
| | 03:18 | If the simulations skip frames
then the simulation is corrupted.
| | 03:22 | So you cannot have the Real-time option
when working with dynamics, because Maya
| | 03:26 | calculates dynamics in the history-dependent
fashion, meaning that what happened
| | 03:30 | on frame 50 depends directly
upon what happened on frame 49.
| | 03:34 | And if we skipped frame 49 in order
to maintain an overall average playback speed,
| | 03:39 | then we will have dirty data on frame 50
and the simulation will blow up
| | 03:43 | so we don't want that to happen.
| | 03:44 | We have got other options here, the
default option is Play Every Frame, Free
| | 03:50 | and what that means is it will not skip frames
and it will playback as fast or as low as it needs to.
| | 03:57 | But that means that in a lightweight scene
it might exceed your time base of in
| | 04:02 | this case 24 frames a second.
| | 04:05 | And if the Viewports are running too fast
you are going to get a false idea false
| | 04:09 | idea what your animation looks like.
| | 04:11 | So you don't want to have a Free Playback speed.
| | 04:14 | The only option that works for dynamics
is Play Every Frame, Max Real-time
| | 04:19 | and that again is universal for all Maya dynamics.
| | 04:23 | Meaning, that it will not skip frames
in a heavy scene, but it will also
| | 04:27 | never exceed your current time base of 24 frames
a second or whatever frame rate you've chosen.
| | 04:33 | Okay, so your playback speed has to
be Play Every Frame, Max Real-time.
| | 04:39 | And then finally, one other thing
that's not essential, but is helpful, is to
| | 04:43 | make sure that we are seeing playback
in all of the viewports. To do that
| | 04:47 | I'll go back into my Preferences, there
is an easy shortcut to that if I just go
| | 04:52 | down into the lower right-hand corner
that Animation Preferences.
| | 04:55 | It opens the Preferences dialog but it takes me
directly to the Time slider settings here.
| | 05:00 | I just would change the Update View to All.
| | 05:03 | And that means that when I playback my
simulation, I will see it play in all the
| | 05:08 | viewports not just the active one, very good.
| | 05:12 | So that's our setup for preferences
to build the scene from Maya dynamics.
| | Collapse this transcript |
| Creating a pond| 00:01 | Let's create a Maya Pond.
| | 00:04 | Just so that I can see what I'm doing
a little bit better, I'm going to the
| | 00:08 | Display layers here and hide a few of
these scene elements like the ducky, we
| | 00:12 | won't need him just yet, so I'll toggle
his visibility off, as well as the room
| | 00:16 | surrounding the bathtub. I'll just
toggle it's visibility as well, so that I can
| | 00:19 | actually tumble around and
analyze my scene more clearly.
| | 00:23 | Okay, now maximize the Perspective view
by clicking in it and then tapping the
| | 00:26 | spacebar and I'll create the pond.
| | 00:29 | The Maya Pond is a variation on the
fluid shape node, so you will find it in the
| | 00:35 | Dynamics menu set, so make sure you have
chosen Dynamics, and then you can go to
| | 00:40 | Fluid Effects menu and go to Pond>Create Pond,
and it's created at the origin with default attributes.
| | 00:49 | And you note by the way, that I just
built my scene so that the tub is in the
| | 00:53 | right place for the pond at the origin.
| | 00:57 | So let's go into those Pond attributes
with that pond selected.
| | 01:02 | I'll hold down Ctrl+A to open the
Attribute Editor in Maya and you'll see that
| | 01:06 | I've got the Attribute Editor in a separate window.
That just gives me a little bit more screen real estate.
| | 01:11 | Just up here you'll see the basic attributes.
The most important ones are the Size attributes right now.
| | 01:18 | You don't want to actually scale the pond,
you could scale it uniformly if you
| | 01:24 | had to, if you change this scale to be
equal in XYZ, that's okay, but if you had
| | 01:29 | stretched it so that were non-uniformly scaled like that,
then you'd have major issues with your simulation.
| | 01:36 | So you cannot stretch a fluid container in that manner.
| | 01:40 | So again you can have a scale that isn't one,
you can scale it up or down,
| | 01:45 | but it has to be uniform in all axes.
| | 01:47 | If you want a rectangular pond then you
need to change the Size attributes here
| | 01:52 | in the Fluid Shape node.
| | 01:54 | I'll give my pond a length of 150 centimeters
and a width of 75 centimeters and
| | 02:03 | a depth of 45 centimeters.
| | 02:07 | Now if I tumble around we can see the effects
of that Depth parameter, it was at 3,
| | 02:13 | and that might be okay if I was
just rendering a surface. If I wanted to
| | 02:17 | render a thick volume then it would
definitely need to be a deeper pond.
| | 02:23 | Okay, we have got our pond created
and sized up, and next we'll look at the
| | 02:27 | basic fluid attributes for Maya Pond.
| | Collapse this transcript |
| Understanding fluid node attributes| 00:01 | The Maya Pond is a fluid shape, but not all of the
fluid shape attributes are relevant to a Maya Pond.
| | 00:08 | Let's take a look at the relevant attributes.
| | 00:11 | I'll select that pond and open up the
Attribute Editor with Ctrl+A if it's not
| | 00:14 | already open. The most important thing
to look at in fact is the Base
| | 00:19 | Resolution and that is the density of
the mesh, the surface of the pond.
| | 00:25 | In order to see that we really
want to be in a Wireframe mode.
| | 00:29 | I'll give focus to the main window
and press the 4 key so we can see wires.
| | 00:34 | As I increase or decrease the Base Resolution
you will see we get more or fewer polygons.
| | 00:42 | Sometimes you might not see that happen
in real time depending upon your
| | 00:45 | graphics hardware and if you're not
seeing a change then if you just rewind in
| | 00:50 | your timeline it should update.
| | 00:53 | This of course is the quality of the simulation
and a higher Base Resolution is
| | 00:57 | going to give you better detail on the surface of your pond.
| | 01:01 | You'll notice that it maxes out at a value of 200,
and that's a safe value for most systems.
| | 01:08 | If you increase that Base Resolution
past the value of 200 then you'll see a
| | 01:14 | marked increase in the usage of memory.
| | 01:18 | In other words, it's very RAM hungry.
| | 01:21 | As you increase this Base Resolution, it's
going to eat more and more on your system.
| | 01:26 | I recommend that if you have only 4 GB
of memory on your system that you
| | 01:29 | don't even bother trying to take it up past 200,
because the simulation is going to run so poorly.
| | 01:35 | If you do have more than 4 GB of memory
then you can increase the Base
| | 01:39 | Resolution beyond 200 by simply typing it in,
just be aware that you may
| | 01:44 | experience performance issues. Don't
go crazy in cranking up past 500, that's
| | 01:49 | the ultimate max I would ever go for.
| | 01:52 | Right now when I'm just setting it up
I'll turn it back down to a 100.
| | 01:56 | I can always turn that up or down
nondestructively later to increase or decrease
| | 02:00 | the quality of the simulation.
| | 02:02 | Scrolling down a little bit, we can open up
the Dynamic Simulation section.
| | 02:06 | I just want to point out to you the
Solver type is set to Spring Mesh and that
| | 02:12 | only applies to a Maya Pond.
| | 02:14 | The Maya Pond is a 2D height field.
| | 02:19 | In other words, on each one of
these vertices here it can have a Height value,
| | 02:24 | so it can move up or down and it's connected
to all of its neighbors with springs.
| | 02:30 | We can't change this value if we want our
pond to work, it has to be a spring mesh.
| | 02:35 | Also, if you work with other types of fluids,
for example, if you want fluid
| | 02:40 | smoke or fluid fire, whatever, then
you will probably want to increase the
| | 02:45 | Substeps and the Solver Quality, etcetera.
| | 02:48 | These values do apply to volumetric fluids,
but they do not apply to a pond, which is a 2D surface.
| | 02:55 | In other words, leave these values
where they are and don't change them.
| | 02:59 | There is another section I want to point
out to you just so you understand what it is.
| | 03:04 | If I open up this Liquids section here
you'll see that there's the switch that
| | 03:08 | says Enable Liquid Simulation.
| | 03:11 | You might be tempted to turn this on,
but in fact you should not, because this
| | 03:16 | is using a completely different solver type.
We'll cover that in another
| | 03:20 | course in which we'll actually
do a true 3D volumetric liquid.
| | 03:26 | But the pond, once again, is a 2D simulation
and we don't want, nor can we enable
| | 03:33 | liquid simulation for a pond, so that needs to remain off.
| | 03:37 | And then finally just to make it easier
to see in the viewports, you note that if
| | 03:41 | I deselect the pond it's going to be
hard for me to see because it's the same
| | 03:46 | wireframe color as everything else.
| | 03:48 | So I just want to change that wireframe color really quickly.
| | 03:50 | Select the pond, go back into Shape Node
Attributes and go to the Object Display section.
| | 03:57 | Scrolling down you'll see there's a
Drawing Override section. I'll turn on
| | 04:01 | Enable Overrides and then I can choose
a different color for the wireframe, and
| | 04:05 | that's this color slider here.
I'll scroll this over to a light blue and
| | 04:11 | then when I deselect the pond, you'll
notice that it's in a different color and
| | 04:15 | that will make it easier for me to see
against the other objects wireframes.
| | Collapse this transcript |
| Adding a pond wake| 00:01 | Our Pond has basic attributes of
resolution and size, but without any forces
| | 00:06 | acting upon it we'll not see any ripples in the pond.
| | 00:09 | If I press Play, you'll notice that the timeline updates
but we see no motion in the viewport.
| | 00:16 | Press Stop and rewind back to frame 1.
| | 00:20 | Let's add a fluid emitter and that will
create density, which will allow the
| | 00:25 | pond to create ripples, and this particular
type of fluid emitter is known as a Pond Wake.
| | 00:31 | I'll select the pond and go to the
Dynamics menu set and in the Fluid Effects
| | 00:37 | menu choose Pond>Create Wake.
| | 00:43 | And now what you'll see is at the origin
we have a spherical object and that
| | 00:47 | is the wake fluid emitter, and if it's selected
you'll notice that the pond
| | 00:53 | itself is highlighted in magenta indicating
that there's a connection between those two.
| | 00:59 | Let's switch to a shaded view so
we can see this a little bit better.
| | 01:02 | Press the 5 key and then press Play.
We don't see any motion right now.
| | 01:09 | That's because the Wake Emitter is smaller
than the polygons of the pond currently.
| | 01:16 | So in order to see any ripples, the
Wake Emitter will need to be scaled up.
| | 01:21 | So I'll rewind back to frame 1, grab
the Scale tool and scale that sphere up.
| | 01:28 | Rewind and play that back and you'll see,
ah, there we go, we've got some ripples.
| | 01:32 | You will notice a couple things about this.
| | 01:35 | First of all, that the emitter causes
the pond to push upward and that's just
| | 01:43 | the default behavior for a fluid emitter.
| | 01:47 | If I have that object selected and go to
its Attribute Editor then under Fluid
| | 01:52 | Attributes you'll see Density/Voxel/Second,
and that's just how much force is
| | 01:58 | being exerted upon the pond.
| | 02:01 | With a positive value it's going to
push the pond vertices up.
| | 02:04 | If I give it a negative value it will push it down,
so give that -5 then rewind,
| | 02:11 | playback and you'll see, that's going
to behave much more like what you would
| | 02:16 | expect if you had an object floating in the pond.
| | 02:20 | Additionally, if the Wake Emitter is above or below
the water line, it will not affect the pond.
| | 02:28 | So if I grab the Move tool and pull this up
and then play it back, since it's
| | 02:33 | not intersecting with the pond, we will see no effect.
| | 02:37 | So it needs to be sitting on the water line
or with a Y value in this case of 0.
| | 02:44 | We have got a Pond Wake added and next
we'll actually add some turbulence, so we
| | 02:48 | can create some ripples that will automatically
generate from the emitter.
| | Collapse this transcript |
| Adding emission turbulence| 00:01 | Our Fluid wake emitter is creating ripples in the bathtub,
but only at the beginning of the simulation.
| | 00:08 | If I press play you'll see that we get
an initial kind of burst of density and
| | 00:12 | then things sort of settle down
and those ripples kind of die out.
| | 00:17 | If we want those ripples to continue onward
as if they were an object floating
| | 00:21 | there then we can add turbulence to the emission.
| | 00:24 | In order to see it more clearly, I want
to extend the range of my timeline here.
| | 00:28 | We've got 200 frames in the playback range,
but I just want to click here and
| | 00:32 | drag this out to extend that playback range
to the full animation range of 480
| | 00:36 | frames or 20 seconds. I'll rewind.
| | 00:40 | Again, play back and you'll see
that it will die out eventually.
| | 00:43 | Those ripples will eventually kind of reach
equilibrium and the water will sort of settle down.
| | 00:50 | We want to add some turbulence to that emitter.
Rewind.
| | 00:54 | I want to select the emitter.
| | 00:55 | Sometimes it's a little bit difficult to
select that in emitter in the viewport.
| | 00:59 | You might need to use the Outliner.
| | 01:01 | Window Outliner, select the Emitter,
and open up the Attribute Editor with
| | 01:06 | Ctrl+A if you haven't already done that.
| | 01:09 | You'll be looking for, in the Fluid Attribute section,
| | 01:12 | there is a subsection here that
says Fluid Emission Turbulence.
| | 01:16 | You got the strength of the Turbulence here,
you have got the Speed, which is
| | 01:22 | how fast the Turbulence is going to oscillate,
and then you have got the
| | 01:26 | Turbulence Frequency, which is the size of the noise.
| | 01:30 | I will set my Turbulence amount to
a value up of 2 and then play the Simulation
| | 01:36 | and see what happens.
| | 01:39 | So it doesn't look that much different than
what we saw a moment ago with no
| | 01:42 | turbulence. The reason is that the Speed
is very slow and the frequency is pretty high actually.
| | 01:52 | Stop that and rewind it. I'll set the Turbulence Speed
to a value of let's say 0.5 and then play that.
| | 02:01 | What you will see here if you get in
really close and look, you'll see that
| | 02:06 | within the volume of the Emitter that
we are getting this chaotic movement of
| | 02:12 | the vertices of the pond's spring mesh,
and that's the turbulence in effect.
| | 02:18 | You'll see a speed here 0.5 is
causing it to ripple at a certain speed.
| | 02:24 | Let's play also with the Turbulence Frequency.
A lower frequency is going to give me larger waves.
| | 02:32 | So I will set that Frequency down to
let's say.1 in all axes, X, Y, and Z.
| | 02:37 | Rewind the simulation and play it back.
| | 02:43 | Now I have got a fairly high Turbulence Amount of 2.
| | 02:47 | I have got Turbulence Speed of 0.5
and the Frequency of 0.1, and this is
| | 02:53 | basically producing constant ripples
throughout the animation.
| | 02:58 | If I had a higher speed,
then the ripples will be closer together.
| | 03:01 | If I had a higher frequency,
then the ripples would be more chaotic.
| | 03:08 | I'll increases Speed up to let's say 1, play that.
| | 03:13 | What should you see here is now we're
getting twice as many ripples in the
| | 03:17 | same amount of time. Then the frequency
is the amount of chaos, essentially.
| | 03:23 | If I set that Turbulence Frequency back up to 1 in all axes,
this going to be an extremely turbulent bathtub.
| | 03:32 | So not only are we getting more ripples,
but the ripples themselves are not as uniformly shaped.
| | 03:39 | They're more chaotic.
| | 03:43 | Those are some very extreme settings.
| | 03:44 | I am actually going to take this down
to something that's more workable for the
| | 03:48 | scene I am going to build with rubber ducky.
| | 03:51 | So I'll set my Turbulence down to 0.2,
a Turbulence Speed also 0.2, and then the
| | 03:58 | Frequency I am going to set that way down
to .01 in all axes.
| | 04:03 | That's going to be a very subtle effect that
we might not see too much on this right now.
| | 04:08 | But once we actually get some animation
in this scene, it's actually going to
| | 04:12 | kind of enhance that animation a little bit by
just adding of a slight amount of chaos to it.
| | 04:18 | That's the Fluid emission turbulence.
| | Collapse this transcript |
| Adjusting fluid shader attributes| 00:01 | We have options on how we want to render the pond.
| | 00:04 | Eventually, we will end up converting
it into polygons so we can see how to
| | 00:08 | create a truly refractive material
that closely emulates the look of water.
| | 00:13 | First, however, let's take a look at the attributes
available to us in the fluid shape node itself.
| | 00:19 | In order to see the shading better
I need to have some ripples on the Pond.
| | 00:23 | So go ahead and press Play and just let
that play through for a moment and then
| | 00:27 | press Stop so that then we'll have some ripples.
| | 00:29 | I'll go ahead and render this
with the default shading attributes.
| | 00:33 | Go ahead and click Render the current frame.
| | 00:35 | You'll notice that this is going to render in mental ray.
I have chosen mental ray for a reason.
| | 00:43 | That's because I can use the interactive
production renderer and it's much faster.
| | 00:48 | Let's look at the shading attribute.
| | 00:49 | So I will select that Pond and hit Ctrl+A
to open up the Attribute Editor.
| | 00:55 | I've got that fluidShape node open.
| | 00:57 | We want to look at the Shading sections.
| | 00:59 | So go down here to Shading and open that up
and let's do interactive production rendering
| | 01:04 | so that as we make adjustments here
we will see update in the Render view.
| | 01:09 | I will click on IPR and then just drag a rectangle
around a representative area of the pond.
| | 01:15 | Now we can start playing around with these things.
| | 01:20 | First and foremost is the Transparency.
| | 01:22 | I want to increase the Transparency to nearly white
so that eventually, I'll be able to see through the water.
| | 01:30 | Well, you will notice that as I increase that
Transparency suddenly it became
| | 01:33 | very, very bright and almost overlit. That's because
of the properties in the Surface section here.
| | 01:40 | Let me open that up.
| | 01:42 | You'll see Environment and you'll also
see Specular color here. Those are
| | 01:50 | what are resulting in this overly bright surface here.
| | 01:53 | I am going to reduce the Specular color actually
all the way down to 0 and IPR updates.
| | 02:01 | With the specular color turned off
we can start get a better handle
| | 02:05 | on the Transparency and other attributes
of the Shading for this fluid node.
| | 02:09 | We've also got the Environment section here.
This is the color of the reflections that you see here.
| | 02:15 | I'm actually going to delete all of these color swatches
except for 1 and set it to White
| | 02:23 | and now we'll just basic white highlights.
| | 02:27 | Now scrolling back down into the Shading section
we've got the incandescence.
| | 02:32 | This is also making it look overlit
and I'm just going to once again delete
| | 02:36 | all of these color flags until I've only got one
and then just make sure that's set the black.
| | 02:42 | So there it is black. No incandescence.
| | 02:47 | Then finally the color itself you will notice
that it's got a gradient and you
| | 02:52 | will notice that it's got an input here.
| | 02:54 | I am going to change that input to Density
and what that means is that the color
| | 03:00 | will be different depending upon the height of the pond.
| | 03:03 | Then I will just adjust this Gradient here.
| | 03:07 | Maybe I only need two color flags here.
| | 03:09 | I'll delete green one in the center
and I'll set this one on the far left to black
| | 03:16 | and the one in the far right is already at white.
| | 03:20 | I can move those around to change the Contrast.
| | 03:25 | Then finally, yes, I can change the Transparency,
maybe make it even more transparent.
| | 03:32 | So with a little bit of playing around here
we can get pretty decent looking water.
| | 03:36 | However, we will not ever get any true refraction.
| | 03:39 | You will notice that there is a refractive
index value here, that only changes
| | 03:44 | the behavior of the reflections.
| | 03:47 | With the Shading attributes built into the fluidShape node
we're not able to get truly refractive surfaces.
| | 03:54 | So will do a full render on that
and that's the result that we get after
| | 04:00 | adjusting some of the fluidShape note shader attribute.
| | Collapse this transcript |
| Matching a wake emitter to an object| 00:01 | We have got our pond built and an emitter
and some basic fluid shape attributes adjusted
| | 00:05 | and now we are ready to start integrating
animation in this pond simulation.
| | 00:11 | The first step to that is matching the emitter to the
shape and size of the object that we want to animate.
| | 00:19 | I have got my rubber ducky over here
on the Display layer, so I will just
| | 00:22 | turn that display layer visibility back on
and dial in a little bit with alt right
| | 00:27 | and tumble around with alt left
and what we want to do is just scale that emitter.
| | 00:33 | I want to select it.
| | 00:35 | It's kind of difficult to select sometimes
in the viewport, so you want to
| | 00:39 | make sure that you actually have the emitter selected.
| | 00:41 | I will go to Window Outliner and select that emitter.
Okay.
| | 00:47 | Now I will grab the Scale tool and then
just shrink that emitter down.
| | 00:51 | It's totally fine and okay for me to scale
the emitter non-uniformly; unlike with the
| | 00:58 | pond itself, I can't scale the pond to non-uniformly,
but I can scale the emitter anyway I need it to be.
| | 01:07 | So that's no problem.
| | 01:08 | Let's go to the four viewport layouts,
we can see that a little bit more clearly.
| | 01:12 | I will tap the spacebar and the emitter is currently selected,
so I can just go ahead and press the F key.
| | 01:18 | but if I hold down Shift+F, I can zoom in all the viewports.
| | 01:22 | My side view is currently a shader view,
so I can focus to that side view and
| | 01:28 | then press the 4 key, so we can see better.
| | 01:31 | Okay, so I am just scaling that emitter
so that it fits the ducky and maybe move
| | 01:36 | it a little bit if I need to, so that it kind of fits his body.
| | 01:41 | Then finally I just need to link it to the ducky.
| | 01:45 | Ducky is being controlled by this NURBS curve here,
so that's the parent of the entire ducky model.
| | 01:51 | I just want to link the emitter to that
Ducky control object, once again,
| | 01:57 | I will go to the Outliner, here's the emitter.
I just want to middle mouse drag that
| | 02:03 | and drop it onto ducky control and
that will parent it to the control object.
| | 02:07 | If I open up the control object's hierarchy,
we can see that it's got lots of
| | 02:12 | children here including now, the PondWakeEmitter.
| | 02:14 | Now if I select the ducky control and
use the Move tool, I should be able to
| | 02:20 | move the duck and the emitter all in one go.
| | 02:26 | All right, that's all there is to that.
We've got our emitter sized and shaped,
| | 02:30 | and also linked so that it will follow the model.
| | Collapse this transcript |
| Testing with Interactive Playback| 00:01 | Now the real fun begins.
We can actually move the duck through the water
| | 00:06 | and watch the ripples in Real-time.
This will allow us to test our simulation
| | 00:11 | before we've even created any animation.
| | 00:13 | This is done through method called interactive playback.
| | 00:17 | In order to see what we're doing
we're actually going to need to reduce the
| | 00:21 | transparency on the fluid shape
just so that will be able to see a surface.
| | 00:26 | I'll go ahead and select that fluid,
and go to it's Attributes, Ctrl+A and just in
| | 00:31 | the Shading section turn the Transparency
all the way down while we are testing.
| | 00:35 | When we finish we can turn it back if we want.
| | 00:38 | Okay, I'll select the ducky control object
and maximize the perspective view.
| | 00:48 | So with ducky control selected and
the view maximized, I've got 20 seconds of
| | 00:53 | animation available in my timeline.
I want to grab the move tool and go into
| | 00:58 | the Dynamics menu Set and choose
Solvers>Interactive Playback. Now I can
| | 01:07 | actually move the duck around and
cause it to affect the simulation.
| | 01:13 | You can see here that it is working, but
we just got way too much going on with our wake.
| | 01:21 | So I just having done that it tells me
that I need to reduce the amount of
| | 01:26 | overall density being emitted from that wake.
| | 01:28 | I rewind the timeline and I want to
select the Emitter, go in the Outliner to do that.
| | 01:34 | Open of Ducky Control and select that Emitter,
go to the Attributes, Ctrl+A.
| | 01:39 | We still want to set the density down,
we are getting too much negative density.
| | 01:46 | I'll give the Negative Density of let's say -1,
close this windows, rewind the Simulation,
| | 01:55 | select the ducky control object once again,
and again if you have
| | 01:59 | difficulty with that you can use the Outliner.
| | 02:02 | So make sure you got ducky_control selected,
and go back to Solvers>Interactive Playback.
| | 02:09 | Now we're getting a much more realistic result;
we just had too much density being emitted.
| | 02:14 | Once we have done that we can see that
we could probably use some fine tuning.
| | 02:21 | In the next movie we will control the simulation quality.
| | Collapse this transcript |
| Controlling dynamic simulation quality| 00:00 | We got a basic setup and our emitter
is working, but our quality for the
| | 00:05 | simulation isn't as good as it could be.
| | 00:08 | If I select the ducky_control object
with the Move tool, I can go back to
| | 00:12 | Interactive Playback and illustrate that.
It's looking a little bit rough around the edges.
| | 00:18 | We're getting very fast performance,
but our simulation isn't of the greatest quality.
| | 00:22 | You can see that most specifically if you get in close.
| | 00:28 | Because of the low definition of the pond shape,
there aren't very many vertices nearby.
| | 00:34 | We're seeing this kind of interesting look here, where it's
not really conforming well to the shape of the emitter.
| | 00:43 | What we need to do is simply increase
the overall resolution of the pond.
| | 00:49 | I'll select that Pond, go to the Attributes,
Ctrl+A, and we've got the Base Resolution.
| | 00:54 | We can turn that up, let's turn it up
all the way to 200; I have got a pretty
| | 00:59 | fast computer here and so it should be okay.
| | 01:01 | Go ahead and close these Windows here,
minimize the outliner, we need that again, back out a bit.
| | 01:10 | Rewind the timeline and go back to
Solvers>Interactive Playback and give that a go.
| | 01:15 | You'll see with the value of 200
it's looking quite a lot better.
| | 01:21 | Getting close there once again you'll see that
the pond is not really conforming
| | 01:26 | very well to the shape of the duck.
| | 01:29 | We need an even higher resolution to the pond.
| | 01:33 | I just want to warn you again, in your own scenes,
on your own computer,
| | 01:37 | you may not be able to push it up pass 200.
| | 01:40 | The performance may not be good enough,
and in that case what I would recommend
| | 01:44 | is you can actually scale the emitter down slightly,
so it's little bit smaller than the object.
| | 01:50 | And that will help to try to prevent
some of those issues, okay.
| | 01:53 | But I have got a fast computer here in this case,
and so I have no problem with
| | 01:57 | just selecting the pond and
increasing the base resolution.
| | 02:01 | You know by the way, that some of the
most basic attributes are here in the
| | 02:04 | channel box, so I don't even really need to
open the Attribute Editor.
| | 02:07 | Base Resolution, I'll set up to 300 and back out,
rewind, grab the ducky_control object, grab the
| | 02:19 | Move tool once again, Solvers>Interactive Playback
and you'll notice now that it's playing more slowly.
| | 02:26 | We're not getting real-time performance anymore,
but we are getting a much better result near the emitter.
| | 02:33 | We should probably check in to see
what our playback speed is.
| | 02:36 | I'll go to the Display menu and choose
Heads Up Display>Frame Rate.
| | 02:44 | That way if I'm playing or if I'm in interactive
playback, I'll be able to read out the speed
| | 02:50 | of the current simulation, so
it's not quite running in real time.
| | 02:54 | I am getting something averaging
around 15 or 20 frames per second.
| | 02:59 | It's important that I know that I'm
not playing in real time, because if I
| | 03:05 | thought I was playing in real time,
I might do things like change the simulation rate
| | 03:09 | in order to speed it up and that
would be wrong, because it's actually
| | 03:13 | playing at the correct speed in the simulation.
It's just that we're not seeing
| | 03:18 | it update in the timeline in real time.
| | 03:20 | In other words, it's working fine.
It's working just perfectly.
| | 03:25 | I might scale that emitter down just a little bit
to try to hide that seam,
| | 03:31 | so I'll just scale it down ever so slightly
to be a little bit smaller than the duck.
| | 03:36 | Then back to my ducky_control object,
back to frame 1 with the Move tool,
| | 03:40 | and do one final test on this and see.
| | 03:47 | I think we're pretty good to go;
our dynamic simulation is essentially doing
| | 03:51 | what we needed to do at this point.
| | Collapse this transcript |
| Making collisions| 00:01 | For more realistic simulation we'll
want the ponds to collide with the tub,
| | 00:07 | so that the ripples will actually
bounce off the sides of the tub.
| | 00:11 | If I just play the simulation now
it's a pretty close approximation to that
| | 00:16 | because the pond is actually not that
much larger than the tub itself, but we
| | 00:21 | can make that lot better.
| | 00:23 | In order to make it more clear what's happening
I'm going to increase the emission turbulence.
| | 00:27 | I want to select the emitter that's in the outliner under
| | 00:31 | the ducky_control hierarchy, select the emitter
and go to its Attributes, Ctrl+A,
| | 00:36 | and in the Fluid Emission Turbulence,
I'm going to set the Turbulence amount to 5
| | 00:40 | and increase the speed to 1.
That way we will be able to see this much more clearly.
| | 00:47 | Playback the simulation, and here with
no collisions you'll see that there is a
| | 00:52 | kind of delay between when the ripple
hits the tub wall and when it bounces off,
| | 00:59 | because it's actually not colliding with the tub just now.
| | 01:02 | But to make it collide is quite simple.
| | 01:04 | All we need to do is select the pond and then
select the object that we want to collide with.
| | 01:09 | Before I do that I want to point it out
by the way that we've got a frame rate
| | 01:14 | of about 20 frames a second currently
with no collisions, okay.
| | 01:17 | So I'll select the pond and I'll also
select the tub geometry so I can hold
| | 01:22 | down Ctrl and select both of those,
so I've got the pond selected and the
| | 01:27 | geometry selected, and go into the
Fluid Effects menu and choose Make Collide
| | 01:34 | that's all there is to that.
| | 01:35 | Now if I playback my simulation, you'll
see that I'm getting about 15 frames a second now,
| | 01:42 | we're getting a better results
in terms of the ripples but we're
| | 01:45 | also seeing a little bit of kind of weirdness
around the edges and does not
| | 01:50 | really desirable, you can see how that
kind of looks kind of strange, we get in
| | 01:54 | really close on that stop the simulation and getting close.
| | 01:57 | And you can see that it's colliding
but we're having some sort of boundary
| | 02:01 | condition issues here and additionally
again my frames per second have gone down.
| | 02:06 | Well, there is a solution to both of
these problems, which is don't collide with
| | 02:11 | the object that you want to render.
Create a proxy object or some sort of simple
| | 02:16 | geometry that has a lower polygon count
and that is not quite the same size as
| | 02:23 | the rendered collision object.
I'm going to delete the collision ability, okay.
| | 02:29 | So there's no menu item in here to
delete collisions. If you look in your
| | 02:35 | Fluid Effects menu we can make
collide but we can't remove collide.
| | 02:38 | To do that we have to select the object
that we've made collisions with, select
| | 02:43 | the tub and you need to go in to the hyper graph
Window>Hypergraph: Connections,
| | 02:48 | open that up and the collisions are created
by this node here call the GeoConnector node.
| | 02:56 | To remove collisions you just have to
delete this GeoConnector node, so select
| | 02:59 | the node in the Hypergraph and press the Delete key
on the keyboard, now we have no more collisions.
| | 03:07 | To get a better result with this and
also a faster result we'll use a proxy object.
| | 03:12 | I created that here, you'll see in the outliner>tubProxy
and if I press the 4 key we can see it.
| | 03:19 | I've created this proxy object that
has a lower polygon count and its surface
| | 03:24 | only exists in the area where it's possible
for those collisions to take place.
| | 03:29 | In other words, I don't need any
geometry up here because the pond can't
| | 03:33 | possibly collide with it there, okay.
| | 03:36 | So I've got my proxy object selected
and I'll also select the pond Ctrl+Click on that
| | 03:41 | and Fluid Effects>Make Collide,
go back to a shaded view press the 5 key
| | 03:49 | rewind get in a little bit closer here,
so we can see that better.
| | 03:55 | Beacause the proxy object is a little bit larger,
| | 03:58 | the collisions are kind of happening behind
the renderable tub surface.
| | 04:05 | I can actually change that up, I can
actually scale the proxy object
| | 04:11 | or I can also use a transform component tool
and that'll actually move all the polygons out.
| | 04:16 | The Transform Component tool is
probably the best thing to use in this case.
| | 04:20 | I'll go back to a Wireframe View with
the 4 key and so I'll go to the Polygons
| | 04:25 | menu set and choose Edit Mesh>Transform Component.
What this will allow me
| | 04:33 | to do is to move all the polygons towards
or away from the surface, so I'll need
| | 04:38 | to find a manipulator; so it's going to be kind
of hiding down here, there's a manipulator here.
| | 04:44 | And I just want to move it in the local z axis.
| | 04:48 | So you see what that Transform Component tool
is doing is it's moving the
| | 04:52 | entire surface towards or away.
t's different from scaling of course,
| | 04:57 | because it's going to maintain a more
consistent distance in an envelope around
| | 05:02 | the object. I want to go up to the top view, maybe
we can see that even more clearly in the top view.
| | 05:10 | So if I extend this proxy object out a
little bit more we can hide that funky
| | 05:15 | edge that we saw on our pond, so
that we won't get that weird result.
| | 05:21 | How much this needs to go out we're not
really sure but we know that it needs to
| | 05:25 | be in a larger than one pond polygon,
something like that is probably fine.
| | 05:32 | I can exit out of the Transform Component tool
just by using any other tool like
| | 05:36 | the Move tool or whatever. Looks like
I've been dropped into component mode
| | 05:40 | here, so I can go back to object mode by
right-clicking on one of these vertices
| | 05:44 | and choosing Object mode, okay.
| | 05:48 | Back to shaded view with the 5 key, rewind,
playback, and see about our collisions.
| | 05:56 | Much nicer, you can see we don't have
so much of those weird issues and if we
| | 06:01 | smooth this surface we would
actually even get a cleaner result.
| | 06:06 | So that's one of the tricks of the trade here,
using a proxy object to clean up the edge
| | 06:12 | and also to improve playback performance.
| | Collapse this transcript |
| Setting an initial state| 00:01 | Currently our water is completely placid
on frame one and there are no ripples
| | 00:07 | at the first frame of the animation.
| | 00:09 | In fact that's what I'm going to
end up doing for my final version of this,
| | 00:14 | but we also need to look at how we can
set it up so that the fluid will actually
| | 00:18 | be in motion on frame 1 and that's
done by setting the initial state.
| | 00:24 | I'll play this simulation through a little bit
with a high turbulence on it, so
| | 00:28 | we can get lots of nice ripples.
| | 00:29 | I'll just let that play through for
several hundred frames until it kind of
| | 00:34 | propagates waves through the entire tub.
| | 00:37 | So I have let it play through a little bit
and I'll stop it before it reaches the en.d
| | 00:41 | At this stage now I can set
the initial state for the pond, meaning
| | 00:47 | that what I see currently will be the new
state at frame 1. I want to select the pond.
| | 00:54 | Make sure that it is selected, you know,
you may not get selection highlighting
| | 00:58 | unless you're in a wireframe view, so
you can switch out to wireframe with the 4 key,
| | 01:02 | if you're not sure if your pond is selected,
go back to shaded view with the 5 key
| | 01:06 | and we want to go into the Dynamics menu set
and choose Fluid Effects>Set Initial State.
| | 01:16 | Now when I rewind back to frame 1
we see no change, because what we saw at
| | 01:22 | frame 447 is now the state on frame 1.
| | 01:28 | I also want to point out that there is
another menu item that's very similar.
| | 01:32 | If you look under Solvers you'll see
initial state, this only works for rigid
| | 01:37 | bodies and soft bodies. So if you tried
to set initial state for a fluid using
| | 01:42 | this menu it would do nothing so you
need to go through the Fluid Effects menu.
| | 01:46 | All right very good.
| | 01:48 | Now if I press Play here we're still
getting a lot of emission turbulence.
| | 01:52 | Iwant to turn that back down again, let
the ripples sort of settle down and then
| | 01:56 | set the initial state again, go back to
my outliner, Window>Outliner.
| | 02:03 | I want to select the emitter, it's a child of
the ducky control object, so I'll select
| | 02:07 | that emitter, go back to the Attributes,
Ctrl+A, and turn the Turbulence Values
| | 02:13 | back down, turbulence amount of .2
and a speed of .2 and just play the
| | 02:20 | simulation through for a few seconds until it
settles down a bit and that looks pretty good.
| | 02:26 | I will just make sure that I have the
pond selected and I can set the
| | 02:30 | initial state once again;
Fluid Effects>Set Initial State.
| | 02:36 | That will be the new state on frame 1.
| | 02:40 | Now if necessary, we can remove the
initial state as well, just select the pond
| | 02:45 | fluid and go back into the Fluid Effects menu
and choose Clear Initial State.
| | 02:50 | I'm not going to do at this time,
I want to leave this in this state currently,
| | 02:54 | so that if we open up the finished
version of this file, we'll actually be in
| | 02:58 | this condition. I'm actually going
to save this now as a finished version,
| | 03:05 | initial state, finished.
| | Collapse this transcript |
| Keyframing emission| 00:01 | Setting the initial state is necessary
if you want your pond to be rippling on
| | 00:06 | frame 1 of the animation, in this case
what I want actually is a perfectly flat
| | 00:12 | and placid water surface at
the first frame of my animation.
| | 00:17 | Now you'll note that even if you have
a low turbulence value that when you
| | 00:22 | press Play you'll still get a burst of
emission at the very beginning of the
| | 00:27 | simulation. Now you could let this
play out and you know get to sort of
| | 00:33 | equilibrium state and then set the initial state,
so that the water would be almost completely flat.
| | 00:38 | But there's a trick to this that we can use
to kind of bypass the initial state entirely.
| | 00:45 | We can keyframe the emission rate; rewind back
to frame 1 and I want to select that emitter.
| | 00:54 | I can go into the Channel box or the Attribute Editor.
What I'm looking for
| | 00:58 | is the density emission rate,
scrolling down and here it is Fluid Density
| | 01:05 | Emission. Remember we set that to a
value of -1. I'm going to key that, so it'll
| | 01:11 | slowly increase over a period of about three seconds,
four seconds, and that will eliminate those ripples.
| | 01:18 | On frame 1 of my animation I'll set the
Fluid Density Emission to value of 0 and
| | 01:24 | press Enter or Return than I want to key that.
I'll select the name of the
| | 01:28 | Attribute and go to the Channel menu
and choose Channels>Key Selected.
| | 01:34 | Its important that I'm only keying this
one attribute, I don't want to key any of
| | 01:37 | this other stuff, so don't use the S key.
| | 01:40 | All right, so I can play that through
and you'll see nothing happens, there is no
| | 01:45 | emission. I'll just go up to about
frame 100, it's make it exactly frame 100
| | 01:52 | and set the Emission rate to what I wait to be
for the final animation and that
| | 01:56 | was a value of -1, press Return or Enter,
select the name and choose Channels>Key Selected.
| | 02:05 | Now that emission rate is going to decrease
from a value of 0 at frame 1 to
| | 02:10 | value of -1 at frame 100. I'll rewind,
playback the simulation and because it's
| | 02:17 | slowly increasing in emission we
don't actually get a ripple coming out.
| | 02:23 | Now I could just actually start my animation
at frame 100 or frame 101 and
| | 02:28 | I have no need to set the initial state at all.
| | Collapse this transcript |
| Keyframing an object in a pond| 00:01 | Later in the course we will see
how to make our objects float.
| | 00:04 | That's a cool technique where we can
have the position and rotation of an object
| | 00:10 | to be partially determined by the
ripples in the pond or an ocean.
| | 00:17 | In this case we want to start small.
| | 00:19 | I just want to create standard ordinary
traditional keyframes on my ducky and
| | 00:23 | cause the wake to be generated
from the position of the emitter.
| | 00:27 | Now to make that happen, I am going to
want to disable evaluation on the fluid shape,
| | 00:33 | because to make keyframes we need to
scrub through the timeline, but if
| | 00:38 | I scrub to the timeline here, my fluid is
going to go haywire, just going to go crazy.
| | 00:43 | This is just an example of the fact
that you cannot scrub in the timeline
| | 00:48 | with maya dynamics because they are history
dependent meaning that, what happens on the
| | 00:53 | current frame depends upon
what happened on the last frame.
| | 00:57 | If you skip around then the simulation
is not going to work right.
| | 01:00 | Okay, so I am going to rewind back to Frame 1
and I am going to disable evaluation for the fluid.
| | 01:07 | Now we can do that in two ways.
| | 01:09 | We can select the fluid and then go to
its attributes, Ctrl+A, and we can turn
| | 01:15 | Disable Evaluation on; and that will be
just local for this one shape, so now if
| | 01:22 | I scrub through here nothing happens.
| | 01:26 | Okay, let me show you the
other way that you can do this.
| | 01:29 | So I will turn Disable Evaluation off,
so that it's reenabled and if you got
| | 01:34 | more than one fluid in your scene you
might want to use the Evaluate menu.
| | 01:39 | Go into the Modify menu and go to Evaluate Nodes
and we can globally disable
| | 01:47 | different dynamics and IK and so on.
| | 01:49 | I want to warn you at this time that
sometimes the state of these little
| | 01:54 | checkboxes does not correctly indicate
the state of evaluation in the scene.
| | 02:00 | So just forewarned its forearmed, sometimes
this checkbox might be off and yet
| | 02:06 | evaluation is still working and if that happens
to you can just go up here to
| | 02:11 | Evaluate All, to turn everything back on again
and come back into the menu and
| | 02:16 | turn everything off or turn off the things that you need to.
| | 02:19 | All right, now turn Fluids off and now
I can scrub through here, no problem.
| | 02:23 | I want my animation to start on Frame 101,
remember we'd made a run-up.
| | 02:29 | Instead of setting the initial state
in this version of the scene, I have got
| | 02:33 | animation on the density emission.
| | 02:36 | So it's ramping down from a value of 0 at frame 1,
to a value of negative 1 at frame 100.
| | 02:44 | So my animation proper is going to start on frame 101.
| | 02:46 | I will select a ducky control object and I only need
to keyframe some of its transforms.
| | 02:54 | I'm not going to keyframe the elevation or the Y position.
| | 02:59 | I am going to leave that just constant.
| | 03:02 | As far as rotations, really I only need
to keyframes the Y rotation, which is its
| | 03:08 | sort of direction of travel and the Z rotation,
which is tilt up or tilt down.
| | 03:14 | In summary the only channels I only need
to keyframe are, Translate X, Translate Z,
| | 03:21 | Rotate Y and Rotate Z. So I held down
the Ctrl key and clicked on those four
| | 03:28 | channels and the ducky control transform node.
| | 03:31 | I will go the Channels menu
and choose Channels key selected.
| | 03:37 | All of those highlight in red indicating
that there is an incoming animation
| | 03:41 | curve and you see I have a keyframe here at frame 101.
| | 03:45 | Now I want to create some tilt here,
so I will get in a little closer, grab the
| | 03:50 | Rotate tool and just tilt the ducky up
a little bit and maybe actually position
| | 03:55 | it up a little bit to while I am at it.
| | 03:58 | And go ahead into Channels key selected.
| | 04:02 | Now from now on, if I want to make more
keyframes, I can just turn on Auto key,
| | 04:06 | which is down here in the lower right
hand corner of the Maya Interface, click
| | 04:09 | on that little skeleton key icon and now
any of these channels that have already
| | 04:15 | been keyed will have new keys
placed on them just automatically.
| | 04:19 | Very good, so I scroll down to some
point later in time, let's say frame 220 or so
| | 04:27 | and I will just move the object forward.
| | 04:32 | And when I release the mouse, a
keyframe is created automatically.
| | 04:37 | Let's see what that looks like.
| | 04:38 | So I rewind back to Frame 1, I go back
up to the Modify menu and chose Evaluate
| | 04:43 | nodes, Evaluate All and then play the simulation.
| | 04:48 | Lets give focus to the Camera view here,
so right-click in the Camera View and
| | 04:53 | tap the spacebar to maximize that.
| | 04:57 | And the first 100 frames are of course our run up
and then the animation starts on frame 100.
| | 05:02 | All right, very good.
| | 05:10 | Now we could probably improve that.
We could collide the fluid with the ducky so
| | 05:14 | that we will get ripples coming off the ducky.
| | 05:16 | I will leave that as an exercise for you.
| | 05:19 | Additionally we could do better job of animating this,
we can cause him to turn and move around.
| | 05:25 | Again you play around with that and
have fun with that, but this is just the
| | 05:29 | essential technique here of creating keyframes
for the wake emitter.
| | Collapse this transcript |
| Rendering raytraced water| 00:01 | Our next step in the quest for realism
is to add a refractive raytraced material
| | 00:06 | to our water surface.
| | 00:08 | But before we do that I want to correct
one small issue with the simulation,
| | 00:13 | it has to do with the animation.
| | 00:15 | If I press Play here you'll see we reach
frame 100 the ducky starts moving,
| | 00:21 | but our emission is too great here.
| | 00:24 | If I continue playing that you'll
| | 00:28 | see that it's, it's just kind of too
great of the negative density emission.
| | 00:33 | So we can go ahead and change that keyframe.
I want to select the Emitter, and
| | 00:40 | if you've trouble selecting the Emitter
of course use the Outliner.
| | 00:46 | I just want to adjust the keyframes.
| | 00:49 | I can do that from the graph editors
probably easiest; Window>Animation Editor>
| | 00:53 | Graph Editor and press the F key to frame that
and we've got a value of -1 here at frame 100.
| | 01:02 | Let me select that keyframe and appear
in the value field, I'll give a value of
| | 01:07 | instead of -1, I'll make it -.5,
reduce the Intensity of that emission.
| | 01:13 | Let's see what that looks like, Rewind, play it back.
| | 01:20 | Additionally one thing I can also do,
is I can change the run up so that the
| | 01:24 | run up is happening while the ducky
is starting his motion, in other words,
| | 01:30 | basically the Emitter is already at full
strength by frame 100, but I can opt to
| | 01:36 | make the Emitter run up to full strength
during the first few frames of the
| | 01:41 | animation proper.
It's kind of a clever thing that we can do.
| | 01:46 | Let's do that I want to turn off the
Evaluation for a moment here evaluate nodes,
| | 01:51 | let's turn fluids off so we can scrub through here
and not see any issues.
| | 01:57 | Basically, I want the run up to happen
during the first few frames of motion here,
| | 02:03 | and probably the best way to do
that is again from the Graph Editor.
| | 02:09 | I'll say, let's say this last frames here,
that keyframe, I'll set that to let
| | 02:15 | say frame 120 and then the first one
we'll have Start at frame 100.
| | 02:23 | So in fact now in this condition it's going to increase
in negative density over a period of about 1 second.
| | 02:31 | Now that I've changed those keyframes,
I'll re-enable a valuation, Evalue All,
| | 02:36 | and then play the simulation.
| | 02:39 | Now off course my run up of a 100
frames is even really strictly necessary,
| | 02:42 | because I have change the behavior of the wake,
there I think I've got a better result.
| | 02:52 | Very good, so if we are happy with that simulation
then now we can move on to playing with Shaders.
| | 02:58 | In order to see this better, we need to
have some state to the fluid. In other words,
| | 03:03 | it can't be perfectly flat and or we won't
be able see the result of our materials.
| | 03:08 | So I have parked my animation at a
representative frame here, and in order to
| | 03:14 | assign a new material to the Fluid,
I'll need to convert it to polygons.
| | 03:19 | I want to selected it; let's go
into Wireframe, I'll press 4 key,
| | 03:24 | make sure I have selected that Pond.
| | 03:27 | And go once again to the Modify menu and this time
we want to go to Convert>Fluid to Polygons.
| | 03:34 | Now be aware that this is a one-way process,
once you do this you can't go back.
| | 03:40 | So you probably need to save your scene
before you do this and then save it to
| | 03:44 | a new version immediately afterwards;
Convert>Fluid to Polygons. All right!
| | 03:50 | And now the only thing we will see
here now is that the object looks slightly
| | 03:55 | more dense than it did before. Now
we'll see it's as polySurface 1 here,
| | 03:59 | let's go to the Outliner, investigate that.
What have we got?
| | 04:03 | We've got our Pond, which is the actual
shape node and then we got polySurface,
| | 04:09 | which is the Pond to Polygons.
I really want to rename that.
| | 04:12 | Okay I'll call this Pond, Polygons or pondPolySurface 1
is good enough. That way I know what I am dealing with.
| | 04:22 | Once it's been converted to polygons
now I can assign whatever material I want to it.
| | 04:26 | Of course I don't want to delete the
construction history, because if
| | 04:29 | I did that then you would freeze the polygons
in their current state, all right.
| | 04:36 | So with focus on the main window here,
I'll press the 5 five key so I can see shading.
| | 04:41 | I want to assign a material.
With that pondPolySurface selected
| | 04:47 | I'll right-click and choose Assign New Material.
| | 04:52 | Since I am using mental ray I could
use MIA Material X and use the Glass preset,
| | 04:57 | but I want a little bit more control over this someone.
| | 05:00 | I want to have some amount of ability
to sort of fine tune it, and it's easier
| | 05:04 | to do that if I use of the Blinn material.
We'll click on Blinn, I want to rename that.
| | 05:10 | I want to call it waterBlinn.
| | 05:15 | So I have got the Color here of course,
change that to blue or whatever,
| | 05:20 | but you'll see that it's kind of hard to tell
what I'm doing, because I've got the objects selected.
| | 05:27 | What I want to do is actually just in
the Attribute Editor copy this tab off,
| | 05:31 | and then I can deselect the object.
| | 05:32 | I can play around with the attributes here.
| | 05:36 | So for water we actually want the color
to be black it's not going to have any
| | 05:39 | Diffuse reflections or we turn the Diffuse amount down
all the way, either would achieve the same result.
| | 05:47 | For the Specular amount and reflectivity,
we can kind a play around with that.
| | 05:51 | Specular Color, Eccentricity, Specular
Roll Off that's all that affect the highlights.
| | 05:58 | So with a High Roll Off and the Low
Eccentricity we're going to get really kind
| | 06:02 | of sharp, shiny highlights it's kind of focused Highlights.
| | 06:08 | Reflectivity is set to .5 by default, which means
it's going to be uniformly reflected throughout.
| | 06:13 | Let's do a test render of this, so go
ahead and click Render and it's going to
| | 06:20 | render in mental ray, which is Draft Quality Settings.
| | 06:23 | So currently we're getting reflections
but we're not getting any refractions.
| | 06:27 | Let's go ahead and store that image by
clicking keep image, back in my Material
| | 06:32 | I want to scroll down and I want to enable refractions.
| | 06:37 | I'll go to Raytrace Options and turn on Refractions.
| | 06:41 | Now you will need to make sure that either
you've got mental ray as your renderer
| | 06:46 | or if you're using the Maya software renderer
then you've gone into the
| | 06:49 | Render Settings and enabled raytracing.
| | 06:52 | The Refractive index here I want to be
the same as water, which has a IOR index
| | 06:57 | of refraction of 1.333.
Go ahead and do another rendering of that.
| | 07:03 | Now we're still seeing this black and that's because
we need to have a greater transparency.
| | 07:09 | So I'll increase the Transparency up to
almost Fully Transparent and render.
| | 07:17 | Now we're actually getting refractions.
| | 07:18 | If we want to see that a little bit
more clearly you know what I can do, is in
| | 07:22 | my Display menu here, and Display layers
I can turn the tub off and turn the room on,
| | 07:27 | and the room actually has a tiled texture on it.
| | 07:31 | So we can see those refractions a bit more
clearly when we've got a tiled texture.
| | 07:35 | All right!
| | 07:36 | We can see here now with Raytraced refractions
that we can actually see the ripples a lot more clearly.
| | 07:44 | Now this is a very simple raytrace effect.
If you want to do a more
| | 07:48 | sophisticated version of this, then you
want to build your own water shader .
| | 07:53 | We're not going to cover that in this course,
because it sort of off topic.
| | 07:57 | But I get cover in another course, which is called
Creating Shared Networks in Maya and Mental Ray.
| | 08:03 | It goes into the process of creating
what's called Dielectric Shader,
| | 08:07 | which is not uniformly reflective and not uniformly opaque.
| | 08:13 | If you want to learn how to do a more interesting
baroque version of this,
| | 08:17 | then go look at that other course here
on the lynda.com online training library.
| | Collapse this transcript |
| Caching a fluid| 00:01 | Before you can render a dynamic simulation in Maya
you'll need to bake or cache that simulation.
| | 00:08 | What that does is it calculates all the dynamics
and then stores it on disk, and
| | 00:14 | that way when it's rendered it will behave
the same way each time a frame is
| | 00:19 | called up on a batch render.
| | 00:22 | If you don't cache your simulation, then
when you do a batch render you may get
| | 00:27 | unexpected results and they could be quite unpleasant.
| | 00:30 | Your fluid may explode or do something completely
different than what you saw in the viewport.
| | 00:36 | Therefore caching is not optional, so before
you render you need to cache your fluid.
| | 00:42 | In this case I have already converted
the fluid to polygons. You can cache the
| | 00:45 | fluid before or after converting or you can
catch a fluid without converting at all, of course.
| | 00:51 | What I'll do is, I'll select that Pond
and go in the Dynamics menu set and
| | 00:57 | choose Fluid nCache>Create New Cache,
and I want window into the Options.
| | 01:04 | Now what you'll see here's the Cache
directory, this is where the files will
| | 01:08 | be stored in the current projects data folder.
It will create a folder just
| | 01:15 | using the name of the current scene file.
| | 01:18 | You know what I am going to do, is I'm
actually going to think ahead and I am
| | 01:23 | going to put the word Finished here,
because once I'm done with this I'm
| | 01:28 | actually going to save it out again in
that Finished State, and when I add this
| | 01:33 | scene here that way at least the Cache
directory name will match my file name,
| | 01:38 | just thinking ahead a little bit.
| | 01:41 | Additionally, you've got the time range here
and the default is the time slider,
| | 01:45 | but in this case you know I have a run up
of 100 frames and I am never going to
| | 01:51 | render that, and just to save time I am
not going to bother cashing in either.
| | 01:55 | I've set the Start time to frame 100
and the end time to frame 300,
| | 02:00 | because I have got 200 frames of animation.
| | 02:02 | And I am caching all these properties;
really density and velocity are the
| | 02:06 | only things that matter, but we will
go ahead and leave all those on anyway.
| | 02:10 | Go ahead and click Create and you'll
see it starts from frame 100 and its just
| | 02:14 | running at normal speed here. The reason why
it's so slow is, because I've
| | 02:19 | converted to Polygons. Be aware
that once you converted to polygons your
| | 02:24 | simulation times is going to be much, much, longer.
We'll go ahead and let that calculate.
| | 02:31 | Okay, our simulation has finished Caching
and it's stored to disk and that means
| | 02:35 | now that I can skip around in the timeline
if I need to, and Maya is not
| | 02:41 | actually calculated the simulation.
Every time I go to a different frame it's
| | 02:45 | simply loading that frame off of disk.
| | 02:48 | Now loading the frame itself takes some time
so it's not actually going to
| | 02:51 | run in real-time even after it's been cached,
but certainly it running faster than it did.
| | 02:57 | Let's take a look at the Cache files themselves.
| | 03:00 | I'll minimize Maya and go to my Project
and look at the data folder, open that
| | 03:05 | up and you'll see in the folder this says
caching a fluid finished we've got a
| | 03:11 | whole bunch of files. Each one of
those files represents one frame, and
| | 03:17 | because of the Density of my pond,
these are fairly large in size; each one is
| | 03:22 | one half of a megabyte.
| | 03:23 | So that's going to be about 100 MB
of data right there, let's find out.
| | 03:27 | We'll right-click and go to Properties
so 103 MB worth of data for that cache.
| | 03:34 | Now this shot is actually ready to batch render
and it will render predictably
| | 03:38 | and we'll not have any problems.
| | 03:41 | If I go back into Maya, I just want to mention that
once we've cached we cannot change the simulation.
| | 03:47 | In other words, for example altered
my animation, or change the dynamic
| | 03:52 | properties of the pond, that would not
be reflected in the playback, because all
| | 03:57 | of that information in the Pond has now been stored to disc.
| | 04:01 | If I need to make changes to my animation
or simulation I'll need to remove the cache.
| | 04:06 | We'll just go back up in that menu and delete the Cache.
| | 04:10 | I am not going to do at this time,
because we have what we want.
| | Collapse this transcript |
| Smoothing pond polygons| 00:01 | If you converted your pond to polygons,
then you do have the option of smoothing
| | 00:05 | those polygons and that will give
you a softer more fluid look without
| | 00:11 | increasing the base resolution of the fluid.
| | 00:15 | Let's render this now with no smoothing
for comparison. So in my perspective view,
| | 00:20 | I've zoomed in really close so we can see the
difference and I'll go-ahead do a render of that.
| | 00:25 | Here is a rendering with no smoothing,
and you can see that we got a little bit
| | 00:30 | of jaggies in here; it's not too bad,
but we can actually improve that without
| | 00:35 | increasing the Mash Density on the original pond.
| | 00:39 | I'll store that and I'll go ahead and just
select the pondPolygons.
| | 00:47 | I can use various methods to smooth it.
Since I'm rendering in mental ray, I can
| | 00:52 | actually just use Smooth Mesh Preview and
that's simply pressing the 3 key on the keyboard.
| | 00:58 | Now I do get this question that asks me,
do you really want to do this, because
| | 01:02 | you have got a high detail mesh already.
| | 01:05 | Yes, I do want to continue with
smooth meshed preview, so click Yes.
| | 01:11 | You see here that it's kind of changed,
it may not be better however, and
| | 01:16 | the reason is that it's all built out triangles currently.
| | 01:19 | Let's see what that looks like
with the smoothing turned on.
| | 01:22 | While that's rendering I'll go ahead
and mention that if you are rendering in
| | 01:29 | Maya software, then you won't be able to
use the smooth mesh preview, the 3 key will not render.
| | 01:35 | In that case you would use in mesh smooth node,
you would just go to Polygons
| | 01:39 | menu set and choose mesh smooth. But here in
mental ray we can use a smooth mesh preview.
| | 01:44 | All right! So that's what it looks like after
it's been smoothed. Okay, so that's no
| | 01:50 | smoothing and that's yes smoothing.
| | 01:54 | So you could say that's better but we
can actually even improve that more.
| | 01:59 | What I'll do is all store that image
so that somebody compar it to.
| | 02:03 | With the object selected, I'll press 1 key
and now we're just looking at raw polygons.
| | 02:09 | Now what I'll do is all quadrangulate
this polygon mesh, I'll go to the Polygons
| | 02:16 | menu set and choose Mesh>Quadrangulate.
| | 02:24 | The subdivision surface algorithm used by
smooth mesh preview works better on quads.
| | 02:29 | So you are just going to get better results
if it's been converted to quadrilaterals
| | 02:32 | or as close to quadrilaterals as we can get.
| | 02:36 | You'll see there is poly quad node in there now.
| | 02:39 | Okay, so let's do a render.
| | 02:43 | So now this is what it looks like
when it's quadrangulted, this is what it
| | 02:49 | looks like when it's smoothed,
and this is what looks like with nothing.
| | 02:56 | Okay, so I'll go back to this version
that has been quadrangulted and I'll store it,
| | 03:01 | and then finally I'll the smoothing back on
in my Pond, with it selectable
| | 03:08 | press the 3 key, once again I get the
Query are you sure you want to do this.
| | 03:13 | Yes and now we'll do one more rendering.
| | 03:18 | So for comparison this is quadrangulated
and smoothed that's quadrangulated only
| | 03:23 | that smoothed only,
and that's with nothing, no effect applied.
| | 03:30 | So let's skip over this, so this is
with no effect, and that's after it's been
| | 03:35 | quadranguled and smoothed.
| | 03:37 | What it's done here is it's kind of
amplified the ripples and made them better,
| | 03:41 | so it's actually a better result.
| | 03:44 | So once again here it is with no quadrangulation
and no smoothing, and here it
| | 03:49 | is after it's been quadrangulated and smoothed.
| | 03:53 | On a final note once again as I was saying,
if you need to render in Maya
| | 03:58 | software then instead of hitting the 3 key
for smooth mashed preview, you would
| | 04:02 | drop a mesh smooth node on the object
after it's been quadrangulated.
| | 04:06 | Now since I'm rendering in mental ray
in this case, I will need to do that.
| | 04:11 | Here's the result after it's been
rendered in mental ray with the
| | 04:15 | quadrangulation and the smoothing,
and it's also got a dielectric shader on it.
| | 04:22 | That's how you work with Maya Ponds.
It's a whole workflow for Ponds.
| | 04:27 | There are some more features that we will
apply to ponds such as making objects float.
| | 04:31 | We will cover those in the next chapter
having to do with ocean, because those
| | 04:36 | features are common to both ponds and oceans.
| | Collapse this transcript |
|
|
2. Open Ocean EffectsCreating an ocean| 00:00 | In this chapter we will be looking at the Maya Ocean,
which is a great tool for open water effects.
| | 00:06 | So if you have got ships out at sea
then the Maya ocean is a great tool.
| | 00:11 | However it's not capable of reproducing
crashing waves or surf.
| | 00:16 | So if you've got a shot that includes
a shoreline, then it's going to can be
| | 00:20 | difficult or impossible for you to use
the Maya Ocean in that case.
| | 00:24 | So that means that you'll have to use
other techniques, but you have got an
| | 00:27 | open water effect then the Maya Ocean is an
excellent choice and it's quite easy to use.
| | 00:31 | In this exercise we're going to take the extra step
of connecting the ocean to a camera.
| | 00:37 | This will make it seem like the ocean
is actually at the size of a real ocean.
| | 00:42 | If the ocean is not connected to a camera,
then it will actually have a boundary;
| | 00:45 | you can actually move that camera so that
you can sort of look over the edge of the Earth.
| | 00:50 | If you connect it to a camera,
then it'll always be scaled and rotated correctly
| | 00:54 | to give the illusion of an ocean
that extends all the way to the horizon.
| | 00:59 | We can start by creating a camera;
Create>Cameras and I'll use a Camera and Aim.
| | 01:04 | It doesn't matter what type of camera you use,
| | 01:07 | I just prefer the Camera and Aim,
because I will not get a canted angle or a Dutch tilt
| | 01:12 | accidentally with a Camera and Aim.
| | 01:14 | So I'll use a Camera and Aim
and it's created and there it is at the origin,
| | 01:19 | here is the Camera and here's the aim point,
tap the spacebar.
| | 01:23 | I want to load that camera into a panel.
I'm not using my side view here so will go
| | 01:28 | Panels>Perspective>camera 1
and now I can use the Alt+left, Alt+right,
| | 01:33 | and Alt+middle mouse buttons
to sort of frame my shot.
| | 01:36 | Additionally, if I want to I can also
turn on the resolution gates, so I'll know
| | 01:40 | where the borders of the frames are
and I have currently got the panel toolbar hidden.
| | 01:45 | Ctrl+Shift and we will hide or unhide the panel toolbar
and here I can turn on the Resolution Gate.
| | 01:52 | So we can see where the borders of the frame are,
very good.
| | 01:56 | I'll that panel toolbar back off again
with Ctrl+Shift+M. Now I am ready to
| | 02:01 | create the Ocean and in a perfect world
what you would do is, you would select
| | 02:06 | the camera viewport or maybe even maximize that view.
| | 02:09 | When you create the ocean, Maya
should connect the ocean to the camera.
| | 02:14 | However what I've seen is that sometimes
there was an issue with Maya attaching
| | 02:18 | the ocean to your perspective view,
and if that happens then we'll just have to
| | 02:23 | make some minor modifications to an
expression to connect it to the camera.
| | 02:27 | Again in a perfect world you would just
maximize that camera view and then go
| | 02:31 | into the Dynamics menu set and choose
Fluid Effects>Ocean>Create Ocean and go
| | 02:38 | into the Options. You'll see there are two options here,
Attached to Camera and Create Preview Plane.
| | 02:42 | We can do those both at the same time actually.
| | 02:47 | I will go ahead and click Create Ocean.
| | 02:48 | Now to test to see if it's properly
connected to the camera, what you do is
| | 02:52 | you just navigate in the View.
What you should see is the ocean sort of
| | 02:56 | stays static in the view.
| | 02:58 | Currently, I look at this and I know that this is not correct,
| | 03:01 | so I'll need to make some adjustments.
| | 03:03 | What we will do is, is will select the
ocean itself, and that's this big nurbs
| | 03:07 | circle here. With that selected in
the Channel box, you'll see that some of
| | 03:13 | those channels are highlighted in purple
and that's indicator there's an expression there.
| | 03:17 | I'll just select any one of those
and go to the Edit menu here and choose
| | 03:21 | Expressions, but we're not going to go
deeply into the Expression Editor here,
| | 03:25 | but what we can see is the perspective camera
is being invoked in the first three lines of those.
| | 03:30 | So I am just going to change that to camera 1
and that will fix the issue. If I
| | 03:35 | want to see this is a little more clearly,
I can just zoom in on the text a
| | 03:39 | little bit by holding down the Ctrl key
and using the mouse wheel.
| | 03:43 | Okay, so everywhere says persp
I just want to change that to camera1.
| | 03:48 | So it's got to be camera1 no spaces all lower case.
| | 03:59 | Okay, and then click Edit to update that,
and now you'll see that if I move the
| | 04:04 | camera around, let's say move left or right,
or up and down, the Ocean plane
| | 04:09 | sort of stays constant in the shot,
and that way it'll feel like the ocean is
| | 04:15 | actually almost infinitely large.
| | 04:17 | Okay, let's do a quick renderer of that
and there is the Maya Ocean with default parameters.
| | Collapse this transcript |
| Working with a preview plane| 00:00 | The Maya ocean is actually in motion
when you first create it. It's got waves
| | 00:05 | that are actually flowing and if you rendered it
right now you would see those waves moving.
| | 00:09 | However, if you press Play in the viewport
you can't see a motion on the ocean itself.
| | 00:15 | But when I created the ocean I also
created a preview plane and that's
| | 00:19 | what this is here. Let's find it and
you get it near the origin here, looking
| | 00:25 | for the preview plane, so it's a very
small little patch of ocean at the origin.
| | 00:30 | That little plane there is the preview plane
and it's not called a preview
| | 00:33 | plane unfortunately it's called transform 1.
I'm actually going to rename
| | 00:37 | that because transform 1 is not a very helpful name.
I'm going to call it preview or oceanPreview.
| | 00:45 | If we get in close on that, if I press the F key
and then press the 5 key to see shading,
| | 00:51 | then when I press Play you can see
there's some movement there.
| | 00:55 | I have only got 24 frames in my timeline here,
so let me extend that out. I'll set the
| | 01:00 | end of the playback range to let's
call it 20 seconds or 480 frames.
| | 01:05 | Okay, so that is the preview plane and it is
playing back at 24 frames a second, currently.
| | 01:11 | If you're getting a difference playback speed,
you want to verify that you've got
| | 01:16 | the correct speed in your timeline, so
you can right-click and choose Playback Speed
| | 01:20 | and make sure that you've got a set to
Play Every Frame, Max Real-time.
| | 01:24 | Additionally and optionally, you can
turn on the frame rate, Display>Heads Up
| | 01:29 | Display>Frame Rate, so you
see here we're getting some waves.
| | 01:33 | Now if you want to change the size of
the preview plane than we want to scale it.
| | 01:38 | You'll see here in the Attributes
in the Channel Box, Scale X and Scale Z
| | 01:44 | are available for us to adjust. Scale Y
is not and that's important, because you
| | 01:50 | wouldn't want to scale the height of
the preview plane; that would make it as if
| | 01:54 | your waves were taller, so we
only want to scale in X and Z.
| | 02:00 | So if I need a larger preview plane
I can select this and give this a value let
| | 02:04 | say 50 and 50 then I can dolly back a little bit
and I can see a larger patch of the ocean.
| | 02:13 | Additionally, I can move it if I need to.
I can just use the Move tool in that case.
| | 02:18 | You'll see that Translate Y is grayed out
meaning it's locked,
| | 02:23 | so I cannot move the plane up or down,
but I can move it X and Z.
| | 02:27 | Additionally, we can change the quality of the preview.
Since I've made it larger
| | 02:31 | we're getting a sort of rougher approximation,
because I've not changed the
| | 02:36 | actual detail of the preview plane.
| | 02:38 | If I go back to a wireframe view with a 4 key,
you'll see that it's a very
| | 02:42 | limited level of detail. I want to
go into the preview plane attributes, Ctrl+A.
| | 02:47 | You'll see here at the top, Resolution.
That's the number of
| | 02:53 | polygons on a side here and turn that
up to let's say 70 or something like that.
| | 03:00 | Now when I play this you'll see a much better
approximation, it may start to run more slowly however.
| | 03:06 | If I turn it all the way up to a 100,
press Play, my frame rate is dropped down
| | 03:11 | from 24 down to 20 frames a second,
but that's a good trade because now we're
| | 03:16 | getting a good idea of what this ocean
is going to look like from the preview plane.
| | 03:21 | Press the 5 key so we can see shading once again.
| | 03:25 | Now we have got stage set, we can
actually start adjusting the detail of the
| | 03:31 | ocean share. We'll do a little quick
render first just to see what it looks like.
| | Collapse this transcript |
| Customizing the Ocean shader| 00:00 | The Maya Ocean is controlled by a custom
material shader that only works with
| | 00:06 | NURBS surfaces that are oriented so that
they are flat relative to the world.
| | 00:11 | In other words, they need to be planes
that lie in the ZX plane of the world
| | 00:18 | or the ground plane of the world.
| | 00:20 | The ocean itself is a very large NURBS plane
that's been stretched into a
| | 00:24 | circular shape and it's got the ocean
shader applied to it automatically.
| | 00:29 | In fact, you could apply the ocean shader to any NURBS
surface that's laying flat to the ground.
| | 00:35 | Okay, let's play around with the Ocean
Shader Attributes. But just so we get a
| | 00:39 | little bit better realism, I'm going to just put
a blue color in the background of my camera here.
| | 00:45 | So with Camera 1 viewport active, I'll go to
View>Select Camera and open up the
| | 00:51 | attribute with Ctrl+A. Just go down into
the Environment section and change the
| | 00:55 | background color here. I'll do kind of
periwinkle blue there, and let's
| | 01:00 | render that and see what it looks like.
| | 01:02 | Now I'm rendering this is in Maya software.
I want to mention in passing that
| | 01:05 | you can render it in mental ray, but it
will look different, you need to decide
| | 01:09 | in advance which render you want to use
before you start to adjust the rendering
| | 01:13 | attributes of this shader.
| | 01:14 | This is what it looks like in Maya software.
I'll save that image, switch over
| | 01:18 | to mental ray and do another render
so we can compare.
| | 01:23 | It's much brighter and much more reflective in general.
| | 01:27 | I actually prefer the look of the Maya software
rendering that's what I'll be using in this lesson.
| | 01:32 | So now we'll start playing around with
the Ocean Shader itself. I want to select
| | 01:37 | the Ocean in the viewport and then
open up the Attributes, Ctrl+A if it's not
| | 01:42 | already open. You want to find the
Ocean Shader Node, so go to that tab and
| | 01:46 | let's do an interactive production render
while we adjust these attributes, so
| | 01:50 | that they'll update in real time.
| | 01:52 | In the Render View I'll click IPR.
Maya will render the entire frame and then
| | 01:59 | once it finished, select a region to
begin tuning. I'll just drag a tall skinny
| | 02:04 | rectangle that's representative of the ocean
so we can see it at all distances.
| | 02:10 | Back in the Attribute Editor
let's start playing around with stuff.
| | 02:13 | Well the most obvious thing is the Scale.
As I increase the scale you'll see
| | 02:17 | that it gets smaller, and as I reduce the scale
you'll see that the texture on the Ocean gets larger.
| | 02:25 | Set it back to Scale of 1.
| | 02:28 | You've got the wave speed;
| | 02:29 | we won't be able to see that if I change this.
| | 02:32 | I mean, it'll change, but we won't be
able to see the effect of the motion.
| | 02:36 | So that's something you would need to test with
an actual animated batch render, set that back to 1.
| | 02:40 | Next, you'll see the number of frequencies,
and this has to do with the detail
| | 02:45 | and if I set the number of frequencies
to a lower value, we will have less detail
| | 02:50 | and it'll look like the ocean
is smaller basically and if I set the
| | 02:54 | number of frequencies down to 1,
it's almost like a placid lake.
| | 02:58 | If I increase the number of frequencies
up to let's say 5, then I'm going to get
| | 03:01 | more detail, set it back to the default of 3.
| | 03:06 | Scrolling down a little bit more, we've
got the Wave Height and so on, so this
| | 03:10 | is a graph here that I can change.
| | 03:12 | As I move this point on the graph, you will
see that the waves become more extreme.
| | 03:17 | You can bring that up or down to
change the overall height of the waves.
| | 03:20 | What I really want to do is change
the shape of the waves and that's
| | 03:25 | controlled through this Wave Peaking graph.
| | 03:28 | If I bring this second point up higher,
then we're going to get a sharper transition,
| | 03:36 | this is going to cause the waves to be
kind of sharper and stand up taller.
| | 03:40 | I can actually add more points on this if I want.
| | 03:42 | I can just click and then move that around
and I'm trying to achieve the effect
| | 03:49 | of a very sharp peaking wave.
| | 03:52 | Let's do a full render of that.
| | 03:54 | So now you can see my waves are
peaking a lot more than they were.
| | 03:59 | All right, what else have we got?
| | 04:01 | We've got foam. Okay, we'll go back to IPR, let that render.
| | 04:10 | Again, draw a rectangle and increase
the Foam Emission, and as I bring that up
| | 04:17 | you'll start to see little flecks of foam
appear at the peaks of those waves.
| | 04:23 | I can play around with all this stuff
and have so much fun. I'll give you a
| | 04:26 | chance to do that on your own. There are
few things though I do want to point out.
| | 04:30 | You've got the Refractive Index here
and that's going to deal with how
| | 04:35 | reflective it's going to be,
the default is 1.3, scrolling down a little bit
| | 04:40 | more you've got the Translucence.
| | 04:42 | This is very helpful, because as you
increase the translucence, it's going to
| | 04:45 | make the ocean kind of glow from within.
| | 04:50 | You've also got Specularity, so those
are shiny highlights.
| | 04:54 | It's easier to see those if you've got lighting
in your scene. I currently don't have any
| | 04:58 | lighting in my scene, but that's just the shiny highlights.
| | 05:03 | And then finally down here you'll see
Environment and this is fake reflections.
| | 05:08 | Now the Maya Ocean can produce ray
traced reflections, in other words, when I
| | 05:14 | put a boat in here, it'll reflect the
boat in the ocean, but it's not able to
| | 05:18 | reflect for example, this background here.
| | 05:20 | So what we see here are Environment colors
and as I change these, you'll see we
| | 05:25 | get different effects here to the reflectivity.
| | 05:30 | So if I wanted those to be really white,
shiny highlights then maybe I would set
| | 05:35 | my Environment color to white here.
| | 05:41 | Those are just a few of the fun attributes
you can play with in the Maya Ocean Shader.
| | Collapse this transcript |
| Controlling render tessellation| 00:00 | Sometimes when you render a Maya Ocean,
especially if the camera is up close to
| | 00:04 | the ocean surface, you will see
the polygon structure of the ocean.
| | 00:08 | You'll see a lot of straight lines and lack of detail.
| | 00:11 | I'm going to show you how to improve that.
| | 00:13 | Let's do a render of this Maya Ocean
with just the default properties.
| | 00:17 | You can see here that it's looking kind of flat
and the closer you get in, the more obvious it is,
| | 00:23 | say I dolly in right close here, do a render, you can see
| | 00:28 | here, especially when we're up close, it doesn't look so nice.
| | 00:31 | You're seeing straight lines and things
like that, and that's because the NURB
| | 00:35 | surface that makes up this ocean is
being tessellated into polygonal triangles.
| | 00:40 | That's happening behind the scenes, so we don't see that.
| | 00:43 | But when it renders, we do see
the end result of it, we see these little
| | 00:47 | pyramids and little structures up
here that don't look liquid at all.
| | 00:50 | What we want to do is increase the
render tessellation values in order to
| | 00:54 | selectively displace this more intelligently.
| | 00:58 | I'll store this image and minimize the
Render View, and I want to select the ocean,
| | 01:02 | not the preview plane, but the ocean itself
and go to its Attributes, Ctrl+A,
| | 01:06 | and you want to go to the nurbsSurface
node here, so the oceanPlaneShape tab.
| | 01:12 | You'll see there is a section that
says Tessellation; that's just breaking
| | 01:15 | the NURBS surface up into tiles, into triangles.
| | 01:19 | Here are the default properties here,
you'll see mode is set to Per Span
| | 01:23 | number of Isoparms with a value of 10,
that means for each one of these
| | 01:28 | Isoparms, which are these green lines,
it's going subdivide it 10 times in U
| | 01:33 | and 10 times in V. That's not really very
much, especially when we get up close on that.
| | 01:38 | But we do have an ace in the hole here,
there is a wonderful attribute down here
| | 01:41 | called Use Min Screen; we turn that on.
| | 01:45 | Now what this does is it makes sure that no polygon
can be any larger than this value,
| | 01:50 | which is a percentage of the screen width.
| | 01:54 | Currently no polygon in the tessellated
NURBS surface is allowed to be any
| | 01:59 | larger than 14% of the screen width.
| | 02:02 | I'm going to take this all the way down
to its minimum value of 1% and
| | 02:07 | that means that no polygon will be able
to be larger than 1% of the screen width.
| | 02:12 | Okay, we'll do another render of that.
| | 02:16 | So here it is with min screen turned
on and that's min screen turned off.
| | 02:21 | Already we're starting to see an improvement.
So that's with it off and on.
| | 02:26 | We're seeing much more detail here, I'll store that image.
| | 02:29 | Finally, if we want to really go all the way
with this, what we could do is go
| | 02:32 | back into our Tessellation settings
and turn on Feature Displacement.
| | 02:37 | I want to warn you that this could result
in extremely long render times.
| | 02:40 | Now what this is going to do is it's going to
test the curvature of the surface
| | 02:45 | and subdivide it smaller in the areas of
higher curvature and I'll turn that on.
| | 02:50 | There are two important attributes here,
the Initial Sample Rate and the Extra Sample Rate.
| | 02:56 | The Initial Sample Rate is how many times
it's going to subdivide just by default.
| | 03:00 | Extra Sample Rate is another layer
of subdivision beyond the initial one.
| | 03:06 | So if this divided six times, then this is going
to divide another five times six or 30 times.
| | 03:12 | This Extra Sample Rate is what causes
the extremely long render times.
| | 03:17 | I would recommend turning it down to 0
at first and then maybe creeping it up
| | 03:21 | ever so slowly if necessary.
Okay. So now what I have got?
| | 03:24 | I've got min screen on with the Min Screen Value of 1,
Feature Displacement on,
| | 03:30 | and Extra Sample Rate turned down to 0.
| | 03:34 | Go ahead and render that
and even with an Extra Sample Rate of 0, it's going to
| | 03:38 | take a while for that to render,
so we'll have to give it a wait for a moment.
| | 03:42 | So that's the result after we've enabled
Feature Displacement; we don't see
| | 03:45 | any straight lines anymore,
and we're seeing nice smooth curves swells.
| | 03:50 | I will go ahead and store that and then
we can compare it to the other versions.
| | 03:54 | This is the one with Feature Displacement and Min Screen,
| | 03:59 | and this is the one with Min Screen Only
and this is the one with Default Settings.
| | 04:04 | So as you can see there's a huge difference
between this one and this one.
| | 04:08 | That's a very useful and helpful technique, especially if
you need to do a close-up shot of the Maya Ocean.
| | Collapse this transcript |
| Floating objects| 00:00 | The Maya Ocean renders as a displaced
surface as we've seen, however, it's
| | 00:05 | also dynamic and that means that we
can float objects on the surface of the ocean,
| | 00:10 | and the position and optionally rotation of the objects
will be driven by the shape of the waves.
| | 00:18 | Here I've got a scene with a Maya Ocean
with default shader parameters.
| | 00:23 | If I press play you can see
we've got some moving waves here.
| | 00:26 | I'm going to import an object that I can
then float on the surface of the ocean.
| | 00:31 | Go to the File menu and choose Import
and scroll down a bit, you're looking for 02_05_jetski,
| | 00:39 | select that, and then over in the
Import options you might want
| | 00:43 | to check the Namespace Option section,
and make sure that Use namespace is on
| | 00:48 | and the option down here labeled Merge
is selected. That just means that Maya
| | 00:53 | is going to import the file nodes and not change
their names, go ahead and click Import.
| | 01:00 | Now I've got a jetski in my scene,
but it's very large relative to the ocean.
| | 01:04 | If we go out to the top view, tap
the spacebar, dolly back in the top view.
| | 01:09 | You'll see that the jetski is actually larger
than the entire ocean plane currently.
| | 01:14 | Let's scale it down so it is at 1/100 scale.
Select it and go over to Channel box,
| | 01:20 | drag your mouse across the X, Y and Z
scale values and type in .01m.
| | 01:26 | Now it's at approximately the correct scale for the Ocean.
| | 01:30 | Back to the Camera view, I'll tap the spacebar,
| | 01:32 | press the 5 key, so we can see shading.
| | 01:35 | Currently it's not dynamic. If I press Play
| | 01:38 | we don't see any motion on the jetski itself.
| | 01:40 | I'll select it and just move it up a little bit
and then go into the menus and make it float.
| | 01:46 | With the object selected, go into
the Dynamics menu set and choose
| | 01:49 | Fluid Effects>Ocean>Float Selected Objects,
and then rewind and play back and you'll see that
| | 01:58 | in fact it is floating on that surface dynamically.
| | 02:02 | You'll note that a locator has been created,
so the locator is a dummy object or a null.
| | 02:08 | With that locator selected you can see
in the Channel box that translate Y is in purple,
| | 02:14 | that means it's got an incoming expression.
That's what's driving the vertical position here.
| | 02:19 | The other channels are all open and free
for us to animate, so for example if I
| | 02:23 | needed to move it forward I could
select translate Z and middle mouse drag in
| | 02:27 | the viewport here, just pull that forward closer to me.
| | 02:30 | Translate X as well, I can move it
but I can't move it in Y, because that's
| | 02:34 | being controlled by the expression, play that through.
| | 02:40 | If your object is too high or too low relative to the ocean,
then you can move it relative to the locator.
| | 02:47 | My object is simply just parented to that locator
| | 02:50 | The locator is what's actually moving
according to this expression.
| | 02:53 | I can select the object itself and move it
relative to the locator to move it up or down.
| | 03:00 | So now it's not going to go below
the ocean surface as much.
| | 03:03 | Okay, so that's how you can make an object float
and you can animate the position
| | 03:08 | and rotation of the floating locator here.
| | 03:11 | So I can select to Rotate tool and turn it
in any direction I need it to be.
| | 03:16 | This is the technique you'd want to use if
in fact you are going to animate the
| | 03:20 | rotations by hand with traditional key framing.
| | 03:24 | Let's also look at how we can make an object float
and have its rotations driven by the Ocean shader.
| | 03:32 | Okay, so I'm going to delete these,
I'll just select that locator and press delete
| | 03:35 | and re-import my jetski; File>Import,
select the file, import it, select it,
| | 03:42 | set its scale down to 1/100th, .01.
| | 03:49 | This time instead of using Float Selected Objects,
I'm going to use Make Boats,
| | 03:54 | with the object selected back in the
Fluid Effects menu, Ocean>Make Boats.
| | 04:02 | We also get a locator once again,
but you'll notice that the Rotate X and
| | 04:07 | Rotate Z Channels also have expressions in them now.
| | 04:10 | I'll move it forward a little bit, translate Z,
so we can see a little bit more clearly.
| | 04:17 | Press Play, and now it's bobbing around
according to the shape of the waves.
| | 04:23 | I can still animate it in position X
and position Z and I can still animate it
| | 04:29 | in rotate Y to steer the boat in different directions.
| | Collapse this transcript |
| Adjusting attributes of a floating object| 00:00 | Once you've made an object float or
created a boat, you want to adjust the
| | 00:04 | extra attributes of the locator in order to control
its Scale, Buoyancy and other dynamic properties.
| | 00:11 | If I press Play here now, you'll see
that it bobs around quite a lot and feels
| | 00:15 | as if it's almost a miniature jetski
instead of a full size one.
| | 00:19 | I'll select the locator and go to
the Attribute Editor, Ctrl+A.
| | 00:23 | In that locatorShape node open up the
Extra Attribute section and here are all the
| | 00:28 | goodies that will let you control the behavior of your boat.
| | 00:31 | For example the Start Y value, if I rewind
back to frame one, my boat is up in the air
| | 00:37 | and it will just drop to the surface
and rewind again, but if I set my
| | 00:41 | Start Y to zero it'll already be floating
on the surface on frame one.
| | 00:48 | Also importantly, we've got the Scene Scale
and a larger value will cause it
| | 00:53 | to behave as if it were larger.
I'll set the Scene Scale up at 10, and then play it.
| | 01:00 | And you will see that it's moving more slowly.
| | 01:02 | But for best result you should also set the
Scene Scale for the Ocean Shader itself.
| | 01:07 | Tou'll see the Ocean Shader tab
is available here on the Attribute Editor.
| | 01:11 | You can go there and set the
Scale value to match that of your boat,
| | 01:16 | set that to 10 as well, and that's going to
make all of the waves larger in the scene.
| | 01:22 | Now it's behaving more like an actual jetski
on the surface of a full scale ocean.
| | 01:28 | We can go back to our locator parameters and those
Extra Attributes also include things like the Buoyancy.
| | 01:34 | We can see this more clearly
if we're actually playing in the scene
| | 01:39 | or if we're using Interactive Playback.
I can go to Solvers, Interactive Playback and
| | 01:44 | then adjust the Buoyancy, in order to
see what it does; so with a high Buoyancy
| | 01:48 | its actually floating above the surface
of the water and if I bring that
| | 01:52 | Buoyancy down its about to sink.
| | 01:54 | Value of .5 is default and that's usually accurate.
| | 01:58 | You'll also see there are other things here
like Start Rotation values, you'll
| | 02:02 | see the Roll and Pitch attributes here as well,
these control the amount of
| | 02:06 | rotation that the ocean will impart to the floating boat.
| | 02:10 | So that's how we can fine tune
the behavior of a floating object.
| | Collapse this transcript |
| Creating motorboats| 00:00 | If you create a boat on an ocean, then you can animate
the position of the boat wherever you want it to go.
| | 00:08 | But there's another way that you can
drive the boat interactively, by creating a
| | 00:13 | motor boat and that will be completely
dynamic and it will also obey the laws of physics
| | 00:18 | where it will turn and bank
according to the shape of the waves.
| | 00:23 | I'll select the boat and go into the Fluid Effects menu
and choose, Ocean>Make Motor Boats.
| | 00:35 | When I do that I get a locator
just as before you can see it here.
| | 00:40 | With that locator selected you
can see in a channel box that all of the
| | 00:44 | position and rotation channels
are bring driven by expressions.
| | 00:48 | I can't animate a motor boat in the
traditional way by keying position and rotation
| | 00:53 | channels here, but I can go in to the
extra attributes and turn on the Throttle
| | 00:58 | and Rudder and actually drive it through the scene.
| | 01:02 | Go to Ctrl+A, Attributes, and that locatorShape node,
in the Extra Attributes section
| | 01:08 | down at the bottom you'll see Throttle and Rudder.
| | 01:13 | All right, so we can drive our boat.
Let's go into Interactive Playback mode,
| | 01:18 | Solvers>Interactive Playback and
increase the Throttle. There you go, we're
| | 01:24 | driving our boat and I can turn the Rudder
and make it go in different directions.
| | 01:28 | We can see that in the top view here.
| | 01:32 | So now it's actually driving in a circle.
I can play around with that Rudder
| | 01:38 | and make it turn in different directions.
| | 01:46 | It goes straight.
Additionally, I'll stop the playback.
| | 01:51 | Additionally, we have Throttle Pitch and Turn Roll
and this has to do it how much it's going to tilt.
| | 01:58 | If the Throttle Pitch is up very high, then when
the boat moves forward it's going to tilt upward.
| | 02:07 | We'll need to actually play the simulation
to see that happen, so with a
| | 02:10 | Throttle Pitch of zero here in the side view
and I set the Rudder value to zero as well.
| | 02:18 | With no Throttle Pitch, when I press Play
it just moves forward and it doesn't do anything special.
| | 02:25 | Okay I go back to frame one a get a little bit more
screen real estate here so you can see that.
| | 02:31 | So just going straight forward, but if
I increase the Throttle Pitch let's say
| | 02:36 | turn it up all the way, then it's actually
going to tilt upward as it drives forward,
| | 02:43 | that's with a maximum Throttle Pitch.
| | 02:47 | Likewise if you're turning, then you
can increase the Turn Roll and that'll
| | 02:53 | make the boat actually tilt as it goes
around corners. We can see that in
| | 02:58 | the front view here, if we actually
give it a little bit of Rudder.
| | 03:04 | I'll give it a little bit of a Rudder
amount here with the Turn Roll turned up all
| | 03:09 | the way and you'll see that it actually is turning
according to the direction that it's moving.
| | 03:26 | All right, so that's how we can control motor boats.
Pretty exciting, pretty cool.
| | 03:31 | If we want to actually animate this
and create renderable animation from it,
| | 03:36 | we would probably want to keyframe
these values on appropriate frames.
| | 03:40 | That's how motorboats work with Maya Oceans.
| | Collapse this transcript |
| Adding an ocean wake| 00:00 | A boat moving on the water needs to
generate a wake for it to be believable.
| | 00:05 | To illustrate that, if I just play my simulation
for a few seconds, I can render the camera view.
| | 00:10 | Select the Camera View, click Render
and you see that without a wake it doesn't
| | 00:14 | even look like it's in the water.
| | 00:17 | However, it's very easy to add the wake,
you don't even need to select anything,
| | 00:20 | just go to the Fluid Effects menu and
choose Ocean>Create Wake,
| | 00:24 | but you do need to go into the Options.
| | 00:27 | The reason is the default value for
Foam creation is 0, and if that value is 0,
| | 00:31 | then no foam will be created, and
you will not be able to add it later.
| | 00:36 | That means, if you want Foam, which you
basically always do, then you're going
| | 00:40 | to need to increase this Foam creation value
to some non-zero value.
| | 00:44 | Let's give it a value about 5 and that's fine.
| | 00:46 | Go ahead and click Create Ocean Wake,
and what you get here is a Emitter.
| | 00:50 | If we play the simulation, it's emitting
density into a Maya Pond, and that's
| | 00:54 | exactly what's going on here, it's a Maya Pond.
| | 00:58 | Let's look at the Outliner, Window>Outliner.
Now what you'll see here
| | 01:02 | is three new nodes; of course, we've got the Emitter
and then we've got a two FluidTexture nodes.
| | 01:08 | A FluidTexture Node is basically a stripped
down version of the fluidShape node,
| | 01:12 | in which only some of the most
relevant attributes are activated.
| | 01:16 | The first one here is the Maya Pond
and the second one is the Wake,
| | 01:23 | so that's the white color we're seeing here.
| | 01:25 | We should rename these, okay, so I'm going to
double-click and call this one wakeFluid
| | 01:30 | and the other one of double-click and I'll call that
foamFluid, that way I will know what's what.
| | 01:38 | Okay, so if I select that and go to the
Attributes, Ctrl+A, then you'll see that
| | 01:42 | it has all the familiar attributes
that we saw from the Maya Pond.
| | 01:46 | In order to see this more clearly, if we want to change
for example, the resolution or the size,
| | 01:51 | we probably want to go down into the
Display section and boundary draw set to full.
| | 01:56 | Now we can actually see the polygons of the pond itself.
| | 02:00 | If we want to change the resolution,
we need to keep the voxel's square,
| | 02:04 | we want these to be perfect squares.
| | 02:06 | So turn Keep Voxel Square on,
and now you'll see if I change this and rewind
| | 02:10 | back to frame1, we can see the effect of
changing the base resolution. All right.
| | 02:17 | Let's leave it at a 100 for now.
Then of course you've got the size, and what
| | 02:21 | you want to do really is have it be the
optimal size for the area in which you
| | 02:26 | need the wake to be created.
Increase it just a little bit to like 30x30.
| | 02:32 | I also want to move it back.
| | 02:34 | But let's move both the wake and the
foam together, so I have selected them both,
| | 02:39 | and we just move them both back,
so they're taking up basically the full frame.
| | 02:46 | All right. Then the foamFluid also I want to
increase its size, too.
| | 02:52 | So I will set that to 30 and 30 as well, so it matches.
| | 02:56 | Okay, since this is a Maya Pond, the techniques
we learned in the last chapter will directly apply.
| | 03:02 | What I want to do is just select that Emitter
and then conform it to the shape of the boat.
| | 03:07 | I'll move it over there, get in closer and scale it
so it's a little bit smaller than the boat itself.
| | 03:13 | And in the front view I'll scale it in Y,
maybe position it up a little bit,
| | 03:20 | scale it so that it's just a little bit smaller
than that jetski, and then link it to a locator.
| | 03:27 | So I'll select that Emitter, and then Shift+Select
the Locator, and press P to create the parent link.
| | 03:34 | Now that we've got our basic parameters,
we don't really need to see the Pond Polygons again.
| | 03:40 | We can go back in the Outliner,
go to that wakeFluid, go back to
| | 03:44 | its attributes and we can turn the boundary
draw back to outline, that way we
| | 03:50 | won't be distracted by that.
Okay. So let's see what we get.
| | 03:54 | Rewind and playback, and we've got
a little bit of a wake happening.
| | 03:59 | We can improve that in later movies.
| | 04:02 | But at this point we've got our wake. We'll click render.
| | 04:06 | We don't see much foam there.
There is a little bit of foam there, but we're
| | 04:10 | going to improve that look in a subsequent movie.
| | Collapse this transcript |
| Improving realism with Emit from Object| 00:00 | For greater realism for an ocean or
pond wake, we can emit from an object
| | 00:05 | instead of the standard volume emitter that we see here.
| | 00:09 | I'm going to select that volume emitter,
maybe do that in the Outliner.
| | 00:15 | It's a child of the Locator currently, but I am
going to select that Wake Emitter and delete it.
| | 00:20 | Now I'm actually going to make the
jetski model create density and foam.
| | 00:25 | To do that, I want to select the model
and select the fluid, Ctrl+Click on that.
| | 00:32 | I'll go up to Fluid Effects, and then choose
Add Edit Contents>Emit From Object.
| | 00:38 | Now the jetski model is actually going
to be generating density into the pond.
| | 00:45 | We can increase that, we can select the emitter now.
| | 00:48 | There's a FluidEmitter that's now
generating density, it's a child of the Mesh.
| | 00:53 | Go to the Attributes and we can play
around with a Density; if we give this a
| | 00:57 | greater negative Density,
then we'll see more effect to the wake.
| | 01:01 | See what that looks like. So now I've
got Density being emitted into the pond
| | 01:08 | from the jetski model itself.
| | 01:10 | Likewise we want to do that with the foam, too.
| | 01:12 | I want to select the jetski model and the
foamFluid container and once again go up to
| | 01:18 | Fluid Effects>Add Edit Contents>Emit From Object.
| | 01:22 | That's created a second emitter here.
We could actually do this with
| | 01:26 | one emitter, but it's just easier to do it with two
in terms of using the menu structure in Maya.
| | 01:31 | Here for this second emitter, we want
to generate heat and that is what's going
| | 01:35 | to create the foam; go to Ctrl+A, Attributes,
and the Heat per Voxel per second value
| | 01:40 | will need to be increased,
so let's give that a value about 5.
| | 01:45 | Now if play this back, we probably
still won't see much in terms of foam.
| | 01:50 | We're getting a little bit of foam,
just a little bit; and if I render this,
| | 01:54 | you might see a little bit of white foam there.
| | 01:56 | What we need to do is just decrease the
dissipation in the foamFluid shape node.
| | 02:01 | It is creating foam, it's just fading out really quickly.
| | 02:04 | I want to select the foamFluid
and we need to go into
| | 02:10 | Contents Details>Temperature. Open that up
and what you'll see here is Dissipation and
| | 02:18 | that's what causing the foam to fade out so quickly.
| | 02:21 | I'm actually just going to turn
the Dissipation completely off.
| | 02:24 | Dissipation is the tendency of a
property of the fluid, in this case the
| | 02:28 | temperature to fade out over time.
| | 02:32 | Diffusion is the tendency of that
property to spread out over space.
| | 02:37 | We want some amount of Diffusion,
we do want to spread somewhat, but we don't
| | 02:41 | need it to fade out, so no Dissipation.
| | 02:43 | All right, rewind, close all the windows
and play it back so we can see if we
| | 02:48 | are getting foam now. There we go,
so we're seeing a preview here in the
| | 02:52 | viewport of what our foam might look like.
| | 02:54 | Let's do a full render of that.
| | 02:56 | We're seeing a little bit more foam,
but I think if we just go back into the Emitter,
| | 03:01 | we can increase that up.
| | 03:03 | So go back to that second fluidEmitter,
go to its Attributes, and just increase
| | 03:09 | the Heat amount to let's say 10,
and then playback the simulation.
| | 03:17 | Now we're getting enough heat that the
foam effect is visible in the rendering.
| | Collapse this transcript |
| Fine-tuning the look| 00:00 | We have got the basics of our simulation working,
but we need to spend a lot
| | 00:04 | of time adjusting all the various attributes
on different nodes in order to get a good result.
| | 00:09 | For example, right now, when I just
play that simulation and do a quick
| | 00:13 | rendering, we got some issues here.
| | 00:15 | First of all our wake is not very well defined.
It's hardly even awake, and you
| | 00:20 | know, we really need to have better results there.
| | 00:22 | Also the foam isn't working the way we
wanted to, the foam is actually swirling
| | 00:27 | around and its sort of inheriting
the velocity of the Emitter.
| | 00:30 | We don't want that either; we need that
foam to stay put on the surface of the
| | 00:35 | water just like it would on a real ocean.
| | 00:37 | Okay, so let's fix all those things up.
| | 00:39 | The first thing we want to do is go into
the locator and go to its attributes.
| | 00:44 | In my tests, I discovered that the boat was kind of
penetrating through the water a bit too much.
| | 00:50 | And so I increased the Buoyancy to value of .8,
and also brought the object
| | 00:56 | height up a little bit that's just going to
sort of bias the object up a little bit,
| | 01:00 | so will set that to 1.2.
| | 01:05 | And scrolling down little bit we also
need to adjust the scene scale, that's a
| | 01:10 | really important one. Because if we go
to the Ocean Shader, you'll see that it's
| | 01:15 | got a scale of 10; and the locator shape
scale here should match that, so we will
| | 01:21 | set that to a value of 10 as well.
| | 01:23 | Now if I play this back we won't see a
lot of change here now. What's really
| | 01:27 | going to be most dramatic is when we
increase the Resolution on the pond.
| | 01:32 | All right. So we'll go back to the Outliner.
We want to find the wakeFluid, that's the
| | 01:39 | pond, and then we just we want to
increased that base resolution.
| | 01:42 | Now I am going to turn it up to 300.
You may experience performance issues on
| | 01:47 | your machine, if you have got a modest hardware;
300 is kind of a high-value here,
| | 01:52 | but I need that in order to get the effect I want.
| | 01:55 | Rewind and play that back and you'll see
that my performance has gone down.
| | 02:00 | The playback of the viewport is slower,
but you can see that the wake appears to
| | 02:05 | have a much better definition to it. o
Do a quick render of that, you can see how
| | 02:10 | much better that wake is now.
| | 02:12 | We also want to adjust the Emission Density.
Go back to my Outliner, and a child
| | 02:17 | of the locator is that jetski object, and then
it has children as well, these two Emitters.
| | 02:24 | The first one here is actually the Pond
wake emitter. I want to rename these, okay.
| | 02:28 | So I am going to rename this one wakeEmitter
and the second one here is the foam.
| | 02:36 | I want to rename that, too,
so I know which one is which.
| | 02:42 | Okay, so the wakeEmitter controls, obviously,
how much density is being admitted into that pond.
| | 02:49 | Currently I have got a value of -5.
I am going to reduce
| | 02:53 | that negative value down to about -3,
because I think these waves are bit too strident.
| | 03:01 | Do a test render of that.
| | 03:04 | So that's much better I think.
| | 03:05 | Additionally we need to make some adjustments
to the foamEmitter.
| | 03:09 | Select that foamEmitter, go its attributes,
and I need to increase the amount of heat
| | 03:14 | being generated, because it's just not enough.
Currently it's only a value of 10,
| | 03:18 | so I am going to crank that up to 30,
and that's going to produce a lot more foam.
| | 03:23 | However that foam is kind of drifting
and it's not staying put, its inheriting
| | 03:28 | the velocity of the Emitter, and that's
not very realistic at all. We need that
| | 03:33 | foam to stay put on the surface of the water.
| | 03:36 | To make that happen, we will go to the
foamFuild attributes. In the Dynamic
| | 03:42 | Simulation section here, there's a
Damp factor. Damping in Dynamics is
| | 03:47 | basically a chill out factor; it's a reduction
in inheritance of velocity from the previous frame.
| | 03:54 | If we have a positive Damp value,
that's going to cause in this case the foam
| | 03:58 | to stay put more on the surface of the water.
We'll give that a Damp value of about 0.6.
| | 04:06 | Rewind that and play that back and what
we hope to see here is the foam kind of
| | 04:10 | sticks to the surface and doesn't drift as much.
| | 04:13 | Now we want to go down a little bit farther
into the Contents Detail section.
| | 04:19 | Under Temperature, previously we set the
Dissipation down to 0, which means that
| | 04:25 | it's not going to fade out over time.
| | 04:28 | We got a very low Diffusion value of .08
and that is the default, but we do want
| | 04:34 | some amount of diffusion. Let's do
a render with the current settings.
| | 04:38 | Keep that image and then I want to
increase the Diffusion Amounts to let's say .5,
| | 04:44 | and then replay the Simulation until
it gets to approximately the same frame
| | 04:54 | and then do another rendering with the Diffusion of 0.5.
| | 05:00 | So that's the diffusion of 0.5
and that's the diffusion of almost 0,
| | 05:05 | so that was .08, and that's .5.
| | 05:07 | We're almost finished with our fine tuning.
We just want to play around with the
| | 05:12 | actual Texture properties here and
make that look a bit more realistic.
| | 05:16 | In the fluidShape node here and that
fluidTexture node, we can keep scrolling down
| | 05:20 | until we see the texture section.
Here is where we can control the
| | 05:26 | quality and the properties of that texture itself.
| | 05:30 | Scroll down a little bit. The main one
I want to adjust right away is the
| | 05:34 | frequency, that's the scale of the texture.
| | 05:36 | The higher frequencies would be smaller texture.
| | 05:40 | So if I reduce the frequency I'll increase
the size of the texture. Set that
| | 05:45 | Frequency to 5. We want to store this
image and then do another rendering.
| | 05:50 | That's a texture frequency of 5,
and that's a texture frequency of 10.
| | 05:54 | So with the value 5,
I have basically made the foam larger.
| | 05:59 | Finally I want to increase the contrast here.
| | 06:02 | I want that texture to have more influence over,
in this case, the Opacity.
| | 06:07 | Scrolling back up a little bit here you see Opacity
texture gain is set to a low value here of .3.
| | 06:14 | That means the texture is not having that much
influence over the Opacity of the foam.
| | 06:19 | We're going to increase that Opacity
texture gain to 0.6, store the previous
| | 06:25 | image into another rendering and there you go.
We've got a much clearer foam texture here.
| | 06:30 | That's the Opacity texture gain of .3
and that's Opacity texture gain of .6.
| | 06:37 | Now we have got all of our fine tuning adjustments made
and we can go ahead and cache the fluid before rendering it.
| | 06:43 | Let me close some of these windows and
I want to set my timeline here. Currently
| | 06:48 | I have got 2000 frames to set my timeline
to 240 frames or 10 seconds. Rewind,
| | 06:55 | play that back and make sure that
I've got what I want.
| | 07:09 | All right. So I think we're good to go here.
I have got about 10 seconds of simulation there.
| | 07:13 | You want to re-render a couple of test renders
in order to make sure that everything is working.
| | 07:18 | But now we are ready to create our cache.
We can select the wakeFluid and the
| | 07:23 | foamFluid and we can go into fluid
and cache create New Cache>Options.
| | 07:29 | You'll need to reset the settings, because you may
have some settings in there from before.
| | 07:34 | Okay, so we've got a folder name and a Cache name
and we're just going to render the time slider.
| | 07:41 | I'll change my Cache name here to --
or the folder name rather -- to Finished,
so I'll know that's the finished version of this exercise.
| | 07:52 | Go ahead and click Create, and Simulation
will play through once, and once that
| | 07:57 | Cache is finished, you can go ahead and render it.
| | 07:59 | Here is the rendered version of our ocean
with a wake and as you can see,
| | 08:04 | it looks pretty good. That concludes
our chapter on open ocean effects.
| | Collapse this transcript |
|
|
3. Rendering Underwater ScenesLaying out the scene| 00:01 | In our final chapter on creating fluid effects in Maya,
we're going to look at underwater scenes.
| | 00:07 | Here in this scene I've got a lot of
scene elements. I've got a sky dome and
| | 00:12 | clouds above the water. I've got the
surface of the water. Below the water we
| | 00:16 | have a fluid container to create a fog effect,
and there are some paint effects for the kelp here.
| | 00:23 | In the chapter we're only going to focus in
on the fluid aspects of this scene.
| | 00:29 | Let's take a look at the scene in Maya.
| | 00:33 | Here I've created a whole bunch of scene
elements, everything except for the water.
| | 00:38 | There's a sky dome here, which is a
large sphere. This is box is a 3D
| | 00:43 | container which includes some clouds, and then
I've got some paint effects kelp here as well.
| | 00:50 | I won't be covering any of those techniques in this course.
| | 00:54 | I covered them in a different course, which is
Maya 2011: Creating Natural Environments.
| | 01:00 | Here we're just going to focus in on the Maya fluids.
Let's go ahead and create an ocean.
| | 01:07 | In the Dynamics menu set, I'll go to
Fluid Effects>Ocean>Create Ocean>Options.
| | 01:16 | This time I'm not worried about attaching
to the camera. I'm going to leave that off,
| | 01:20 | but I'm going to make sure that
Create preview plane is on.
| | 01:24 | I know that is going to need to
be a little bit larger, so I'll just go
| | 01:28 | ahead and do that now, increase that
Preview plane size to a value of 30.
| | 01:32 | Go ahead and Create the Ocean.
As you can see here in the perspective view,
| | 01:37 | the ocean is just about the right
size for the sky dome, in this case.
| | 01:42 | If you look at our camera view,
the preview plane is about the right size,
| | 01:46 | so that we can get an idea of what
our ripples are going to look like.
| | 01:50 | We can play this, but it's going to be very,
very slow to update because of these paint effects.
| | 01:55 | So I'll just turn off the paint effects layer
for a moment, just hide its
| | 01:59 | visibility on this paint effects polygons layer,
and then press play, and we can
| | 02:03 | see that we're getting some ripples here on the ocean.
| | 02:06 | All right, very good, it'll turn my paint effects back on
again, and that's the basic layout of our scene.
| | Collapse this transcript |
| Building a shader network| 00:01 | When rendering an underwater scene,
we have to work a little bit harder on the
| | 00:04 | ocean shader to make it look right.
| | 00:07 | Water looks very different when you're inside it
than it does when you're outside it.
| | 00:12 | Let's take a look at just a rendering
with the default parameters.
| | 00:17 | I have already got one here in the Render view.
| | 00:20 | So if we render this scene just as it is now,
it looks like we're above the surface of the water,
| | 00:25 | but the camera is turned upside down.
| | 00:28 | We will make a lot of adjustments here
and we're going to build a dielectric shader,
| | 00:32 | which will be partially reflective.
| | 00:36 | I'll go a head and select the oceanPlane
and open of the Attribute Editor with Ctrl+A,
| | 00:43 | go that oceanShader node and we're
going to make a lot of adjustments here.
| | 00:47 | First of all it's going to have no Diffuse color.
I'll turn the Water Color and the Foam Color down,
| | 00:53 | and all the color in the final rendering will come
from reflections, and from transparency.
| | 01:00 | Okay, so Water and Foam Color
I have turned all the way down.
| | 01:03 | Let's go download a little bit
here you'll see Trough Shadowing.
| | 01:07 | That's darkness in between the waves.
I am going to turn that off as well, set that 0.
| | 01:13 | Also Translucence, normally you want
to increase the Translucence if you're
| | 01:18 | above the surface of the water. Here
once again because we're below the surface
| | 01:22 | we've special consideration. So I want to
set the Translucence to 0 in this case.
| | 01:27 | Now we have got Specular Shading section here,
that's the intensity and size of the Specular Highlights.
| | 01:35 | What I want here is a slightly more specular effect.
I'll set the Specularity amount to .9.
| | 01:42 | I want to spread out a little bit, too,
so the Eccentricity I'll increase to a value of 0.1.
| | 01:47 | So now I am getting a little bit stronger
and little bit larger specular highlight.
| | 01:53 | Okay, now if we render this now it still
won't look like much, because we don't
| | 01:57 | really have any reflections and we don't really have opacity.
| | 02:01 | So if we render it now it will be mostly black
except for a few specular highlights.
| | 02:06 | Okay, that's what it looks like with
just those parameters changed.
| | 02:10 | Basically, it's black. We're getting a little
bit of reflection here that we can see.
| | 02:14 | Let me go ahead and store that image so
we can compare it to our next rendering.
| | 02:19 | Let's build a Dielectric Shader.
If you want to learn more about this
| | 02:23 | I covered it also in more depth in another course, which is
Creating Shader Networks in Maya in Mental Ray.
| | 02:31 | Here we're just kind do a really kind of fast,
accelerated version of that Dielectric Shader.
| | 02:37 | Let's go into the Hypershade window,
Window>Rendering Editors>Hypershade.
| | 02:44 | Here in the Hypershade you'll see we
actually have two oceanShaders;
| | 02:48 | oceanShader 1 actually came with the scene file;
that one is completed, and so if you want to
| | 02:52 | take a look at that and compare it, you can do that.
| | 02:56 | oceanShader 2 is the one that we're concerned with now,
that's the one that we need to work on.
| | 03:01 | I am going to go ahead and middle mouse,
drag it over into the work area.
| | 03:06 | What we want to do here to create a
Dielectric Shader is we want the object to be
| | 03:11 | more highly reflective on the edges,
and more transparent in the center,
| | 03:17 | or in the area that's pointed towards the camera.
To do that we will create a couple of utility nodes.
| | 03:23 | Over here in the Create section of the
Hypershade let's go to Utilities and we
| | 03:28 | want to create a sampler info node.
That's going to find the facing ratio
| | 03:35 | or whether a polygon is facing towards the camera or not.
| | 03:39 | Let's find Sampler Info, go ahead and click that to create it.
| | 03:43 | We also want to create a Utility node
called Remap Value and here it is,
| | 03:49 | Remap Value, click on that, and now I have created these.
| | 03:54 | I want to take facing ratio of samplerInfo
and connect it to the input value of remapValue.
| | 03:59 | Right-click on the lower right-hand corner
of the samplerInfo node and choose facingRatio,
| | 04:07 | then left-click on the lower left-hand corner of the
| | 04:10 | remapValue node and choose inputValue,
and now that connection has been made.
| | 04:15 | If I select the Remap Value node
and have the Attribute Editor open
| | 04:19 | you can see we've got two sections here,
in each one of these is an output.
| | 04:23 | The Value output is a single value
and the Color output is a triple value;
| | 04:28 | it's got a red, green, and blue, component.
We want to connect the Value here to the
| | 04:35 | reflectivity of the oceanShader.
| | 04:38 | We want to connect the Color here
to the Transparency of the oceanShader.
| | 04:43 | I'll select the oceanShader and I want to
find those two attributes.
| | 04:48 | Here's reflectivity, okay and we also want to find
the Transparency and that's going to be up here.
| | 04:55 | All right. Maya is smart and it will know when you
middle mouse drag and drop, it'll know
| | 05:02 | whether to connect the single output
or the triple output.
| | 05:06 | Because transparency is a triple input,
it will connect the triple output automatically.
| | 05:12 | So I'll middle mouse drag and drop
onto Transparency and I can hover my mouse
| | 05:16 | over here and it says remap value out color
is connected to oceanShader to Transparency.
| | 05:21 | Now we can see we're getting a variable
transparency here.
| | 05:26 | Scroll down, we also want to middle
mouse drag onto the Reflectivity.
| | 05:31 | Now when we hover our mouse over this connection,
you'll see there are two connections;
| | 05:35 | remapValue2outcolor is connected to Transparency,
and outValue is connected to Reflectivity.
| | 05:42 | All right. Now we want to make some adjustments
to the remapValue curves.
| | 05:47 | I'll select that remapValue node and in the
Attribute Editor I want to make some changes here.
| | 05:52 | It's going to move these graph points around here.
| | 05:56 | What we want is, is we wanted to be
very highly reflective on the edges,
| | 06:00 | and partially reflective in the faces
that are pointed towards the camera,
| | 06:05 | so that graph is going to look something like this.
| | 06:08 | Now we have also got the Transparency
and we want to be more opaque on the edges
| | 06:13 | and more transparent in the center
and that's what we're getting here now
| | 06:17 | but I get want to make it more extreme by
dragging these two points closer to one another.
| | 06:24 | Okay, so let's do a render of that see what we get.
| | 06:29 | All right. After this is finished rendering I want to keep
the image in order to compare it to the other versions.
| | 06:35 | Now as you can see here we're getting some transparency.
I can see the sky and the clouds through the water.
| | 06:42 | However, our reflections aren't quite working out just yet,
| | 06:46 | but we will adjust that and fix it up in the following movie.
| | Collapse this transcript |
| Setting Refractive Index| 00:01 | We created a dielectric shader
and let's just take a look at that once again,
| | 00:05 | open up the Render View, and the issue here
is that the reflections are not strong enough.
| | 00:12 | You can actually play around with trying to increase
the reflection amount, but it won't actually do anything.
| | 00:18 | What we need to do here is kind of tricky and unexpected.
| | 00:21 | We need to adjust the Refractive Index in order
to get our reflections here more strong.
| | 00:28 | So I want to select the oceanShader.
Go to its attributes, Ctrl+A. We want to
| | 00:34 | scroll up here, we're looking for in the Common
Material Attributes, the Refractive Index.
| | 00:40 | It's set to approximately the correct value for water;
| | 00:44 | that is, if we were above the water not below it.
| | 00:48 | In this case, we want to actually change
this Refractive Index to a fractional value.
| | 00:54 | This is something you would do to get
a metal look and it would also work in
| | 00:58 | this case to give us a stronger reflection here.
| | 01:02 | Okay, so with the Refractive Index of about 0.3,
we'll go ahead and do another rendering.
| | 01:10 | Okay, with a Fractional Refractive Index
now we are getting a much better result to our reflections.
| | 01:16 | We can also still see the clouds in the sky above the water.
| | 01:20 | I'll go ahead and store that image.
| | 01:24 | Now if we were to critique this now we
would say that the reflections are too strong.
| | 01:29 | Part of that is because of the lighting in the scene.
| | 01:33 | I basically over-lit the seen in advance,
because I know that once I add a fluid
| | 01:38 | underwater to create fog, that's going
to dim my lighting down quite a lot.
| | 01:43 | The other reason why this is a bit too bright
is because of the Environment settings.
| | 01:49 | We're going to take a look at the environment color
for the oceanShader in the next movie.
| | Collapse this transcript |
| Adjusting the environment color ramp| 00:00 | We are nearly finished with our ocean shader
for the underwater scene.
| | 00:05 | Let's take a look at where we are so far.
If I open up the Render View, here we
| | 00:10 | have got some nice strong reflections,
but they might be a bit too strong.
| | 00:15 | What we can do is we can adjust the environment
color ramp in the ocean shader to control the color
| | 00:22 | of those specular highlights in those reflections.
| | 00:26 | I'll select the ocean plane and go back
to its attributes, Ctrl+A, and scroll down
| | 00:33 | and just below the Specular Shading section
you'll see Environment.
| | 00:38 | This is the actual color that's reflected
on the surface of the water.
| | 00:44 | To see this most clearly, let's do an IPR rendering.
| | 00:47 | Mental Ray is my current renderer,
I am going to click on IPR and then just
| | 00:52 | drag a rectangle around an area here,
wait for that to render.
| | 00:59 | So this red color is reflection from the oil drum
underneath the water and the
| | 01:06 | rest of all of this is from the environment color here.
| | 01:11 | So if we change these, then that's going to
change the look of the shot as you can see.
| | 01:20 | Okay. What I want to do here is I want to
actually set this flag here to a bright white color.
| | 01:28 | This is going to produce a very
extreme reflection, but that's
| | 01:32 | actually what I want and I can go back
into my Remap Value node that I created
| | 01:38 | earlier and adjust the reflections.
| | 01:41 | But let's just move these flags around a little bit here, too.
| | 01:44 | Maybe I will make this more of a Cyan Hue,
click on that, take that a little bit more towards Cyan.
| | 01:52 | This blue here, maybe I will just bring that over a bit,
so we can see a bit more of that.
| | 02:00 | Let's do a different area of the rendering
so just drag a rectangle here.
| | 02:06 | Click IPR and we will drag the rectangle,
just clear that one out.
| | 02:09 | We'll start to see these little blue spots come up here.
| | 02:14 | Okay, so now we can go back to our remapValue node,
Window>Rendering Editors>Hypershade.
| | 02:21 | Here is our oceanShader.
We want to right-click and graph
| | 02:28 | that network and here is the remapValue node.
With it selected, and the attribute editor open,
| | 02:35 | and IPR still enabled, we can move
these flags around and see the results.
| | 02:42 | As I reduce that point on the value graph,
what's happening is that we are
| | 02:48 | getting less reflection here in this area.
We just kind of experiment and
| | 02:55 | move this around until we get the result that we want.
| | 03:01 | Perhaps that's too bright.
We can kind of reduce the reflection amount.
| | 03:05 | Of course we have also got the opacity here.
| | 03:09 | As I change that, we will see the Opacity change.
| | 03:14 | If I bring this flag all the way over to the right,
that means we are going to have a lot less transparency.
| | 03:20 | In other words, we will see more of the reflection
and less of the sky above the water.
| | 03:29 | This is just one of these things that
you want to season to taste and
| | 03:32 | experiment with until you get
the look that you are going for.
| | 03:39 | Let's try a full render of that.
| | 03:42 | Okay, so that's how my rendering looks like.
I will go ahead and store that
| | 03:46 | image once again to compare it to the others.
| | 03:48 | What we have done here is we have
kind of evened out the reflection, so
| | 03:52 | it's kind of more consistent, simply by moving
these points around in the remap value node.
| | 03:59 | Again, you want to experiment with this and use IPR
in order to fine tune the look that you are going for.
| | Collapse this transcript |
| Creating a fluid for underwater fog| 00:00 | Our rendering won't be very realistic if we
don't add any fog to the underwater shot.
| | 00:06 | Let's take a look at the rendering that made.
As you see here that's not terribly believable.
| | 00:11 | We need to add some fog here
to make that feel like you know there's
| | 00:16 | some murk and the objects in the distance
will be darker and maybe bluer.
| | 00:22 | Okay, to do that we will use a fluid container.
We will go to the Dynamics
| | 00:26 | menu set in Fluid Effects>Create 3D Container.
It's built here at the origin and we need to size it up.
| | 00:34 | So let's go to the Attribute Editor, Ctrl+A.
I'll set the X size to 600 units,
| | 00:40 | so it's just as wide as the SkyDome here.
| | 00:45 | The Y size, which is the height, I'll set
to 100 units and the Z size 600 as well.
| | 00:52 | Now currently it's actually above and below
the oceanPlane, as you can see here.
| | 00:57 | We'll just need to move it down.
Since this is a 100 units tall we can move it
| | 01:02 | down to a Y-value of -50 and now it's
ust right below that oceanPlane.
| | 01:10 | Okay, so all of the work on this is
actually shader work, because it's not in
| | 01:15 | fact dynamic at all. There is not going
to be any density or any other dynamic
| | 01:20 | properties flowing through this fluid container,
its just purely to be filled up with fog.
| | 01:27 | That means, I can set these contents methods all off,
so there is not going to be any dynamics.
| | 01:32 | Scrolling down we want to open up the Shading Section,
and you'll see you've got
| | 01:38 | Transparency, Color and Incandescence.
| | 01:41 | Okay, well for the Color we want that
to be kind of deep blue, not a completely
| | 01:46 | saturated blue but a little bit desaturated
maybe the little bit less value.
| | 01:53 | For the Incandescence we don't want to
be Incandescent and currently it isn't really,
| | 01:57 | because its input is temperature
and there is no temperature, but just so
| | 02:01 | I don't have these other colors here confusing me,
I am just going to delete those.
| | 02:06 | Really the Opacity is the most important
attribute here, and currently its input
| | 02:11 | is density, but there is no density,
because it's not dynamic.
| | 02:14 | What we want here is a Y gradient.
It'll be thicker at the bottom and thinner at
| | 02:21 | the top, as you can kind of see here.
Basically we need to adjust these
| | 02:26 | values in order to make it look right.
| | 02:28 | But it's kind of hard to see that in the Camera View,
we really need to do an
| | 02:32 | interactive production render to make that clear.
| | 02:35 | So I will go ahead and click on IPR
and its rendered the wrong view, so I want to
| | 02:40 | make sure I give focus to the Camera View and click IPR.
| | 02:44 | Select the region to be in tuning, I'll select
the representative area here that
| | 02:49 | includes my little oil drum, wait for that to render.
| | 02:55 | So you can see here, although it doesn't
look quite we've very much density
| | 02:59 | here and there in the viewport, in the
render you can see that it's extremely dense.
| | 03:05 | Okay, so I want to back to that fluid container,
so I'm going too select it and
| | 03:11 | then in the Attribute Editor start playing
around with some these values.
| | 03:14 | Most importantly is the Transparency.
need to make that a lot more transparent
| | 03:18 | like almost completely transparent in this case.
| | 03:21 | So that's a really Transparent Fluid,
too transparent, but we can also play
| | 03:26 | around with this Opacity curve here.
I can bring this point on the left
| | 03:32 | upward so it'll be more opaque, cool.
| | 03:37 | So that's starting look okay, we just
want to make sure we eliminate this line here
| | 03:41 | and that's kind of going away now,
that line represents the boundary of the
| | 03:47 | ocean itself and we just want to
make sure we obscure that, cool.
| | 03:50 | So we just play around with these 2 points
on here to control the Gradient or
| | 03:56 | how it transitions from a more dense area at
the bottom to a less dense area up at the top.
| | 04:03 | All right, maybe a little bit more Transparency
we just want to just find the sweet spot
| | 04:09 | here until it looks good.
| | 04:10 | I think that's almost there we are very,
very close, maybe I will just move
| | 04:14 | this Opacity point up a little bit here,
because remember we want to obscure
| | 04:19 | that line so we don't see it.
| | 04:21 | Okay, so I think I'm pretty good here actually
to do a full rendering, go ahead and click Render.
| | 04:29 | Okay, with those settings we still don't
quite have what we need here, so I just
| | 04:33 | what to give it a little bit more adjustment here.
We will go back to IPR mode,
| | 04:40 | drag a rectangle around that, and play
around once again with the Transparency.
| | 04:45 | We want it to be a little bit less transparent, more opaque.
| | 04:49 | We can also change the color itself, too.
| | 04:53 | Change that Color many make it darker, cool. All right.
I think we're in a good place here now.
| | 05:06 | Those settings are very sensitive
and changing any one of those fluidShape
| | 05:12 | Shading attributes just a little bit,
may have a very profound effect on your rendering.
| | 05:18 | So you will need to spend quite bit of time
experimenting with those,
| | 05:22 | especially with IPR, so that you can get
the exact look that you are going for.
| | 05:27 | There we go, we have got some fluidFog,
now it doesn't look quite the same as
| | 05:31 | the image that we saw the beginning of
this chapter, but that's because as I
| | 05:36 | said all these settings are very, very sensitive.
| | 05:38 | And so you really need to devote more time
than we have here in order to tweak
| | 05:42 | it out and make it look exactly perfect.
| | 05:45 | But I'll include the scene file of the
other version so that you can analyze it.
| | 05:50 | That then concludes our chapter on
rendering underwater scenes and that also
| | 05:55 | closes out our course in Creating Fluid Effects in Maya.
| | Collapse this transcript |
|
|
ConclusionNext steps| 00:00 | As we've seen, Maya's Pond and Ocean
are powerful tools for simulating the surfaces of liquids.
| | 00:07 | The visual effects techniques I have demonstrated here
have been employed in countless productions.
| | 00:12 | To further your skill-set in Maya I invite you to browse
the other training courses hosted here at lynda.com.
| | 00:18 | I hope you've enjoyed this course,
covering the Maya Ocean and Pond tools.
| | 00:22 | Thanks and goodbye.
| | Collapse this transcript |
|
|