Effect C4D Clones Based on ID With the Formula Effector

Photo of Rick Barrett

Instructor Rick Barrett

Share this video
  • Duration: 04:39
  • Views: 11344
  • Made with Release: 17
  • Works with Release: 17 and greater

Use C4D's MoGraph Formula Effector to control the first, last, or every other clone.

Learn the basics of the MoGraph Formula Effector in Cinema 4D, and how it can be used to easily transform the first or last clone using the ID and count variables, create stepped patterns using modulo, and adjust every second, third, fourth, or nth clone.

Less...

Transcript

- In this Cinema 4D quick tip we're going to look at how to control the first, the last, or every nth clone using the formula effector in Cinema 4D. The first thing we need to do is add a formula effector to the scene. With my cloner selected I'm just going to go down to the mograph menu, choose the effector sub menu, and add a new formula effector. Of course, because the cloner was already selected the formula effector was already applied in the effectors list. Now a lot of people get scared of the formula effector because it involves math and by default it has a formula that includes a sin function and a bunch of other variables you might not understand. We're going to get rid of that function and we're going to just simplify this a little bit. Here we have the variables that are available and the only one we're going to worry about for the purposes of this tutorial is they object index, which is ID. In Cinema 4D each clone has an ID and it's based on it's order that it's created. This clone here at the beginning is going to be ID zero and we're going to go one, two, three, four, five straight up the line. If I go in here in the formula and type ID, it's going to output one, two, three, four, five. We're going to remove this scale parameter here. We are just working with position. When the formula outputs zero for this first clone, it's going to multiply zero times 50 and it gets zero. It's not going to move this clone at all. Here it's going to multiple one times 50 and it's going to move the clone over 50. Here it's going to multiple two times 50 and get 100 and move the clone over and so on and so forth. If I want to control just the first clone, I change my formula to ID equals zero. Now what happens is this is going to result in one if they ID equals zero, one times 50 will move that brick over 50 units. For all the other clones the ID is not equal to zero so that's going to result in zero. It's going to multiple zero times 50 and it's not going to move the clones at all, because zero time anything is zero. Now if I want to control the last clone all I need to do is do ID equals count, but remember it's zero based so I have to do count minus one. But there's another little trick here. I need to make sure that it evaluates count minus one before it evaluates the equivalency so I put this in parenthesis. Now I'm controlling just the last clone. When the ID equals the total clone count minus one we've got the last clone equals one times 50 and it moves the clone over 50. If we want to create a staggered pattern what we need to do here is modulate our ID. The modulo function is basically the remainder that you get after you divide one number by another. To modulate what we do is type mod open paren open ID then a semicolon and the value that we want to modulate by. I'm going to put a two so we can control every other clone and then a closed paren. Now you can see that every other clone is affected, because when the ID equals zero and we divide that by two we get zero. When the ID equals one we divide that by two the remainder is one. When the ID equals two and we divide that by two the remainder is zero. When the ID equals three and we divide that by two the remainder is one and so on and so forth. If we want to control every third clone we just go ahead and change those two mod ID three. Now we're staggering based on a three clone pattern. Add a fourth clone pattern which is using four and so on and so forth. But what if we only want every third clone to be changed? We don't want to have this staggered pattern we just want every third clone to pop out. Well, to do that we go mod ID three equals zero. Now only if the mod of the ID and three is zero are those clones going to pop out and of course if we wanted to inverse of this, we wanted all of the other clones to pop out, we could change this to mod ID 3 is greater than zero and now we get that result. That's the basics of the formula effector. Don't worry about the sin function and all that craziness for now. Just worry about the ID variable, the count variable, and the modulo function and you'll have a lot more power in your hands.
Resume Auto-Scroll?