4
$\begingroup$

I am trying to create two types of rain the first type being rain falling to the ground as im sure you have all seen before. The second type i am trying to create is raindrops that you will find left over on items after rainfall.

enter image description here

$\endgroup$
2
$\begingroup$

If video tutorials are your thing, Andrew Price has made one on both types of rain.

Here is one for the big drops on a window:

https://youtu.be/sO8kw0a2ZeI

Here is one for the splashes onto wet ground:

http://youtu.be/XEZYcyi7JC0

(This is slightly outdated as it is for the internal renderer, but I think that the dynamic paint itself is applicable to cycles too.)

Edit:

Due to popular demand I will try to summarize the tutorials here. I skip the part about raindrops with trails, as your reference doesn't show any. I will also skip the compositing and lighting part of the tutorials.

Close-up raindrops

Modelling and materials

Start with a UV Sphere. Rotate it by 90° and in edit mode select one of the poles. Hit o to go to proportional editing and move the pole into the sphere to mimic surface tension. Go to the materials panel and add a Glass bsfd. Set the refraction index to 1.33.

Use this object as a template create about a dozen raindrops by pushing single vertices in from the sides. Using a reference image here helps. The point here is that raindrops aren't all somewhat rounded blobs. Instead, they can be of a variety of exotics shapes.

Raindrops courtesy of Wikimedia

When you have your raindrops done, add them to a group.

Particles

Select the object you want the raindrops to show on. Go into the particles panel and add a new particle system with hair as the type. In rendering select group and pick the one you just created. If the particles point the wrong way around, select normal and rotate the particle meshes.

Play around with the particle count, size, random size and random rotation until you are happy with the result.

Falling rain effect

(I tried to adapt this to Cycles.)

Particles

Start by setting up your particle system as you wish. To make it work with dynamic paint ensure that the display amount is set to 100%.

To make the particles show up, set them to appear as objects and make them spheres. Assign an emission material to them. To make them show up as trails, add motion blur.

Now select the object you want the rain to fall onto. In physics set it up as a collision object. There turn both particle dampening and particle friction up to one.

Select the particle emitter again and determine the frame the particles hit the ground by scrolling through the animation. Set the particle lifetime to [start of the animation] - [frame of contact] + 1 so that they die one frame after they make contact.

Caveat: make sure that the emitter and the ground are on the same layer.

With the particle object still selected go to particles > cache and set the cache step to 1. If the options are greyed out, save your file first. In particles > physics set subframes to 2.

In cache click bake all dynamics. This should take some time.

Dynamic paint

We are going to use the rain as a brush and the ground as a canvas. For this you must UV-unwrap the ground.

Wet areas

With the particle emitter selected go to physics > dynamic paint > brush and click add brush. Set the color to black and disable absolute alpha. Under dynamic paint source set the type to particle system and pick the particle system you have created. Set the solid radius to about 0.15. This value depends highly on your scene. This controls the size of the area wettened by a drop.

With the ground selected go to physics > dynamic paint > canvas and click add canvas. Set format to image sequence and set the resolution to 1024. Adjust the frame range to match the actual contacts. To make the simulation more stable, set the subframes to 5. Under dynamic paint output select your UV -map and pick the destination folder for the baked files. Under dynamic paint effects check use spread.

Finally, under dynamic paint output click bake image sequence.

Ripple effect

Next, add a new canvas under dynamic paint. Set the format and resolution as before. Set the surface type to be waves. Set spring to zero and the dampening to 0.6.

Check the UV-map as before and select a new output folder. Finally, change the file format to Open EXR and hit bake image sequence.

Splashes

Finally, select the first canvas we created and change its type from paintmaps to wetmaps. Under dynamic paint advanced, set wetmap drying to 8. Under dynamic paint initial color set the color to black.

With the particle emitter selected, set the solid radius to 0.010 and disable the smooth radius completely. Also set the paint to be white.

Once again check the UV-map as before and select a new output folder. Finally, hit bake image sequence.

Materials

Crack open the node editor for the ground. Add two material mixes and hook them up to reach other and the material output. Hook your old material up to the first one.

Add an image texture with the first image of the first maps you baked. Set the type to image sequence. Set the offset to the frame of contact of the particles. Where it says color set it to be non-color data. Hook this up to the value input of the first mix.

Add a glossy node and hook it up to the first mix. You may want to add some method of control between the image and the mix. math, color ramp and RGB curves are all possible candidates.

As some materials are darker when wet, you can play around with the color of the glossy. Keep in mind that the setup is not yet finished though.

Add the second image series we baked like the previous one. Run it through a heightmap and plug the resulting normal data into the glossy and the material you already have.

Finally, add the last image series and plug it into the second mix node along with an emission so that the emission is in the upper green slot and the rest of the material in the lower.

I apologize if this is unclear. It is difficult to compress almost two hours of video into a free words while typing with a touchscreen.

Anyway, I hope this helps.

$\endgroup$
4
  • $\begingroup$ Thank you very much! You can always rely on Andrew Price for a good tutorial. $\endgroup$ – Kikkaz Aug 4 '16 at 7:58
  • $\begingroup$ Roger that. Could your mark this as solved? $\endgroup$ – Mörkö Aug 4 '16 at 8:02
  • 1
    $\begingroup$ it will be useful to give an overview of the tut's because if the link gets broken, the answer becomes obsolete. By the looks of that downvote, someone agrees with me. $\endgroup$ – Unnamed Sentient Being Aug 4 '16 at 19:27
  • 1
    $\begingroup$ @user277143 please add detail to the answer. $\endgroup$ – user1853 Aug 4 '16 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.