|
Ok I'm back, and this time I've got more spangly wibbly
bits than you can shake a stick at! "Hoorah!", you shout
"what are you gonna teach us this time uncle chuggnut".
Well I'll tell you, and don't call me uncle, I feel old enough without
that.
Wooly jackets, the smell of the ole salty dog, sheepshanks, leathery
skin and pipes. Any of these thing ringing a bell? Alright then I'd
better tell you. The sea. Ah, now it's all clear. This should help
alll you lost souls who need to do some funky water type effects.
This here is a quick real video clip of the finished
fandango....
And if you can't be arsed to wait for that then heres
a quick pic...
And god (or whoever) said let there be a circle.....
Lets start off nice and simple. A spline, or to be
more exact a circle. Drag out a large circle. This is going to serve
as the extents of your ocean, so make sure it's big enough for what
you need. Then slap an extrude modifier on it. Extrude it some, how
much deosn't matter, just make sure that the cap settings are set
to grid. Thats the important bit.
You should have something like this, in fact you WILL
have EXACTLY this, it's a little early in the tut to be getting lost
yet!
This is a two sided shape, and while I have nothing against two sided
shapes, we only need one side for this tut so, slap on a edit mesh
and chop off the sides and the bottom. Good. Now we have a general
base to shape the waves on. Even though there are quite a few polys
in the shape we're gonna need more if we want any sort of detail in
our waves. What we need to do is to beef up (beefcake, BEEFCAKE!)
the area of the mesh that we're gonna be looking at. This way we don't
spend polys where we don't need em'.
I'm taking a ride with my best friend....
We could select some of the faces by hand, but if
we needed to pan the camera around a bit, then this wouldn't be very
efficient would it? ("No uncle chuggnut")So the best way
is to use the volume select modifier. So go put it on. It selects
parts of the mesh thsat are contained within the gizmo, and it's animateable
so you can dynamically change which faces are selected. Set it to
select faces and choose the cylinder selection method. Now because
we're working with a flat shape you may find that when you scale down
the gizmo, that it stops selecting anything. If you do a 2D scale
in X/Y from the top this should get round it.
Now we have a small patch of faces selected.
TIP:I forced the visability of all the edges in the mesh before using
volume select, that way you can see what it's doing.
To beefup (BEEFCAKE!) the selected area bung on the tesselate modifier
and give it 2 or 3 iterations. You should now have this....
A dense area of mesh in the middle of the circle.
Now we need some waves, you can't have an ocean without waves can
ya? Well maybe you can but I wanted waves and as this is MY tut I'm
gonna have waves or I'll sulk!
Ijust can't get enough, I just can't get enough....
Ok so I'm gonna use some space warps, sure I could
have slapped on a wave modifier, but all seemed too much like hard
work and thinking to me. So spacewarps it is. Now I'm going to put
three waves on this puppy, one very LARGE wave, we'll call this the
swell wave. It's job is to generate a general heave to the whole thing,
like a giant shifting tidal kinda' movement. Then I'm using two smaller
waves that are nearly the same but just a little different and I'm
going to rotate them so they lie at an opposing angle to the swell
wave. You can place them wherever you want, but this configuration
seemed to work quite well. Be sure to animate the phase of
the warps so that they appear to move along. I used a very small amount
of phase. Over 500 frames I animated the phase up to a maximum of
3. In hindsight this was a little slow overall. But I can live with
it. The swell wave should have a small phase value or the sea will
look a bit to lively and this will not help set the scale of the ocean.
Slow moving things look BIGGER.
 |
