Who will mow the lawn? In most families owning a garden, this question often comes with the weed-end. I’m sure that you would prefer to play with Blender ! What is the common point between a blender and a lawn mower? They both have rotating blades ! So, you have a good reason to stay in front of your computer and mow virtual grass !
This tutorial and setup have been inspired by the excellent video tutorial about making realistic grass, written by Andrew Price on blenderguru.com. His materials and lighting setup are really awesome. I have enjoyed playing with them.
Last year, I had done some countryside scenes with animated grass, but I had used a completely different method to animate the grass, based on a mesh hidden underneath the ground surface, animated by a displacement texture.
Andrew’s method to simulate the wind and animate the grass is based on a moving texture driven by an empty. This texture is used by a Field, set to wind. The texture used is a procedural Marble texture.
After reading his tutorial, the first idea that came to my mind was : great, we have nice grass, but now... how to mow the lawn in an animation? The answer was : By using textures to control the hair particles.
Textures moved by an object or an empty used as reference have plenty of uses. In GIMP or any other image editor, you can create textures with specific patterns to achieve all kinds of interesting effects. On my site, you will find a tutorial based on displacement textures, dedicated to foot prints in sand, mud or snow. My short animation Crazy Boat is an other example of the use of a moving texture applied to the water material, to create a hole in the surface of the sea under the boat.
In this example, I will use a texture animated by an empty to define an area where the grass (hair particles) are pushed by the texture under the lawn mower. In fact, the lawn mower is parented to the same empty used to drive the texture. The texture is added to the Ground plane material. Note that you could alos drive your texture using directly the Lawn mower object, but using an empty is handy if you want to change or resize the Lawn mower model.
As we will use RGB as Wind parameter for the Field, after noticing that the grass behaviour was not the one I expected when using a greyscale texture I experimented with other color textures. Using Red, Green or Blue give different results : your hair particles are pushed in different directions according to the choosen color.
After some tests, I decided to use a Blue on Grey texture. The Grey color is set to (R=127,G=127,G=127) or (R=128, G=128, B=128. The Grey color is neutral and doesn’t affect the particles. Using a Blue color, I got the grass blades to be pushed in the direction of the lawn mower moving.
The texture is set to Extend mode. This allows to extend the color of the texture in all directions and you will get an infinite trak in the direction where the Blue color is in contact with the border of the texture. All the texture you could need to use this tutorial are in the Zip File named Tracks-Creator.zip
Note that you can control visually the effect of the texture in top view, and resize the texture to adjust the width of the mower trak by resizing the Empty. Use S Key without any axis specification to avoid diagonal distorsion ! You may notice that the effect of resizing is inverted : your texture increases when you reduce the size of the empty.
Adjusting the Strength parameter (you can alos adjust the Contrast parameter of the texture), I have used the value allowing the shorter grass. I stopped just before the grass totally disappear, for more realisms. This allow to keep some uncut grass blades.
Now, we need to get shortened grass on the trak of lawn mower. Using Weight Painting on the ground mesh allows to get various lengths for the grass in different areas, but animation of the weight is not possible (I think!). Selecting Particle Mode in the 3D view and setting the particles system to Editable allows to vary manually the length of the hair particles where you want, usin the Comb tools, but this feature is not animatable as well.
The old particle system available in former releases of Blender allowed to control the length of the Static Particles (name of hair particles in those old versións) using a greyscale texture. I haven’t found yet such a function in Blender v2.48a, but maybe one of the other Field options allows it. Until I’ll find a better way, I used another method to get the short grass after the lawn mower passed by :
The idea is simple : I duplicated the ground plane and set the copy to not render the emitter. On this second ground surface, using an other particle system, I make grow short grass. It is always present but only visible in the area where the lawn mower has pushed down the long grass blades ! it is not necessary to keep the same surface as the main ground plane, because you only need to fill a narrow lane on the trak of the lawn mower. After reducing the surface, you can reduce the amount of hair particles created on this surface, otherwize you’ll get very thik grass on this lane.
Using different shapes or Field types for your textures allows you to create wheels or caterpillar tracks in the grass, or even the shape of a moving creature in high grass.
In the images here above, you can see various textures and the effect that you will achieve by using them in your setup. All these textures are provided in a Zip file joined to this tutorial.
In the example shown until now, we have used only static textures (simple images). You will certainly want to create more complex effects, with a Jeep car driving through the fields or a predator running in the high weeds, and of course following a paths that will be all except straight !
No problem ! You will use an animated texture. You might wonder how to make this texture, but don’t worry, because thanks to the second Blend file provided with this tutorial, it will be as simple as pushing a button or no much more ! The Tracks-Creator will do almost everything for you. You just have to choose if you want to generate an AVI file or a sequence of images.
Just open the Tracks-Creator.blend file and follow the instructions in the Text window. There are 2 screens available :
Screen 1 : Animation -Screen 2 : Compositing.
In the compositing screen you can adjust the level of blur of your animated texture.
There is a different setup on each of the 3 layers used. This will allow you to create curvy animated tracks for a lawn mower, a car or a predator. After that, you will be able to create all kinds of tracks to match all your needs.
Just add your animated texture to material of the surface emitting your grass particles and apply a Field Effect. Dont forget to fill the line with your texture name. Use an object like an empty as reference for your texture : it will help you if you have to change the orientation of the texture (rotate in top view).
Here we are !
I hope that this tutorial and setup will be understandable and useful. Feel free to tell me if you noticed errors, missing informations or if you have found a better way of doing this kind of worque !
Thanque you for reading !
By Philippe ROUBAL 3d-synthesis.com