How To Rig & Animate a 3D Pie Chart - After Effects Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
my name is Oliver and in this video I'll be teaching you how to brick and animate a 3d pie chart in After Effects so that's quite a sign a way of doing this it's using the effect called radial wipe and you take that put it onto a circle and you actually just animate sort of the transition value and that will animate a 2d pie chart the problem is that the moment you turn that into 3d you actually can't extrude that layer and something messes up and also the animation is quite bland it's not really anything special and it doesn't have that flow that you really want in motion design so I figured out another way of doing this and after I'm showing you how to animated I'll show you how you can link it up to actual percentage values so you can use this for any sort of thing you'd like so to get started we're going to select the ellipse tool to create a circle we're going to click and hold down command shift drag out to create the circle then we're gonna select the layer go up to the Anchor Point tool and we're just going to hold out command while we click so we can censor the anchor point now if we go to a line we can just align this in the center and we're good to go now the size doesn't really matter here because we're actually not going to use the fill we're go into the fill we can just turn this off and press ok and will actually enable the stroke so the thing is we want to make the stroke big enough so there's no hole in the middle now you can see when we make this big the circle becomes very huge actually so we might want to go down to our shape press s and scale it down a bit so it fits accordingly now for this one you're going to want to zoom in so you can actually see the hole better and you're just gonna drag that up so it just closes the hole like that now we can go out again and we're actually ready to animate this shape so the reason why we're doing this with a stroke is so we can use the thing called trim paths now if we just rename this layer - we can call it dark blue we can open it up go into the contents and select the ellipse here we can press add and then we can choose the trim paths the smart thing about this is that if you animate the end you can see it's sort of like the radial wipe effect but we just have a lot more control over this so we don't want to animate it clockwise we actually want to animate it counterclockwise and therefore we put them both to 100% now after doing this you can see we just have to animate the start property down to 0% again and we'll get this sort of radial wipe effect so we'll put down a keyframe at the start then we'll go ahead around one second and we're just going to put it down to 0% now this is the first very simple animation and we're going to add a few more elements just to you can say sort of spice up the animation so it's not that simple and the first thing we could do is animate the scale so we press s get the scale just add a keyframe and press u so we can actually see the timing of the animation now we want it to be a bit bigger when it starts and then scale down accordingly so if we drag this keyframe all the way to the end we can just scale this up as we'd like and if we take a look you can see that it scales down maybe right now it's a bit too much so we can just adjust it to our liking now another thing we can do is actually if we open this up again and go down to find the stroke we can also animate this one now we want it to be very thin at the start and then increase in size as the animation place so we can add a keyframe to the stroke width then we can just pursue so we can see what we're working with here drag it all the way to the end and then we can size it down here to start now you can see we get an animation like this and maybe we want the stroke to be a bit thinner like this right now it doesn't really look that interesting and the reason why is because we haven't added the 3d aspect yet and we haven't really added in the easing to the animation so we can go ahead first of all and at the 3d part so we can do that by pressing the enabled delia then we can press our as in rotation and the two rotations we want to work with is the X rotation and the Y rotation so if we add a keyframe to both of these press you again to see all of the keyframes we can just have it very simple flat at the start and then at the end we want some free dimensionality therefore we can just drag the values out as we'd like so maybe we'll see the bit from the top a bit from the side sort of like this and now if you played you can see that we have this sort of simple animation right now it doesn't really look that great but let's go ahead and add some easing to this animation so we'll just select all of our keyframes press f9 go into the craft editor and now we will select our last keyframes and just drag them in a bit and we'll also select the first ones and drag them in a bit as well so this means that it slows in at the start accelerates and then eases out quite a bit so we can try and play this back and maybe this is a bit too extreme so we can just drag the handles out a bit again and maybe we can also adjust the timing so if we select the last keyframes and just drag them out maybe zoom out a bit so you can see a bit more of the timeline can try and RAM preview this now we have this quite interesting animation but we can actually adjust some of the timing offset a little bit just to give it that extra bit of punch so we can start out with the stroke and maybe this doesn't have to take that long to actually animate all the way out and maybe also the rotation can take a bit longer so let's try and preview this again so now you can see that it sort of pops out and scales back down but we can also offset the trim paths animation to make it pop a bit more so if we open up the layer we go into the trim path and we can animate the offset so right now when it ends it's actually quite linear because there's no angle to this really so and go to the start we can offset it by maybe 90 degrees at a keyframe then we can go to the last keyframe and maybe go back to 45 degrees now we also have to ease this one so we can just sort of find match the easing that we have done on the other keyframes so it's a bit like this and we can try and preview this so you can see that slight angle actually adds quite a bit to the animation itself so we want to extrude this animation and before we go ahead and do that we have to make sure that our renderer is set to cinema 4d so you just click here and you can switch between these cinema 4d and the classic 3d so when that's done you just go through the contents close it down close down the transform and we want to go into the geometry options now we want to work with the extrusion depth and you can actually just drag this out and see that the layer extrudes so maybe somewhere around 100 we go for 96 that's quite nice but we can see that we have a problem it's the same color on the side as it is in the front and therefore we don't really get that freely illusion now you could fix this with lighting but we actually want to make this sort of flat so very flat colors and the reason we want to make it like that is so we can use these 3d pie charts in to the animation to sort of mix it together now to do this go to our contents we can just select the ellipse we can click Add and we want to go to the side and here we can add a color now this color should be very close to the one on the front but actually just a bit darker so just sort of I drop this one and make it a bit darker and maybe slightly more saturated press ok and you can see that we have a darker color on this side and now you can see we actually might want to extrude it just a tiny bit more to really get that Freedy effect so right now we can go ahead and preview this and as you can see have the 3d animated pie chart but it's not really that interesting until you add some more colors into it and you actually have some different values therefore we can go ahead and duplicate this dark blue and we can call this blue because as you can see I have selected a color palette RPN that's up and we're going to use that for this example now the blue color can be selected if we go up to the stroke and just I drop it from here press ok right now you won't be able to see anything and the reasoning behind this is that they're actually on the same sort of see value and if we go into the position of the blue one we just want to push this back by one so we'll insert one into the C value and we can just put this down below the dark blue you still won't be able to see it but that's because of the fact that this dark blue has taken up all of the space so if you go into the dark blue press you can go here over to the point where the sort of start keyframe is and maybe you want this to be at 20% so now you can see that we actually get some of that blue graph but there's also another problem and that is the fact that the side of this blue one is the exact same as the dark blue one so we can just go into the blue and change that really quickly go into the material options just quickly I drop it go for sort of the same like that you can see that we have multiple colors now we might want to add some of this sort of red reddish color and we can just do that by duplicating the blue calling this red putting it down below and if we go into the position we'll put this at two in the c-axis and again we have to go into the blue and just alternate the start value so we get a bit of flat red and we also have to remember that the red color should be changed like this and we also have to change the side of the red one so that's contents lips and the material options I drop that and again go bit down a bit more saturated you can now see that we have three values now maybe we want just for the visual purpose of this one we want the red value to be the least visible one so maybe we can just go to 6% maybe a bit more sort of like that and we have these free colors now if we close everything down we just go to the start and preview this animation now this looks good but we really want some offsetting to make the animation more interesting so if we open up all of these fresh you can see the keyframes and what we really want to offset is the star value now we want the red one to finish first then the blue and then the dark blue therefore we can go to the blue drag out the star value then we go to the dark blue and just drag it out even further so now we can go ahead and try to preview this so this is really all for the animation part and the thing is that just taking that bit more time to tweak everything and offset it makes it look so much better and make it flow a lot greater than just using the regular radial white really but now we want to get into rigging this so we can actually rig this up so you have some controls where you can say okay the red one has to be ten percent the blue one has to be forty five percent and then it will calculate what the dark blue line is because that's sort of the rest of a hundred percent now to do this we need a control layer so I like to use null layer you can use whatever you want but to create one you go command option shift Y I can just go to lay on you and then null object now we rename this controls so what we really wanted this layer is free slider values so they can sort of control the different percentages so we're going to the effects and presets search filiz slider control now the first one will call that the red then we have the blue and then we have the dark blue now the red and blue we have to rig those up so we can actually change the values but the dark blue should just be 100 - the blue - Li red so that's just sort of the rest so we can just all click the stopwatch then we can type in 100 minus the value of the blue one minus the value of the red one so that means when there's zero percent red and sira percent blue the dark blue will be 100 percent of the graph now if we change this to let's say 20 and 30 then it will be 50 on the dark blue so that's quite simple math now it gets a bit more complicated when we have to still after effects the percentage we want for the red one and the blue one the reasoning behind this is that we have this animated we have these start keyframes and we have to sell after fix that this keyframe has to be a certain value depending on what the slider value tells on this layer and you can't really just do that quite easily you have to do a bit of expressions but I'll walk you through this and sort of show you the simplest way of doing it so we can start out by rigging the rate value and we have to think a bit before we do this because what really controls the rate value or the red percentage if we're going to the blue press U and we go to the end here so the starting value you can see that if we track this around this is actually what's controlling the red value because it's the amount that is missing of the blue pie-chart therefore we can't just go to the red value and start animating that we actually have to go to the blue one therefore we go to the start and we all click this and we're going to type in the expression that links this to the red slider so after fixing needs to know four variables it needs to know the time of the first keyframe so you can see this is a first keyframe and cero frames then it needs to know the time of the second keyframe this one right here so it hasn't has sort of hit time interval then it needs to know the value of the first keyframe which is going to be 100 as it's all gone and then it needs to know the value of the second keyframe and that's what's going to be dynamic that's what we're going to link to the red controller so let's just get started and drag out this window to get a bit more space and the first variable the time one we're just going to call c1 and this will just take the key frame number one and figure out the time and semicolon that then the time to the second keyframe is pretty much the same just a different name and a different keyframe so let's type that in keyframe suit at time now we have to figure out the value so the value we'll just call that v1 as in value number one and this is going to be 100% as we talked about because that's what it starts at so 100 then the value number two this is going to be the value taken from the actual red slider so if we click on the controls you can see the red slider go back in here and actually just pick whip up to the red slider go semicolon and we have that value now we have to tell after fix to use this time interval and these values to actually create a piece of animation so I use the East expression and the reason why I use this is just to ease it a bit at the start in the end so it's not that linear so the first thing we'll type in is just time so it knows it has to deal with time then we type in the time one and the time too so this is the time interval that it has to work with and then we type in the v1 and v2 so it knows that it has to go from this value to that value in this given time period so go ahead and semicolon that click out of it and you can already see that the red disappears completely and why sup the reason why is that we have put this at zero so it's actually zero percent right now so if we crack this window down a bit again so we can actually see the graph we just go ahead and put this at maybe 10% and this shows 10% of the pie chart now we're going to break how much of the blue pipe is actually being shown and this takes a bit more and it's easier to explain if I just show you now to do this we have to use the expression that we used for the red pie and we actually use that expression on the blue layer so let's go down here copy the expression and now we're going to use the dark blue because that's really what's covering up the blue shape so we can open this up just pressure you actually we can all click the start pasted the expression and now we actually want this to target the blue slider control so we can just delete this part so the second value can go to the controls go back into the expression and just pick with that blue slider so if we go out of this and we add the last keyframe of that start animation we actually should be shown 10% blue but we're not and why is that that's because the red is covering up the blue right now so if we put this at 20 you can see that it's actually only showing 10% and because of that we just have to add the red value through the blue one down here in the expression so at a plus and just pick whip to the red slider this way you can see that it now shows the 10% of blue needed and if we close this down you can actually see that if we only show the red one listen an entire pie chart then the blue is layer on top and you can see this has been Sagan 10% away from the blue which is the red slider and then we show the dark blue and you can see that there has been taken 20 percent away from the dark blue but only 10 percent of that is the blue because the rest is covered by the red one and that's really how this works it's sort of layer up on top of each other but now we can change these values to whatever we'd like so maybe this is let's go ahead and type in a value so we can type in something like 17 this is 46 and it does all the math for you and not just that you can go ahead and preview it and now you can see that you really just have to change these values and it's already animated so that's quite easy and you can easily use it for anything you'd like but you really need to show precise values basically so what's quite interesting is so we can actually take the values that we have from this control layer and show them through text layers now we can start out by taking these free parts of the pie chart just moving it a bit to the left so we can actually have some space for the text then we can select the text - and just press and we can just type in a value at first it doesn't really matter because it will be altered anyways and but we can just match this color so the first one could be the red and we can just align it as with one maybe scale it down a bit so let's see how this looks that could be all right then we duplicate this dragged it down underneath now this should be the blue color and then we can duplicate this one and drag it down underneath that one so something sort of like this and we can just select the dark blue color now we have this free text layers and you might want to adjust them a bit to your liking sort of like this maybe and then we can take them as a group and just adjust them and now we want to link up these layers so we could just call this one the dark blue this one the blue and this one the red one now let's start with the dark blue so if we open this up go to text we have this source text which basically defines what's shown now if we select the controls layer or click the source text just have to go to the controls again we want to pick with this unto the dark blue slider now we want to take the value from this slider so we have to type in dot value but we also want to show a percentage sign just after the text and therefore we go plus and then quotation marks and type percentage so like that it's showing 37% now we can go ahead and repeat this for the blue one this time go to the controls and we just have to select the blue slider dot value plus percentage and then last but not least when it goes to the red one open it up I'll click go to the controls and pick whether to the red slider dot value plus percentage so right now we have the free needed values and if we'd like we can adjust the text a bit more to our likings maybe select them go down a bit in size so maybe something like that and now if we go to the controls layer we can just alter these percentages and you can see that the text actually changes so this is a way that you would create Rick and animate a freely pie chart then you can use for literally anything and just adds a lot of interest too if that should be your presentation website anything else and you can use this edge as you'd like really you can also just take the expressions and use them for something else they're quite useful when you have to rig something and it took me some time to sort of understand them but I think it's important that you don't just copy expressions but you actually understand the meaning behind them and the meaning behind every single part of the expression and that way you can utilize it in your work in the future so this is the end of the video I really hope that you enjoyed it that you perhaps learned some breaking techniques using expressions maybe some animation techniques and I really hope that you can save just something from this video and apply it to your future projects if you enjoyed the video go ahead and leave a like subscribe to the channel and turn on the notifications I'll be posting a lot of different animation cancer so stay tuned for that I also have a course on Skillshare that's the first link in the description and that's all about sex animation so you can go ahead and check that out get the two first months free and really tell me what you think that's all for this time and I'll see you in the next one bye
Info
Channel: Oliver Randorff
Views: 10,757
Rating: undefined out of 5
Keywords: motion design, mograph, motion graphics, animation, 2d animation, 3d animation, animated, after effects, adobe after effects, 3d pie chart, infographics, charts, data visualization
Id: L1KJpjNq_ao
Channel Id: undefined
Length: 24min 56sec (1496 seconds)
Published: Mon Jan 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.