Trapcode Particular 3 Training | 13: Motion Paths

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi everyone Harry Frank here from red giant in this tutorial we're going to be talking about motion paths in trapcode particular this is a curious little feature found in the physics section in trapcode particular and the way it works is fairly unique but it has a lot of applications especially if you need to guide your particles along a very specific path and this works really well if you're trying to integrate movement within 3d even if you need particles to go behind things and you're perhaps working in cinema 4d and we'll go through some examples of this using cinema 4d Lite and creating some particle swirls around objects but let's start with the simple part of what a motion path is and how this differs from the standard light emitter that you might use in After Effects so I'm gonna steal this little blue background to make things look a little more interesting and let's create a solid I'm gonna use the quick key to apply my last effect I'm just apply particular now in other tutorials we've learned about using lights as emitters with in particular in fact this is a very useful feature if I create a light and I name it emitter I can use this lights 3d position to dictate where my particles are generated so I'll go to my emitter type and set this to lights and if I animate this we'll see that the space in which particles are generated will follow the light however motion paths are very different from this in this case we're defining the emitter position so this is where the particles are continuously generated as they are created they continue to move outwards but the light emitter itself doesn't affect the path of the particles the particles are not flowing along this path the area in which the particles are born is just being dictated from the 3d position of the light so not to be confused with light emitters motion paths are a very very different thing so I'm going to take this light and rename it and I'm gonna call this motion path one and I'll make a path that's slightly interesting here so now in particular I'm going to close out the intersection and we are actually well first before I close that out I need to set this to something that is not lights that's very important we're not using a light emitter we're using the spline of the motion path to define the flow of the particles but how they emit is still defined in the emitter section and we do not set this to lights so I'm going to set this to point four now and maybe we can change this up a little bit but point is just fine so I'll go to the physics section under error and select motion path one you'll notice that we've got lots of room for additional motion paths with additional uses of particular but I'm going to just use this one right here the difference between the 1 through 9 and the HQ versions is that the HQ versions are slightly slower but do a more detailed subsampling of the motion path but generally you'll find that the standard motion path will work just fine so you'll notice immediately that my particles are taking on a flow that mimics the overall path of my light now it still has its default velocity of 100 so they're flowing along this path but they still have a bit of velocity I'm just going to turn this down like I mentioned the speed at which they flow along the path is dictated by how fast this path draws on you'll also notice that the paths are not in alignment whatsoever so again the motion path is just dictating the flow of the particles but where the particles are being generated is up to the emitter section so the emitter section and the motion path are two totally different things but if you want them in alignment all we need to do is align this emitter position with the starting point of the light so right now you can see we've got some fairly random values but I'll just copy and paste these in here we can align these with expressions if you want but that's just a bit tedious for this right now there so now I can see that where my starting point is is aligned with where the particular universe is you notice that the particles are stopping prematurely and that is because they just don't have enough lifespan to make it all the way to the end of that spline the spline length is at four seconds right now so they were stopping a little bit short so as they flow along this path there is no more position information for it it stops there so that's exactly where the particles stop so how is this useful well as the particles flow along this they have their own velocity we can set these particles to something like a custom particle like an arrow in show direction we can show a sort of flow along this path so if I go in here and I set this to a sprite colorize and I choose a sprite from my particle library let's just use it the basic arrow and we need to fix a few things here we need to make it a little bit bigger I'll go to the rotation section and set this to orient to motion and rotate the overall angle of the arrow 90 degrees because its initial angle is facing up so we need to point it to the right I think this is quite a bit of particles for what we're trying to show here so I'll knock this down to maybe 25 particles per second and now we can see that we've got particles flowing along the path now there's a few quirks to this and this is just not exactly a bug it's a matter of working with the math rather than trying to work against it when we select that feature right here which I said is orient to motion keep in mind at frame 0 there is no motion it has not started moving as of yet so there's no motion for it to orient to at that point in time meaning you might be saying well why is that a big deal well you'll notice as I scrub forward the very first particle that gets generated on that frame 0 where there is no motion is not aligned with the rest of the particles now there's a couple different ways to fix this the easiest fix for this is to simply keyframe the particles per second from 0 to the value that you want so if I go back to frame 0 I enable keyframes for particles particles per second set this to 0 and then animate it to 25 and I scrub forward in time you'll notice that it essentially skips that first frame but if I change my particles per second here it's now going to animate between 25 at frame 1 and then all the way to that change that I made later in time and I don't like that I don't like having to go back to frame 1 every single time I want to make a change to my particles per second so there's another way to do this which is to use an expression so I can keep my existing value and I can just use an expression to say if we are at the time of the end point of the layer so no matter where I move this in time if we're at that time set the particles per second to zero so I'm going to turn off all of my keyframes option or alt-click on here and we're just use an if statement that says if something is true do something so if something happens and we'll put that in here in parentheses if that is true set the particles per second to zero so that's what we will output if this stuff in here is true if it's not true then output something else now I could say 25 and that would leave it as a fixed value of 25 or I could just say value and that will be using the existing value before the expression so if something is true set it to zero else use the existing value so I can say if my current time matches the end point of the layer then output zero that saying we're at the very first frame of the end point of the layer so the way we measure time is with the word time time as a reserved word for the current playback time if that is equal to now it's just a JavaScript thing you have to use two equal signs because one equal sign is used to set to something equal to something else two equal signs is to test if something is equal to something else so if time is equal to in point lowercase I capital P end point is equal to the start time of the layer so this makes it flexible if I move this layer forward or whatever I'm not saying if time is zero because if I move this layer forward then while time isn't a zero here it's actually one second 25 frames so if I just say the end point of the layer this will cover all of our bases so you notice now that it generally works and I say generally because in theory it's still working you might every now and then run into a one little straggler and this honestly I don't know the math behind this but if you do see one little straggler like this that isn't quite lining up and I can make this a little more obvious by setting this to a box and we'll set this to 0 and 0 in Z and maybe 25 in Y so we can spread these out just a little bit they're mostly pointing the the right way but there's sometimes one little crazy particle that is oriented just slightly the wrong way so if we go into emission extras and go into period periodicity random which is essentially a mini randomness control for for the random seed within particular if you set this to something that isn't a zero this will snap that one stray a little particle back into place and this isn't something that's unique to particular or any sort of bug this is just a math kind of thing you'll find in after-effects even using Orient to motion or oriental long path where you have zero velocity there is no motion to measure at that point in time so you kind of have to work around it so I mentioned being able to use something like this as a 3d path using cinema 4d Lite so included with After Effects is a lite version of cinema 4d in fact you can create a new cinema 4d file right with an After Effects and you can select File max on cinema 4d file and we'll just call this like cylinder vortex all right now not that I want to turn this into a full-on lesson about how to use cinema 4d but I will cover just the basics of what I set up in the scene that I was showing you so I'm gonna work with the cylinder and we're gonna have air flow inside the cylinder in fact it's going to flow around a center object and be and will contain it within a larger object so I have my internal cylinder right here this is where the error will be flowing around or my particles and I'll duplicate this we'll just make it a copy of that and I'll make a larger one spy dragging this out so I'll put two different shaders on here so I'll create one shader for the outside let's just drop this on there and we'll make this slightly transparent go into my transparency and I'll have this mostly transparent and on the inside will create a very plain flat blue texture so I'll apply the another material and we'll go to its color that too blue I'm gonna make sure to make a camera for my scene and we'll look through it by clicking on this icon right here I'm going to create a null object and we'll use this to locate the center of that blue object that we want the particles to swirl around so I'll go in here and create new null that kind of defaults to the center which is right about where I want it but I want to move it down to the bottom there I'll jump to a different view and make sure I'm kind of aligned near the bottom right there and I'm not really gonna animate anything within cinema4d I'm just gonna make the arrow flow of the particles around these objects all in after-effects but to prep things to get into After Effects we need to check a few things first of all we got to make sure that our actual resolution is ready for video and 800 by 600 I don't think it's going to cut it so we'll use an HD TV 1080 twenty nine nine seven I'm going to set this to render all frames and we'll make this length maybe 150 frames in length now we'll come back to this but there's a couple specific things that we need to do to our objects in here to see our null show up in After Effects as a 3d null we need to apply a certain tag to this and you'll go to tags cinema 4d and select external compositing and this will tell cinema 4d to take this object and have it show up in my After Effects scene I also need to have a separate alpha channel for this blue object here because I want my particles to interact with it so when we bring this over to After Effects we're not really bringing over geometry but we're bringing over layers for After Effects to work with so I can define this cylinder here to render as a separate little element with its own little alpha channel and the way we do that is by rendering this single object to the object buffer and that might sound complicated but all we need to do is go back to that tag section with that cylinder selected and go to compositing at the very last tab of that compositing section we have this thing called object buffer and I can click on enable and this is going to render this object to object buffer number one all that means is going to do a separate pass of the alpha channel of this image that's really all it's doing now it won't do that unless we enable multi pass rendering so I need to go in here and select multi pass and I need to click on multi pass and tell it to render both the RGB image and the object buffer so it's going to render two different passes so it's going to render the full image of all the stuff that we see and the object buffer there it seems like a lot but it's pretty standard cinema 4d stuff now over here in After Effects I already have this file imported because I created it within After Effects if you wanted to import it you can simply go to file import so I'll take this drag it on to a new composition and there we see our scene if I go in to my sin aware controls right here I can click on extract and this will get that null object that I created and the camera from my scene if I switch my renderer to a standard either draft or full I can add my image layer so this is the multi pass layers that I defined earlier and I need to check to find multi passes and this will just add the two that I have setup in cinema 4d so I'll say add image layers and now it's showing me my RGB a image that's the surrender right here and then this object right here this is an isolated and matte of that object so I'll just turn that off okay so let's create a layer for particular apply the effect and I'm going to set up the motion path so I got my null object right here I didn't animate it in cinema 4d I'm just going to use that null and and it made my life this will be motion path 1 and I need to align this to where that null is because we've got slightly different space here after effects space in cinema 4d space don't always line up 0 and 0 is actually right here in cinema 4d where as 0 and 0 is right here in After Effects so my light is probably somewhere off screen but I can simply align it to that motion path and by parenting it and holding the shift key and that will snap it right to the center of that null and then I'll move this light just a little bit off-center so we're gonna have our particles kind of start there and swirl upward in this cylinder so this point all I need to do is animate my null position and rotation so R is my null position and Y rotation and we'll have this go over four seconds we'll have the Y rotation do maybe three full rotations and we'll have it move from the bottom and then all the way up to the top so as I scrub through this we should see this light spinning just like so so so that is going to be our motion path so I'll go to particular go to the physics error and set this to motion path number one now if we don't see anything just yet we're not going to panic remember how we have to align the world a particular to the world in our After Effects scene now this gets a little bit complicated because we've got particular space we've got this light space which is parented to this 3dnull so where do we get our 3d well we kind of have to estimate things unless we want to get into very complicated expressions but this isn't very difficult to estimate the 3d space we need is going to be pretty close to this nulls starting location so let's look at this null location so it's 0 & 2 60 and 0 so let's start there so I'll go to emitter set this to 0 to 60 and 0 now as we scrub forward we should start to see some particles rendering let's set this velocity to zero these are essentially emitting from the center here and we need to move it in its x-axis to be where that light was so from here I'm just going to go into the emitter position and scoot this over in the x-axis to kind of get it where it should be in fact I can go to my different views here I can look at the front view let's move this around using my camera pan tool and it should look like the particles are centered right around that spinning null object looks like they should be kind of scooted over just a little bit more their temp the escape key to get to our last camera view so I think we pretty much got all we need to do is define that object buffer that I rendered to knock out the particles now this isn't going to be a mask because as you look closely we should have particles in the front and we should have particles behind it now I could fake this using an observation layer but that is kind of faking it and I want to fake it I want to do it the right way so we're gonna use a different feature here we're gonna use the Z buffer instead of the obscuration layer obscuration layer allows us to obscure particles with After Effects 3d layers like flat layers so what the Z buffer is saying is that there's an object in 3d space where our particles should be obscured and can go behind it and in front of it we define that object in space using black and white so first I need to define that layer so we'll define the object buffer as the Z buffer layer and now just notice it's knocking everything out so I need to define where in z space so essentially the distance from our current camera to where this object is in space so what that distance is is what this white value needs to be again this is what our object looks like so this is white and we need to say in where in space is this white now we can do expressions to measure the distance between the camera and this null object right here but really what you're going to end up doing is just kind of knocking this value up and up and up until you find the particles pop right in front of the object now in the basic scenes that I've set up like this it's pretty consistently just above 1,000 somewhere on 1200 so if you get it too high all the particles are going to go in front it's too low all the particles would go behind it so right around 1200 is exactly where that object should be in space so what this distance is is saying the distance between the camera which is here and where this object is supposed to be in space which is essentially where this null object is that distance in pixels is 1200 pixels again After Effects is pretty much the only program that I know that measures units of distance in pixels you know when you to cinema 4d or working with meters or centimeters or millimeters but After Effects uses pixels so sometimes you just have to guess to me so again we can go in here we can set this to some sort of custom particle so go to the right colorize will set this to our nice little arrow basic arrow turn the size up just a little bit we'll set the rotation here in the rotation section by setting it to orient to motion and set the rotate to 90 degrees so we want a little bit of that variation in there so it's not just one single point drawing on so I'll set this to box XYZ individual set X and Z to 0 and we'll set this to I don't know maybe 80 pixels tall or something like that so now we see we have got the particles swirling and moving along that path so again this is about what it looks like this has a second system with some basic speakers in it just adding a little bit more of dust or debris in there there was another example that I showed here using a simple pipe like this now again I could animate this in After Effects but in this case I chose to animate the light right within cinema 4d I said I didn't want to turn this into a full-on cinema 4d lesson but just to do a quick overview in this case I have an object that is using a sweep so it's drawing a circle along a spline so I have my spline right here just looks like that I have a circle that looks like that and then a sweep when I put both of these inside the sweep essentially draws an object and draws geometry using those two splines taking this spline here I can create a light in use a tag called align to spline and if I animate its position from 0 to 100 that light will animate along the spline so the geometry and the light will share the exact same spline so this is a good way to get a motion path right into After Effects now what you need to do is pick this tag and actually turn it into keyframes and you'll find that under the timeline functions baked objects and then you're going to hit okay right here to take that spline right here and turn it into keyframes and it creates a copy and that's exactly what we're seeing right here motion path one copy and this is essentially written two keyframes you can see all the keyframes written over time right down here so when I import that into After Effects I get the motion path light which has all these baked keyframes and then I can do the same thing that I just showed you before which is assign this as my motion path and have arrows or whatever travel along the same geometry so those are motion paths in general they are pretty fun to work with and definitely worth exploring if you're working with 3d scenes imported from other software especially as I showed you right here using cinema 4d lite which is built right into After Effects so that is the topic of motion paths my name is Harry Frank for red giant we'll see you next time [Music] you
Info
Channel: Red Giant
Views: 133,655
Rating: undefined out of 5
Keywords: Red giant, visual effects, vfx, motion graphics, filmmaking, color correction, compositing, tutorial, gaming, after effects, adobe, premiere pro, final cut pro, trapcode, magic bullet, universe, pluraleyes, particular, mir, movies, video, training, how to, diy, maker, iron man, ilm, vlog, blogger, content, youtube, creator, vlogger, vlogging
Id: a3ZfR4uJxNY
Channel Id: undefined
Length: 26min 31sec (1591 seconds)
Published: Mon Mar 19 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.