Hi, everybody, and welcome back to this second video, taking a look at the fundamentals of Nuke 6.3’s particle system. Now, in the second part, we’re going to take a look, first of all, at the channels. Now, channels can be thought of as subsets of particles, onto which you can apply different effects and forces. The good thing is you don't have to split them off into separate pipes. They can all be maintained in a single particle system. Let’s take a look at exactly what I mean.
So, underneath here, I have our basic particle setup - very similar to the ones we had in video 1. We have our Nuke logos falling down with a little bit of gravity and underneath this, the first thing I am going to do is add in a ParticleBounce node. Let’s double-click this and view it to have a look at where it sits within the scene. Our particles should be expected to fall down with gravity, bounce off the plane, and go from there. Let’s take a look at what happens. As you can see, the particles are falling through the bounce plane. Don’t worry; this is actually a feature, it is not a bug. Within the ParticleBounce node, we have an external bounce mode and internal bounce mode that we have seen before, and I have set both of these to none. The important part is that, next to both of these modes, we have this new channels setting. This basically says whenever a particle falls through this bounce plane, change its channel from its original one into channel b. When we emit particles, if we look up in the scene at the ParticleEmitter, we can see that channels are going to emit into channel a. So, the way it works is when they emit, they are in a, they fall down with gravity and as soon as they pass through this point, they change from channel a to channel b. Now underneath that ParticleBounce node, I have another one. If we go in and take a look at the properties for this guy, we can see that when particles fall through this plane they are going to change from channel b to channel c and, underneath this, I have a final one. You can see that our new channel, in this case, is channel d. So, just to clarify, from the very top we are emitting in channel a, we fall through the first bounce plane and change to channel b, then we fall through the second one and change to c, then we fall through the last one and, finally, our particles are stuck in channel d. So, what we are going to do is use all of these channels and provide different effects to each set.
Underneath this, we have a node that we haven't seen before and this is the ParticleExpression node. I will be doing a short video on this one alone and this will be coming up shortly. For now, all you need to know is that the ParticleExpression node is basically going to allow you to affect any of these variables of the particles over time. So, right now, I have this value in our first expression node, v(1,0,0), and what this is saying is change the color to an r value of 1, a g value of 0, and a b value of 0. Because we have our BlendMat applied further up in our scene, with the color set to modulate, the color is going to be affected. So, if I view our ParticleExpression node, what we will see is that particles get emitted and keep our Nuke logo, and as soon as they fall into this set they become red. The reason they are only getting affected at this point and not at emission is because on the Conditions tab, at the very bottom, I have set our channels to b. Now, if I was to set this back to say, none, and then set it to a, it would affect all of the particles from the point of emission. What I am going to do is set this back to b and just turn off our a channel as well so we maintain our Nuke logo at the top, fall through the plane, and turn red. Our second ParticleEmission node, if we go to Conditions, is set to c. In the ParticleExpression tab itself, we have set the color to 0 on r, 1 on g, and 0 on b, using the expression v(0,1,0). So this should, if we view it, change particles from red, to green as soon as they fall through this bounce plane. Let’s have a look, and you can see that’s exactly what’s happening.
Now, another thing of note is if we take a look at the actual nodes themselves. Underneath the node name, in parentheses, we have the channel that’s currently being affected. This is a very quick way of seeing exactly what's going on within your particle setup. So, on our third ParticleExpression node, you can see that whatever is going on inside this node is only going to affect channel d. It’s only going to affect particles once they fall through this final bounce plane. Let’s view that, and you can see that what I am doing is turning the particles back to their original color but, in here, I have also set the size to take the current size on this frame and multiply it by 1.04 on the next frame, using the expression size* 1.04. Now I will be explaining this in a lot more detail in the expressions video, however, for now, all you need to know is that this will increase the size of particles over time.
This doesn't only affect the ParticleExpression node. If we go on down here, I have a ParticleWind node. The first thing you can tell by looking at it is it’s only going to be affecting the d set, or d channel of particles. So, if I view this ParticleWind, this force is only going to come into effect as soon as there are d particles within our scene. They are only being blown by this wind as soon as they fall through this final bounce plane.
Now that we understand particle channels, I’m going to quickly return to my basic particle setup tree and show you that node that I promised to show you earlier. That was, in fact, the ParticleSpawn node. If we take a look under the name, you can see that we have a b in parentheses, which means whatever is happening inside this ParticleSpawn node is only affecting the b channel of particles. As we have already experienced within the ParticleEmitter node, by default the particles are set to emit in channel a, so where is this mysterious channel coming from? Well, it’s actually being generated within the ParticleBounce node. If we have a look at this, next to starting my internal bounce mode, I have set new channels to b. Now, what this means is, the particles will be emitted in channel a, they will fall down with gravity, and as soon as they bounce on this plane they will move from channel a to channel b. It is at this point when the ParticleSpawn node can come into play.
So, let’s not wait any further. I’m going to go down and view the result of my ParticleSpawn node. What you can see is that we get these kind of trails, or tails, coming off these bouncing particles. If we go into the ParticleSpawn node itself, we can see a couple of things of interest that tell us why this is happening. First of all, in the Conditions tab, the channels are set to b, so that explains why we are only getting these tails as soon as we hit this bounce plane, because that’s when the particles are being moved into channel b. In the ParticleSpawn node itself, we have things very familiar to the values you find in the ParticleEmitter node - things like rate, halflife, velocity, size, and spread - all of those kinds of settings are available to use separately on the spawn particles as well as the originally emitted particles. Finally, in this section we have the channels at the top here, and that is currently set to c. So as soon as we get these spawn particles, there are going to be three sets of particles existing within your scene simultaneously. That will be the originally emitted particles in channel a, bounced particles in channel b, and spawned particles in channel c. Now, there are a couple of ways we can change the look of these particles now that we have set this up. On the ParticleSpawn node itself, we actually have this particle pipe. If you did want to change the texture being applied to these spawned sprites, you would just plug it into here and that would happen instantly, but because we have put these into a separate subset or a separate channel, we could actually go in and add something like a ParticleExpression node and have this only affect our spawned particles. In the Conditions tab, over here, I am going to go into my channels and I will set it to none, and then set it to only exist on my spawned particles, which is channel c. Then, in the ParticleExpression node, I am going to set the size down to 0.25 and, as you can see, we are only affecting the size of the spawned particles within the scene. There are a lot of different ways you can utilize this - by putting particles into different subsets, changing the forces, changing the looks affecting your spawned particles - I am sure you are going to have a lot of fun with it.
Finally, in this video we are going to take a look at the sub frame settings you can apply to your particle systems. Right now, in scene, I have a very simple particle setup. It does look more complicated than previous ones - that’s only because I have an animation attached to our emission geometry, so it’s going to travel up this spiral over time. The one thing you will notice about this setup is that, in between the particles, there is a little bit of a gap. The reason behind this is that when the ParticleEmitter is set with an emission rate of 1, we are going to emit 1 particle per frame. We don't emit particles in between frames and that’s what causes this gap.
To fix this, what we can do is bring in a ParticleSettings node and within this node there is one control, that is steps per frame. If we take a look at these first three particles in this setup, right now, we have a steps per frame value of 5. As soon as I view this node, we are going to take this first particle and replace it with five new particles that will be evenly spread out between this first particle and this second one. It will then do exactly the same thing for the next gap in our sequence, so this particle will be replaced by five, which will be evenly spread out to fill in this gap. It will just iterate down through filling in every particle with five new ones, evenly spread out to create a nice streak of particles. Now there is one more thing to this. If I view the ParticleSettings node right now, even though we have set our steps per frame, we are not seeing that nice, full streak. The reason being is that while we have told the particles to have a steps per frame of 5, we haven't actually generated that many particles yet. So, we need to go back into our ParticleEmitter and use our steps per frame as a multiplier of our original emission rate. So, in this case, our emission rate is 1 and we are emitting one particle per frame. I am going to multiply this by our steps per frame value, which is 5. This is going to emit five particles per frame, which will then get spread out and give us a result that looks a little bit like this. We get a much more filled in streak now, which if I zoom out and click play, is going to travel all the way up this spiral in our scene. Now, it is worth noting that because this is essentially a multiplier of the number of particles within your scene, the ParticleSettings steps per frame setting is something you do want to keep an eye on. If you do put this up to 100, you will find that your scene will slow down a little bit. You want to keep it at the bare minimum for the amount you need in the final render. In this case, 5 looks pretty good, so I’m going to leave it at that. Now one other thing, just quickly, to notice is because this is a sprite setup, we are getting these little hotspots at the front here. This is not visible in the final render.
That’s it for this video, showing the fundamentals of the brand new particle system in Nuke 6.3. We have covered basic setup, bounding boxes and regions on forces, channels and subsets of particles, as well as subframe settings, and spawning settings as well. Hopefully you will have enough to get up and running as quickly as possible. I will see everybody in the next video.