Home
Username:
Password:
Introduction to Game Development Using Unity 3D Tutorials

Special Effects / Sparking a Fire pt. 3




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

Continuing our look into particle effects, we now need to shape our fire so that it doesn't stretch out this ridiculously far, but instead stay a little bit around the turret. So let's go through these values one by one. First off, the Minimum Size and the Maximum Size of particles are OK because that has to deal with the size of the particle, not how far they shoot out. The Energy however is a little much and that is the energy that the particles are emitted with, so let's change it to 1.5 and then the Maximum Energy to 1. Alright, as you can see, this kind of does the trick already. As you can see, it's not shooting out that far and it actually looks like fire. When I run my game, you can see that it starts up pretty nicely and it already works pretty good, maybe it's a little low into the barrel as you can see here. I'll move it a little bit more up top so let's do that right now and let's look at it from the front, and let's move it up just at that here. Of course, the position can change as long as you are changing the effects of your particles, so that works a lot better. It's a very nice effect already. Alright, so let's go over some more values we have, our Minimum Emission and our Maximum Emission and this kind of has to do with the emission of the particles of course but it makes it look a little fuller, so let's turn up the max to 200. We don't need to touch the World or Local Velocity because we want to do the animation in our particle animator, but as explained in our local versus global video, you understand that world has to do with particles inside of the World and Local has to do with the local rotation. In this case, the third is parented under. So there's that. Of course, we don't want to simulate World space. We want to simulate it in Local space. If you would select one shot, then it is kind of like an explosion only once it happens, like this, but in this case with our turret, it doesn't look that good because it looks like he is shooting very slowly, so in this case, we don't want the one shot and then our Ellipsoid Size is pretty good already and for the animator, we have everything set pretty nicely. Of course, we can see and tweak some variables for example. The size of our particles can grow over time and as you can see, it just adds a little bit to the mass of our gun here and it looks pretty good. Actually, it looks really good. I like this a lot and now that is Falcon Gun at play. Very nice, I'm excited about this one. Alright, so there is that, so let's leave the size grow the way it is. Our Force is fine. If you start playing with the X and Y, it goes into different directions as you can see. So, for example I would tweak the X, you can see it starts going off in weird directions so I'll just keep that at 0 and only play it with the Z. Alright, then the Damping. You can try some things with these two. Of course, dampens the particles and as you can see, spreads it over the area. We don't really want that unless if you want some back flow burning out of your turret. In this case, the model isn't really set up for that so let's turn our Damping back to 0 or 1. There we go. Perfect. So, there's that, that is our third animation. Now, let's make sure that this particle system is grouped correctly into our turret. So, let me rename it and in order to keep things nicely organized, I just usually type P_ so that when I'm going through my Hierarchy, I know that this is a particle emitter and will call this Barrel Fire. Alright, I need to group it on top of this left gun here and this is the turret left barrel so let's put the P_ Barrel Fire on top of the turret left barrel and now it is becoming part of that. Now, let's select our particle once more and to duplicate it for the other gun, go Edit, Duplicate, dragging on top of the right barrel and now of course, we also need to make sure that it is actually sitting upon our right barrel right here and it's looking pretty good, pretty nice here. Let's make sure it looks good in the game also, although the flexibility of Unity already gives us a great look of what the fire looks like in our editor. Wow, these flames look really hot because of the last one, the last color is white and even though it's pretty transparent, it's the last one. So that particles eventually turn white and this of course gives you that huge flame effect of the color as it starts off red and orange and then slowly goes to green back into red, the red flame and then finally into white. I'm really happy about this effect so let's save this and next let's move on to the next block and get some more stuff going to shape our game here.

Tutorial Information

Course: Introduction to Game Development Using Unity 3D
Author: Efraim Meulenberg
SKU: 34092
ISBN: 1-936334-03-8
Release Date: 2010-02-23
Duration: 5.5 hrs / 75 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available