From the course: Cinema 4D Weekly
Selecting every other clone or polygon - CINEMA 4D Tutorial
From the course: Cinema 4D Weekly
Selecting every other clone or polygon
- [Instructor] Welcome to another Cinema 4D weekly. Now have you ever had the need to select every other clone or polygon in a project, maybe even every fourth clone or somethin' like that? Well in this video, I'm going to show you a simple formula called modulo that can allow you to select every other, every third, every fourth, et cetera, clone or polygon very, very easily. All right, so let's get a little bit geeky here and let's talk about what modulo actually is. Well, modulo is the remainder of two numbers that you divide. So here I have this little setup here, where if you divide zero by two, you actually have no remainder, the remainder would be zero. If you divide one by two, you can do that, but then you have a remainder of one and then if you divide two by two, that equals one, you have no remainder there, so you can keep going up from zero to nine, or to infinity and all of the remainders, the alternation between zero and one, zero one, zero one, zero one, that is the modulo okay? So you're modulating between these different values of remainders okay? And this is with the value of two okay? So let's take modulo and these remainders of going from zero to one, zero to one, zero to one, and have this affect say every other clone, so like zero percent strength, 100% strength, zero, one, zero, 100, all that good stuff okay? So, let's go ahead and let's talk about this little function that we need to use to create this kind of modulo effect to affect every other clone, and that function is mod, parenthesis, id; or semi colon, two, and then close parenthesis. Now, mod is modulo, so it's taking the remainder of two different numbers that you're dividing together. Okay, so just like we have over here and we get that modulo remainder, that's what we're having here as well. So, here we have two different numbers, actually the ID's not a number, but it actually is, so what is the ID in this formula? ID is the number of the clone, the ID number of the clone. Now you can find this in your cloner. If we go to transform and we go to display, and we choose index, okay? If this is, this is typically set to none, but if you change this to index with the ID, you can reveal what the ID number of all these clones are. So you can see they just go from zero to 10. I just have a cloner that is just counting to 11 clones and so we start at zero, we have zero to 10 and, basically, ID is the number of the clone and then we're just dividing it by two. So, the remainder of the ID is divided by two, so basically we have this same setup here, only visualized as clones, all right? So let's go ahead and to apply this formula, we're going to use a formula effector and we're going to apply this to our cloner object here. So if I turn on my formula effector and here on the formula tab, I just enter in that modulo, mod, parenthesis, id, colon, that's basically divided by, two, and let's just click off there, and basically, you can see with this scale activated, I just have scale activated, just scaling up, you can see that with this modulo formula, this is translating the remainder from zero to one, zero to one, zero to one, and translating it to zero percent strength of this formula effector to 100% to zero, to 100, zero, 100, zero, 100. So hopefully this makes a lot more sense, visualized now again. So, again, we're basically going to this alternate between zero one, zero one, zero one, translating it to strength of an effector on some clones. So let's do this with divided by four, okay? And here we have everything the same, only instead of dividing by two, we're dividing by four and we have the same setup where we have zero divided by four, remainder zero, we have one divided by four, we have that one as the remainder so that's the remainder. If we have two divided by four, can't divide into that, so the remainder's two, same thing with three divided by four, can't do that, so the remainder's three. Four divided by four though is one, so the remainder value is zero. Five divided by four, you can divide once, but then you have that remainder of one, okay, and so on and so forth. So actually between the divided by two and divided by four, we're not alternating between zero one, zero one, we're actually alternating zero, one, two, three, zero, one, two, three, zero, one, two, three, so on, so forth. Okay and you can see this represented in this modular ID divided by four, okay, and everything's the same, but what we have as far as how it's represented with the formula effector, is this scale strength is slowly ramping up over three clones or four clones, actually, so we have zero percent and then like 33% strength, then 66, then you know 100% strength, throughout this modulo setup using the divided by four. But, this doesn't really help us because what if we wanted to select every fourth clone. Well, what we can do is actually add onto our formula and say you know what, I want every modulo represented that just equals zero. So that means, unless the remainder is zero, it is actually going to just give a value of 100%, so you're either zero percent or 100%, depending on if you're a number other than zero, or remainder other than zero. So let's just add that, so we're going to do equals zero, hit enter, and you can see what happened. But now, we only have every fourth clone selected and actually scaling up because we said only add this scale to the modulo that equals zero. So you can see that zero divided by four, which is the first ID, will get zero remainder, so that'll get 100% strength of that scale or of that formula effector. Same with four divided by four or the fourth clone here. We'll also get that modulo strength or that formula effector strength and then, eight divided by four is two, no remainder, so that eighth clone, eighth ID will get that strength. So it's a little geeky, but it's a little easier to understand when you actually put this in practice, okay? So, what we can do is, maybe we divide this by six and you can see that we get every sixth clone, so this is very predictable. If I do three, that's every third clone, so very predictable when you understand what's going on with the mod formula here. So it's basically the modulo, understand the remainders, ID is the number of the clone, divided by, which is a semicolon four, and then if you want to just filter out and just apply the strength to the remainder, or the modulo, that equals zero, you can do that once you understand what modulo is okay? So, this becomes very powerful when we use this on say polygon selections, using the formula field, not just formula effector. So let's go into a different example here and here are some different setups here that I already have set up. You can basically see that okay, I have a bevel deformer and you can set a selection. So let's go ahead, so then add our selection here, let's just go to select and set selection and on that selection tag, I can say use fields. And here we can just delete that freeze field and use a formula field to control which polygons are being selected. So instead of clones, we can select every third or fourth polygon, okay? So let's go to formula field and in the formula field, you will see that there is this formula we have. So let's just go ahead and delete that and let's go and in this formula field, let's just type in mod, and let's do ID, colon, again we're dividing and then let's do, let's select every four, fourth clone, close parenthesis and then we'll just do the equal zero, okay? So if we enter that and then we go and we activate this bevel deformer and we just drag and drop that polygon flexion in there, you'll see that because we're using that formula field, selecting every other polygon, we can then bevel and extrude those polygons that we have selected, which is every fourth polygon there. So now we can go and you adjust the offset, we can go into our formula field and we can just adjust this as well, so let's see what every other polygon looks like so we'll put in a value of two and now you can see that we're getting like these cool little lines, so this is really great for, you know textural type of things. Let's see what three looks like, so every third, so that's every third, we get this cool diagonal kind of thing. Again, if we use four, that's kind of like a hexagon or honeycomb kind of deal and if we do five, we get something completely different, we get these cool stripes, so hopefully this gives you a very good idea of the different ways you can use modulo, not only with clones but also with, you know, mo extrudes and beveled deformers and stuff like that, very, very powerful stuff. So it is pretty crazy how if you just wrap your head around what modulo is and how to utilize this function, in different aspects of Cinema 4D, how powerful it can be. So I hope you found this week's quick tip a little useful, might've gotten a little bit too mathy, but I hope it's useful and I'll see you again next week. So you don't want to wait until next week to learn something new? No problem. Here's some other ways to feed your creative brain to keep you busy. You can check out my other courses in the Linked In Library, visit my website, eyedesyn.com for more tutorials, subscribe to my YouTube channel and be alerted when I post a brand new tutorial, join my Facebook for daily mo graph inspiration and keep up to date on all my latest mo graph creations on Instagram, thanks so much for watching and I'll see you here again next week.
Contents
-
-
-
Text inflation animations5m 35s
-
Intro to Morph deformer6m 23s
-
Intro to subsurface scattering in Cinema 4D (C4D)6m 9s
-
Subsurface scattering in OctaneRender5m 21s
-
Intro to Cinema 4D R20 fields5m 21s
-
Intro to R20 volumes7m 43s
-
Intro to decay and delay fields in R206m 56s
-
Mesh morphs with fields and volumes8m 37s
-
Creating material wipes using fields5m 42s
-
(Locked)
Interactive render region for OctaneRender3m 50s
-
(Locked)
Viewing the speed graph in C4D2m 31s
-
(Locked)
Creating realistic noise-based materials5m 44s
-
(Locked)
Follow-through and overlapping animation6m 31s
-
(Locked)
Procedural growth animation7m 55s
-
Rigging and animating a 3D character in minutes with Mixamo10m 37s
-
(Locked)
Easy melt simulations in C4D5m 6s
-
(Locked)
Fading objects with effectors5m 7s
-
(Locked)
Onion skinning in C4D4m 26s
-
(Locked)
Blueprint renders using Sketch and Toon6m 53s
-
(Locked)
Baking Mixamo animation into motion clips6m 24s
-
(Locked)
Mixing Mixamo animation with motion xlips6m 14s
-
(Locked)
Must-know Xpresso7m 38s
-
(Locked)
Looping animation applied to effectors5m 11s
-
(Locked)
Intro to C4D sculpting tools9m 40s
-
(Locked)
Creating glTF files for AR and VR6m 9s
-
(Locked)
Intro to IK rigging6m 4s
-
(Locked)
Intro to rigging with joints7m 10s
-
(Locked)
Using deformers for character animation9m 54s
-
(Locked)
Rigging simple objects with FFDs10m 38s
-
(Locked)
Animation smears6m 35s
-
(Locked)
Cartoon mouth rig using Spline IK6m 5s
-
(Locked)
Add watermarks or timecodes to renders4m 46s
-
(Locked)
Intro to the Doodle tool3m 3s
-
(Locked)
Faster renders using Physical Renderer8m 26s
-
(Locked)
Using bendy limbs rig for C4D10m 32s
-
(Locked)
Automatic walk cycles using CMotion7m 43s
-
Rigging mouth using clusters5m 30s
-
(Locked)
Cartoon eyeball rig7m 48s
-
(Locked)
Intro to IK dynamics12m 16s
-
(Locked)
Worfklow enhancers: selection object4m 53s
-
(Locked)
Creating clay renders2m 55s
-
(Locked)
Three ways to animate splines10m 36s
-
Selecting every other clone or polygon10m 44s
-
Blending Mixamo motion capture animation11m 29s
-
(Locked)
Using pivot objects and Mixamo motion capture7m 9s
-
Model a cartoon hand12m 15s
-
(Locked)
Introduction to collision deformer6m 21s
-
(Locked)
Using connectors and dynamics8m 34s
-
(Locked)
Dynamic connections between objects11m 28s
-
(Locked)
Creating a dynamic spring rig9m 14s
-
(Locked)
Triggering cloth dynamics9m 55s
-
(Locked)
Model faster with Tweak mode2m 2s
-
(Locked)
Paint objects onto a surface7m 22s
-
(Locked)
Text inflation animations5m 41s
-
(Locked)
Intro to Morph deformer6m 29s
-
(Locked)
Intro to subsurface scattering in Cinema 4D (C4D)6m 15s
-
(Locked)
Subsurface scattering in OctaneRender5m 25s
-
(Locked)
Intro to C4D sculpting tools9m 46s
-
(Locked)
Making Symmetrical and Radial Polygon Selections5m 16s
-
(Locked)
Rendering Caustics in Redshift8m 13s
-
(Locked)
Creating an iridescent metal shader in Redshift6m 54s
-
(Locked)
Timeline Workflow Tips4m
-
(Locked)
Painting worn edges with vertex maps4m 37s
-
(Locked)
Speeding up your animation workflow with timeline markers4m 48s
-
(Locked)
How to sculpt cloth wrinkles using deformers6m 6s
-
(Locked)
How to draw splines on a surface4m 9s
-
(Locked)
Real-time cartoon outlines in the viewport4m 19s
-
(Locked)
Workflow enhancer: Interaction tag3m 38s
-
(Locked)
Tips for fixing jittery dynamics4m 6s
-
(Locked)
5 C4D preferences you absolutely should change5m 40s
-
(Locked)
Rigging splines with IK-spline5m 36s
-
(Locked)
How to easily select anything in your viewport1m 59s
-
(Locked)
Tips for better sketch and toon renders4m 58s
-
(Locked)
Using the Cinema 4D color wheel to easily create color harmonies4m 26s
-
(Locked)
Easily edit Mixamo animations using motion layers6m 5s
-
(Locked)
Create a squash and stretch rig using joints5m 41s
-
(Locked)
Using gobos in Redshift4m 47s
-
(Locked)
Using color swatches in Cinema 4D4m 15s
-
(Locked)
Make your splines and points easier to see with this setting2m 9s
-
(Locked)
Intro to alembic workflows10m 34s
-
(Locked)
Fixing bad weighting using Delta Mush3m 4s
-
(Locked)
Creating Dolly and Zoom camera moves in C4D3m 39s
-
(Locked)
Light faster with Lighting Tool4m 10s
-
(Locked)
Creating custom Redshift node presets in Cinema 4D5m 4s
-
(Locked)
Record mouse movement into keyframes4m 17s
-
(Locked)
Tip for working with gradients in C4D2m 27s
-
(Locked)
Using custom object icons2m 28s
-
(Locked)
Creating realistic camera shake4m 46s
-
(Locked)
Adding variation to cloth dynamics2m 41s
-
(Locked)
Light faster using Set Active Object as Camera3m 41s
-
(Locked)
Create looping walk cycles with Motion Clips3m 40s
-
(Locked)
Mapping custom shortcut keys4m 29s
-