This is a pic of the warps in place. See how big the swell wave
is. Cor blimey! |
Remember to bind all the warps to the water mesh -
use the button. Because
only the tesselated bit of the mesh is selected, the outer areas of
mesh don't get affected by the waves. This is good if you want to
keep the horizon line still, further helping to set the scale of the
ocean. But if you want to see the edge waving, like in a pool, then
slap a mesh select on after the tesselate and this should fix the
problem.
All I ever wanted, all I ever needed is here in
my arms....
So now we've got the basic watery mesh sitting there
waving and being all watery. But it doesn't look much like water does
it? What it needs is some cunning texture that will magicaly transform
it in to a yawning stretch of the Atlantic (or where ever).
So what are the properties of water? And don't say it's wet. Well,
it's transparent, it's reflective and it distorts stuff when you look
through it. Aha! it just so happens that I can simulate all of those
properties with my trusry materials editor. Onward to the batmobile
(TM).
Bring up the materials editor and call a new slot "water"
(or something equally original). Set the transparency (opacity) setting
to 20%. It's not necessary to set it to 0% because water is not completely
transparent, just nearly. Next set the diffuse and ambient colours
to dark blue and VERY dark blue. Mostly you won't see these colours,
but it's important that you set them, also set the specular colour
to white. Water is also kinda shiney, so we need to set the shineness
appropriately. Make the shiny graph show a tall peak ala this diagram.....
Copy the rest of the settings from the piccy. But
don't set the supersample just yet.
Now the wave spacewarps we created will cater for
the gross movement of the water. But water on the whole has a lot
more surface texture that just these large waves. What we could do
with here is cunning use of bump mapping. For those of you who don't
know bump mapping is a kinda fudge to give the illusion of surface
texture without having to model it. You don't actually get a lumpy
surface, it just messes with the way it calculates highlights to make
you think that there is texture. The classic way of creating water
is to use a noise bump map. Not one to fly in the face of such hallowed
tradition, that's what wer're going to do. But in a funky dual level
kinda way. What we need is a large heavily detailed bump with a smaller,
subtler bump at a lower level. For this I'm using the mix map. So
click on the bump slot and choose mix from the list. A mix map blends
two maps together. Goto the first slot in the mix map and choose noise.
Name this map "Big noise". Make the size of the noise about
25. Then goto the second slot in the mix map and choose noise again
call it "small noise". This time put the size down to 1
and push the lower threshold up to about 0.4. What this does is to
change the falloff from black to white in the noise. It means we get
more black with sharp white noise peaks on our map. Go back to the
mix map and set the amount of blend between the two noises. 0 means
you get all "big noise" and 1 means you get all "small
noise". I used a value of about 0.1, lots of "big noise"
with just a hint of "small noise"
Let me see you stripped down to the bone...
Just two more things to set in this material of joy.
The reflective bit and the bit that makes it go all wibbly. Lets deal
with the reflective bit first. Now, in reality (pah who needs it!)
the reflectivity of water changes on the angle that you view it from.
If you see it directly from above then it's not very relective at
all, but if you view it from a really low anlge, then then relfectivity
increases. Now I could write an expression to alter the amount of
reflection in the material based on the angle of the camera to the
water. But I just can't be bothered. It all seem too much like hard
work, so I'm gonna set it up for a kind of all purpose look. What
we need to do is set the reflectivity so that you can still see the
blue colour comming through clearly. (but the look of the thing is
up to you) I set it to about 20%. I was going to use a bitmap in the
reflection, but I opted to go for the generated reflection because
is gives slightly more detail. What you do need to do is to give it
something to reflect. We need to set up an environment. To do this
pick an empty slot in the material editor and click the get material
button . From the list pick bitmap and
choose a nice cloud piccy for the reflection be sure to set the mapping
type to environment and spherical. I tiled mine a bit to make it look
more complex that it really was. Next goto the environment setting
under the render menu. Click on the background slot and set the dialogue
box to show what in the material editor. Then choose your cloud texture.
This should mean that the water will reflect the clouds up above.
Next we need to set the wibbly bit. This is called refraction (but
you already knew that didn't you?) There are three different types
of refraction (in max 2.5 anyway) ...
A.refelect/refract
B.thinwall refraction
C.raytraced.
Believe me I tried all of the multiple times. But
in this situation thinwall seemed top work the best. Which is also
good because there is very little to set up on it. I just changed
the bump effect to around 3 so that It would take more notice of the
bump map I put on. Set the refraction level to around 50%. The IOR
(index of refraction) was set to 1.8. Yes I know thats not the IOR
of water, but it just looked good.
And your worlds they fall apart, and the walls
come tumbling in....
It would be good if there was something to refract
though eh? I put this rusty metal pole in. But whatever you feel.
We also need to fix the background. I used two cylinders, with the
tops and bottoms cut off and flipped inside out. I put one above the
water for the sky, which I mapped with some clouds. The other, I put
below the water as the sea bed. I mapped it with a gradient, from
dark blue at the top the a more deeply saturated blue at the bottom.
This seemed to work just fine.
Then I put a camera in, this is the view from the
camera....
And thats about your lot. I put a bit of image motion
blur on the water - just the standard settings. Then I rendered it
out through the video post, using a bit of lensFX focus (which 9 times
out of ten is crap, but I managed to get away with it today). And
there you have it. I think If I did it again I would probably speed
the waves up a bit, bat as for the rest I think it worked out knida
well. Till next time, Ta la.
Ten extra points for anyone who can tell me the name
of the band whos lyrics the headings come from - it's dead easy!!
|