Mow the Lawn: Hair+Proximal+Tracer

Sorry for the long absence... But here is a new tutorial about Cinema4d.
This time of year we have to mow the lawn. Maxon has a great tutorial about that, but I wanted to go a bit further.
This setup mows the grass with a dynamic spline. So there is no pre-determined path.
We'll be using Hair and Mograph's Tracer to accomplish the following effect.

Mow Trace Hair Proximal

Follow up:

Lets get started by getting to know Mograph's Tracer object. This is becoming one of my favorite tools in Mograph.
The tracer can do several things, like connecting a bunch of objects, witch I will not cover here. I'll just show 3 examples of how to use the tracer to mow a lawn.
First example shows how to Trace a spline following the movement of a Null object.
Lets assume you have an animated null (attached to a character or any other object)
Select the null and add a Tracer object from the Mograph menu.
The tracer will automatically draw a spline following the selected Null. Great.

mograph-tracer

If you did not select the null before adding the Tracer you will have to drag it in the "Trace Link" field by hand.

There are no other settings to make to the tracer at this point.
I'll give 2 other possibilities of Tracer at the end of this tutorial once the whole setup is done.

So what we have now is a spline that is dynamically generated from a movement of a Null. What we want is this spline to do something for us.
In this case: Mow the lawn. (Yes honey I'll do that right now, just finishing this tutorial)

Ok lets make a lawn. See the complete tutorial for more details: Grass & Flowers with Hair
Add a plane to the scene, select it and hit the "Add Hair" item in the Hair menu.
Ok, that is our lawn.
If you want a more fancy effect, select "Fur" from the Hair menu, with the plane selected, and set the length to 1/4 of that of the Hair. (This will be the hight of the cut grass)
Now go the the Hair texture, this is where it all gets done.
Check the "Length" box and set the "Texture" to the "Proximal" effect.

proximal effect lenght

This will open the settings of the Proximal effect like in the image above.
To make the proximal work you have to drag the Tracer in the Object field.
Then there a 3 setting:
- Start and End Distance --> this is the with of the mowing area, you will have to play with this setting.
- Intensity --> this is the hight of the cut grass.

Now ensure the tracer has traced a spline above your plane with hairs before you do a test render.
If you render the scene now you will notice that the proximal grows the hair instead of cutting it.
To avoid this we have to invert the effect of the Proximal. I did this by putting the proximal in a "Filter" shader.
In this filter you can invert the proximal by checking "Clipping" and by reversing the High Clip and the Low Clip sliders, like so:

filter

Re-render your scene and if all went well the grass is shorter along the Tracer-spline.
I made a more detailed tutorial about the proximal and hair here

mow render

Why all the fuss about dynamic splines. Well as the tools in cinema4d become more and more dynamic there are a lot of cases where the path of an object can not be determined in advance.
The Tracer helps us to get the spline or path of any animated object.

In the example below the Tracer follows particles, and the particles cut the grass.
This is done with the same setup for the Hair but with the tracer set on the emiter object.

Particle trace

And here the Tracer follows a Dynamic Spline:

Dynamic Spline Tracer

There is probably a lot more you can do with this combination of modules I didn't cover here. But I hope this gives a good start to your animation setup.
Enjoy!

Edit: Here is an image showing the different settings of the proximal shader

proximal-intensity

19 comments

Comment from: Aurety [Visitor]
Great as always, Thank you Base !
2008-07-22 @ 18:18
Comment from: Irfan [Visitor]
Excellent... good to see you back online!
2008-07-23 @ 00:16
Comment from: george drakakis [Visitor] · http://studiomoccoro.googlepages.com/
great tutorial as always base!!!
i got on question though:
do you have a solution for real-life grass??!!
2008-07-23 @ 12:04
Comment from: base80 [Member] Email
Thanks for the reactions.
George ther is a complete grass with flowers tutorial on this site.
2008-07-23 @ 12:49
Comment from: Chris Kelley [Visitor] · http://themographblog.com
Really nice stuff. You've got some great content up here about proximal shaders -- sounds like you're having fun, keep up the good work!
2008-07-24 @ 12:45
Comment from: george drakakis [Visitor] · http://studiomoccoro.googlepages.com/
tnx Base, i think your tutorials are one of the best, always aim straight to the problem.
what i meant, was truly real-life grass, cause i think this weekend i'll have to mow the lawn, around my house!
2008-07-25 @ 15:48
Comment from: semerkhet [Visitor]
BRAVO!!!
But how can i chage the color of the mowled grass, like it was burned.
thank you.
2008-09-06 @ 20:34
Comment from: base80 [Member] Email
@ semerkhet
Use the same trick in the color channel in a fusion channel between two colors
2008-09-07 @ 00:56
Comment from: semerkhet [Visitor]
Thank you for your tip it worked!!!
2008-09-07 @ 12:23
Comment from: semerkhet [Visitor]
Hi base80,
Check this http://www.yousendit.com/transfer.php?action=batch_download&batch_id=bVlEc0wxT003bURIRGc9PQ.
And thank you.
2008-09-10 @ 04:04
Comment from: base80 [Member] Email
Nice work semerkhet.

2008-09-10 @ 12:59
Comment from: mguastaferro [Visitor] Email
Thanks for this tutorial, its exactly what i needed. Im having a problem though, i need to make a graphic that has a harvester going over field, leaving a trail of different colored "crops". Ive got this working, but i also need the color to be even lighter on the parts where the path overlaps. Is this possible?
2008-10-14 @ 00:57
Comment from: base80 [Member] Email
mguastaferro I think that you will have to cheat with a more complex testure (in layers) and make the overlap regions with a separate object that lifts into place at the second pass (the overlaps) as to influence a separate displace shader in a layer.

2008-10-14 @ 01:02
Comment from: mguastaferro [Visitor]
Lets see if im thinking correctly. Is it possible i could have 2 tracers, 1 for the spline, 1 for the overlap. then do the layered shader like you said, and keyframeing a the first tracer to stop right before overlap, and have the second "turn on". Ill give it a try, see if it works. Ill let you know!
2008-10-14 @ 01:09
Comment from: base80 [Member] Email
The first tracer could just stay on all the time. The second thing could be a tracer or any other shape made by hand.
As far as I know there is no easy way to create objects automatically on intersections in a spline.
2008-10-14 @ 01:13
Comment from: mguastaferro [Visitor]
Thanks base80, that did it. I created aa 1x1x1 px cube and put a spline wrap on it and had the second proximal channel use the geometry of the wrapped cube. Good enough for now. Thanks, and keep it up, you're stuff is a huge help.
2008-10-14 @ 03:42
Comment from: Brian [Visitor] Email
*****
I am having a problem... I have the proximal following the tracer.. but its just a circle... i cant get the grass/hair to stay cut as the radius of the proximal travels along the tracer... it looks like a traveling circle instead of a shorter grass trail... any ideas?
2008-11-12 @ 18:44
Comment from: base80 [Member] Email
Does your tracer leave a trace in its trajectory?
Did you check the proximal to get the Tracer as a reference?
2008-11-12 @ 18:49
Comment from: parili [Visitor]
***--
could somebody please upload the file somewhere... because i can't quite figure the tutorial out and I really need this. maybe it would be easyer to figure it out with a C4D file. thnx out front.
2009-01-03 @ 12:57

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)