|
|
|
Here's
a small
tutorial on how to do water droplets on a surface by using a Blend
Material, some masking and other tricks and flips to get a reasonably
good-looking surface scattered with droplets
What
you need: 3D Studio MAX 2.0/2.5/3.0, Photoshop 3.0-5.5, a basic
understanding of 3DSMax's material editor, and of course Photoshop,
some spare time and a banjo. Maps used in the tutorial: drop_mask.jpg,
drop_mask.jpg, scratch.tga
Download:
drop_maps.zip
134 kB
1.
First start up Photoshop and CTRL+N to get a new document, 600*600
pixels will do (the bigger size, the better, though). Paint some
points with the pen tools in various sizes, like the pic to the
right. The pic will serve as both bump and mask and you will save
two different samples each for its specific purpose.
Select all (CTRL+A) and do a Gaussian blur to the whole pic at
about 0.8 strength; this is to smooth out the jagged contour from
the pen tool (of course, you could have used the paintbrush instead,
it's up to you). Now save a copy, name it drop_mask.jpg and place
it somewhere in your maps dir. Next, select the magic wand tool
and select the black area, invert selection so you have the white
dots selected, again do a Gaussian blur this time at about 3.5
strength. This last blur was for the bump map, so save a copy
in your maps dir name it drop_bump.jpg. And that's about it with
Photoshop.
|
|
| 2.
Time to start 3DSMAX, or if it isn't already, /Reset/Save your current
work in 3DSMAX. Start with a sphere, fairly "dense" 40 segments
will suffice, create a target cam with the target centered in the
sphere. Put in some light, create and position a target direct light
pointing at the sphere, making sure the hot spot covers the sphere.
Also, create a box covering the works, including the cam and the
target direct light, apply a normal modifier to the box (in the
modify panel), flip the normals, by checking the check box that
says just that. The box will serve as environment to reflect for
the raytrace material you apply to the drops later. Your perspective
viewport should look something like the pic to the right (the cam
doesn't show up clearly in the pic though, but it's there). The
effect of the flip Normals modifier is clearly visible. |
|
3.
Now open the Material editor; the standard material has to be replaced
by a Blend material and you do so by clicking the button that says
Standard (lower right). When the material/Map Browser appears, choose
the Blend material, and discard old material when asked. You should
now have a gray Blend material sample sphere in your No. 1 sample
slot, and the rollout for the material is as the pic below. Assign
the material to the Sphere in the scene. Give the material a name
such as Drop_Blend or something similar.
 |
 |
| 4.
Both material 1 and 2 that is part of the Blend material is of standard
type, so first let's deal with the material 1 that is to be the
surface of the sphere (material 2 will be the water drops). Click
the material 1 sample slot (where it says [Standard]); the rollout
for the material 1 is just a standard material. For your amusement,
use a bitmap for the diffuse -- I chose to use a crosshatch type
thingy (pic 1) to the left (all maps are downloadable at top of
page). Also change the shading to metal, change the Shininess and
Shine strength to 50 each. Activate your cam in the perspective
viewport, render out a sample at 320*240 pixels res, and the rendered
pic should be something like the pic to the right (pic 2). Now to
an important thing: to be able to change the tiling of the maps
individually, i.e., bigger/smaller drops without changing the tiling
of the surface of the sphere, two mapping channels must be used.
Yes, I found this scary too when I first read about it, but it's
very useful and one really has to use it in some cases, such as
this one. Choose the Sphere and open the Modify panel, assign a
UVW Map modifier to it; in the rollout choose spherical and change
the U and V Tile to 2.0 each. Render out a new sample; the "repeat"
of the texture is higher and the "scratches" seems smaller. While
you're at it, assign another UVW Map modifier, spherical, for controlling
the tiling of the drop maps. At the rollout, change to UVW map to
Channel 2 for this modifier like the pic 3; leave the tiling for
now, adjust those later. |
pic
1
pic
2

pic
3
|
| 5.
Open the Material editor again, click the Material 2 sample slot,
and a standard material rollout appears. Change from standard to
raytrace material type by clicking the Standard button, discard
old material when prompted. The raytrace material rollout is slightly
different from the standard material (pic 1), as seen to the right.
Now click the bump slot where it says None, and choose bitmap from
the browser, and find the drop_bump.jpg you painted in Photoshop.
Important in this rollout is to change the texture mapping to address
the second UVW Map modifier in the modifier stack for the sphere,
so drop down the menu and choose Explicit UVW 2 instead (pic 2).
Go to the "root" of the raytrace material. Some changes to the basic
raytrace material have to be done. First check the two-sided checkbox.
To have the material transparent click the black box next to the
Transparency and bring the "sliders" down to R:235, G:235, B: 235,
take up the Shininess to about 70 and the Shininess Strength to
about 150 (pic 1). Finally, open the Raytracer Controls rollout
and enable the two check boxes (pic 3). Do a test, render out the
cam viewport again ... no drops? Things aren't quite done yet, masking
out the drops has to be done, so get to the root of the Drop_Blend
material.
pic
3
|
pic
1
pic 2
|
6.
Click the Mask button (pic 1) and choose a mask map, two sample
slots available for the mask, a map and a mask, click the
map button, browse from new, and choose a bitmap Map locate the
scratch.tga in your maps dir once more. Second click the mask button,
browse new, choose bitmap Map, find the drop_mask.jpg and you're
almost done. When you have assigned the drop_mask.jpg there is one
important thing to do: change the Mapping to Explicit UVW 2 (pic
2). In the Material/Map Navigator your material tree should look
like the one below (pic 3). Render out the cam viewport; the drops
are there, but they are a bit to big, so choose the sphere and in
the modify tab choose the topmost UVW Map modifier and change the
tiling to U:3, V:2, render again. The output from the render this
time will look something like the picture below (pic 4)
pic
4
|
pic
1
pic
2
pic
3
|
7. OK,
it's time to set up the environment, so the raytrace material has something
to reflect. Put in an omni light between the sphere and cam and in the
rollout exclude the sphere from being lit by the omni (pic 1).
To see
the effect of the raytrace material, open the material editor again
and click the almost black color box next to the Reflect, drag the slider
down so you get a gray (R;G;B=126) value instead, render again. The
lit box clearly is reflected in the droplets, a bit too much perhaps,
so bring the sliders down to R;G;B=40. Render again, there seems to
be a problem with the color of the drops, too white in the not directly
lit areas and too black where lit. You can control this by doing the
following: Open the Mask channel again, click the Map button so the
Bitmap parameters appears for the scratch.tga bitmap, now click the
button which says Type: Bitmap then when at the Material/Map Browser,
browse from new, choose the Output Map, when asked replace Map,
check the Keep old map as sub-map? and click OK. You now have control
over the output from the map channel. Drag the Output amount spinner
down to about 0.5-0.6 (pic 3).
And that's
about it for this material -- your material tree should look like pic
4. If you render out a sample now, you should have something like the
picture below (pic 5). The scratch map shows through the drops more
clearly now, you can go back to the material editor and try out other
settings with the specular/reflect/IOR/opacity settings to fine-tune
the material/drops. You could also try some experiments with lights
set up, for example, have a spot to control the hi lights of the droplets,
etc., etc.
Animate
the drops ... perhaps a new "grayscale" drop map has to be made, a more
stretched-out drop shape would do better when animated.

"The
Space People think factories are musical instruments.
They sing along with them.
Each song lasts from 8 a.m. to 5 p.m.
No music on weekends"
Talking
Heads
Please
adjust your monitors brightness/contrast, you should see the letters
C D E but not A and B
Handmade by Kåre
Ola Jacobsson, no animals harmed during the process.
Copyright ©
1999 Kåre Ola Jacobsson
|