Cinema 4D Tutorial: Folding Boxes with MoGraph

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so basically in this very special tutorial we're going to go from the basics of cinema 4d all the way to some more advanced techniques so we're basically going to start with just some simple animation techniques learn about key framing and parenting and creating hierarchies between objects and then we're going to take a look at more graph and we're going to use the corner object to duplicate our work and we're going to take a quick look at effectors and we're going to learn how to trigger animation using effectors which is a more advanced technique but it's pretty simple but ok so we're just going to get started so basically we're going to create a folding box animation so I'm going to start by creating a plane from up here and I'm going to make the width and height two segments just one so it's basically a polygon square and I'm just going to reduce this a bit I'm just going to make it 200 maybe and I'm going to make this editable by clicking this icon here so if we go into vertex mode we have this very simple polygon face so what I want to do is I want to move this anchor point so we're going to learn about snapping I'm just going to go into this snap option choose enable snap and then I'm going to choose edge snap now I'm going to go into move anchor mode so I'm just going to click here so if I just push this back it should snap right to the center there I'm just going to exit anchor mode and I'm going to exit snapping so if I just click on the plane and go to coordinates if I rotate around pitch we get this kind of flapping effect which we're going to use so I'm just going to undo that I'm going to call this a bottom because it's the bottom of the box and I'm going to now control hold down control and drag this so that creates a copy I'm going to call this far face and and I'm just going to rotate it 90 degrees and I'm going to push it to the back so if we want this to snap we could use snapping and there we go the face snaps to the bottom place so this is the far face and we can basically you can imagine how the box is going to animate now so we need a few more faces so I'm just going to duplicate that again hit our hold down shift and it rotates 90 degrees in 90 degrees sorry 10 degree increments I'm just going to hit e to move this and I'm going to try and snap it to the back now if you want to double check so I'm just going to call this left face if you want to double check the coordinates you can go to here the coordinate and as you can see Z is 2.8 something that should be 0 and that's going to be perfectly aligned I'm just going to check the rest yep 0 0 100 and minus 100 because the cube dimensions were the polygon face dimensions were 200 basically 100 will be kind of the snapping point okay left face so I'm just going to duplicate this again control drag I'm going to call this right face and I'm just going to move this here and as you can see the coordinates look good duplicate it again hit R to rotate hold down shift and it snaps to 10 degree increments II to move and I'm just going to put that here and now I'm going to check see that should be 0 and that's now perfectly aligned call this front face because it's kind of facing the camera it's the front most face that's the furthest face what we need lastly is a face that attaches to this far face another flap on basically the top flap so I'm just going to duplicate this far face and we're move it up that should snap perfectly yep two hundred one hundred they'll seem like exact values so everything's lined up nice and perfectly now what I want to do is we'll call this top flap so what I'm going to do is I'm going to make top flap a child or far face so if I rotate far face that top flap moves with it which is good and we can then move that top flap separately and they're all kind of linked together like this so I'm just going to undo everything okay so I'm going to start by I'm going to start animating this so left face I'm just going to start using our hold down shift and just open up these flaps 90 degrees oops turn snap to shift Oh shift yep 90 degrees and this one will now shift 90 degrees okay so we now got this opened up box which is good and we're going to animate this folding up so usually I start my animations it's about frame 10 and we don't really need a keyframe for bottom because that's just going to be staying where it is a far face I'm going to animate last that's the top flap so I might start with this one here and we basically going to animate P so I'm just going to click here creates a keyframe and I'm going to make this maybe 30 frames I'm going to move it to 90 keyframe here so we have this animation okay so 10 to 40 is that range now next I think I'll animate maybe a front face so I'm going to start at 15 for this one a keyframe on P and then go to maybe 45 put 90 there so we have this cool animation and then on frame 20 I'm going to animate this one so keyframe on P go to frame 50 and 90 degrees that's perfectly lined up keyframe here so we have this kind of delay each face one at a time kind of animates and frame 25 I'm going to grab this parented object so we're going to animate P here frames per click the keyframe 25 go to 55 make this 90 degrees keyframe here and we have that face animating as well pretty cool animation and lastly it's about frame 50 I want to animate this top flap so I'm just going to put a value for this top one keyframe here and then the top closes so we created a pretty cool basic box animation we could even move this back to 40 so it's kind of bending as it's coming up just play with the ranges maybe just make that 40 to 60 that top flap okay I'm just going to play this back yeah great so next I'm just going to create a null and I'm just going to put everything into that null so basically elephant's are grouped inside of that null and just call this box so what we can do now is we can actually use more graph to create clones so I'm just going to go to more graph create a corner put the box in there go to corner object object mode sorry grid array the Y count which is in the middle I'm just going to make that one and I'm just going to make the count maybe six by six initially you're just going to zoom out and I think 1200 should create enough space in between the clones if we play this back we have that box animation but everything is very uniform and kind of a mathematical and doesn't look very good to be honest might increase these clone counts to eight depends on how much your machine can handle basically and I'm going to make the spacing 2200 okay so right now if we just play this animation back everything plays at the same speed now so we can basically apply a factors to cloner so I'm just going to go to corner and create a plane effector uncheck position choose scale uniform scale and make this minus one just to demonstrate what it does and fall off I'm going to choose linear and I'm just going to move this so basically this is what the effector does this affect their plane effectors set to scale the objects down minus one basically makes them scale down to nothing so when this red area in the middle this is kind of like a fall-off when this area touches the corner objects the effect takes place it's pretty simple this is a linear one so it's basically like an infinite plane so everything a shrinks down if I chose a spherical one it would only affect the ones within that spherical area so as you can see we get this kind of cool effect where the middle ones are shrinking down and then coming back up because the spheres are got limited size anyway I'm going to go back to linear on a complicate this too much and that's looking good I think the size scale asset I'll set to 400 fall-off make that 100 so it's kind of this mover as you can see so usually the way defectors are used is a plane effector you can instead of scale you could do position so we could make them jump up 100 units like that along Y so you could use that use it to do that or you can make them rotate we could choose some kind of rotation 90 degrees here as soon as it touches the corners they start rotating that's another cool effect that's the basics of it and then you've got a random effector which kind of randomizes their positions using a seed kind of algorithm but what we want to do in this instance is we want to trigger the animation with this plane effector so right now if we play this back the animation plays regardless of where this effector is I could put it over here and it's just not going to care it's just going to animate regardless to fix that problem we're going to go to corner transform and where it says animation mode play we're going to make this fixed what this does is it basically basically makes the corners wait for the effector before playing the animation on the plane effector here instead of using like position scale rotation I'm actually going to use time offset and we check the animation before if you just highlight everything is 60 frames so here on the time offset I'm just going to put in 60 now I'm going to place animation back nothing happens that's because the corners are waiting for this effector and instead of playing sorry sort of plane I'm going to call this time trigger and I'm going to animate this so starting from frame 10 and let's go to coordinates just going to animate this Z spur keyframe here go to frame 1 10 and it goes all the way over there if we just play this back now o cloners are reacting they're playing the animation when the effector touches them right now that this looks kind of a bit messy like this it's kind of a bit quick it's almost a bit fast so we can always increase the animation range to about 200 and move this keyframe from 110 to about 190 so the animation is a bit more gradual to me that's still a bit fast the problem is if we just right-click here animation show F curve or basically you've got an easing kind of curve I'm just going to grab this curve just select both points just click here and make it linear that way we haven't got this kind of easing the animations yeah that's much better so that's great we're just going to add a few more things to this so cloner mograph effector now we're going to add a delay effector now what this is quite cool effector it basically just kind of gives the animation a bit bounce a bit of delay so I'm going to set it to spring and I'm just going to see what happens and it hasn't really had an effect I'm just going to it's usually applies to position scale transformation so it's not actually going to have any effect on the animation but what we can do is on the time trigger we can also add some scale so basically they kind of scale up I'm just going to turn this delay off for now and fall off we want it the other way around I think so the box is okay wait this is a mess I'm just going to take off a scale parameter invert the fall-off makes it just go the other way we need a separate effector if we want to do scale so I'm just going to go to corner mograph effector just do another factor make this one scale and what we can do is we want the scale to move the exact same time as a time trigger what you can do is you can go to coordinates for the time we've already animated this I'm just going to right click here animation copy track go to this scale a factor we just need to set the fall-off on it and go to coordinate and then just paste animation paste track so that's the scale and time trigger we're going to have the exact same animation which is kind of what we want on the scale effector I'm going to set scale as before uniform scale to minus 1 and now we should have everything scaling down so we don't want that we want to flip it so fall off invert now everything is kind of scaling up and then the animation is playing as well so go to the corner effectors and what we want is time trigger first then the scale and then the delay the litter effectors execute top to bottom so I'm just going to activate this delay again and it should have an effect because we have a scale vector in there I'm just going to turn off position and rotation spring 71% let's see what happens is it going to be springy yeah it kind of is yep we've got that springy effect it's a bit strange but uh let's just keep it for now we can use blend as well I think that's maybe just kind of smooth it out a bit yeah I think Springs a bit cooler that's pretty cool let's just so let's just carry on cloner I'm going to now add a random effector and I'm going to put the position of this maybe even before the time trigger because I'm going to use this to kind of scatter the positions of these it's too uniform right now so we'll call this one random pause and just going to parameter position I don't the Y position changing I want them all fixed on the floor but you can change the x and z position by the way you might want to turn off delay because it's going to interfere it's going to try and calculate while you're adjusting the positions we don't want that let's just scatter them out a bit now we have a small problem when we do this the factor animation is going to change the factor is kind of outside of the range now we could include increase the clones as well so can maybe go to 12 now you have all these boxes and we just want to scatter them out of it just scattering them out can always go through different seeds now we have some intersection I'm just going to ignore ignore that for now our our time trigger I'm just going to go to the frame 10 and just push this back a bit keyframe it go to frame 190 and just make sure it's outside the range and then we can just animation copy track and put on the scale as well remember we want that to move at the same speed so now we have this computer is a bit slow now but you have these boxes kind of appearing and folding on scale I'm just going to increase the size of that scale make fall of 100 I'm going to turn these off in the viewport not here sorry just make them invisible in the viewport so this red traffic lights here turn delay back on so I'm just going to see what animation looks like with the delay added it's playing back really slow but yes looking pretty cool boxes just appearing and falling okay so that's basically the end of this tutorial and I hope you learned something please stay tuned for more videos and subscribe to the channel if you have any questions please feel free to ask and thanks for watching
Info
Channel: QuickVFX
Views: 46,388
Rating: undefined out of 5
Keywords: quickvfx, mograph tutorial, trigger animation, effector trigger, animate with effector, time offset, box fold animation, folding box tutorial, animate a box
Id: LYjrp3orkF4
Channel Id: undefined
Length: 19min 43sec (1183 seconds)
Published: Tue Nov 24 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.