Cinema 4D's easy to use hair module enables us to create any type of hair object with its comprehensive options and powerful tools. In this tutorial, the Hair module will be used in order to create a realistic grass effect which will also dynamically interact with a collider object.
Start by creating a surface that you want to grow grass on. Size wise mine is 800x25x800cm Cube with 25x1x25 segments.
Select the cube you created and make it Editable (Shortcut C.)
Switch to the "Top" view by pressing the F2 button. Then select the surface polygons which you want grass on.
Follow the Simulate>Hair Objects>Add Hair menus to add the hair object.
Now You should end up with something like what's shown below.
Now select the Hair object and switch to the "Hairs" tab. Here we are going to make some changes to get a realistic looking grass effect. First of all let's start with "segments". This option, as the name implies, increases the number of segment guides. Since we will be using the dynamic properties of the hair object, more segments enable us to get a much more realistic response by each of the individual hairs. So, I am going to set it to 48.
Under the same tab, another option is "Count". This directly defines the number of individual hairs that will be rendered. Use 10000 for the Count value.
The next variable is "Clone". This one creates clones for each individual hair. So, if you have 30 hairs and set the value of the Clone to 5, you'll end up with 150 individual hairs in total, but as a cluster of 30. I am going to specify the Clone value as 30.
The following four variables are for determining the position and magnitude of the clones. The first two are Root and Tip. "Root" specifies the maximum distance between each clones' root and the original position on the X-Z plane (surface plane.) And "Tip" is the same but this time for the tip of the clones. Set them as 10 and 25 respectively.
The last two parameters are Scale and Variation. "Scale" is for how much the clones' length can vary compared to the original length. "Variation" is for, as the name implies, how much this scale can vary. If you wish to get a much more scattered result, set both of them as 100% otherwise leave them as they are. Don't forget that this option may dominate your pre-defined "length" option and result in longer hairs.
Now we are going to edit the hair material. Double click on the material to open the Material Editor. Let's start with the "Color" channel; The only thing to change here is the gradient colors. The picture below shows the specifications of the color for the left hand side.
And this picture is for the right hand side of the gradient color.
Next switch to the "Specular" channel and set the "Strength" to 5%.
Now to the "Thickness" channel and set the following values for Root: 0.5 cm, Tip: 0.2 cm.
Now In the "Curl" channel, the options may vary in accordance with your desires, but below are the values I used.
We're done with the material. So, the last part we have left to go is the dynamics. This is quite simple to achieve thanks to the useful tags of Cinema 4D. Start by creating the object you want to throw onto the grass. In this example I created a golf ball. Just create a Sphere and then a material with the "Bump" channel activated. As texture to use for the bump map, just search "golf ball bump map" in google-images and the first result you will see is what you need. And now by changing the "Color" and "Specular" channels, it is easy to get a nice golf ball like the one below.
Select both the golf-ball and the object we've grown the grass on and then add the "Rigid Body" dynamic tag for each of them at once.
Select the "Rigid Body" tag we have just added for the surface and under the Dynamics tab, turn Off the "dynamic" option in order to prevent this surface from undergoing a free fall.
Select the Hair object and under the "Forces" tab, there is the Gravity force option. -9.81 is the real acceleration for earth's gravitation force. However, since we didn't set anything regarding the resistance of the grasses towards the gravitation force, if we don't turn the gravity off or decrease it, the dynamics of the grass will not be realistic. So, for the sake of realism, just set it to -0.1.
Now jump to the "Dynamics" Tab and under the "Properties" section. Here increase the "Surface Radius" to 2 in order to decrease the likelihood of penetration into the collision object (golf-ball.) Moreover, check the "Rigid" option and set the "Stiffness" to 1% in order to keep the initial states of the hairs. If you want your grass to be smashed, never use the "Rigid" option and play with other variables. Furthermore increase the "Drag" to 10% for a much more realistic flow of the hairs. The final result is below.
Now we have to define an initial velocity for the golf-ball. Click on the "Rigid Body" tag of the sphere and jump to the "Dynamics" tab, here check the "Custom Initial Velocity" option . Set an appropriate initial velocity in accordance with your scene. If you desire you can set "Angular Velocity" as well, for much more realistic results.
Now the last thing to do is to add the "Hair Collider" tag. So Right-click on the Sphere object and add the tag.
By adding some extra features like a material for the surface, an environment light and camera effects, you can get some neat results.
We’ve published a few related tutorials you might also be interested in: