Transcripts
1. 1.0 - Introduction: Are you ready to learn one of the most exciting art forms there is in the world? You will have this amazing ability to create magic or even explosions. Literally. You will be able to create spells or even cast curses on your enemies. How awesome is that? It's truly one of the most amazing digital art forms that we currently have. And you will have a lot of fun making a career in Visual Effects for games. So are you ready to join me in this special course? I'm Gabriel Aguiar your host and founder of the YouTube channel. Gabriel Aguiar Prod. which currently has more than 1.5 million views mostly related to creating Visual Effects for games in Unity. In this course you will see how to create different effects, like some basic sparks but quickly progress to more advanced effects like, an amazing area of attack. And a spell or projectile like this one. And we will see how to create different variations from these. Each one of them, will have your personal touch and you will have an interesting portfolio at the end. We will not only create effects but we will also see the core concepts that make up a good visual effects for a game. We will see what's good and bad practices and we'll see how to develop effects that are visually interesting that surprises and pleases the player too. And it doesn't matter if you come from a programmer background, an illustrator, an animator, a 3d generalist or none of these areas. This course will take you from a beginner standpoint to an intermediate visual effects artist for games. We will walk you through the different softwares and techniques that you need. You will see up to use the particle system. You will learn shaders. You will learn how to create good textures and how to create meshes for your effects. So, I really hope that I can fill you with curiosity and give you more than a starting point in visual effects for games. Because it is truly one of the most amazing areas there are in games and in digital arts. I will be more than glad to teach you how to create this kind of magic and show you some solid foundations for your future career. You don't need to wait any longer to learn these amazing skill. So come on and join me this special course.
2. 2.1 - Type Of Effects: Introduction: So this chapter is called Visual Effects Fundamentals because it shows the theory and practical examples that for example I wish I knew when I started in this field. It's true. It would have helped me a lot. Here I'm going to show you different types of effects there are in games and the principles of visual effects. effects so not all the effects are done in the same way. Not all of them use the same techniques. But, it doesn't mean that we don't mix them. In fact most of the greatest effects we see use several techniques at the same time. But here are the five main types of ethics we can clearly distinguish, are more common and we will use in this course.
3. 2.2 - Type Of Effects: Particle Effects: So, one, is the particles effects. Which are effects that are only made of particle systems. These Unique Toon Projectile package that I made is a good example. It's kind of hard to master because it has a lot of settings and options and it has a wide array of uses. And it's the basis of a lot of effects actually. Particle systems play an important role in creating effects in games. And it's also where we are going to focus more of our time. Because once you understand the particle system very well you are able to do a lot of effects. Many things are possible with particle systems but in terms of particles effects this type of effect. It uses the most basic shaders, mostly the additive and the alpha blended shader and most of the times only billboards. Which are essentially only quads which is a square with two triangles. The most basic way to render something in a game. It's a primitive. But don't worry we are going to see what all of these means.
4. 2.3 - Type Of Effects: Mesh Effects: The second type are mesh effects, which involves mostly the use of 3D models that are previously done in a 3D software. They can have bones and even animations included. The example you are seeing is composed of a 3D model and animated Sphinx which then as a special shader apply. And besides these it's also real useful to compliment particle effects and this quad that we have seen before, is also a mesh. But it's a much simpler one that only has two triangles and it's necessary to render anything. The meshes I'm talking about are more complex and require 3D software like blender which is the one that we are going to use. And if you never use it before don't worry I will walk you through. In fact we are going to mix both very often.
5. 2.4 - Type Of Effects: Flipbook Animations: The third type of animation. Flip book animations which are mostly made of previously calculated simulations in another software. Like for example blender Houdini, 3ds Max or Maya. And it can be useful for example to create realistic explosions. A smoke. Or a fire simulation. This is an explosion simulated in Blender which is part of the Unique Explosions package that I created for the asset store and then I exported every frame into a separate PNG image. And at the end we create this flip book animation, also known as a texture sheet animation. This can be used inside any game engine as a barrel explosion for example, or a car explosion or simply a mine explosion. Flip book effects can also be hand painted and they are truly one of the most beautiful effects there are but are essentially 2d effects. But they can be combined with mesh effects and you can have a really beautiful end result. You can make them in Flash, Photoshop or --, or even in paper why not. Besides flipbook simulations and hand painted simulations there are also animations made in After Effects. For examples these ones that we are seeing are mostly made in After Effects. We are not going to see that because it requires another software. But don't worry about it because you can still create amazing effects without these software.
6. 2.5 - Type Of Effects: Shader Effects: The fourth type are the Shader effects and it falls a bit more on the technical side but it can have a lot of purpose and it can create an amount of amazing effects. For example you can create water with shaders like this one but you can also create an awesome Portal effect or a Laser or a Fire or even Blood. There's a lot of purpose in shaders and it's considered an advance a topic that we are only going to scratch the surface so you can get started. But if you want to learn more about shaders you can always go to my channel. Gabriel Aguiar Prod. and you can find all of these shaders there. And many more effects.
7. 2.6 - Type Of Effects: Hybrid Effects: And the fifth type. It's what I call the Hybrids type. Which is an effect that contains two or more of these types. Like for example these effects. We can see that it contains particle systems everywhere and billboards. And it also contains mesh effects and the mesh also use flip book animations. There is also hand painted flip book animations. There are shaders being used as well. That's it. It's basically a combination of all the types that we have talked about. And of course there are more types but they are not very often used or are really advanced types and all of these types of effects share obligatory two things in common which are a shader and a mesh. It can be the most basic shader like a particle additive shader with the most basic mesh, a quad the most basic texture which is a beam of light and it's going to be our first exercise actually because you are going to need these in your future and that's basically our things work. In fact all you see in your screen inside a game contains a mesh and the shader. That's how things works in computer graphics and shaders are the very basis of our game effects and almost all of these effects are based on principles of Visual Effects, which is our next topic.
8. 2.7 - Principles Of VFX: Gameplay: So the gameplay. It's as simple as knowing what's the purpose of the effort. You are going to do like is it going to be a projectile. Is it going to be a area of effect, that inflicts damage upon the player's enemies or is it an area of effect that heals your allies. Maybe it's an environment effect. Maybe a character. So yeah, Gameplay is knowing the purpose of the effect What is it for. Sometimes if you are working with a client you get the listt of effects with some description, some reference but at least you know what's going to be the purpose of the effect that you are going to do. And make sure you know what's the purpose of the effect before you start it. Because you may spend a few hours on it and in the case of working with a client you are wasting his money and your time as well. So sometimes it's better to be clear on what's the purpose of the effort and even try to know a bit more about the game how it works, the mechanics, the character's there is, and what not. Because the client may not know all the effect he needs. And sometimes it's up to you to say: Hey, look, I think that is right here is going to need this type of effect or that type of effect. So the players know that this or that happens you know. If you are in charge of creating all the effects you need to extract as much information as possible about the game. It will help you to create better effects for the game in question and you will satisfy your client, obviously. I know this is the client's scenario but I just want you to be prepared for that because it's a very important step that you have to take before creating the Visual Effects. So yeah that's it.
9. 2.8 - Principles Of VFX: Timing: The second principle of Visual Effects is timing. Timing is crucial in game effects and it can be divided into three main parts. The anticipation the climax and dissipation. For example is it a quick explosion with no anticipation like just a hit or is it with anticipation. How does that explosion build up? What's the feeling that it gives with half a second? Seems like the danger is imminent and feels like we don't have much time to avoid it Although, if it's one second of anticipation the feeling is totally different. Now it feels like we can avoid it but if we don't it may hurt a bit more. It also feels like it's taking more time to charge. Maybe it's going to be more dangerous And that's anticipation. Creates an expectation. Here's variations of the same anticipation with one second too. As you can see some of them create different feelings buildups or anticipations tells the player that something is about to happen. It's really important. Here's also a different dissipation. With longer aftermath. It feels like it's not that dangerous. Maybe it's a stun you know, maybe it's freezing the player and he can't move. Another good example of anticipation, climax and dissipation is, this area of attack. Well this is the anticipation, where we get the feeling that the effect is charging, it's gathering energy and getting even stronger and building up to the second part which is the climax. And it happens really fast where we have the explosion of the elements we build up and we see the brightest colors values. Until we reach the this part, the dissipation. Which the word says it all. We see the dissipation of those elements. We see the aftermath of the explosion. In this case we see some red ambers flying around, a mark on the ground that's dissipating heat. And here's another way of communicating anticipation which also communicates really well with our next principle of Visual Effects, which is, shape.
10. 2.9 - Principles Of VFX: Shape: So clearly the spiral tells where the damage is going to happen. If the player is inside or near the radius he will take damage. As well as with this electric attack. Inside that quick radius, there will be damage. Which doesn't have much anticipation as you can see and shape has to be quickly recognizable. Like when you are reading something you recognize the shapes of the letters instantaneously Well shape on visible effects, works in a similar way. You will immediately know that it's dangerous, if you see a pointy spell coming towards the player. It's very likely to inflict damage. On the other end. If it's round maybe it will stun or freeze the player you know. It has different meanings. But if you see a green calm floating orb like this shrine from Bard of League of Legends maybe it's not harmful. When an ally touches it, it will heal. And of course the green yellowish color has a very important role in communicating, it's a friendly orb. So shapes communicates the intention of the visual effect. Is it going to hurt the player. Is it going to heal him. Maybe it's poisonous or maybe it's a power up. Combined with colors, it has a lot of meaning. But next we are going to see what's contrast before we see colors.
11. 2.10 - Principles Of VFX: Contrast: So to have a good contrast in an effect means creating a focal point that drives the players attention in a matter of milliseconds. If I quickly showed you this image. Can you tell which part was the most bright? Well it's end of the Project. Since it's part that's going to hit the player and he needs to pay more attention to that part so he can avoid it. The trail fades out so it doesn't interfere with the focal point. And there are a few ways to create contrast and create a focal point that drives the attention. For example these blinking beams of light clearly grabs anyone's eyes attention. We are immediately driving to that point of light as well as when you see this trail passing by you will firstly focus on the front because it's brighter so it naturally grabs your attention. And that's contrast In some games, this is even use it as a way of describing the importance of the character ability. We clearly can see the first ones in the top are basic attacks compared it to the last ones, which have a higher contrast and are the characters ultimate abilities. And you know it will inflict a lot more damage than the ones in the top. And if you look to the one in the middle it's basically what we have seen with the projectile. The part that is more dangerous needs to have the player's attention so you can avoid it. In conclusion if we look at this gradient from white to black. If we put the black square in front of the white we are creating higher contrast and higher focus. The same happens if we put a white square in front of a black area. So these are I contrast situations. Now these two squares are still creating a good contrast not as pronounced as the other two. And that may be useful to create areas of less focus abilities that are not so important. However this square in the middle creates a really low contrast with the background which therefore is a lower focus of attention. Maybe it's useful for some environment effects for something that doesn't require much of the player's attention. So in conclusion the top and the bottom are higher focus of attention and this is a good example of how contrast works. On how you can use it. It's gradient can be really useful. And this may seem basic but it plays an important role in what's good visible effort for game. What's also very important is color palettes and themes which is our next and last topic.
12. 2.11 - Principles Of VFX: Color: As simple as one may think color is. It isn't. Don't get fooled by the fact that red, may represent fire or blue is water. It's much more complex than that. For example which one would you say it's water? I mean, one could argue that both color palettes could work as water, right? Well what if I tell you that, both are ice? Wouldn't those color palettes be OK to represent ice. Yes one would say. So yeah. Here's when things start to get a little tricky because as you can see both are very similar. Both are blue but now if I had some flakes around these I'd splash. We immediately identify it as such and don't even think twice right. It's obviously ice. Well that's why sometimes it's really important to use elements like these to make things clear to the player. Another example. Consider this Two green color palettes. What's the first thing that comes to your mind? Nature. Right? Both of these colors palettes can be inserted in Nature or Jungle. Well, but, maybe they can also be poisoned and radioactivity. Well that would fit too. So what if I tell you that one represents the color palette of heal. Both could do that as well right. So as you can see once again this is really hard sometimes and it gets really complicated, by only using colors. But what if I do these? And then these? Now we can immediately assume that the top one is poison or radioactivity even though they are both different things. And the bottom one is clearly a healing drop. Don't you think? And if I switch this, well, now it's clearly Nature right? So yeah the Leafs which is an element of Nature helps a lot. Well. This one is easy right? The top one is Strawberry or maybe Tomato Sauce? I'm not sure anymore right? And the bottom one is clearly fire, yeah... Well, not really. The one in the top can pass as Blood. And the one at the bottom can represent Lava. I mean can you see how complicated things can get with colors? Specially in visual effects, when we are trying to represent different Themes and Skins. Oh boy. And we are not even mixing colors. We are only using linear palettes you know. So what if I show you these two color palettes now. What do you assume they are? I'm sure the splashes, did it help? Well, what if I mentioned Gold and Honey? Which one would you assume it's what? Both can be one of this, right? OK so, let's add a shine here and add some hexagons down here. And here you go. What do you say now. Much easier to identify it right? Well Gold and Honey are very similar. But the aspect they have in real world is what distinguish them but if you can't transpose the real world to the game, well, you will need to use elements like these. That's why once again it's important to use elements and shapes to make things more clear. So as you can see color can have so many meanings. But, combined with shapes the message gets more clear and we can give a better perception of what's the theme. What's the skin to the player. And these are only linear. Color palettes. They are still great and beautiful. But for example when we are working in a game sometimes there are skins and factions or teams and there's a lot of color palettes. So we need more than only four colors. So let's look at a few more examples. For instance these two color bots are very similar to each other right. But one uses more purple and the other one more blue. Well the one on top actually represents Mage magic and one at the bottom. It's magic but it's an Arcane magic. Looks a bit more powerful or even in a bit more evil. They both are very similar but they represent distinct origins. Let's look at a few more examples. This one is a very interesting color palette that can also represent magic but this one is even more powerful or even more corrupted by evil and it's what it's called Void. It's a very beautiful color palette as well. Now let's look into a different class these one. Well this one mixes orange, yellow ,a bit of purple and some very light colors. This is an Hard one and this one. This one is used to represent Celestial. Godly beings, godly factions, godly teams. They are pure and white gold armors and have a little touch of purple that makes it look more refined. You know it's art to use it well but when done properly can be truly beautiful. All right so this color palette actually is very common and it represents the Nature skins or themes and it has the brown that may represent hood or dirt. The green from the leafs are the grass and the yellowish green that may represent flowers and the other light colors too. But in this case I rather call it Swamp because that's what it feels like at this moment. It gives a really sensation of swamp but it's also Nature. Now this color palette once again uses very distinguished colors. It has purple, blue, violets and even yellow. The combination is not an easy one, but it's a beautiful one. Sometimes it's used in spacy themes or futuristic themes like Guardians of the galaxy. It has that vibe you know. That's why I call it sci fi. I'll it can have other interpretations, obviously but this call is combined really well with each other. Next one is a very common one and it's used in powder explosions. It has a fiery feeling of burning. You know it's awesome for explosions and it looks really cool in stylized games. And as you can see the color palette as that dark brown and it also contains the white color. almost white color. So yeah, you have big contrasts here. The last one that I want to show you. It's a very beautiful one, and it has dark and light blue, teal blue as well and a bit of green too. This combines really well with underwater beings and it's what I like to call an aqua palette which fits very well with effects that uses water or that are influenced by it. It's very peacefully actually. So yeah that's it. Color is a very deep topic as you can see, and it's a very beautiful one. When you start creating color palettes it's awesome. The combinations are almost infinite and they can have very distinguished results so you have to learn to make proper use of them. But don't forget that they all have one thing in common for the effects to work well. They have contrasts. They have colors that contrast with each other. Don't forget that, it goes from dark to light and that's very important. Okay so that's it for the visual effects fundamentals. You saw the type of effects there are and most importantly the visual effects principles which are very important and needs to be applied in games to create pleasing effects. Our next topic will get us even closer to getting our hands dirty but before that we need to know what we are going to do. So let's see what's the Pre Production all about.
13. 3.1 - Pre-Production: Introduction: So welcome to the third chapter and in this short chapter we will see what pre production of visual effects for games is all about. So most of the times before we create an effect we want to start the pre production phase. Which can go from a quick 10 minutes to an hour or even more. And this phase can be separated to mainly for parts which are the gameplay objective, getting reference, getting technical reference and sketching. Even though sometimes you already know what we want it is still important to get some reference and it's useful to visualize our ideas on paper or on screen with these four categories in mind. And sometimes in bigger projects they spend days weeks and even months just into specific pre production phase to get ideas on paper, to create concepts and to make sure that everything works well together. So like in many other areas it's a very important step to take.
14. 3.2 - Pre-Production: Gameplay Objective: So the first one, the gameplay objective, it's mostly focused on knowing what your effect is going to be in game and I know we already talked about it but it's the first step of the pre production phase and it's important to mention it again. This is the part where you study the game in question you know, where you start your client as well. So yeah it's it's really important guys, ok? And when you are working with clients they send stuff like these ones. There have been showing, you know, PDFs, Google Docs or Google Sheets with descriptions and sometimes also image like I said and this is going to shape how the effect it's going to be and only when you have these information you can move on to the next part, the next phase, which is getting reference.
15. 3.3 - Pre-Production: Getting References: So getting reference is important. This is mostly focused on getting images and videos of something that you think it matches the effect you need to build. You can get it from games from comics even from manga anime is also a great source of content. And of course from movies, at least the idea. Sometimes if you are working with a client they will provide some guidelines and reference you know and you will also have the art of the game and you will have to adjust your effects to that art so it fits well. But anyway there are few good places where you can find amazing reference. For example Artstation, which is an Artist Showcase platform for games, movies and other media. It's a great place to find inspiration even get in contact with artists, if you want. The content varies a lot it can go from showreels to breakdowns and even tutorials. It's an amazing place and I even recommend you, if you haven't already, to create an account so you can start posting your portfolio, as well. And I can already tell you that some of my clients found me trough this site. So it's a very important site by the way. Another great place especially for visual effects artist is Real Time VFX forum which is an amazing community of visual effects artists. I highly recommend to you, to check it out. It has a lot of useful information that people post people that work in the industry and you can get really cool support in case you have any questions any doubts. Pinterest is also another great place for you to get reference on visual effects and many things actually. It's really easy and straightforward and if you create an account you can pin any image or video you like. To a board of game effect reference, for example. Which is what I have done and it's quite useful to get inspired. And to accumulate visual effects with time. And lastly YouTube and Google are obviously great places to get reference. You can check out my channel my YouTube channel. There's a lot of visual effects and shaders there. So yeah that's pretty much it.
16. 3.4 - Pre-Production: Technical Research: So after you know what you need to do, get some reference, you may need to do some technical research and sometimes, you are getting references, and also doing technical research at the same time. It can happen. Because an interesting tutorial may appear or you can find a good break down. With good art it inspires you and it teaches you how to do it. That's great stuff and it's useful to understand how a certain technique works or, sometimes how a specific art style is done. In case we don't find anything you are looking for. You can always go to Real Time VFX Forum. Like I said. Or you can come directly to me. Send me an email. Leave a comment on my YouTube channel. Send me a tweet. Or even a message on Facebook and I will try my best to answer you.
17. 3.5 - Pre-Production: Sketching: So after you know what's the purpose of your effect and after you have got some images and videos as well. You may want to start doing some sketches similar to this ones that we're seeing. You may even add timings. You may discover the best contrasts, or colors and even elements or themes. Of course most of the sketches we are looking at are really detailed and you don't need to be a super good illustrator. Like this one for example, it's much simpler or like these ones that we are going to do are much simpler. Now we will walk you through the idea with sketches projecting your imagination into the real world projecting your idea into a piece of paper or into a digital sketch. Fortunately you don't need to be a pro illustrator and I will show you later on what you need to create simple sketches to get the idea on paper or on screen. If you have a graphic tablet to help a draw in Photoshop or in -- that's awesome. Otherwise there is no problem. You can always use paper which is a great technique to get ideas as well. So that's pretty much it for this chapter. I hope that I have teach it something new. This is very important steps that sometimes we need to take before creating an effect. And I hope you are ready for the next part. Where we are going to set up unity. We are going to set up your workspace. Basically.
18. 4.1 - Download And Install Unity: Alright So time to get your hands dirty as the title says we are going to set Unity as your workspace as your workbench. And I'm going to be using Unity 2019. For those who already have Unity installed, you can go ahead and skip to the next video if you want or you can install the same version. This won't take long anyway. So let's go to this site to the unity site. And as it is now we can press in products or in get started. And this page will appear and you can choose personal. After you have read their terms, you can check this box and press download Unity Hub. Save it and then you can proceed with the unity installation. Alright. So this is Unity Hub. And it's a great tool to organize your projects and your unity versions all in one place. Oh and by the way you may need to create your account in unity, I'm not sure. But it shouldn't take long anyway. Now if we come here to installs, yeah you will notice I have a lot of versions installed. But don't worry about it. And we can come here to official releases button where you can click and choose to install the same version I have or another one. And this add component panel will appear and you will need at least Microsoft Visual Studio. And if you want you can install the android package as well. And now we can proceed with the installation.
19. 4.2 - Create An Empty Project: So once you have unity in your machine we want to go ahead and create a new project in the project name. You can put your name followed by underscore visual effects. VFX. I'm just gonna add underscore guide, so I can distinguish it from my other project. And then we can choose the Unity 2019. Tthe one we just installed. Choose a location or leave it as it is and in template you can choose Hight Definition Renderpipeline Alright so your project will build and once it's done you may want to change your layout. For example I am used to have Unity set to a two by tree layout. This one. But obviously you are free to use Unity the way you are more comfortable with. That's truly up to you. And lastly let's come here into gizmo. Where we can turn off show grid, selection outline and selection wire as well, and you can also turn off or degrees the 3D icon size if you want. This can get pretty annoying when creating visual effects, so you can turn them off.
20. 4.3 - Import Package: So now that we have unity set up and that we have created our empty project I have decided to provide a simple package with a scene that will help you get started. It's attached to this lesson and you can go ahead and download it. To import it to unity, you can come here to assets and choose import packages or you can simply drag and drop directly to the project panel, like this. And then you can press the import button down here. Once everything is imported, in the Gabriel Aguiar Productions let's open up the VFX scene right here in the scene folder. And as you can see we have this simple backdrop with a basic brown material. Applied. And we also have these directional lights, these two spotlights, the volume settings and the main camera which is missing some scripts at the moment. And we can easily fix that by opening the package manager in window. I'm going to duck this panel right here if you don't see these lists you can come up here and select All package. And now down here if you scroll down here you can install the post processing package which should be quick, and it's also a useful tool for a visual effects artist. Once it is installed the scripts are no longer missing from the camera or from the volume settings as well. There were just some post-processing layers with this boom profile that I create with just a little bit of blue and a vignette and nothing really fancy. And the camera also has this simple camera controller by the way, which as soon as we press play it will let us move the camera around and I think it's really useful when developing visual effects. Let's just create a folder for animations, another one for prefabs ,one for scripts one for shaders and the last one for textures. And why are we doing this you may ask. Well our organization is fundamental. That's why we have our folder structured in the way they are. We have animations, materials, models, prefabs, scenes scripts, shaders and textures. Ignore the Post Process Profiles. It's not that relevant, but the others are the main folders you need in a good visual effects work environment. Organization is really key when developing effects, things can get really messy. Alright. So now we are ready to start to build our first effect.
21. 5.1 - Sparks: Getting Familiar with the Particle System: Alright. So our first effect it's going to be something real simple but extremely useful to you to understand how effects are structured. To understand the basics of materials and shaders and how a proper texture is set up. And most importantly to get familiar with the particle system. So the way we can build is visual effect in Unity is by starting to create an empty game object which is nothing more than just an object with only a name and a transform. And a transform contains the position rotation and scale. And as a good practice and in most cases we want to reset the transform of our empty to be zero in position and in rotation and one in scale. Like this I'm just going to actually turn off gizmos that are really not helping right now. So it's also a good practice to start with an empty game object because as you will see later on it's really useful to have an empty to attach animations or even scripts among other utilities. And naming is also very important. Be organize. Don't leave unnamed textures, unnamed materials and specially and unnamed effects. Things can get so messy when developing visual effects. You don't want to have unnamed textures, or effect, or materials or shaders. Effects should be named as visual effects underscore first then the name which in this case it's going to be sparks and if something else to add with insert an underscore and put it in front which in this case it's going to be loop. And this is a widely used method across different game projects and teams or at least something very similar. And if you are familiar with Unity you already know this but in unity we are able to save this as a prebad and the prefab allows us to store these assets with all its properties. And the more we use Unity the more you will notice how useful they are and fundamental in the way Unity works. So let's simply drag and drop this to our prefab folder let's also create another folder named sparks and drag our visual effects sparks to here. Now moving on with our sparks. We can create the particle system attach it to our empty. Let's just rename it to Sparks first and you will notice that our particle system is emitting pink squares, which is really awesome. Nah, I'm just kidding guys it's not really useful. And this is happening because the material assigned in the renderer is not being correctly rendered in this render pipeline. I know there is a lot of render words around here. But we could switch these material with the default particles material and it would render correctly but it's still using the legacy shaders and legacy shaders are widely used before unity 2018.1 if you ever work in the older version of unity, you will have these shaders which are extremely useful as well as the mobile shaders but for now we can do much better since we have shader graph. And I know it will be really useful to you in your future to have a bit of knowledge about shaders. So, let's see why this is happening and how we can fix it.
22. 5.2 - Sparks: Shader Graph Additive: So since we are in the high definition render pipeline we now have access to shader graph. Which is a visual scripting tool, that uses nodes created by unity to easily develop shaders. It's also available in the lightweight render pipeline, by the way. And we only need to come here to the package manager that we open earlier Now if we scroll down here we can install shader graph package. And once it is installed we can go ahead with the right click and we can create inside our shader folder the first shader which is an unlit graph just like this. And an Unlit shader is a shader that that doesn't receive light information, it doesn't have shadows as well. And in terms of performance it's very lightweight which is good and we can rename it to particle additive underscore HDR. And HDR stands for high dynamic range. Which will be useful to control the intensity of our colors. Alright so, we can double click to open or press this open shader editor button. So, this is shader graph. You can move around by pressing mouse wheel down and you can select the nodes with the left click mouse button and you can zoom in and zoom out with the wheel as well. And here's also the properties panel where we can add textures, colors, vectors and other properties that will be available in the inspector. Down here is the preview and if we right click we can change the shape to a quad. Which is more useful to us and you can rotate the preview by holding mouse 1 you can zoom in and zoom out with the scroll wheel. So if we're clicking this cog icon we have the settings that are useful for example to change the surface of our material. And do you think it's going to be an opaque surface or a transparent one? Which one do you think it's useful for visual effects. Well it's the transparent one. Opaque surfaces are mostly used to create materials such as wood, stone, iron you know something that we cannot see true. And the blend mode is how this shader or material is going to blend with what's behind it. And for now we are going to choose additive but I will show you later on what the other blender modes do basically. And the two sided option which we want to turn on will enable the mesh to be seen not only from the front but also from the back. And if I rotate our preview now it's visible from both sides. Alright. So this was a short introduction to shader graph and we now need to add two properties to our shader. The first one is a texture 2D that we can rename to main texture. And this property will be useful to us so we can assign a texture in the inspector. Textures are extremely important when creating visual effects for games. That's what, will give it that certain art style you know. And the second property is the color which I'm going to drag up here. You are free to organize your shader properties the way you want, by the way. Let's also change the color mode to HDR. And now if you click here in the color we can choose a white color, with full capacity or in other words with Alpha set to maximum or even in other words, it's no transparency. And HDR enables us to control the intensity. Which we will see out it behaves in the inspector in just a few moments. But for now let's leave it at 0. Now we can drag and drop the color in our material to around here. So, this texture property is only a reference to a texture. Which means we need a sample texture 2d node. And we can press spacebar to search it. And now we are able to connect the main texture to this node. Just like this and we don't see nothing because we don't have any texture assigned. So, let's assign a new texture by clicking here and if we type default we can choose this default particle which probably everyone as on their new project. If you don't have one don't worry I will show in a few moments how to create one. And yeah, you may think oh now we can connect the color to the color input and that's it. Yeah we could but we would only have control over the color. Basically our texture property will be useless. So the way we go around this is by using a multiply node that will multiply the texture with the color. And now we can connect it to the color input of the unlit master. Now let me just save this in the save asset button. To show you how this is behaving in the particle system. So first thing is that we cannot assign shaders directly to our particle system but we can assign materials. And a material is nothing more than an instance of a shader. If you change the shader you change the material. And shaders can also have several material. instances. It's simple, you will see. Let's create the material by pressing right click in our new particle additive HDR. We are basically creating a new instance and then we can choose material right here by the way. And we can rename it, according to the text or it will have. Which in this case it's the default particle and the underscore HDR, which I will change this in a moment. By the way. And as you can see it has the color and the texture we created. In our particle system now, if we go down here to our render we can drag and drop the new material we just great. And now it renders all squares. Because we need to reassign our default particle as the main texture Which we can do down here. And if we wanted to control the color of our shader we could actually do it right here and it would work well. But if we want to control transparency or the alpha, nothing would happen. However we are developing effects and we don't really use this color from the shader that much. Sometimes we use it but only in specific cases in our case we want to control the color with our particle system. If we come here to the start color and change to another color nothing would happen. And why this is happening you may wonder. Well this is happening because our shader is not taking in consideration any external color sources. So let's go back to you to unity shader graph to fix this and we can fix it by creating a vertex color node Which is nothing more than a node that will give us access to the mesh vertex color values. So the way we use this is by multiplying the vertex color directly with the color multiplied with the main texture. This one like this. And this is going to allow to control the color of the shader with the particle system. And we cannot directly connect it to alpha but we can split this so we can have access to the RGB channels and the alpha channel. And now we can connect the alpha to the Alpha input of the unlit master shader and maybe this is now clipped. Because we have a higher value than 0 in the Alpha Clip Threshold but we don't need it in this shader. So let's set it to zero. But now you know what Alpha Clip Threshold does basically. So let's save this and go back to unity. And as you can see it's worked correctly we are able to control the color with start color of our particle system and we can also control the alpha or the transparency call it whatever you want of our particles basically. And that's really cool but we are still using the default particle texture. So let's see how we can fix that.
23. 5.3 - Sparks: Your First Texture: So we could keep on using the default particle but that's not how pros do stuff. What you guys want to do is create your own textures. They are really important. But that's okay if sometimes we need to borrow a texture from Google. That's OK but just for testing purposes. So let's start with something super easy like a point of light on beam of light and in Photoshop or another image editing software we can create the file with 1024 by 1024 pixels which is more than enough and call it Beam 01 let's choose the bucket tool, this one so we can paint the background to black which will let us have a better view of our texture and then we can create the new layer with control shift. Now with the brush tool selected, B for shortcut, we want to set the opacity to 100 and make sure that hardness is set to zero. We can also insert 500 pixels for our brush size let's just choose white. And now more or less in the middle we want to click only one time to create these nice faded beam of light. We just need to align this. And for that let's like our layer while holding shift and then we can click on our background. Now if you press V we will have access to this align options up here and that's it. You have done your first texture. Now we just need to hide the background and export as a PNG to your Unity project and make sure you save it in the textures folder we created earlier.
24. 5.4 - Sparks: Particle System: Alright so now that our shader is ready and that we have our own texture we can move on to learn one of the most important tools a game visual effects artist uses which is the particle system. Lets drag and drop our beam texture to the default particle just like this and we can also rename these now to beam 01. And normally I don't use HDR. What I use to distinguish materials is if they are additive, alpha blended or other type of shader. So let's put "add" in the end which refers to additive shading. Let's also move this to the materials folder. Alright. So our texture is already applied to the particle system. And by the way if you wanna pause this video and try to create one or two different beams just for fun. That's OK. It's a good offline exercise that you can do. Now let's just move the empty game object a little bit up just like this and with our spark selected let's start making it look much better. While I explain you some of the features of the particle system. So the first one the duration is quite simple. And basically how much time the particle system will emit. If I turn off loop and put only one second duration and then restart the particle system. It will only meet particles for one second. And the cool thing about this particle system is that you can rewind. We can rewind the playback time which is pretty cool right. Now if I turn on loop it means that every that we put in these fields below it will repeat every second basically. And what keeps this particle system emitting particles is the emission model which at the moment does a rate over time of 10 particles each second. If we insert the value of one we really meet one particle every second. As you can see. But let's leave it at 10 for now The Start Delay is also pretty much self-explanatory. If we insert a value of two seconds and restart the sparks it will take two seconds before emitting particles. Let's also leave it at zero. We don't need for this. The start lifetime is how much a particle will live. And as it is now each particles leave exactly five seconds. If we insert 0.5, each particle will only leave 0.5 seconds. Half a second and then they will die. Now all these values in this particle systems in Unity, almost all of this values, can be constant, a curve, a random between two constants or a random between two curves. And in this case we wanna use a random range between two constants. So some particles live longer and others will have a shorter lifetime. Sometimes it's really important to create the most possible randomness in effects. And this is the case Sparks is a good example of randomness. And something like 0.7 for the minimum and 2 seconds for maximum is OK. Just remember that diversity is good. OK. So the start speed is how much speed. Each particle has. They currently have five of start speed. And we also want and choose random between two constants. So some moves slower and others move faster something between 1 and 15. For now should be fine. You can test different values of course. You can always test different values, guys. That's really important. Now the current start size is too big for sparks. Let's make it random between 0.1 and 0.3 for now. They need to be really small and we will also see this rotation stuff later. Now let's come down here to the shape model and as you can see as soon as we open it we can see the shape of the particle system is using to emit particles. There are other shapes besides cone but we will see them later on. Let's focus on the cone. Now if you are curious you can pause this video in of course have a quick check. For sparks the radius is too big. We wanna decrease this maybe to around 0.1 or 0.15 Here we can also control the angle at which it emits particles we can make it bigger or even a really small. And it goes in a straight line as you can see. But for Sparks we wanna make it something around 20. And of course guys if you wanna keep testing this values out don't hesitate. It's the better way to learn if you want to pause and test values. It's OK. And yeah down here there's a lot of stuff but we will see that later on or at least we will see most of the stuff of course. Let's close the shape model and come down here to the renderer. The renderer model is where we control how the particles are rendered. We have already gave it a material and now we can control how they are rendered. So the render mode is in Billboard mode which is nothing more than a even quad, like we have seen. Like stretched billboard, horizontal billboard which locks the particle horizontally, vertical billboard which locks the particle vertically and mesh let's us choose a 3d object. And there is even none. And guess which one we are going to use for the sparks? Well it's the stretched billboard. This one allows us to stretch the particle and if we look into some quick reference this is how most of the Sparks looks. They are all stretched. Now if we increase the speed scale to one it will stretch too much. Even with length scale set to 1. And normally we want to play only with one of these values, with the speed scale. I just wanted to show that both are very similar. Now let's set the max particle size to 3 and this is not the perfect example to show what this does. But this will let the camera get closer to the particle system without shrinking the particles. Anyway, moving on. Let me just rotate this -90 degrees in the y axis. Let me just also shrink a bit. Start size to 0.05 and 0.2. I think they were a little bit too big in my opinion. Alright so as you can see our sparks are floating around they are going away like it was nothing. And we need to make them go down. And for that we use the gravity field we have here and we can insert one. Particles will start immediately falling down but they are not colliding with the ground as you can see. But fortunately we have the collision model which we can turn on. And we can also turn on or turn off visualize bounce which will hide, or show this sphere around our particles. Which is basically a sphere collider. And here in collision type let's switch to World so it can collide with objects however there's still nothing happening our sparks are still falling through the ground and not colliding with it. And that's because the ground itself doesn't have any collider and I left it like this to show that collision of the particle system only works if the objects have a collider. So let's quickly add one collider to the backdrop. We can search for a box collider here and we need to resize to only be in the ground and you can copy my values. This are my final values. You can go ahead and copy them just to make things easier back to our sparks they are now colliding with the ground, which is looking awesome and it's nice it has a really nice motion. For example if we increase the bounce that would jump farther away And the Damp is how much they lose motion when they hit something so a value of 1 in the Damp immediately stops our particles. And I find a good balance. if we insert 0.5 in dampen and in bounce oh and lifetime loss if set to 1 will instantly kill the particle because we are seeing that spark will lose the remaining lifetime it still had. So let's leave it at zero. So the particle can live all of it's lifetime which is between 0.7 and 2. Now let's close the collision model and let's increase the rate over time of the emission to around 50. Yeah that looks much better much more particles. And of course if this was for a game you would need to have in consideration the platform. If it's Mobile or PC or many sparks will there will be at the same time. But since it is for academic purpose. That's good 50 it's a good value. So now let's give it color Let's try to emulate the gradient where it goes from bright orange to a faded red. More a less. So if we need a gradient we are not going to use the start color but instead the color of a lifetime. So the keys on top controls the Alpha. The opacity of the particles. Basically. And the keys at the bottom controls the color. So let's say that in the beginning we want the yellow orange color something very similar to this. I always like to have my colors displayed the HSV. By the way. So for example I can say that in the U It's 35. In saturation it's around 85 for this color and that looks okay for now. Well now we want this to go to a reddish color and maybe around 10 in the U would be fine and a bit less saturated. Yeah. That looks OK maybe a bit more towards yellow in the beginning. What do you think. This is always a little bit up to you. You should try colors you know, like for example you could try from blue to purple. It's quite beautiful by the way. If you want a pause. Go ahead. Let's just decrease a little bit the opacity towards the end. Alright. That's OK. So, remember when we were developing our awesome shader and we added that HDR called property. Well now it's the time to use it. If we start increasing the intensity values we start getting this hot glowy sparks which look even better. And that's the trick. sometimes. Another trick is coming here to the bloom in the volume or in the camera. And if we increase the bloom intensity to around 0.2 in this case, it will add that final touch that looks really great that really glowing thing around sparks. Now let's try the size over lifetime module which is controlled by a curve. And if we choose this curvature we are saying that it goes from original size the start size and then it will slowly shrink towards zero. And it gives a nice touch too. If you want you can leave it on randomness is really important and in color of lifetime we are able to choose between two gradients. Which is great. This is useful because the way they are now they all have the same color in the beginning and in the end. So, we can copy and paste this gradient like this. Now we can open a second gradient and let's say that in the beginning it can be a bit more yellow and in the end it can be a bit more red so we can have more randomness two gradients or two colors always adds more diversity which is good. Remember for this exercise the sparks it's good and for a lot of effects too. Now just so you know the Pre Warm, if it's off it means that when we start the particle system it will gradually start spawn particles until it's spawning 50 particles a second. in this case. When Pre Warm it's On, it acts like if the particle system was already working like if the particles are already loaded. Sometimes it can be really useful but we don't want to use this in this case. So let's turn off. All right so now one last thing, if we try to move this around, the sparks will always follow along. As you can see. And that's not how sparks work and this is only happening because we are saying that our simulation space is set to local instead of world. And now if we move this the particle system we start to leave sparks behind and this looks much better. Sometimes it's truly useful to know this difference.
25. 5.5 - Sparks: More Details: Great. Now the sparks are pretty much done. Let's just save the changes we made to our prefab, before we lose all of this chance. Don't forget to frequently save your prefab and your scene, Ctrl+S and it's always a good practice. Alright now with this material and this textuew we can still spice up our sparks a little bit. We can do it by simply duplicating the sparks and rename it to beam. If we're looking to our reference we are going to recreate this beam of light as you can see more or less. I'm not going to make it white blue for example but if you want to try it's completely fine. You only need to change the color afterwards. So the most important changes we need to make is the start lifetime. Which is going to be much shorter than sparks because it's going to blink really fast. Something between 0.2 and 0.5 and we don't want to beam to move right. So let's set the start speed to zero and we also want this to be a little bit bigger than sparks. So let's make it around 0.5 and 0.7 and gravity will make this move. So let's set it to 0 too We don't want the beam to move. That's why we also want this to be in local simulation space in case the sparks are moving. We want to beam to always follow the movement because they are like the source of the Sparks. In rate over time we want to use less, something like 5 particles a second. Should be fine. We can turn off shape because like I said we always want this to be in the same place. And for now let's turn off color and size over lifetime as well as collision. Now let's change this from Stretched Billboard to Billboard. Which is always going to be a perfect quad. Unless we change it in 3D start size but you'll see that in a moment. Now if you play this. Here we go. We have these blinking point of light. Now we can do a few things like add color to this for example. And we only need to turn on color over lifetime. And we still have the same gradients that we have used in the sparks, because we duplicated this. Which are fine by now. Like I said if you want to try other colors that's fine. Now let's turn on size over lifetime and let's create our own curve. It's very important that you make custom curves since most of the timing and the shape of effects comes from these model. So let's make this wobble a little bit and we can choose a flat line. And now with the right click mouse we can have a key around here. Let's move it down and have another key and move it up. And we can keep going on, until we have something very similar to this. And this will add just a little bit of detail to our beam. All right so now to see the sparks and the beam in action, at the same time, we can select both with shift and yeah. OK. Let's just move the sparks a little bit. They seem like they are coming from behind of the beam. And here we go. The beam may seem a little bit small but we are going to add another particle system. But first let's save this and apply the changes to the prefab. So now let's again duplicate the beam. Just to show you how many things we can do with only one material and one texture, which is great. Let's call this one shiny or rays. For this one we are going to make the start lifetime last just a little bit longer between 0.3 and 0.6 and this time we are going to use the 3D start size. Like I said before it will allow us to control how much the particle will stretch and the Z can be left at 1 or 0 it does matter since this is a quad and it's 2D. Now if we stretch into x and make it shorter in the y something like 2.5 and 0.1 respectively, we get this thin line and if we use the start rotation to make it random between two constants with values between 360 and -360. So it rotates clockwise and counterclockwise so we can have more randomness. We get this line being rotated anywhere. Totally random. And by the way the flip rotation it will add a chance of flipping the particle in the opposite rotation. Now let's also add some randomness to the 3D start size by making random between 0.25 and 0.1 in the y axis and 2.5 and 1 in the x. Alright. So, now we are starting to see where this is going. And we just need to increase the rate over time to around 15 more or less. And we get this nice shiny rays. So final touches are about color. You can leave this as it is or we can use only one gradient and if we do so we can push this key to more a less to the middle and create another one in the beginning but with the alpha set to zero. So it fades in and then it fades out. Now let's make both of the keys white because we wanna use the start color instead. And we want to use 2 start colors like this. The first one is going to be for the light orange with low opacity. And the other one is a darker orange but we are going to leave it almost white which will give the sensation that this is really hot you know. And yet that's looking much better now. Let's just make them shrink over time and use a curve like this one and now if we select the three particle systems we can see how this is going. How they are working together, and yeah. What do you think? I believe it's looking quite interesting since we are only using one texture and one material. And by the way we don't actually need to select all the particle systems to see how they are working together. But first let's just save the changes to the prefab and then if we enter in the prefab we can actually parent the sparks and the shiny to the beam just by dragging them like this. And we can easily watch them work together only by selecting the beam which is a parent. And this is really useful instead of selecting every particle size. Alright. So, one last thing that I want to show you, is in the emission model for example instead of using rate overtime we could use rate over speed. The big difference is that now it only emits if the particle system is moving and then it emits particles according to the speed at which is moving. This can be really useful. If we are creating a projectile or something that's moving like a vehicle an aircraft etc, etc. So, that's basically it.
26. 5.6 - Sparks: Impact: Now just to show you a quick way of transforming this sparks into a hit, like something really fast hit a piece of metal for example, we can duplicate our sparks loop. Name it sparks Hit and let's create the prefab out of this by dragging and dropping to the sparks folder and say it's an original prefab. Alright. So, now we want the opposite of what we are doing. For example, we can like this three particle systems and say we don't want this to loop right guys because it's going to be a hit. It's only going to play one time. We also don't want rate overtime. And now nothing emits from the particle system because we are going to use the bursts. So in the beam we can say we want one burst with one particle by clicking in this plus sign. And here we can also choose the time at which it emits the particle, the interval, and even the probability of emitting that particle. But let's leave it as it is now. Now we have one beam that only emits one time. Great. And it's not fading away. It simply disappears. We only want one gradient in the color of a lifetime. And that gradient goes from full opaque to completely transparent and we can also delete the last key by the way. Alright cool. Now it fades away. But we still have this wobble going around and now in size of a lifetime let's choose one of this curves right here, and now it looks much better it looks good it fades away and it shrinks away. But it's still a bit too bright in my opinion. And we could control that in the start color by decreasing the alpha basically. Alright. Now we can use a constant in start size with around 2. Let's also only use a constant of 0.4 in the start lifetime. So it's going to be quick. OK. So for sparks we can use one burst with get 30 is fine. OK. Looks good Let's just rotate it -90 degrees in the x axis. So the sparks face up And now let's also increase the angle of the cone to around 60 degrees should be fine. And the start lifetime is fine but, I'm still gonna make the sparks last a bit less. Something between 0.5 and 1.5 Now, for the shiny rays let's also add a burst but with 10 for the count. We also need to change the color gradient because we want the rays to go from full opaque to transparent. Basically. Like this And I think it's too white. So I'm gonna make the second color more orange. Alright. OK. Looks better. We can also increase the size of the rays to 3.5 in X and maybe we also have a shorter lifetime something between 0.2 and they're not 4 since this is going to be quick. It's going to be an impact. Alight guys. So, one of the last things we can do, is add a flash of light. By simply duplicating the beam and then erasing its child like this. Rename it to flash for example. And this is going to be really fast. So 0.2 for lifetime is a good value to create a good impact and it's going to be a big flash like 6 for the start size should be enough. Lastly let's make it fairly visible with only five in the alpha of the start color. It looks great. It has an impact and that's fine. Let's parent the beam so we can see everything working together. Now it's really cool. It that's that punchy feeling you know. Like if something fast hit a piece of metal. alright We have some pretty cool sparks done and we have also seen several important features of the particle system. We also created our first shader, we saw how the effects should be structured in Unity and we made some looping sparks and the hits sparks which actually look really interesting. It's not that bad since we are only using one shader and one texture. So now let's make some quick experiments with different colors and have a better look on how they can transpose different sensations and feelings.
27. 5.7 - Sparks: Variations: So the cool thing is that we can quickly create some color variations of this and we can get some totally different feelings. For example let's start with sparks loop. If we duplicate it we can now for example come here to the gradient of the beam and start to create a green version like this. Where we will have a darker green at the end and a lime green in the beginning and that's it. And now we can leave the other gradient as it is because they will complement each other very well you will see. Now we can copy this gradient and paste it to the sparks the first gradient and we start to see the green ouch. It could look like something that you could use in a jungle scenario maybe. Anyway, for the shine we only need to choose a green color for the second start color and that's it. Alright. So it's as simple as this. And let's just save this as a new prefab, an original one. Now let's also create another one. We can easily create a blue loop spark too. Maybe this key can be a darker blue like this. And the first key can be a light blue maybe a darker blue after all. Yeah. Looking good. Let's just copy these and paste it to the sparks color over lifetime. And we can already start perceiving that this gives a really different feeling to meet. Looks like something that would fit well a sci fi game or a futuristic kind of game. something along those lines. Let's just save this as a prefab and also do the same for the sparks hit. We can drag the prefab and add green in front and then also save this as a prefab so we don't miss the original one. All we got to do now is copy the gradients. So yeah, the beam only has one gradient. OK. But we can add another one, no problem. We just need to make sure that the end is transparent. Then we can paste it to the sparks and in shiny, we simply need to change the start color to something more like this and the Flash can have green at the end as well on the gradient. Yeah looking good it gives it a really nice sensation by just mixing two colors. I think it's awesome but let's save the changes to the prefab. And now you know the drill. We can do the same. We can duplicate the green one and rename it to blue save it as an original prefab. Before we start making the modifications and you know it's the same idea now. So you can copy the gradients make some adjustments and make sure it's transparent at the end and i'm going to fast forward this. The idea with this little experiment is to show you how colors can combine really well with each other and give totally different sensations. And that, sometimes, it may seem like it doesn't make sense if you look into the real world, but these are games that we are working on. Sometimes some blue sparks will look really well in a sci-fi space game. Why not. And maybe the green one would fit perfectly a plane that crashed in a Jungle. Think about it. So yeah don't always stick to two colors that you think will look good because you saw it in reality but instead make experiments try different things. Color is really important it gives really nice sensations. So that was just a little experiment to show you how color is awesome. Now our next step is to create the more complex effect an Area of Effect attack, get some reference do a quick sketch and see how the anticipation climax and dissipation can be done as well as a few more things obviously. So I hope to see you in the next chapter.
28. 6.1 - AoE: References: Alright. So welcome to this new chapter. The area of effect, where we are going to create a much more complex effect. And this time we want to have a better look at some reference since it's a more elaborate effect. So let's start by going to pinterest for example and simply type game effects And it's really cool because you can quickly see a bunch of reference and if there's something you like you can create an account and pin it to a board, of game effects references for example. And for instance I have this board of reference where with time I started pinning ideas that I really liked and references that I thought they may help me for what I was doing at the time. And for the effect we are going to do I focus on this images and videos around here. So basically we are going to create something vertical that starts concentrating energy in a certain area and then inflicts damage upon that area with a big impact. And then we will have a fall off and aftermath at dissipation. So yes this are good reference and this is the basic idea. Now we can also come here to Artstation. And if you do the same research game effects you will get a very broad result of course. But if you see something it pleases, you can leave a like and if you have an account which I totally advise you to create one you can come here and also see everything you liked. And for example I left a like in this artworks, around here, when I was researching reference for the effect that we are going to do. And once again I focus on the same ideas like Area of Effect vertical attack concentrating energy and then a big impact which they all have in common. Alright. That's cool. That's how you get references. And of course you can also come to YouTube or to Google and also search for unity effects or game effects and you will get very interesting results as well. It's very important that you see a lot of effects that you have a lot to reference but, don't simply copy everything, ok? Just use it for academic purpose. Alright. So for now we've got some good references from pinterest and artstation and we can move on to our next step which is creating a quick and simple sketch so we can visualize our idea.
29. 6.2 - AoE: Sketching: So Sparks was a good example of when you most likely don't need to do sketches. It was OK to only look at a few references and move on to Unity, it's a very basic effect. But for an effect more complex like the one we are going to do we are going to need a few more things than only references. Alright so now let's go ahead and actually try to visualize on paper or in Photoshop or in -- what our effect is going to look like. And I already have this sketch here of the effect we are going to do. But it's a bit more detailed and the sketch we are doing doesn't need to be super fancy guys. I'm gonna make this much simpler just to show you how basic sketches can be. And by the way, this are just simple tricks about illustration, since the subject of illustration is enormous, and we only want to get our ideas on screen or on paper. So like I said I'm going to use photoshop with a graphic tablet but it's fine if you don't have one. And if you want to follow along with paper we can start by creating a new file in photoshop or -- with 1920 by 1080 which should be enough or you can use the size that I got which is actually the resolution of my two monitors. We can call it sketch 01, in my case it's going to be sketch 02 and then underscore, AoE, which means area of effect. Now we can paint the background with the bucket tool, this tool right here and down here let's choose a light gray. I like to use light grays from time to time. Similar to this one. Aright so let's create a new layer with Ctrl+Shift+N in Photoshop. And now you can press B to select the brush too. And if we come up here let's set our opacity to around 35 to 50. It depends on how much you like, and the brush size can be between 1 and 3. Whatever you feel more comfortable with. And make sure the hardness is at the minimum which is 0%. So it's a smooth brush. Alright. So let's change our brush color to black now. And so I'm basically going to create a circle very lightly, that basically represents the area of effect until I get a nice shape like this one. Next thing, is basically the vertical cylinder We want to concentrate energy vertically that is going to accumulate energy on the ground as well. So this is accumulating energy, there's particles coming in from everywhere and the cylinder is spinning around. It's also shaking and rotating you know and then there is this circle at the bottom, at the base, that it's going to work as a reverse shockwave. You know, like if it was the energy accumulating in the ground it's getting really bright and this cylinder is also going to have a texture scrolling probably and by the way you can use the erase tool, E for shortcut if you have to erase some excessive drawing that you have made, always remember that low opacity values are great for brush and for the eraser. And I know this probably isn't simple for you if you don't have any experience drawing but don't worry about being perfect it will help you to start doodling your effects and it's going to make a bigger difference in the future before you are going to go to unity because this will help to see if you need textures, meshes or shaders. It's also going to help you to keep focus on your original idea. Alright. Now I was just giving a few more details and make it more visible. Nothing really special. So this is going to shrink now. It's going to focus even more energy and is going to get smaller and smaller it's like a beam coming from the sky and it's going to build up the anctipation, and then boom, we have the climax which is the second part. So this is the first part the energy gathering basically the anticipation and this is the explosion, the climax, in other words. Which is going to be very quick by the way. And the climax where the accumulation of energy explodes and inflicts damage on the enemy is going to mostly be very quick. So we are going to try to capture the peak of the action. And in this case we are going to see this bright impact this bright explosion. By the way this is a little bit too big. And in case that happens to you you can use the M, or the L, to select this and then you can press Ctrl+T Ctrl+T to shrink your drawing,. as you can see. It's really useful. So like I said this is going to create a shockwave on the ground it's going to release particles and sparks which is flying everywhere like this and it's going crazy for half a second, more a less. The 3rd part which is the dissipation the dissolve or the aftermath. We mostly want to leave a mark on the ground, because it's cool, because we will see how to create marks on the ground. And then we will see some particles flying around while the heat of the explosion disappears. So to draw a crater on the ground you mostly need to have a loose hands and try not to make the brushes is too deep. Only light brushes at the beginning so you can start to see the shape you want to create and you can start by making five or six branches like this around something similar to a circle. I hope that this is helping because it's not easy to explain. Illustration So once you start finding a shape you are comfortable with that you like, something similar to this, you can start adding a few more details. But remember you don't need to make this perfect or loose too much time with this. It's just an idea on screen. Now I'm just going to pass a quick brush with only around 5% of capacity and with the size of around 50 pixels. It's just a quick brush to help pop out the most important areas of this three stages. And obviously this are just tricks that I'm sharing with you. Illustration is a whole other topic. And in case this is not still very visible to you. What I like to do, is basically duplicate this layer that we are drawing in and then we can select both layers and press Ctrl+E to merge them and that's it. It's a bit more visible now if you want you can even duplicate it again. Alright. So this effect is going to have an element associated. From the moment it starts the anticipation, to the dissipation. And what I mean by element is for example let's go to my first sketch. We have nature we have frost or ice. We have fire, electricity, there's arcane, there's galaxy, there's a lot of themes basically and elements. For example in the climax we will have electricity shooting everywhere. If this was an electric effect and the color will be blue or yellow or maybe a combination of both or we will have a green leaf and stripes coming out if this was a nature theme you know. With green and yellow as well. Or fire like this one we will have this orange and red and yellows this really amber colors you know. Or even ice you know which will be really cold really frosty with this with this bright blue and almost white you know. So this are elements that really need to be visible in the anticipation the climax and dissipation too. And that's basically it at least for this sketch. So one last thing that I want to talk to you about how sketches are useful is you need to consider when looking at sketches and references, what do we need to make this effect happen. We literally need to deconstruct the effect. For example looking at this 3 effects, we can see that we will need this particle, this beam, which we already have. We'll probably need some kind of circle texture to create the shockwave. There is also this bright third circle at the base of these cylinder and yeah, there's this cylinder which is a 3d object that we are going to need to create and also apply a texture. There's also this stripes which are 3d objects and they also have another texture And then there's this. Mark are this crack on the ground too. Amd a few more things obviously. What math is that you start perceiving what is the elements that you need to create the effect what is textures and meshes.. You know. That's really important. And try to train your eye every time you are playing a game try to see what what they used to make the effect . It's really a good exercise. So let's move on to Unity and apply all of this that we have been talking about.
31. 6.3 - AoE: Starting the Anticipation, Climax & Dissipation: Alright. So once you are back in unity we can start by doing the same we've done with the sparks. Which is by creating an empty that we can rename to vfx_AreaOfEffect_v1 vfx_AreaOfEffect_v1 or v1. And let's also reset the location the rotation and scale. Good. Now we can already go ahead and save this as a prefab. Just drag and drop to the prefabs folder. You can also create the new folder. Named for now, Area of Effects. And let's drag and drop our new prefab to this folder. So let's start off by creating a beam on the ground that will shrink over time. And let's simply add a new particle system that we can rename to beam ground. So the Beam on the ground will not loop and it will certainly not live 5 seconds right guys? We said the anticipation will be between 0.7 and maybe 1.5 seconds. So let's put it in-between more a less at 1 second for now. And then we may adjust it if necessary. And this is going to be underground. It's not gonna move anywhere. So we don't need any start speed now. This is going to be quite big. It depends on the game you are doing. But for now let's set the value of 7 in the start size. And yeah this pink squares are getting a bit annoying. Fortunately we already have the beam and the additive shader done. So let's simply assign in the renderer, the material we created for the sparks. The Beam01_Add. Oh and remember the max particle size? Now we can see that better in action. If we get closer to the beam it will start shrinking according to the camera position. Now if we increase the max particle size to around 3 we no longer have that problem which is cool right. Great. So now in the emission model we don't want this to have a rate overtime because we want to use a burst that will emit only 1 particle like this and we also don't want the shape module because we want this to be right at the center of the effect. Cool. So we have been using billboard and stretched billboard, and now it's the time to use the horizontal billboards. Our beam will be actually parallel to the ground. And vertical is perpendicular to the horizontal billboard by the way. Alright great. We are almost done with the beam ground actually but don't you think it's a bit too bright? Yeah... That's what I thought. Let's decrease the opacity to around 50 maybe even lower if you want. Now let's make it fade in. Which is what we want in this case because it's accumulating energy right. So in color over a lifetime we can actually set the alpha to zero on the first key like this. But we want to go fully visible a little bit before the lifetime ends of the particle. More or less around 90% and then we can add another key so it fades out completely. And this is how it looks now it fades in but it doesn't disappear out of nowhere it simply quickly fades away instead which is better. So now what we need is actually make this shrink over time. And for that we are going to use the size over lifetime module. Which will let us choose a curve similar to this one. But let's not make it shrink completely until it disappears. Let's push this key a little bit up. Alright. And now with this two tricks, the color and the size over lifetime we are starting to give the sensation that this is building up to something. But we are still missing a few things obviously. Like this particles around here going basically in and for that we can duplicate this particle system with Ctrl+D. And then we can rename it to something like Particles In. Alright. So first thing, this particle will have a much shorter lifetime compared to the beam ground. Something between 0.2 and 0.25. They will also be very small something between 0.05 and 0.18 0.18 Yeah, I know that's a specific number but you can try other numbers obviously. Next is the emission module. We don't want to use the bursts. We can remove it and let's set the rate over time to be around 75. And if we test this, all the particles will be concentrated in that spot mostly because we are not using any shape. And yes this is emitting particles for way too long. Let's decrease the duration of the particle system to around 0.75. Which means it will emit for 0.75 seconds + 0.25, which makes up for that 1 second. And why this is important. Well, it means that both the beam ground and the particles in will disappear at the same time basically. And that's important for a good anticipation. Anyway, let's change the shape to an hemisphere. Basically half a sphere and as you can see it's not correctly rotated so let's fix it by rotating -90 degrees in the x axis. Alright. Okay. So as you can see the particles are all acting weird. That's because we are still using the horizontal billboard in the render mode. So let's switch it to a stretched billboard like we did with the Sparks, with 0.05 in the speed scale. Should be fine. And now you may notice that nothing happens because these particles aren't moving. And if we set for example 15 in the start speed we will start seeing something but it's moving outwards instead of inside. And if we insert -15 we can make them go in the opposite direction, we can make them go inside. And now it looks like they are being pulled by some sort of energy gathering you know and it looks much better. It looks pretty cool. And I believe the radius of the hemisphere is just a little bit too small, yeah. I'm gonna increase it to around 2. Okay now let's see how a curve in start speed we'll make this look much better. So this graph goes from positive values to negative values. As you can see there. And we want this graph to be in the negative values. So we want it to go slowly from below zero to 15. Just like this. And now we will get a pretty cool effect, where the particles at the beginning are moving very slow and then they start getting pulled inside faster and faster. And that's really cool that gives a nice sensation to the effect but all the particles are still moving at the same speed you know. And remember that if you can add some randomness then go ahead and add it. And we can add the randomness with two curves where one will be a bit slower than the other. Just like this. And we end up with this gap, a range of particles movement, and it looks pretty cool these curves are real useful guys. Now final adjustments we probably want this particles to go from small to big instead of big to small but that's more of a personal taste by the way. It's a bit up to you. OK. So don't hesitate to try different settings than mine. Obviously. And yeah I think it looks pretty cool now. Besides the fact that we don't have any color yet anyway now we can parent the particles in, to the beam grounds. Okay so this is the anticipation. Now let's give it some color. Let's actually give it two colors. And this is where you can go to a different path if you want and try a different color or you can follow along and try different colors at the end. So anyway, the 2nd color will have a lower opacity than the first one. By the way. And I'm gonna choose a strong Violet for the first color. More or less like this and for the second color maybe a purple one will do fine. So yeah it's more of a arcane magic feeling we are going after. Let's just make it a little bit more blue. And yeah it looks cool. Now, let's copy the first color and paste it to the beam ground start color Yeah. It doesn't look that bad but we may want this to be a bit more brighter. Maybe a lighter Violet will do. But yeah maybe that's too much. And color is a tricky thing. By the way guys. Yeah. Okay. I'm going to leave it around here. It seems cool. Let's also go ahead and apply all the changes to the prefab so we don't lose anything. So there's still a few things missing in anticipation but we can still start building the climax. For example we can duplicate the beam ground. Delete the particles in, for now, and then we can add a start delay, since this will only be activated once the anticipation ends. So if the anticipation lasts for 1 second we could delay this directly 1 second but it wouldn't have that great impact. So let's have an interval of let's say 0.2. So, we want a start delay of 1.2 seconds which seems like a good one for now. So the emission is going to be the same but, the color and size overlifetime is going to be literally the opposite. Which means it's going to go from fully opaque, to fully transparent and maybe from a white to black too. All right the size overlifetime is not going to be exactly the opposite because we just want this to slightly grow. That's why I'm pushing the first key up to around here. Alright. It looks good. It has a strong impact in the beginning and then it's dissipating away which is cool. Let's go ahead and duplicate the particles in and call them particles out which are going to live much longer. Somewhere between 0.4 and 0.9, maybe even more. And this ones are not going to use a curve in the start speed but simply a random between two constants something between 2 and 15 should create the nice impact. And if you want you can use the gravity by the way like we have used it in Sparks. It's up to you. So this is a burst of particles meaning no rate over time, but an explosion of between 20 and 25 particles should be enough. And yeah it's looking cool. So what do you think we need to fix now. Well it's the shape of the hemisphere. It's a little bit way too big. OK. So now it looks better. So the size over a lifetime should be the opposite. From big to small like this, yeah. And the color over lifetime is also going to be the opposite. Alright. Looking good. Now if you want to try a different shape like a circle for example you get a different feeling which is also cool. I'm actually going to leave it this way for now. So now let's parent this to the beam ground and let's see how everything is working out together. And here we go. We have actually a very cool anticipation, and a climax and a quick dissipation of the particles going away. While the beam on the ground also fades out. It's quite nice actually. But we can still add one more cool thing so we can have a bigger impact which is actually a quick beam like we used in the Sparks Hit It was a flash. So that's the duplicate this beam ground. Delete the attached particles and rename it only to beam or to flash if you want. And the first thing we are going to change is the render mode. We want this to be a simple billboards. OK. So we also want this to have a big impact. And for that we want it to be really quick. So something between 0.2 for the lifetime is a good way of having a nice impact let's just push this a little bit in the y axis a value of 0.5 should be fine and the start size now, can be around 5. OK it's looking almost good. We just want to change the size over lifetime so it quickly shrinks with a curve OK. That's great. So let's see how this is working out with the rest of the particle system. Let's parent it And yeah, it's looking quite good actually. But I think it may look even better with an Hemisphere on the particles out and yeah, it definitely spreads out the particles above the ground and it looks nice. And it's actually already a really cool area of effect the fact that we got here let's just save the changes to prefab. Our original idea in the sketch, is to have a vertical energy gathering. And for that we need to use our first mesh. So, let's see how to improve this in our next video.
32. 6.4 - AoE: Your First Mesh: So for this part you will need blender or another 3d software that you are comfortable with. And in case you don't have any, you can come here to the blender site, and simply download it. The installation should be quite straightforward. So once you have everything ready you can open blender and as soon as you see this screen you can press A to select everything and then you can delete with the delete key. Now we can use Shift+A to create a new Cylinder, and in this dropdown menu, you can actually add a bunch of things but we want to add the cylinder for now. And down here we can control how many vertices it will have. This is really important to know because you may want your effects to be lightweight. And the number of vertices is really important in terms of performance, but performance is a topic that we are going to talk later. So for now let's choose 16 vertices which should be fine. OK. So now we need to remove the top and the bottom. So, let's press Tab to enter in edit mode, and then we can press Ctrl+Tab and choose faces. This will allow us to select the top face with right click and you can unselect everything with A by the way. And once you have selected the top face you can press delete to erase it. Let's also do the same with the bottom face. Alright. So at the end you want to have these type of cylinder with no top and no bottom. Now let's keep in edit mode because we want to press Ctrl+Tab once again so we can choose vertex while holding Shift+Alt we can press right click in these edge so we can select all the vertex at the bottom, like this. Now which Shift+S we want to choose cursor to select and this will allow us to get out of edit mode with Tab and press Ctrl+Shift+Alt+C so we can select origin to 3d Cursor and what we have just done is set the pivot of our mesh to the bottom and this will help us a lot inside unity so we don't need to be messing around and making sure the pivot is aligned with the ground. OK so great. Now we can actually enter in edit mode and while holding Shift+Alt again we can press right click in the top vertices so we can select them all. And now let's press G to move it and then, Z to lock in the Z axis and then we can press 2 in the numpad. So it goes up 2 units like this, and then you can press Enter. Alright looking right. Let's just rename this to Cylinder no top for example. You can add another name if you want. And now we have our first mesh done guys. We are just missing the UV maps which are actually fairly easy to create since this is a very simple mesh. So let's again press Ctrl+Tab so we can choose edge. And once again while holding Shift+Alt let's select the bottom edges. And now while holding only Shift we can select one of this vertical edges like this, and now once again holding Shift+Alt let's select the top edges like this. So with this selection done we can press Ctrl+E and then choose Mark Seem like this and these red lines now is where we are going to cut to unwrap basically this mesh so we can create UV maps. Now let's press A to select everything and then we can press U so we can choose Wnwrap and that's it. We have just unwrapped our mesh correctly. We just need to make a few more adjustments so let's create a new window by selecting and dragging this little icon right here as you can see like this and now in the dropdown menu let's select UV / Image UV / Image Editor Alright cool, so now as you can see our UV map it's only covering half of its full capacity. Now here's a cool tip guys if we click on this icon we can now select the vertices on the UV map and we can now understand which part of the mesh it represents. So, now we know this is the top part which is great because we want to select all of this vertices with B and then push them up until it almost touches the top but don't let it pass. Okay guys. Alright. Just like this. And now we just need to press Ctrl+S, don't forget, so you can save this in your folder and then with the mesh selected we can come up here and export as an FBX and in this left panel, done here, make sure you turn on select ON Selected Objects, then press this icon so the scale goes correct. And we can choose only mesh down here. And if you haven't already you can give it a name and that's it. You can export it. Now. Now once you have imported it to unity to the models folder, don't forget to be organized guys. We can select the cylinder and say that we don't want to import materials nor animations and we can also set the scale factor to 10 and then we can press apply Alright so let's apply this mesh to our area of attack now. So the way we can do it by simply duplicating the beam ground for example. Erase the child, and rename it to simply cylinder for example. And to use meshes or 3D objects in a particle system. We have to come down here to the renderer and select mesh as the render mode. Now we can assign the cylinder by simply dragging it around here to the mesh slot like this and here we go. We have the cylinder in action and at the moment it's applying the beam, according to the UV the maps we made. And it's also always facing the camera and that's easily fixed by coming here to the render alignment and switch it from view to Local. Now it no longer follows along the camera. And by the way, World aligns it to World axis and doesn't allow to rotate it by its transform, just so you know. But let's leave it at Local and let's also rotate it -90 degrees in the x axis. So it faces up, just like this. So now as you can see this doesn't look that good with our beam texture which means we need to create the new one one that looks like an impact.
33. 6.5 - AoE: Impact01 Texture: So in your image editing software of preference let's create a new file named Impact 01 with 1024 by 1024 pixels. Now with the bucket tool, this tool, let's choose a black and paint the background to black as well. Now let's create a new layer with Ctrl+Shift+N and now we need the brush tool, B for shortcut. We also need the white color. Okay so the idea is to end with these spikes. Something similar to this, and this will be mapped to the cylinder meaning we are basically drawing from the bottom to the top of the cylinder. So what we can do is increase our brush size to be between 400 and 450 pixels with 0 for the hardness. So it's always smooth and more or less around here close to the bottom while holding Shift we want to paint a white stripe like this and make sure it's white at the bottom and it fades slowly away. Now with the smudge tool this one, we can start pushing down this whites with a small brush and you can keep on pushing them down. And once you have something like this you can increase the brush. And again do the same in some areas. Just make sure you don't touch the extremities because we want to leave this as seemingless as possible you know. Now still with the smudge tool we can start pushing up the white spikes like this and maybe push some of them a bit more down too. And then again we can push the white spikes up make them a bit longer. You know. Now with a small brush size let's again with the smudge to push some of these whites from down here. So we can create several tiny spikes like this. It always goes from the bottom to the top. And it will give this texture of more details. And yeah if you notice that you want to add a spike around here or there. Don't hesitate to create another one with this much to. So this is basically our process. Now we can again push these even deeper as you can see and you can also with a low opacity eraser start to take away some of these bright spots. Because it's really important to have a nice shape to have a nice fade, between black and white. You know, creating these gray areas will look better in the end So once we have this nice faded spikes we can double click on the layer to access the layers. And now we can activate the outer glow and change it to a white, by the way. Let's also increase a bit the size and also decrease the opacity. Basically we just want to add a little bit of glow to our Impact texture. OK. It's looking good. So one of the final tricks that I like to use, is pick the erase tool. And with a very big brush like this and with the very low opacity around 5 or 10 percent we can click a few times just to erase a little bit off the top of the spikes. We are basically creating a nice fade. And leaving the White at the bottom. You know and final adjustments if you want. You can create a few more spikes like this and add a few smaller ones too. Why not. Alright. So whenever you are satisfied with the end result you can save this photoshop file in the folder and then we can hide the black background and export this texture as a PNG to Unity So once you are back in Unity we can duplicate our Beam01_Add material and now we can call it Impact01_Add and let's drag and drop our impact. 01. Texture to this slot. Now we can go ahead and also assign the impact material to the cylinder. And now we get this nice result with the much better looking impact. Now we need to control the size of the cylinder. And to control the size of meshes we can turn on 3D start sites. Which will give us control on the radius and how high the cylinder is in this case for example 10 by 10 in the x and y respectively. We'll have a nice radius but since Z is only at 1 it will look really small. So let's increase it to around let's say 20 maybe why not and by the way if you see some artifacts just make sure do you. This map don't go over the top. Okay. Now we also want to use a 3D size over a lifetime and we can simply turn on separate axis and now we have control over the x y and z axis. So in conclusion we want this to shrink in the radius but to keep its original height. For that we can make sure only the X shrinks like this, and we can also copy this curve to the y axis. And in the Z, we want to keep it the same height. Basically by leaving the curve always at 1 like this and now we get this pretty cool cylinder shrinking only in the radius. As you can see. And the color over lifetime is actually looking good so let's leave it as it is. Now, if we want this to rotate we can use the rotate over lifetime and if we insert 360 in the cylinder it will basically do one turn only. Meaning that if we would insert 180 it would do half a turn. And 720 would do 2 turns. Now let's parent this to the anticipation basically and see how everything is looking together. Oh yes. And that's really cool. I think it gives a really nice touch to that anticipation and we are going according to our original sketch and idea which is gathering energy vertically. And that's really awesome. So now for the climax and dissipation part we can also reuse this cylinder. Basically as a way of dissipating energy. So let's duplicate the cylinder and firstly we want to add a start delay of 1.2 So let's shrink the lifetime to be 0.5 and in size over lifetime we want this to go outwards So we are going for the opposite, where the X and Y will always be at 1 and it will grow in the z basically. And get bigger until it fades away. And you can try a different curves and different ideas if you want, obviously. The only thing we are missing now is a correct fade in the color over lifetime. Basically we want this to go from full opaque to fully transparent. Alright looking much better, but, I'm noticing that the fade away still needs to be a little bit better. So let's make it go from white to black. And now yeah. Now it looks much nicer. The fade That's cool. It's looking really nice and now we can also increase the height to 25. Yeah. So don't forget to save the changes to the prefab and let's actually add one more detail to the dissipation before we move on to the next part. And I think it would look cool if we add some vertical particles that will be left behind after the vertical cylinder, you know. Like if there is some the debris or some particles that come out of the cylinder. So let's duplicate the particles out and call it particles vertical. And this particles are going to live longer. We want them to be part of the dissipation and values between 0.8 and 1.8 should be fine for these particles. They're also going to move slower. So let's set the start speed to bit to be between 0.5 and 7. More a less. And they also are going to be smaller something between 0.01 and 0.1. Next if we want them to only go vertically we need the cone, with zero on the angle. Basically a cylinder again. And that's mostly it. We are adding more to the dissipation so it doesn't disappear too fast and it's a very cool detail. Let me just close the shape module so we can have a better view of all this is working together. And yeah I think it looks really cool. What do you think guys? Of course you can try to make your own adjustments. And by the way there's something I want to show in the shape. See this radius thickness option. Well if it's set to zero it will only meet in the perimeter of the center. As you can see. But once we start increasing the radius thickness we get this gap where the particles can spawn see. And yes this is really useful sometimes. I'm going to leave it at around 0.2. So it has this nice gap around the cylinder. Alright. Looking good. Let's just add a few more things to the climax. It still feels a little bit empty don't you think? Oh and don't forget to save the changes to the prefab guys. Okay.
34. 6.6 - AoE: Impact02 Texture: So we still need to spice up the climax of our efforts. And for that we are going to need another texture. Yep that's right. Textures are really important guys and gals. Let's create the a new file name and impact 02. And again with 1024 by 10024 pixels. We are also going to paint the background to black and then create the new layer with Ctrl+Shift+N So now with the brush tool, B shortcut, let's choose a white color. And that's also lower the opacity to around 20%, lower opacity are always great to sketch new textures. Now with a brush size of around 150 pixels, and hardness set to 0. You wanna start building the shape of an impact that will have around five or six stripes as you can see. And don't be afraid to make more traces than I do. It's really fine. Try your own things, don't be afraid. Maybe make the bottom a bit more round like this. And I'm also going to push this up with Ctrl+T so I can center these in the middle of our canvas. Alright. So now with the brush a little bit smaller around 100 pixels. I'm going to start filling this up and add a few more details. We can create several stripes that go from the center to outwards to the top. And that are brighter in the beginning and lighter towards the end. Basically we are after a good contrast between white and black and gray. So the next step is to use an even smaller brush size to create even more tiny details to add even more tiny stripes going always from the center to the outside. Now at least that's my technique for this texture, each texture as its own technique in its own way of doing. So as you may notice when creating textures you pretty much want to go from a basic shape to a more detailed texture where you keep on decreasing the brush size and keep on adding detail. Alright. Looking good. Now one of the tricks that I really like to use the most is with the erase tool with a low opacity 20 maybe we can start to raising some of the parts that are in excess I may have a erased a few more than I wanted but I don't mind with that because we can always add it and we can always use Ctrl+Z. And if you don't want to add it we are still going to use the outer glow at the end which may fix it. So no big worries. Don't feel pressure when you are drawing feel calm and relaxed. Now with this Smudge tool, we are also going to push some of this white stripes more towards outside and also create some minor stripes. It's a very useful tool to blend and to create white areas and sometimes I switch between a bigger and smaller brush size to help with smaller or bigger details too Now we can also do the opposite then instead of pushing the whites outside we can push them inside you know, creating more gaps between the spikes like this. At least it works really well in this texture. And you know with these techniques the smudge tool, low opacity on the brush and on the eraser, you can give some more tweaks until you are satisfied with the end result. After that you can double click on the layer and simply add some white outter glow, maybe increase a bit the size and also decrease the opacity of the glow. Just to add a simple touch once you are ok with what you have you can simply save this photoshop file and then we can hide the black background and export as a PNG. Now back to unity we can duplicate the impact 01 material and rename it to Impact 02_Add Impact 02_Add. And that's why it's important to have good names in your texture. And now we can assign the new impact texture, that we have to just created and then we can duplicate this beam for example. Rename it to impact and we can assign the Impact02 material and if we test this as you can see most of it it's below the ground. Oh and let's push the Y to zero by the way. So the way we fix this is by moving the pivot of this particle system. We can do it down here in the renderer, and if we start increasing just a little bit in the y axis we can control how high the impact will be, how high this texture will be. So we just want this to be a little bit above ground. More or less around, 0.35 or 0.4 at least for me. Okay cool. So, we want more than one particle in this case in the burst. We want to between four and five And now yes they are all being overlapped. As you can see and now there's little trick that I like to use from time to time, which is to rotate all of this impacts to different directions but only in the y axis and for that we can turn on 3D start rotation and now we choose between two constants and in our case we want them to have a random rotation in the y axis between 0 and 360 degrees like this. Now if we test this we can get a very scattered impact across the y axis and it looks much better then only one texture facing the camera it's quite quick and easy. But as you can see it's an interesting result. And we can also use the 3D start side. So they have a different size in the x and y every time they spawn. So X will be the width between 4 and 3 should be fine. And Y will control how tall the impact is, which going to be a bit more between 6 and 4 maybe, because we want to make a vertical impact. So yeah. As you can see they are more stretched in the y axis now and that looks good. By the way we can also change the size over lifetime to this curve. Alright so let's parents this to the rest so we can see how it behaves So yeah, now it looks more complete the effect. We have a big impact. We wanted the climax. We also have the vertical impact and the vertical energy gathering. And now let's make the color random between the violet and a purple just to make it a little bit more randomness and gives a nice touch. Okay. So don't forget to save the changes to the prefab, because the next thing we are going to do is a shockwave.
35. 6.7 - AoE: Shockwave: Now in your image editing software let's create a new file named circle 01. With 1024 by 1024 pixels. Once again with the bucket to speed the background to black and create a new layer with Ctrl+Shift+N. Cool. So let's start by pushing some guides while holding mouse 1 and dragging like this. Now with shift we can snap them until we are in the middle of our canvas which is in this case 512 pixels. Just like this. If you don't see the rulers you can press Ctrl+R. And this time we are going to use the Elipse tool and we want to make sure we change this to a path. It's very important. Now while holding Shift+Alt, let's click in the middle and create a nice proportional circle of around 600 pixels. So the idea now is that we select our brush. B for shortcut. Change the color to white. Choose an opacity of 65% and with a brush size of around 125 pixels and with the hardness set to 0. Once you have all of this settings you can press P in your keyboard. And Right Click, on top of the circle. let's choose stroke path and then we can make sure the brush tool is selected and that simulate pressure is off. Now we can press enter and that's it. We have our awesome circle which is going to be used as a shockwave. Now we can just drag away these guidelines. We don't need them anymore. I just wanted to show you another way of aligning your textures to the center. Now let's add a very simple outer glow by double-clicking in the layer and turning on outer glow. We can change the call to White and we can lower the opacity, as well as the size And that's it. It's looking good. Now save this photoshop file in your folder, and we can hide the black background and export this as a PNG to unity. Okay so once you are back in unity you want to again duplicate one of this materials. Maybe this one and rename it to Circle01_Add. Now let's assign the circle texture we created and let's also duplicate the beam particle system. And I'm gonna unapparent it and then rename it to shockwave. Oh and let's set the Y of the position to zero. By the way. Now down here in the renderer, let's switch the render mode to Horizontal because we want this to be on the ground right. And lets inside the circle material as well. Okay. So we have a quick circle. That's it. And we want to change the size over lifetime where we can choose this curve right here. Okay so we already have our shockwave now but it's still a bit too small. So let's increase the start size to maybe around 13. Should be enough. And let's also go ahead and parent this to the 2nd beam ground. So what do you think of this shockwave. Well I believe it's quite a nice detail that helps translate from climax to the dissipation. And it also adds power and impact to our effect. Right. And it was a quick trick that looks great but maybe it's a bit too bright. So let's go ahead and actually change this to a darker color. Okay. So that's pretty cool. So now if we try a different lifetime like 0.5 we get a totally different result. Can you feel that difference in the impact it feels like it has lost some power but it also looks really great. Right. So this is really up to you. And now you know our timing is really important in this area in the visual effects area. It gives different sensations as you can see. Anyway now just don't forget to save the changes to prefab because our next step is to add a crack to the ground.
36. 6.8 - AoE: Ground Crack: Now this is a more complex texture. But don't worry we are gonna get this right. So I really hope that my tips and tricks have been helping you. But remember I can't guide your hand. So, I'm gonna try my best to explain you, as always, how you can do this one. So now you know the drill. We create a new file named Crack01 with 1024 by 1024 pixels. We paint the background to black and then we create the new layer. With Ctrl+Shift+N. So with our brush set to white and with an opacity to around 20%. Lower opacity remember the idea is that we start creating the shape of our crack. Basically the swirly traces, the zigzags around a more less an imaginary circle. Let's try to make around 9 of this cracks with some irregular intervals and more or less looking like zigzags. And remember that we always start big. We always want to get the bigger picture and only then we start creating the details. OK. So now with the smaller brush size let's try to connect them like this. And then let's try to create a second circle. But much less visible and not so complete as well. OK. So now it's the moment we start defining our crack with a smaller brush even. And it's almost like if we have a bit of a shaky end to create these you know try to have your hand lose and let's try to make some zigzaggy some branches not worry if you go outside of what's drawn down below. Remember, we can always adjust this with the erase tool or you can always paint on top of these. So yeah we keep on adding details we keep on connecting the dots literally and we keep on creating these zigzags and sometimes it divides itself into two branches like these. You know sometimes it comes back a little bit. Sometimes there is a branch that doesn't go all the way too and I'm doing this all by my imagination but if you want you can always google and search for some reference obviously like ground crack or something very similar. That may help you just in case. So, now we Ctrl+T, I'm going to center this a bit and also make it a bit bigger. So now we can start to see what's in excess. And we can actually go ahead and start erasing what's in excess with E for shortcut. And I'm also going to break the inner circle by the way and create some empty spots around here. It looks better. It looks more realistic. And it's also a nice detail now where I have erased those spots and created those blank areas. I'm gonna polish them with a very thin brush. So it looks like it started that way. I'm also going to start giving the final brushes basically making some areas really white with a small brush off around 8 or 9 pixels, you know. To start to give that finished look by basically making some of the cracks look thicker in the center and thiner at the end you know. And here's a cool trick for example. If you have one of this branches that's really like you can actually duplicate it for example with the Lasso tool, L for shortcut, and select it more or less like this. Now weed Ctrl+C you can copy and press Ctrl+V to paste it and we Ctrl+T you can move it around here place it whatever you want whenever it fits. And now since this is in another layer we can actually go ahead and erase some parts that have hard edges some parts that look bad basically. And after you it's good you can select both of the layers in press Ctrl+E to merge them. So yeah, they will become only one layer and be careful with that. If you don't think that it looks good yet. OK. So then we can continue to add a few more details with a small brush and finish some of this branches too. And I'm just going to try to fit some small details in the middle, just around here you know just so it isn't too empty Alright so now I'm just going to keep on ending some of these branches make them thicker in the bottom and thinner at the end. I'm so going to give them more white in the middle basically and then we can also extend the extremities maybe a bit more so it's more balanced and nicely faded as well and once you think it's looking good you can always add some outer glow by double clicking in Layer to access to layer style and basically I'm gonna choose a small outer glow white. With low opacity too. And I'm gonna leave it like this I think it's good. And when you think it's good you know don't forget to save this photoshop file and then you can hide the black background and export this texture as a png to unity. So now back in unity we also want to duplicate one of these materials and rename it to Crack01_Add. Then we can assign the Crack texture we have just created to the texture slot. Now let's for example duplicate the shockwave and rename it to crack and I'm going to unparent it so we can see this better. Next, let's assign the new material and since this is going to be a static mark on the ground we don't want this to move anywhere. So let's turn off size of a lifetime. So this is going to be mostly part of the dissipation which means it needs to live longer than the rest and maybe 1.5 is a good start lifetime. It's also going to be much smaller than the shockwave around 6. Should be fine. And OK it's starting to look good but since it's a crack on the ground let's make it brighter. Like if the energy broke on the ground and it remained there for a little while and yeah maybe that's a little bit too much. But let's see how it's working out with the rest. Let's reparent to the beam ground OK. So I think it's looking quite good. Maybe make it a little bit even more brighter and now we can add some randomness to this. For example in start rotation we can make it random between 360 and minus 360. You can also set 1 in the flip rotation. And it doesn't need to be always the same size you know. So let's make it between 6 and 6.5 should be fine. OK. So it's really looking nice. It adds a really nice detail but we are still missing the part where we leave the ground with a mark like if it was burned. But it's so hot, that it should leave temporary mark on the ground right? Well so let's save the changes to prefab because next thing we are going to do is create the a new shader, our 2nd shader which will allow allow us to create dark colors in our effects.
37. 6.9 - AoE: Shader Graph Alpha Blend Shader: So there's still one shader that, it's extremely useful and you are going to need it several times to create dark colors at least. That's right. If it try it out the additive shader cannot create dark colors. So we need a different shader and for that we can simply duplicate the additive shader that we have and rename it to Particles AB_HDR. We can double click it to open in shader graph. Now it's as simple as switching the blend mode in the settings to Alpha and that's it. Just don't forget to save this. OK. So now with the right click we can create a material directly from the shader, and let's change the name to Crack01_AB Let's assign the Crack texture and then we can simply duplicate the crack particle system and rename it to CrackAB I'm going to unparent it so I can better show you how it's looking. Now let's assign the CrackAB material in the renderer. OK. So we are starting to see something but the colors are wrong, because we need this to be a completely black color and with the alpha set to the maximum as well. Alright. So that's looking nice and this is going to be used in a different way this particle system. We are going to use a Sub Emitter. So let's set the start rotation to 0. As well as the flip rotation to zero and you will understand why we are doing this. And maybe increase the count of the burst to 2 at least for now just to make it more visible. We will see if it looks better with the rest of the effect. Now let's go to the crack particle system and let's turn on sub emitter module. And this is a very simple module. We only need now to drag and drop our CrackAB to this slot here and then Unity will warn us that basically, we need to parent the CrackAB as a child of the crack, in order for this to work. And we can say yes we can reparent it. OK. So so sub emitters are simple. They let you emit another particle system in the birth of the crack, in this case. If it collides, when it dies, when there is a trigger, and evenin manual mode. So we want to spawn CrackAB as soon as crack is born. In this case right. So let's leave at birth. And now, crackAB can also inherit, some values from crack like color, size, rotation, lifetime or duration or nothing. Or everything. So in our case we only need size in rotation because we want them to align perfectly right. The color and the lifetime is going to be controlled on the CrackAB particle system. So now if you play this what happens is that CrackAB appears enormous and it's way too big. And it also has this delay at the beginning and this is happening because we still have the start delay on the CrackAB. So we need to set it to 0 and it's spawning really big because start size now works as a multiplier which means that CrackAB is spawning 6.5x bigger then the Crack. So let's set it to 1 and the lifetime can be 3 seconds is fine. And if lifetime was in inherit from the crack, just so you know, this would mean it will live three times more. It would also work as a multiplier by the way. I just made it this way to show the possibilities of inheriting or not inheriting from the parent particle system when creating sub emitters. OK. So, now it has the correct size and it's also aligned with the Crack. The only thing wrong happening here is that the CrackAB is in the same layer order as Crack. And it looks weird. If we come down here to the renderer you can set the order in layer to be -1 and now CrackAB, will appear below the Crack which looks better and this will also be important for performance. And we'll see why later on. Okay. So it still disappears way too fast. And that's because in the color overlifetime we need to change the gradient. Let's for example raise the black key at the end. And let's push the first key of the Alpha. More or less around here. So it starts fading later okay. So now, it's OK. It's nice. Just a quick trick. You can increase a tiny bit of the start size to around 1.05 Maybe that's too much. Maybe 1.025 It should be fine to give this sensation that it's a bit bigger. The mark that we are going to left in the ground. OK. So let's see how this is going with the rest. And it looks pretty cool. I believe I'm just going decrease the burst count to only one after all. It was a bit too much visible but other than that what do you think guys I'm really enjoying the end result. I hope you are doing too. Aright. So now that we can create that recall is let's actually add more contrast to our effect. We can start by duplicating the beam of the anticipation delete the child and call it BeamGroundAB BeamGroundAB. And the color is going to be completely dark but, with full opacity and the size is going to be the double around 15. And now let's go ahead and duplicate the Beam01_Add and add the alpha blender abbreviation in front. So we know what's the shader of this material. And change the shader to ParticlesAB_HDR which is in shader graph drop down menu. And by the way we can also change this directory we can change the drop down menu. For example if we open one of this shaders that we created, right under the name we can change this to, for example in my case SG_GAP which stands for shader graph underscore Gabriel Aguiar Productions. And you can put your name in it. You can put whatever you want. What matters is that, you put something that you remember because now you're also going to change the other shader so both can be in the same dropdown. Okay Now as you can see they are in the dropdown menu that we have created which is cool. Now let's set the intensity to 0 because we actually don't need it and let's set it to completly white too. So, now we can assign the Beam01_AB to our BeamGroundAB renderer. Alright. So now as you can see we have this black spot on the ground. And let's see how this plays out with the rest. Oh and now if we try to parent this Unity basically won't let us because first we need to apply the changes to the prefab, and only then we can reparent the BeamGround to the anticipation. And this is only happening because of the new nested prefab system, which is great. Anyway, so, as you can see we have this back all around the base it's very subtle and it's almost looking really good. We just need to set the order in layer to be -1. Remember. So it renders below the additive shader basically. And if you want you can increase the size to 20 as well. It will look good. And it adds this nice touch and creates more contrast. So now we can do the same for the BeamGround of the climax. We can duplicate it. We can erase the childs, rename it, assign the Beam01_AB material, set the order in layer also to -1. So it renders behind everything. Double the start size. In this case let's also increase the start lifetime to 3 seconds. Set the color to black with full opacity as well. And now we need to again apply the changes to the prefab and only then we can parent this to the rest. Okay so that's it. We can see that adds a nice contrast to the effect. And if you want to make it darker you can always add another particle in the burst of the emission. Or you can increase a bit the size if you want as well. Anyway it's a must have guys. You will realize sooner or later that almost all the effects will need additive colors and alpha blended colors. It will help to make the effect more visible in a very bright scenario too. And it also adds a really nice touch. Wouldn't it be cool if we created a fire version of this? Or even a nature version? So don't forget to save the changes to prefab and let's see how we can do that.
38. 6.10 - AoE: Fire Version: So first let's just add arcane in the name so we can distinguish them. And I'm also going to rename this BeamGround to BeamImpact. OK. Now we can apply the changes. And now I'm going to duplicate this and instead of Arcane it's going to be for the Fire. Let's save this as a prefab. Yes. As an original one. So the first thing is to create the palettes of color that as a nice fire touch. So for example for the beam on the ground it's going to be more orange for now, something like this. The cylinder is also going to be orange red around here. And it actually looks like a nice color. This is really hot. And the next is the particles which is going to be an orange yellow for the first slot and then an orange red for the second slot. And let's increase the alpha also. So this needs to be super hot. Alright. Looking good. The only thing it can be better is the BeamGround which needs to be a bit more brighter and orange Alright something like this combines well with the cylinder. So now that we have our palette of color we can go ahead and copy the BeamGround color to the BeamImpact BeamImpact. Now we can paste that same color to the Beam. And I copy the colors from the particles into the ParticlesOut ParticlesOut and ParticlesVertical one at a time. But you can copy both at the same time. If you select them. OK. Now let's copy the color from the cylinder to the cylinder . It's going to be the same. I'm also copying again colors from particles to particles. Like I said you can copy if you select both you can copy and paste to both particles at the same time for the impact. You can also copy from the beam to the first slot and for the second slot we can manually chose and orange towards red. Something like this looks OK. Alright. So for the shockwave let's just choose an orange in this range and we are good to go to the crack where we want to choose a bright orange like this one. OK maybe even more bright and a bit more towards yellow as well. Alright. So this is looking nice. It seems to have that firepower. It's very vibrant orange colors and it's looking really good. Now to spice this up. We are going to add an element to this which is going to be a simple flame texture so let's go over here to your image editing software where we are going to create the file with 1024 by 1024. Let's just paint the background to black and create the new layer Ctrl+Shift+N As always. Now we are going to use a white brush of around 10 or 15 percent for the opacity. So the idea is to create a basic shape without ever lifting your pen or your mouse like this. And don't worry if you added too much. Now with an eraser tool I'm going to remove what's in the excess and this will also help to shape the flame. At least in my case it will also help to create this cavities. That looks good in a flame. Now with the smudge tool. This one, with a strength of around 20, I'm going to start creating this pointy ends. I'm going to push it until it's pointy basically and then I'm going to do the same for the top. And I'm also going to create one around here on this site. Now I'm just going to round up the button up and maybe also shrink it with Ctrl+T We don't want this to be too big because we are going to add some glow at the end. Alright. So, once you have a shape that you like you can start adding more white from the pointy end towards the center, like this. And I'm also going to do the same for this side and then I will also do the same for the other side. We are basically adding whites creating more volume and don't worry if it's not perfect it doesn't matter. You can always smooth these with the smudge tool or you can use Ctrl+Z you know which is what I'm going to do now I'm going to just use a little bit of the smudge tool. Alright. So, our last step is to use the eraser tool at around 20% of opacity. And we are going to create around three spots more or less around here and then around here. And last one can be up here and this will help to create diversity in our texture. Now with the smudge tool I'm going to smooth this out a little bit. Maybe I went a little bit too hard with their erase tool and I'm going to pick the brush again and add a bit more white where I erased too much and just going to fix all this. Alright. Now, we can add some outer glow . You know increase the size and lower the opacity as well. And that's, that's it basically. Just wanted to give it a little touch of glow. And I'm going to decrease the size of this because the outer glow is going out of our texture is being cut and something like this is good. Maybe also decrease the outer glow size, it was a little bit too big. Anyway, once you are ok with what you have you can save this photoshop file. Then we can hide the black background and export as a PNG to Unity. Now in Unity we can import this flame and then we can start by duplicating this BeamAdd material we are going to rename it to Flame01and also assign the texture once you have done that we can actually duplicate the ParticlesIn and rename it to FireIn. So, this is going to be a bit bigger than the particles. Something between 0.3 and 0.8. Let's also make sure the start rotation is completely random between 360 and -360. Okay alright. We just need to assign the flame material now. Oh and this is going to be a billboard by the way. OK. So we have too many flames and it's coming from everywhere. Let's actually choose a different shape a circle this time and we may need to push this a little bit up in the y axis maybe 0.3 is fine Alright. Moving a little bit too fast maybe but let's decrease the radius first around 1.7 and with a radius thickness of 0.1. OK so still too many flames. Like I said maybe 30 for the rate over time is enough, since we only want to add a little touch with this fire element you know. And yeah like I say it's moving too fast so let's slow them down by saying this start speed as a range of 10 OK. It looks really nice in my opinion. This is a great addition as you can see to create a fire theme. For example. OK, let's just add some rotation over lifetime and then we are going to move on to the impact. Something between 90 and -90 should be fine maybe even between 360 and -360. Yeah I think it looks pretty cool OK. So let's duplicate it with Ctrl+D. Drag it to the impact and rename it to FireOut. Alright. So this one needs to have the same delay as the others which is 1.2. Ad this time we are going to need the burst just a few particles something between 5 and 7 is enough OK. So it's also going to live a little bit longer. At least the maximum range is going to be 0.5. It should be fine. Now for the start speed. We want the opposite actually. We don't want this to start slow. We want it to move faster in the beginning and then slower in the end. This range will do. Now let's also set the maximum to only 5 oh yeah seems like the radius of the circle shape is too big. Let's decrease it to only 1 Yeah OK So I think the problem now is that the gradient in Color over lifetime should be the opposite. Let's switch it and yeah, the size over lifetime it's also wrong. It should be the opposite. Like this. Alright. So that's looking really cool. But let's see what the rest. It has this nice stylized feeling this effect and it's really cool. I really like this. I hope you enjoy it to the fact that we can create fire is mostly made with the correct palette of colors. But if we add one element it really adds this nice touch. There's always a bunch of things we can do until we realize maybe it's too much. And sometimes the simpler the better.
39. 6.11 - AoE: Nature Version Part 1: So let's just create one more version, the nature version where we'll see how to create some spiral lines, and add a few more elements like some leafs. Okay. So basically we want to start with the original one the Arcane one. Rename it to Nature and we can drag and drop to create the new prefab out of this. Okay. So like we previously did with fire the first thing we need is to create a nice color palette and I'm going to aim for example to some green and yellowish colors which I think translates into a nice nature and healing filling. Now for the particles. The first slot is going to be for a yellow color towards green. The second slot is going to have a bit more of alpha and it's going to be more green. And for the cylinder it's almost the same. Alright, so far so good. I like this nature color palette that we have now. I'm gonna copy from the BeamGround to the BeamImpact and to the Beam as well. You can select both. While holding Ctrl, by the way. Now I'm going to copy from the ParticlesIn into the ParticlesOut and ParticlesVertical at the same time the first and the second slot. Okay let's copy from cylinder to the cylinder as well. And for the Impact I'm going to use the Beam color, and for the second slot I'm going to manually choose a more greenish color something like this seems okay. For the shockwave, I'm just gonna select the green in this range and that's it. And the crack is going to be a green a little bit more towards yellow like this one. This seems okay. Alright. Seems like we have a good nature palette color with greens and yellows and it has a very nice feeling. Now let's add some distinguishing elements of nature like for example, Leafs. And we can start by duplicating the ParticlesIn and rename it to LeafsIn. Now we need to create a simple leaf texture. And by the way you could come to Google and search for a leaf PNG texture. But that's not very profitable in terms of learning you know. So let's see how we can do it. But you can use one as a reference for drawing a leaf. So in your image editing software of preference we can start with a new file called leaf, with 1024 by 1024. And you know let's paint the background to black and create a new layer with Ctrl+Shift+N With a white brush off around 15% of opacity let's create the shape of a simple leaf with only One stroke like this and I'm going to shape the leaf by removing the excess with the erase tool at 100% of opacity until I get something like this. And I'm just going to center this with Ctrl+T more a less in the middle. And with the smudge tool I'm going to start creating some details, like a small pointy ends at the bottom as well as a pointy tip in the top and I'm going to continue with the smudge tool, but around 40% to create some tiny spikes, more a less with a even space between them. And all around the leaf going from the bottom to the top. And then also to the other side some of the leaves that I've seen of these details and I think it gives a real nice touch okay. So now with a small brush at around 50% of opacity I'm going to create that middle division that almost all of the leafs have. It doesn't need to be perfect and it doesn't need to go all the way to the top as well. And I'm going to add some branches that comes out of the middle one towards outside in the same direction as the spikes more a less like this it does need to be perfect. It's a leaf. Nature is not perfect. And now with a bigger brush size and with the lower opacity of 7% I'm going to add some more thickness to these lines in the middle and to some of the branches too. It's a very simple touch. Guys, doesn't need to be perfect again. Okay. So now with an even bigger brush I'm going to add more white all over the leaf just to add some more volume to these leaf. Alright. So this is looking much better now if you want. You can add some tiny details like I'm doing very simple traces. Maybe they won't be visible in the effect but, at least we know that they are there. You know. OK so, with all of that done let's add a tiny amount of outer glow with a very small size and a very low opacity like this more or less and that's it. We have done our leaf. We can save this photoshop file and hide the black back well before we export this as a PNG to Unity Back in Unity. We can duplicate the Bea01_Add, rename it to Leaf01 and then assign the leaf texture Now let's also assign our leaf material to the leaf particle system. And also change the render mode to billboards. We don't want this to be stretched and the first thing we noticed is that they are very small. So maybe let's increase the start size to around 0.2 and 0.5 Ok, so I'm going to make sure that all of the leafs have a random rotation just like this. And I'm also going to decrease the rate over time. I think 75 is too much. And I'm gonna put it that around 50 I'm also going to decrease the particles to 50. I think there are too many. What I also want to change is the shape like we did with fire. We also want to use the circle and maybe what we need is to push this a little bit in the y axis more or less like this. There's also too many ParticlesIn, decrease it to 30 which I think is enough. I'm also going to increase the radius for this one yeah that's better and more visible. All right so now we are going to use something different for the Leafs. We are going to turn on velocity of a lifetime and this helps to create very distinct motions in our particles. It's really useful. So let's set this to work in world space and we wanna use two curves to create a custom range. Oh and you can turn off the Z and X curves by clicking on them. And this way we can focus only in the y axis. Okay. So I want this to quickly go up in the beginning and then more or less in the middle. I want to leafs to go down alright and this range is going to be more or less around 6 for now. Okay. So for the leafs to go inside we want to start speed to be simple. We want it to be between two constants between -0.5 and -3 Basically they are going to be pushed inside, while they go up and they go down. And we want them to live longer between 0.5 and 0.7 which means the duration has to be less like 0.5 0.5 Alright. So they are being pushed up and then goes inside and starting to look pretty cool. But we still need to adjust their size over lifetime which should be the opposite from big to small. OK. That looks better. Looks like it's being pulled to the inside. Now we can add rotation over lifetime with a curve as well and with a range of 720. And it goes from not rotating to spinning really fast towards the end but not at the end more or less around 0.7. Which is going to be aligned with the velocity over lifetime curve and I noticed that I just need to fix the start speed it needs to be more uniform like -2 and -3 and here we go. That's more like it. We are giving the sensation that the Leafs are being lifted and then bullied inside by a really strong force. And now we can turn on 3d start size so we can have a different leaf size. It's going to be more diversified, it's going to be between 0.5 and 0.2 in the X and Y axis. And Z it doesn't matter because this is a 2d texture. All right so now let's do the same for the BeamImpact. We can duplicate the LeafsIn and drag it to the BeamImpact rename the leafs to LeafsOut and the first thing we want is to increase their lifetime. We want them to be between 0.6 and 1.2 maybe even more. And this time we are not going use start speed. We are going to use only velocity of a lifetime. So let's set it to 0. And before that, in the emission we wanna leave the rate over time at 40 which will emit for 0.4 seconds, but let's also use a burst between 10 and 15 okay. So now in the velocity over lifetime we are going to push this point to around here because we want this to move faster in the beginning and slower at the end. It's more or less the same as it starts now in the shape we want this to emit from anywhere inside the circle. Meaning 1 for the radius thickness and the circle needs to be smaller like 2.5 maybe smaller. Okay now the color over lifetime is going to be the opposite, and size over lifetime is ok. But, rotation over lifetime is going to be the opposite. It's going to spin faster in the beginning and then it's going to slow down at the end. Finally let's set the start delay to 1.2 Alright so leafs are going in and boom they are floating at the end maybe a little bit too big OK. Let's also use the noise model. It will add a nice touch to the floating leafs. The strength is going to be between 0.2 and 0.8 The frequency is going to be 1. We can add some scroll speed like 0.1. The circle radius needs to be a bit smaller too. Like I said before maybe 2.2. There were also too many Leafs and i am also decreasing the rate over lifetime to 20. They were also going up way too fast. I want them to float so maybe 2.5 in velocity a lifetime is enough. Maybe we can also increase the lifetime to 0.8 and 1.6 as well. And yeah that's that's really much better. That's that's looking really nice. You can see the Leafs floating a bit at the end and I think it gives a really nice touch. I'm very pleased with the end result. I hope you also like this motion of the Leafs is looking really cool.
40. 6.12 - AoE: Nature Version Part 2: Now let's add something new something that comes from the middle like some stripes maybe like some kind of roots or branches something that remains the player of that. And yeah we are actually going to need a 3d mesh for that but it's going to be a very useful mesh. It's going to be a spiral. It can be used in many things. So in a new blender file, let's select everything with and press delete. We wanna press press Shift+A so we can add the plane. And now we want to add the modifier called Skrew, its a very useful modifier. If we increase the screw value to 15 we are literally extruding our mesh in the z, in this case. And we can control much it distorts with this angle parameter as you can see. But let's leave it at 360. This steps right here controls the amount of geometry it will generate. Let's also leave it at 16. And if I enter in edit mode, as you can see this is still simply a plane. We could have applied the modifier but, we can also convert this to a mesh directly. And we can do it with Alt+C Alt+C in object mode, where we can choose Mesh From Curve like this and that's it. We have converted to a mesh. Now we don't need all of these jump to we just want a segment of faces. So let's press Ctrl+Tab So we can choose face. Now, while holding Shift+Alt at the same time let's press with Right Click mouse , more a less here in this segment of faces. And now with Ctrl+I we are going to select the inverse, and we can press delete to erase this faces. Alright. And here we go. We have a nice spiral. So let's rename it to that to Spiral01 and we want to create hte UVs, which we just need to select everything with A in edit mode and press U So we can choose unwrap. Alright. So let's drag a new window from here and choose UV / Image Editor OK. Now as you can see we need to adjust this UV maps. But it's real simple we can select this vertices with B. And now with Ctrl+Shift+Tab, let's select vertex. Now we can press G and lock this in Y axis. And now while holding Ctrl we can snap this to these vertex right here. And now this is a line, and we just need to drag it until the end of the square. More a less around here. Now with A let's select everything and with G we can press Y to push this a little bit up and now we only need to press S and scale this in Y only a little bit until it fits the square. Okay looking good. Once the UVs are done we can add another modifier, the Subdivision Surface, because without this our mesh would look really low poly and with a lot of edges and it wouldn't look good. Alright so let's save this Blender file and then we can export this as an FBX and you know don't forget to turn on selected objects, click on this scale button and select mesh. Down here. Alright. So we also are going to need a texture for this. And once again in your image editing software we can create the new file called Spiral with 1024 by 1024 And let's also paint the background to back and now it will be useful to have the UVs of the actual spiral. So let's go back to blender and down here in the UVs we can export UV layout give it a simple name like Spiral01 UVs and now back to Photoshop we can drag and drop the UV Layout out just like this. And this guides right here it will help me to draw better texture. So let's create a new layer with Ctrl+Shift+N. And let's also lower the opacity of the UV layout and block that layer as well so we don't paint on top of it. OK. So in the new layer I'm going to paint the zigzag with a wide brush off around 50 percent of opacity something more or less like this. Now with a smaller brush I'm gonna go nuts and paint a big crack in almost only one brush stroke and make sure it goes sideways to cover a bigger area of the spiral mesh. And don't forget to loosen up your hand. Really all right. So once that is done I'm actually going to erase the top and the bottom edges make them smooth since we don't need this texture to be seamless. Right now I'm going to repass this line in the center. It doesn't need to be in the same position in the same place. I'm just adding more value once I have done that. I started to create some branches out of the main branch. You know something similar to what we have done with the crack. But this time in the vertical line instead of a circle. If you want to picture something to help you draw this, well, you can imagine roots of trees or even the branches of the trees as well. It's good, at least for me it helps. And the brush is going to be bigger in the beginning but then we are going to start to add more details with a smaller brush like we have done before. You know in the start it's always useful to have a big brush and try to figure out the position of the branches. Okay. So once again I'm going to decrease the size of the brush like I was saying and add even more details it's basically what we have done with the crack on the ground. Do you remember, we have also create bifurcation and some of the branches don't divide themselves. Others have tiny divisions and others end somewhere else, you have to go a bit nuts with these sincerely and one of the final touches I'm going to give is with a big eraser at around 20% of opacity. I'm going to pass a few times on the right then on the left to create the nice fade, anyway. Once you are satisfied with this you can add just a little bit of outer glow and once that's OK you can save these photoshop file and export this as a PNG without the black background to Unity. Now let's go ahead and import the Spiral mesh and then import the spiral texture as well. In the mesh we don't want to import materials nor animations and the scale factor is going to be 10. In this case, now let's apply the changes. OK so now what we can do is actually start by duplicating the cylinder I'm going to unparent it. It will help me to create these lines and rename it to lines out for example. We can also duplicate the Impact01 material and rename it to Spiral01. Let's also assig the spiral texture like this and now we can assign that material to the lines out particle system we can also assign the spiral mesh just drag and drop. Now let me just set this start delay to zero so I can work better with this. Alright. So this is way too big as you can see. What we need is to actually decrease the Z since it controls the length of the spiral and maybe 2.5 will be enough. Alright. Looking really cool already. The texture actually fits very well the mesh. I'm impressed. Awesome stuff. Now I'm actually going to shrink the radius by setting the X in the way of the start size to 6. Now we can actually duplicate these lines out and add one 180 in front because this lines out it's going to be rotated 180 degrees and I'm doing this because I think it looks really cool. This kind of DNA format you know this kind of spiral it adds a nice touch. We can now add some randomness to this two spirals. For example we can make sure the rotation over lifetime it's between 540 and 720. This is going to make sure they are not seeing it and it will add a nice touch of randomness. Let's just re parent this to the rest. Now, and set the start delay to 1.2 okay. And we have actually a pretty cool addition to our nature area of effect attack, but we can still add a little bit more randomness to this lines. For example I think lifetime is really short so I'm gonna make it random between only 0.6 and 0.7 You can also set the 3d start size to be random between 8 and 6 for the X and Y axis and random between 2.25 and 2.75 for the Z. Different height different radius This type of stuff adds really a nice touch. And I actually think the end result is quite good this one. I hope you also enjoy the kids nature variation. It came out pretty good in my opinion. All right so let's apply the changes to prefab, since now I'm going to show you some final touches on the original one, the Arcane one and you will see how sometimes there's cool improvements we can make by adding more contrast.
41. 6.13 - AoE: Final Touches: So in this case I want to show you that there's still room for improvement in terms of aesthetics of the oringal area of attack the Arcane one. And sometimes those improvements are only visible when we leave the effect for a few days. And then we come back and we noticed that maybe we could do something differently or maybe we could add this or that you know. We got to let the effect mature sometimes. So let's create a second version by simply dragging the original one. Set it to V2 and save it as a new prefab. OK. So in here the first thing I notice is that the ParticlesIn. Can have a bigger radius and their rate over time controlled by a curve. So it starts emitting a few particles in the beginning and then, progressively starts increasing the rate like this. Now I think a bit more of Blue won't hurt, something like this. So for the cylinder we have now, a shader, that will make this look much more interesting. Right. So let's go ahead and duplicate this Impact01 material and we can call it Impact01_AddScroll Impact01_AddScroll and change the shader also. And we can increase the distortion amount to around 0.05. Let's also try 0.2 in the X of the main speed and -0.3 in the X and -0.2 in the Y of the noise speed and maybe a noise scale of 15 okay. And yeah clearly this is an improvement. It has more detail and it looks much better already. Now this is always using the same color. So let's change that to use a gradient and we can copy the start color and paste it to the first color key of the gradient which actually I'm going to switch it with the last one and add the bluish color in the beginning like these and let's not forget to set the start color to white Yeah Okay. And let's see how it looks if I add another key, a blue color in the start. Alright. Yeah. Now let's see how it looks with the BeamGround, using the same gradient. We can copy and paste and set the start color to white and paste the gradient from the cylinder Yeah. Okay maybe maybe it's not that bad. I'm just going to push this mid key more towards the beginning so we can have more Violet in the lifetime of the cylinder, and in the beam on the ground. Alright. Looking good. What I also noticed is that this could look better with more contrast. So I'm going to start by adding another particle in the BeamGroundAB to increase the darkness of the ground. You know, it makes it more visible. That's really nice. Now we can also duplicate the cylinder and this one is going to be alpha blended to add more contrast. And the first thing we want to do is change the order in layer to -1. So it renders behind the other cylinder. Now we can create an Impact01 Alpha Blended version and set the intensity to 1, white to the fullest. And we are good to apply this to the cylinder alpha blended so, let's set the start color to completly black and with full Alpha. And now to make this visible. We may need to push it a little bit up or you can also try to make it taller in the z axis. By the way . But this way is also OK. And here we go. This gives a really nice touch. Now we can also add some dark particles being pulled inside, so let's duplicate the ParticlesIn for example use only one color which is going to be pretty much black. Let's also use less particles and make them a bit smaller too. Lastly we only need to assign the beam AB material and here we go. OK. So clearly we need more particles going to increase it to 50 and also increase the radius to 4 yeah, we are starting to see something cool but I think I'm gonna increase the rate over time to 70 as well Alright. Looking better. We are starting to see something cool. I'm just going to save the changes to the prefab because now we also need to adapt the second part. And we can start by also setting the count of the BeamGround alpha blended to 2 Next we can adjust the color. So let's copy from the beam ground to the beam impact but switch the colors and the transparency too and we can keep these gradients. OK. Let's not forget the set the the start color to white in the beam. We can also do the same. And then paste the gradient color okay. Looking good. Let's also copy this blue from the ParticlesIn to the ParticlesOut for the cylinder We only need to replace the material with a new impact 01 that uses the add scroll shader and we can also duplicate the cylinder to create the alpha blended version. Now we can assign the impact 01 alpha blended version and let's just push this a little bit up. Oh, yeah, actually maybe it's a bit too much. It's also set to start color to black now, and we are missing some dark particles. So let's duplicate this one. Rename it and let's make the start color random between two black colors. But when we lower opacity. OK. So let's assign the beam Alpha banded and we are good to go right. So again it's much more interesting. Now we have more contrasts on this and it looks better in my opinion but I'm noticing that maybe we could have a slower shockwave something that looks like a slower energy dissipating away in the ground. So I'm going to duplicate the shockwave and rename it to circle which is going to have a longer lifetime like 0.8. And a much slower growth in the size over lifetime. By the way and maybe it can also be smaller like 10. Oh yeah. Now that looks much better it adds really a nice touch to the dissipation and I think that glow on the ground looks cool. Now I'm just OK so I'm just going to increase the brightness of the cylinder by the way a little bit. Oh and the cylinder AB actually needs to be -1. So it renders being the additive cylinder And finally this needs to be much taller. Otherwise we will see the cut at the bottom and it doesn't look that good. OK. So I think that's it. Let's save the changes to be prefab and let's see how this is looking OK. So yeah that's looking really nice. I think the like I said the contrast dark colors really adds a lot, to the effect. It makes the bright colors pop up and the effect is also looking more obscure you know. Now if you want you can also add more alpha blended colors to the fire and nature one area of effect. It's a good exercise food to try to see what needs to have more contrast what looks better what doesn't look good and it can even make the same changes I did in the arcane or you can also try different approaches of course. So that's it. Guys I hope you like it. And now let's move on to the next chapter which is a very different type of effect. We are going to create something that is awesome and it's a magic spell. It's basically projectile. So I hope you like this one and I hope to see you in the next chapter.
42. 7.1 - Projectile: References: So welcome to this new chapter. The projectile chapter where we are going to see a very different type of effect compared to the area of effect attack. That's for sure. Even though we can combine both. As you can see. And we get this area of effect attack that uses projectiles that comes from the sky to probably inflict damage on the enemy. It's a combination of both. And it looks really great. A projectile can mostly be a simple bullet, or a laser, it can be a special skill, like a fireball which are a bit more common but still very awesome to do And there are really great. It can be an orb of energy. It can even be a poison ball and it can take so many forms. That's the beauty of projectiles. It's just awesome to create them. And it opens up a bunch of possibilities. So if you want to go to pinterest you can always search for fireball or energy ball or projectile effect, you know. And you most likely will stumble one of my tutorials, Or you can also search for a unity projectile and you will get a great variety of results. You can get awesome references for your effects, get really inspired when we are a bit blocked. It's great to help. But once again don't copy that's generally a bad thing and someone will eventually notice. Just use it for academic purpose, just use it to learn, just to use it to inspire yourself. There's also a bunch of styles as well. It's really an enormous world of possibilities. So get creative get out of your comfort zone and try something new. But for now let's learn how you can create your first projectile and let's do a very quick sketch just to see what we are going to need.
43. 7.2 - Projectile: Sketching: And the idea for the projectile that we are going to create, is like a skill, like power skill that can stun the enemy or it can inflict damage. Something along that way. And I was thinking making it round in the front, like a capsule you know, and then with a trail like this one. And of course if we wanted we could make a pointy projectile you know more aggressive. There's a lot of options for kills like these. Nate will also look OK. but I think a round one will be really nice So yeah this capsule will be basically a 3d mesh and it will have a texture also applied. Will have particles around you know basically this trail is done with something different than particles is done with something called trail renderer that we are going to see. And we are probably also going to need to create the new shader. Now it's going to be a very useful shader for you in the future as well. So yeah we have this projectile more or less like these. It's a round capsule basically and it leaves this trail behind with particles. Alright. Looking good. Now we will also probably need a Hit or an Impact. So yeah this is the projectile and this the hi, the impact. Something basically that will look like a splash but not the splash of jelly or something. An aggressive splash of light it will be more or less like this it will have particles flying everywhere in very quickly and it will also probably have a shockwave. I think it will look great. And yet that's basically it for the Hit or the Impact. So basically 3 or 4 textures maybe we'll see. And the 3rd part is the Muzzle or gathering part in this case it's going to be a muzzle We are not going to gather energy and then fired projectile but it would also be cool. So let's imagine it's a person that will basically shoot the speel with both hands. Yeah. It's like this and the muzzle part is the part where initially appears at the fire point. In this case at the hands of the character it will be something more or less like this. It's also going to be a flash of light. It's also going to be very quick and yeah we'll basically shoot the projectile after that and then we will have the hit and it will something more a lesslike this but, and with particles everywhere obviously. But basically this it's going to be more a less like a cone shaped mesh where we will have a texture applied and it will look something more a less like this you know. So that's it for this sketch we just want to have a quick overview of what we are going to do, of what we are going to need, and where we are going to start basically. And am doing more quickly these one, this took me more a less like five to eight minutes just to sketch an idea and just to see what I need and where do I need to start. It can be real useful if you start sketching your effects before you start creating them. So that's basically it. Let's see if we can do this in unity instead.
45. 7.3 - Projectile: Mesh: So even though we need to create a mesh for these we can start basically prototyping our projectile effect. Which means we can start by creating the foundations like, start with an empty game object that we are going to call: vfx_Projectile_v1 And we can also reset the transform. Then we can go ahead and already save these as a prefab and create the folder name it projectiles as well and drag our prefab to the folder. Now let's just push these a little bit up by a value of 1 in the y axis. So it doesn't intersect with the ground. Now we can even start by creating the particle system and we already know for example that this is going to loop because a projectile only stops existing in most of the case once it collides with something. And it's also going to loop every second and also have one second of lifetime. And by the way the projectile is going to move but not with the particle system. So we can set the start speed to zero. It's going to move with the script that we will see later on how to create. So the size is also something that we are only going to see once we have the mesh. And basically now in the emission we know that we don't need rate over time because we want a burst of only one particle. So, the shape is also going to be off because we don't need that. We are going to use our mesh and we want the mesh to always be in the same place. And now one of the last things that we still can do is come down here and set the max particle size to 3. So now to continue we need the projectile mesh that we are going to create in blender or in another 3D software that you like. All right so once you are in Blender we can press A to select everything and then press delete to erase everything we want an empty scene basically. So we want to press Shift A so we can start with a sphere this time and this sphere like the cylinder can be controlled on how many vertices it will have. And in this case we want to control how many segments and rings it will have. So in our case 16 segments and 16 rings is enough for our projector. OK so now we can press TAB to enter and edit mode and if we press Z we can see through our mesh. And I'm also going to press 1 in the Numnpad So we go to the front view and then I'm gonna press 5 also in the Numpad, to switch from perspective to orthographic view. Now with B, We want to select these bottom vertices right here and then we can press Delete to erase them. So basically we want these to be open as you can see. Okay. So from here we can actually create a few different shapes for our projectile. But since we sketched a round projectile at the end let's just select the top vertex and press O to turn on proportional editing. And now if you click and drag in this blue arrow this circle of influence will appear and you can control the radius of influence with the mouse wheel. So I'm going to scroll down to increase the radius of influence. And now if you push this up we are also influencing the rest of the mesh. And we can push it more or less around here. That's fine. Okay. So that's a good looking shape. This will do. Now let's just press booth here in shading. If we don't have this panel capacity by the way and let's also go ahead and rename the mesh to ProjectileMesh01. ProjectileMesh01. OK. So now we only need to create the UV maps and fortunately it's super easy to create the UV maps for this mesh. We can basically enter in edit mode with TAB and then we can press A to select everything. And now we only need to press U and select Unwrap. Yep it's very simple. This one. Let's just see how the movie maps are looking. Let's drag another window down here and choose UV/Image Editor All right so as you can see it's a perfect circle. And the vertex on the middle represents the top of our mesh. OK. So it means that we are basically going to create the texture that goes from the center to outside of our mesh. OK so let's save this binder file and with the projectile mesh selected let's export as an FBX and let's just make sure that we have Selected Objects turned On and that we click on this button to have a correct scale. And down here we can choose mesh OK. So now back to unity let's import the mesh we just created to the models folder. And with the projectile mesh selected let's come here and basically we need to turn off import materials we don't need that we can also turn off part animations we don't have them but we are making sure nothing is imported and we will see in a moment if we need to increase the scale factor. So for now let's apply these changes. Okay. So once we have done that we can come down here and switch the render mode to mesh and if we click here. Now we can search for the name of our mesh which in this case is projectile. And here it is. All right. So let's assign it and this is really tiny in my case at least it's very small our mesh. So we need to increase the scale factor to let's say 10. And yet it's still a little bit too small so I'm gonna push to 100. OK. Yeah that looks much better. All right and this is all acting weird. We can't even move it for some reason probably a Unity bug, but, as soon as we assign a material like the Beam01 it goes to the right place. OK. So let me just set the rotation to zero again because I was testing a few things and yeah, this is really bright. So let's actually switch these to the crack material for example just to show you how the UVs are working. UVs are working. Let's just decrease the alpha to around 6. OK. Much better and it's actually looking really great. These these crack text or you know I'm impressed by this one but anyway. OK so to see the mesh of our projectile we can click on this arrow and down here we can turn on selection wire and now we can see the crack text that is being mapped to these mesh and it looks really cool. Anyway even though it looks amazing. Let's go ahead and grade the projectile texture, because our original idea was to have something more like these glowy at the end you know. So, let's stick with that.
46. 7.4 - Projectile: Texture: Alright. So once you are in your image editing software of preference we can create a new file. Call it Impact03 and then we can make it 1024 by 1024 pixels. Now with the bucket tool let's paint the background to black as you know and let's create the new layer with Ctrl+Shift+N in Photoshop. OK so let's select our brush with a white color. By the way and we want this to be around 20% of opacity and with the size of around 125 pixels 125 pixels maybe bigger. But don't forget to set the hardness to 0. OK. So well now this time, before we start we are going to actually use the UVs maps of our mesh to help us draw this texture. So let's come here to blender. And don't forget to enter in edit mode and to select everything with A. And in this window where we have the UV maps, we can come down here and press where it says you UVs and up here we can export you UV Layout. And this window will appear where we can name this, ProjectileMesh01_UVs ProjectileMesh01_UVs And now you can choose a folder to save this and press enter. Now let's go to Photoshop and drag and drop the UV map that we just exported and it fits automatically in the right place. By the way this as replaced our layer. So let's create the new one with Ctrl+Shift+N OK. So, now let's make this UV map barely visible by decreasing the capacity to around 20 more or less. We just want to have barely the lines visible of the UV map which will act as small guides basically. And now we can block this UV map so we don't accidentally paint on top of it. OK. So in the new layer we created. Let's start by creating this rays that will go from the center to the outside like these remember guys low opacity brushes. And don't be afraid to make mistakes. Alright. So let's keep on creating some rays until we have completed that turn. And let's keep on going on until we basically make another turn full of this traces. OK. Yep. OK. So just like this. Now let's start decreasing the brush size, this time to around 75 pixels and let's start by defining some of this more visible rays by trying to make them more pointy You know more triangular. You also need to try to make this balanced basically don't add too much white in one side. You know. It doesn't need to be perfect of course but let's make sure we don't leave empty gaps basically. OK, So basically our next step is making these smoother with this smudge tool, this tool right here. With around 30 for the strength and besides making this smoother we also going to push the white outwards basically outside. We also wanna to do this on all the many rays that we have something more or less like these. Now let me just hide the UV maps. We don't actually need them anymore at this point. Now we can also do the opposite basically. We can start pushing the whites inside and create more empty areas because they are also going to be important once they are mapped to our projectile mesh, the empty areas you know And once we have done that we are going to use a small smudge size maybe around 15 pixels for the brush size. So that we can keep on pushing some whites down as you can see this will add more details and these smaller brush size will help a lot. Wherever you start always go towards the center so you don't create strange traces going in different directions. I know it's not easy but once you see a trace is crooked you can always go back. Right. OK. So, once you have gone all around this texture now we can pick the erase tool and with the big brush size let's start erasing some areas around our texture But be careful. We are going to use 100% of opacity. And if you don't feel comfortable with that you can always lower it to around 20 percent. OK. And it will look better if we start decreasing this intensity. We also want to erase a bit more then only the excess in this case. You see ,something like this, to create these breaks. So once again I'm going to pass with the smudge tool. But this time with the 40 pixels brush size and around 60 for strength because I want to make sure that i'm real starting to create this gaps between these rays and even separate some of this rays you know And as always, try to be careful, and always go towards the center of this texture OK something more a less like these should be fine. It's starting to look really cool and I'm just going to push this whites at the center outwards just a little bit you know like this. So, now I'm starting to notice that it still is a little bit too bright on the outside. As you can see. So in other words the extremities need to be grayer and to fix it. We are going to pick the eraser tool, E for shortcut, and with a very low opacity of around 5 to 8 percent. We want to pick a very big brush size and then I'm gonna start to erasing all around of this texture I'm going to do this several times until I have this nice gray areas and it's nicely faded from white to black. OK. Maybe I will decrease this a little bit more later. But now it's looking good OK. So the next step is to add tiny details around here. And this time we are going to use the brush with a very low opacity of around 20, and with a very small brush size of between 5 or 10 pixels. And now we wanna add this very small rays that once again needs to go from the center to the outside as you can see but not too many of them. Just a few just to add this nice shiny details and then we can also make some really long. Like these two OK. So now let's get closer so we can add more of these small rays but only in the center as you can see. And it's a simple touch that will look nice. Then once again I'm going to use the smudge tool to push some of this whites inside and create more gaps. You know ,this is a very repetitive process, and you will get the hang of it once you create several textures. Now once again I'm going to use a big eraser brush size and I'm going start to take a little bit more of the outside because I think it needs to be better faded. OK Alright. So once you think this is looking nice we can save this photoshop file and then we can also hide the black background and export this as a PNG. OK. So back to Unity once you have imported our new Impact03 texture, we can go ahead and duplicate the Impact02 material basically, don't forget to rename it and then we can assign our new textture. Let's also lower the intensity to around 3 for now. We will adjust it later if if we need it. Alright. So now let's assign this material to our ProjectileOut particle system. As you can see it's a little bit too dull. So let's increase the capacity to around 15 maybe. OK. So it's looking quite interesting. If you want to make changes to the texture. This is a good time. Go ahead. If you think that something is not looking good. And I'm going give it a little bit of light blue color more or less like this. Yeah it's a good blue but I think I'm gonna increase in intensity a bit more make it really glow until we start seeing some whites in the tip. But just a little bit of white you know. So basically I'm going to leave it at around 6.25. Yeah. I really like that glow around or mesh. It's looking nice. OK. So let's actually go ahead and turn on rotation over lifetime and set it at 360. So it does one turn every time seeminglessly So let's also stretch this a little bit by turning on 3D start sites like we have seen before. And in this case the Z represents how this mesh is. So let's leave it that around 1.1 just a tiny bit. Yeah that looks nice. Alright. So now we need to create a contrast on this. We need to create darker colors. And for that we are going to duplicate the ProjectileOut and call it ProjectileIn because it's going to be inside. Something like 0.9 for the X and Y. And it's also going to be longer in the Z around 1.5 Okay. Looking nice. We just need to reposition these to around -0.85 in the z axis like this. Yeah. So it just needs to fit inside our projectile out mesh. Okay. Alright. So we just need to set the order in layer to be -1. So this doesn't overlap you know. Alright. So since we have the alpha blend and share that we only need to duplicate the Impact03 material. Rename it and then change the shader to Alpha Blended. We can set the intensity to zero because we don't need it and now let's assign the material okay so let's set the alpha to the maximum. And then let's decrease the value of this blue to around 15 or 20 maybe it's a dark blue basically. And it looks really cool. That's a nice touch. Let's just make sure the shader is completely white by the way. Alright. Like this. OK. And now if we select both, to see them in action. It's looking great so far and it adds a really nice touch now we can go ahead and add some particles by the way. So let's create a new particle system and rename it to particles. This is also going to have a loop of 1 second and since they are going to be left behind. We don't need them to live too much. Basically between 0.4 and 1 second is enough. Let's get rid of this pink squares by assigning the Beam01_Add in the renderer. Let's also set the max particle size to 3. Never forget about that. And alright. It's looking better. Let's make just a few adjustments like the shape is going to be a sphere in this case. So it can emit in every direction. Basically, let's just push it a little bit more inside around 0.4 in the Z axis. As you can see Now we can shrink the sphere radius to be 0.8. So it fits inside basically. OK. So this is really big. Let's set the start size to be between 0.05 and 0.25. OK. That's better but it's still going everywhere right. We don't actually want that. So let's decrease the start speed to be between 0.5 and -0.5e. Meaning that some particles will go outwords and some will go inwards. OK. Looking better. Let's add some color, 2 colors actually the first one we can copy from the ProjectileOut like this and we can increase the opacity to around 50 more or less. We can also paste the blue to the second color but this time it's going to be a darker blue. Yeah more or less around here. That's fine. Alright. So, clearly we need to make them fade out smoothly Don't you think. So let's go ahead and in color over lifetime. Let's set the last alpha key to 0 OK. Nice. Oh maybe. Let's also make this particles fade in too. Add a key here. More or less like this. Okay ok that's looking better. And if you notice every time we move this particles they follow along and we have already seen how to fix that with Sparks. Basically we just need to make sure the particles are left behind and we can do that with the simulation space, if we set it to World. Now it looks much better and it makes much more sense for a projectile. Okay so next we are going to use a module that we have never used it before and it's quite cool. It's the noise model. And as soon as we turn it on the particles go crazy. So this is a real simple. The strength controls how much the noise will influence the movement of the particles. Higher values, more distortion on their movement. And what I'd like to do is set it to be between 0.2 and 1 meaning that some particles will have less influence than the others creating more randomness now the frequency controls the size of this nice map right here. And it basically controls the movement pattern of the particles. So let's leave it that 1. I think it's a good size. Of course you can try all the numbers you want don't hesitate to try out. And then we are also able to control the scroll speed which is basically the movement of this texture. So let's leave it at around 0.1 meaning that it will move slowly. Alright. Looking sweet but if you remember right in the emission we don't actually want to use rate over time as we have seen before. Rate over distance is more appropriate to a projectile. So let's set it to 3. And now as soon as we start moving this, the particle system will emit according to the movement of this object which is great. And that's exactly what we need because the speed of a projectile may vary. OK. So let me just push this to inside the projectile at 0.4 in Z. Alright. So that's cool. So let's apply the changes to the prefab before we lose anything and let's get ready to the next part which is the trail lesson. This deserves a great trail. So let's see how to make it.
47. 7.5 - Projectile: Trail: So yeah. This is starting to look interesting but we are still missing an important part which is the trail besides the particles. The projectile will move around and leave a trail behind and that trail will add a lot of value to the effect. So for that we can press right click here and this time instead of adding a particle system we are going to use a trail renderer. Now if you drag this trail around well, it will basically leave a trail behind. And in this case a white rectangle because at the moment we are still using the default material. But what's also happening is that this trail is living way too long. So yeah that's right. Trails also have a lifetime. More specifically at time parameter. Now if you decrease the time to around 0.3 and then we start moving around you will notice that the trail is much shorter and it looks much better in this case. Well, now there's this curve right here. This Width curve. And if we add a key at the end and push it down here our trail will have the exact same format as this curve which is awesome. As you can see There's also the possibility of creating a gradient and adding color. For example we can copy the color from the ProjectileOut and then pasted here to the first color key and we will have the blue with the beginning and slowly fade towards the White at the end. Alright. So that's cool. Now let's also paste the blue to the last color key. But this one is going to be a darker blue something like this. Alright. OK. So what's good about the gradient is that we can also control the opacity. We can basically say it goes from fully a back to transparent like this. And now the end will be faded. Which is nice. Alright. So now we need a material and that material will need a good texture. So let's see how to create a trail texture. Let's create a new file called Trail01 with 1024 by 1024 pixels. Let's also paint the background to black and create a new layer with Ctrl+Shift+N as you know. So what we are going to do now is paint a big horizontal white stripe with the brush at 100 of opacity around 300 pixels for the size and 0 hardness now more or less in the center while holding shift. Let's drag two or three times back and forth until we have this nice straight faded stripe line. Now let's align it to the center by selecting, with shift, the layer and background. And if you press V we can get these align options up here and we can choose this one and that's it. Our texture is centered. So before starting I just want to say don't mess too much with the extremities because we want to keep this texture seamless. So now let's go ahead and start sculpting this texture with the smudge tool. And we want to have strength of around 30 and the brush size of around 140 pixels more a less you know. So now we can start pushing these down like if it was dented and then you can push the other side a little bit up just like this. Let's do the same down here too. OK so let's also push it down in front of this thin and push this a bit back too. Then push it again down basically. OK. So down here I'm going to create the big fin you know push it quite a bit. By the way like this. Alright. And then again I'm gonna to do more of the same. Push this up and then push it a bit down creating these dented texture basically. And I'm going to add another one here where we still have space and I'm also going to create the bigger fin down here. Just give a few adjustments you know. You know what I'm trying to do right. Basically create this dented texture, on both sides, and then add some irregularities of course and also start down here a bit at the end OK. So I'm satisfied with these and if you are too, let's move on to the next part which is, with the eraser tool, E for shorcut. So with a brush off around 40 of opacity and 100 pixels for the size we might start creating some empty spots because as it is now it's too bright we have too much white. So we can start erasing around here creating some dark spots like these. And don't worry if it's not super smooth you know because we are going to fix it with the smudge tool in just a few moments. So let's keep on creating some empty spots here and there basically. And once you have all that spots let's actually go ahead and increase the opacity to around 50 just to basically remove a little bit more here in there. Not too much. Alright. So now the time has come to pick the smudge tool and start to polish these empty spots from the inside to the outside as you can see. And make some of these black spots longer to extend and OK. So once we have done that you can actually add some tiny details now with the smudge tool, basically. And we wanna start pushing these whites here basically all in the same direction. It will give a nice sensation and a nice effect to this texture. Like if it was starting to dissolve itself you know basically we are adding a personalized motion blur too. I mean it will look really cool in the end and you don't need to be super precise about it. OK. So you may need to pass several times until you reach a nice amount of details. And as you can see I only do it in one direction right guys. And I also kept this are seamless by leaving the extremities. There's other ways of doing seamless textures. But this one is the simplest one and it looks good to OK. So that's it. Once it's done we can go ahead and add a little bit of outer glow you know double click on the layer and turn it on. And we can make it white also. Let's increase the size to around 50 maybe and decrease the opacity to less 30. Just to get a little bit of glow and now we can save this photoshop file and then let's hide the back background and export this as a PNG to Unity. Now back to Unity. Let's go ahead and duplicate one of these materials rename it to Trail01_Add And then we can assign the new Trail texture that we just created. Let's also decrease the intensity to around 1 for now. Cool. Now we only need to assign this to the material of the trail and as soon as we start moving around we have this nice trail. It still needs a few adjustments of course but it's starting to look really good. And I'm also starting to notice that it would look better if we flip the texter basically to the opposite side you know. So back to Photoshop we can do that if you press Ctrl+T. And then we can go up here in the edit, and we can choose down here in transform flip horizontally. And that's it. Let's replace the texture that we have in Unity, with this one Ctrl+C and Ctrl+V. You know replace. Yes. And let's see how it's looking. Oh yeah. It's much better. It's working in the correct direction at least this time and it gives a really nice sensation. OK. So now to work on the trail to make the few adjustments that we need. Let's increase the time to 100 for example so let's just drag it one time a little bit like this. OK. And now we need to make this wider as you can see and we can do that right here in the beginning of the curve around 2.5 maybe. Now let's make sure the end key of Alpha is at 0. And let's make the blue a little bit lighter. Alright. So let's increase also a little bit the intensity as well. And let's drag it around to see what fits best. An yeah OK. We don't need this to be super bright. We don't want this to be the center of attention. We want this to have less impact than the tip of the projectile because it's the tip of the project that it's going to inflict damage upon the enemy and the receiver. So maybe 1.8 even less is a good value for the intensity. Okay looks nice. Let's put it back in place at around 1 in Z. And let's get the time to what we had before which is 0.3 as well. Alright so let's test this out, by selecting everything. Now let's drag it around here to have a rough idea and now it's looking and it's starting to look really cool. If I step on this frame you can start seeing on the overall aspect is there's a few things that needs to be adjusted, but it looks nice. So let's just set the order in layer of the Trail to be -1 by the way. And for now I know we still have to test this by moving it around. But later on I will show you how to shoot projectiles with the mouse. And we will get a better idea. On how it looks. OK. It looks a little bit better, but we still need to fix a few things especially these hard cut. And let's turn off Dynamic Ocludee and turn off Cast Shadows. We don't need that and let's turn on auto-destruct What this does is that it will destroy the trail as soon as the projectile stops moving. Basically. Alright. So that's it. Just don't forget to apply the changes to the prefab and we are good to go to the next step which is a new shader.
48. 7.6 - Projectile: Additive Scroll Shader: So this new shader is a bit more advanced than the two that we have done before. And don't forget that shaders are extremely important and we can do amazing things with them. And this one will enable you to scroll a texture in a direction in any direction and you will also be able to animate it, to look like it's the distorted, like if it was burning, basically. And we wanna to do this because we want our trail to move in a direction it's way too static now and we want to also add some distortion. Okay so we can start by duplicating the ParticlesAdditive_HDR, with Ctrl+D and then we can rename it to ParticlesAddScroll_HDR ParticlesAddScroll_HDR Let's double click to open the graph. And this part here is going to be the same. We are going to leave these as it is. This time we actually need to assign a texture to the main texture So we can see what we are doing so we can see the effect in action. Let's click here and assign the trail texture. Alright. That's fine. So like I said our changes are going to happen before the main texture, in fact we want to manipulate the main texture, mostly the UV's. OK. So first we want to make it move or scroll to any direction we want at any speed we want. And secondly we want to distort the texture So these are the two big steps we have to do. Alright. So both of these modifications require one node, which is a must have. And it's the Time note. Time nodes are extremely useful in shaders. If we want to make something move. we use a time node, most of the times. Now to control the speed and the direction of the texture. We are going to need a vector 2 and it's going to be called Main speed because it's going to control the speed of the main texture I'm going to push it here because we are going to need space back there. Alright so, we wanna multiply this vector 2 with the time so we can control the speed. Alright. So this by itself it doesn't do nothing. We need to connect this to the UV to have impact in the main texture. But if we connect this right now like this we would see a white square because we are not taking consideration do you UVs. So we just need to access the UV information. Fortunately there is a note for that. That represents the UV coordinates. You can press spacebar to search for UV. Let me push it back here. So now we can add this movement information to the UVs. And we can do it with an add node and then we can pass all of these to the UV input of the main texture. And nothing really happens because our main speed is at 0. So if we insert a positive value like 0.2 it will move to the left. And in this case negative values will scroll the texture in the right and then you can also use the y axis to move it vertically. Okay, so that was easy right. Making this texture scroll only needs a time node multiply it with a vector 2. And then we all need to add the UVs. So that's it. Let's save this and let's go back to Unity just to see how this is affecting our trail. Now we can duplicate the Trail01 material and call it Trail01_Scroll. Now we only need to switch the shader to the one we just created which is the additive scroll and then let me just set this time to 100 and push it around here more a less. So let's assign the Trail01_AddScroll material. And nothing really happens but we can come down here and insert a value of -0.1 in the X axis and we are literally making the texture scroll to the right direction this time. Maybe -0.3 we will look better. It really depends on your taste. Now the next part is a bit more complicated. It's fairly easy also so we are going to need a lerp node to distort this and basically will interpolate between the normal UVs and the distorted UVs. And it's going to be controlled by a vector1 called distortion amount. Let's push it way up here below the color OK. And it's also going to be a slider between -1 and 1 and by the way for those who don't know the lerp node will output a mix between A and B according to the T input meaning that if T 0. It will only output A which in this case is Red. And if it's 1 it will only output B which is Blue and all the values between, are a mix of A and B. So that's it. Alright so let's add a lerp node and basically the option A is going to be our normal UV map and option B will be our distorted texture and for the T we can connect the distortion amount vector1 we just created. So now the outcome of this Lerp is what we are going to add to the main speed. Alright. So to distort our main texture need what we call a noise textuew There are several types of noise textures. And Shader Graph comes with 3 different types. They are procedurally generated and they are the simple noise, the gradient noise . And lastly the Voronoi noise which is awesome. But there are more in reality and you could be using a texture to do this. But for now let's use these ones. Let's actually use the gradient noise and let's also create a vector 2, to control the speed of these noise, because we also want to control it's speed, the way it moves, its direction. Let's call it noise speed let's drag it around here and now we need to multiply these with the time so it can move like we have done before with an add node. Let's connect them like these and then connect to the UV input of the gradient. noise, and that's it. We are controlling the speed of the gradient noise. Alright so, so far so good, in the lerp now we have the normal UVs connected Now let's connect to B our distorted UVs and nothing really happens because everything is set to 0. For example if we start increasing the distortion amount to 0.2, we actually get an absurd amount of distortion even 0.1. is a bit too much and let's leave it at 0 for now. Now let's just add another vector one so we can control the noise scale. It's also going to be useful, with a default value of 10. And lets connect it to the scale like this. Okay so that's basically it we can save these shader now, and we have a scroll and distortion shader as well. Now back to Unity. Let me just drag this to around here. Okay so it's already scrolling. And now we can add some distortion to this texture. So as you can see the positive values kind of feel like we are expanding our texture while the negative value seems like we are shrinking the trail texture and it's looking really cool. At least it gives a nice touch. And yeah we probably will not use more than 0.1 or 0.2 because let's face it. 1 is an enormous amount of distortion. So if you want to have a better control over these values we can go back to Shader Graph and let's decrease the minimum and the maximum to be -0.1 and 0.1. You can also try -0.2 and 0.2 if you feel like it alright. So that's better. We have more control now over these values and I'm gonna leave it at around 0.05. More a less and we can even add some motion to our noise maybe let's increase the X to 0.5 and it gives a nice sensation more a less like -0.6 Looks good. We can also play with the noise scale something around 14 looks nice. Make gains you can test these values as you know and if you increase it too much you can get this grain effect basically and yeah, it doesn't look that good but low values look really cool. Alright so I'm gonna leave it at 15 maybe 10. Yeah that looks good enough. Alright let me, let me just round up these value to 0.05, now we can actually put this back in place by saying in time in 0.3 and the position in Z is 1 1. Cool. So we can only see how this is working by dragging around and it's kinda annoying but we will fix that in just a few moments. So, as you can see this shader is extremely useful and versatile and can be used in other parts of our project. For example we can use it in the ProjectileOut. What we need is basically to duplicate the Impact03 material. With Ctrl+D and add the name of our shader in front. Basically add scroll like this, so we can distinguish them. It's useful. And we can change the shader now. Okay so for example. Let's insert a -0.05 in the distortion amount. And maybe a value of 0.3 in the X of the noise speed. And let's see how this is looking. Let's say this is affecting no projectile. Let's say this material to the renderer. Let me just stop the rotation of our time so, so we can have a better look. And yeah I think it looks really nice don't you think guys this -- that is awesome and it creates some cool effects. Like if it was burning. Basically it's really useful. Alright so just don't forget to save the changes to prefab and now let's see how we can make this projectile move we can make it fly and probably make a few more adjustments as well.
49. 7.7 - Projectile: Scene: So let's go ahead and open the other scene we have here now. The projectile scene. This scene is from one of my most famous packages the Unique Projectiles Vol. 1 and I'm only adding this scene to this class for you to test your projectiles basically only for academic purposes and nothing more. Alright so, let's have an overview of this scene. And this time we have a canvas for a simple UI that tells people how to use the scene, with some basic instructions like Mouse1 to fire the projectile, D and A, for next and previous effects, C to change the camera, Z and X to zoom in and zoom out, and 1 to disable or enable the camera shake. We also have a scene game object with everything that makes up the scenario attached to it, and there's also this spawn projectiles script where we can assign our projectiles the fire point and a few more things. So let's have a quick view of that script. If you understand C#. That's awesome. If you don't. No problem at all. I will explain the basics and walk you through. And here is where I assign the first element of the VFX List. It's basically where we are going to add our projectiles and down here. If we press spacebar basically or Left Mouse we are basically triggering this SpawnVFX Function This function basically creates a game object an empty game object. It checks if there is a fire point assigned Basically the fire point of this sphere this one, which is a assigned in here so if we have assigned the fire point in the inspector. Now we instantiate the effect to spawn. That is the first projectile in the beginning so we instantiate the projectile right here in the fire point position and we will rotate the projectile to where the sphere is aiming. And the sphere is aiming at the mouse. And down here is the next and previous functions. So we can change the projectiles the camera shake the zoom in and zoom out and switch camera as well. You can have a better look at these if you want. But what matters now is how the projectile is shot and how it works. Now once the projectile is spawned the projectile itself contains these scripts, the projectile script that basically as a bunch of things that should be in a gun actually but since this is only for showcasing the projectile. It's fine it's no problem at all. Anyway, here's the part where we will spawn a muzzle flash, as soon as the projectile is spawned and down here in the FixedUpdate, is where we make the projectile move by simply changing the position of the rigidbody according to the speed and it moves in the forward direction which is the blue arrow. Basically the Z axis not forget about that it's really important and this OnCollisionEnter we'll fire up as soon as a projectile collides with something. Once it collided. Basically does a bunch of things but it will spawn the impact effect or the Hit effect which is also something that matters to ius since we are going to create one in a few moments. In the sphere there is also this rotate to mouse script which basically rotates any game object towards the mouse. And it uses raycast to do that. It rotates to wherever you aim basically. So that's basically it. And I hope this overview helped you to understand how this scene works if it doesn't you can always contact me. Obviously.
50. 7.8 - Projectile: Making It Fly: Alright so, with that overview now let's see how we can actually make our projectile fly. So let's double click here to edit the prefab and Oh and let me just turn on the rotation over lifetime of the projectile out which was off and the first thing we need is a rigidbody attached to the parent of this particle system. That's why we attach everything to an empty. Remember in the beginning we talked about that. Okay, so, we are not going to use gravity by the way. Now let's also add a sphere collider so it can detect if it has collided with something or not. Now let's increase the radius to fit the front. More or less like 0.8 And let's also push it around here in the z axis until it almost touches the inside of our projectile maybe around 0.6 actually. Now we only need to add the projectile move script and let's say for now that it has around 15 for speed and accuracy is at the maximum which is one hundred and fire rate is set to 1 which means it will allow us to shoot every second. If it's 2 we can shoot every half a second and so on and we don't actually have a muzzle or a hit yet. So let's leave it empty and the trails. Let's also leave it empty because we will see in a moment why we need this. Now in our scene we only need to drag and drop to projectile to the VFX List like these so as soon as we press play we can start aiming around and when we fire with our mouse button our nice blue fireball is shot to where we are aiming and I got say it's looking quite nice actually really enjoying the results and I hope you are doing too. But if I stop these you you'll notice that we have these hard edges on our trail and this is mostly happening because we are not fading in the beginning. So let's open the projectile prefab like these and in the gradient of the trail we want to make sure that in the start we have this key at 0 opacity like this. Let's also make sure it's being rendered behind the projectile mesh. So let's set it to one layer below to, -2 and yes now it's actually blending really well and it looks like both are part of one another the trail and the projectile. It's really cool. And if we increase the speed of the projectile we will get a longer trail. So you may need to play around to find a good balance between the speed and the time of the trail. Anyway I think that 15 is a good speed maybe 60. All right. Looking good. So as you can see as soon as it collides everything disappears. And this is why the trail list exists. It's to make sure that, what is left behind may live until it fades away or it dies. So it's enter in the prefab and let's assign the trail to the Trails List. And let's also drag and drop the particles they are not working at the moment actually probably because the emitter velocity is set to rigidbody instead of Transform. Sorry about that. OK. So now it's working like a charm. And as you can see the trail lives until it's own time ends and the particles don't immediately disappear once they collide because it will take in consideration the last particle emitted and wait for the last particle to die before it destroys the particle system. So that's why this trails list is really important. Alright so this is looking pretty good. The projectile seems to be pretty much finished by now and let's go ahead and actually create an impact for when the projectile collides with the wall or with something else.
51. 7.9 - Projectile: Impact: And for our impact or for our hit, we can start by creating an empty like we have done before and we name it to simply vfx_Hit_v1 vfx_Hit_v1. Now as you already know. Let's add a particle system that it's going to be used to create a beam or a flash that we already have created sometimes before. And this one is not going to loop it's going to be fast. So 0.2 for lifetime is enough. It's not going to move so 0 for the start speed. And let's go ahead and increase the max particle size down here to 3 before we forget that. And assign Beam material. We also only want one particle from these and we don't need the shape model. Alright. So this is too small. Maybe 6 will be enough yeah that's better. Now for the color. We can actually copy it from the ProjectileOut like this and it looks better. It's not that bright and it has the same color as the projectile. Great. Now we want this to shrink and fade away which we can do with the start size. Something like this curve wiil do And then we can use a gradient like this one like we have used before. Okay. So that's it. We have our beam done and it's useful to create an impact to create a flash of light. Now let's say this is a prefab in the projectiles folder So the next thing we can do is actually very simple and it's add some sparks, and we can re utilize the particles we have done for the projectile, Ctrl+D to duplicate it. Let's also recenter this like this. OK so now this is not going to loop, it's an impact so it's going to play only one time. It's also going to live less oh and, yeah, we need to change the emission let's remove this and let's add a burst between 10 and 15 which should be enough. You can try other values obviously that's more like it. It looks good. Now we don't need this to be in world simulation because it's not going to move like the projectile and we just need to add an impact to this. So let's actually use two curves in starts. This graph will go from 20 to -20 like this, and we want this to move slower towards the end of the lifetime of the particle. And the second curve will be lower we'll have slower values. Let's basically make these a range between 5 and 20 where the end is slower. Alright. That seems okay. And I think we just need to shrink the radius of the sphere in the shape model to 0.6 okay. Oh and let's make sure it starts with a full opacity in the beginning for the color of a lifetime. Yeah that's better. Now if you want to leave the Ooise On that's fine. And I'm also going to leave it On. Let's just go to the renderer and switch it to a stretch of billboard so they can be a bit stretched something like 0.02 in the speed scale should be enough. And yeah, I think it looks good. You can obviously play with the values and this seems to give a nice impact sensation. Alright. So let's apply the changes to prefab and now our next particle system can be duplicated from the beam. It's going to be called Impact. The impact is going to live a bit longer like 0.4. Now let's go ahead and assign the Impact03_AddScroll material Alright. So now we also wanna use 2 particles so we can create more diversity and they are overlapping now. So let's make sure it doesn't happen by saying they will have a random rotation between 360 clockwise and -360 which is counterclockwise. And turn on flip rotation. That looks much better. Let's also increase the offer to around 85 since we want this to be in the center of our focus of attention let's make sure we have a better fade out by also fading to black. And so now we can also add a little bit of rotation over lifetime something between 90 and -90 should be fine let's see how it's looking with the rest actually. Well yeah. Impact in my opinion is too big. I'm gonna decrease it to around 5 OK. So that looks better now. It's not oversized anymore but we will see all this looking with the projectile. Now, one thing that we can add, to improve this, is something similar to a shockwave and we can again duplicate the beam with Ctrl+ D and rename it to circle or to shockwave actually. And let's go ahead and duplicate the circle material and add the scroll in front, because we are going to use the other shader the additive scroll shader, this one. Let's just increase the distortion amount a bit and also add some noise speed and maybe increase the nice scale to okay. So yeah it should go in the opposite direction. The motion of the circle. So this curve should be more appropriate for a shockwave. And the circle will live a little bit more than the beam and a little bit less than the impact. So 0.3 is good. In this case it's in between okay. Yet that's okay for a shockwave. I'm just going to increase the alpha values so it becomes a little bit more visible. It's better in the beginning but it's still too visible towards the end. So I'm going to make sure the gradient goes from white to black. Alright. So that's much better. Now we can save the changes to prefab and see it's behaving with the projectile OK. We only need to drag and drop the Hit to the hitprefab in the projectile just like this and let's test these out and yeah OK. It's actually pretty good in my opinion. It also adds a lot of meaning to the projectile. Seems like it's the dissipation of the projectile. But I'm starting to notice and I don't know if you did it to that the motion of the impact doesn't fit very well. I'm actually going to use this curve but slightly changed in beginning so it doesn't start all the way from 0. Yeah I think now it makes more sense. It's like the energy of the projectiles dissipating away. Right. That's exactly what we want from a hit. Now what you may have also noticed is this hard edges. We have these cuts on the impact. That only happens when it hits the wall. It's very visible and visually very disturbing as well. So as you can see if you come here we have these 3cameras for 3 different perspectives and all of them have a visual effects camera attached. And if you noticed these camera is set to only render what's in the VFX layer which means that if you come here to the Hit and switch the layer to visual effects, Unity asks us if you want to also changes the children's and we can say yes and we can also do the same for the project that actually is now. What happens is that we no longer have these hard edges, and we can see the whole effect in action much more clearly and this is only happening because these visual effects cameras only renders the visual effects layers. And because the death is higher than the camera that only renders the other layers as you can see this one as it lower that than the other and it looks quite nice now without the cuts and we can have a better perception of all the effects are looking so I'm also starting to notice that maybe the hit is a little bit too big and I'm going to create the circle an amount of 0.5 in Star size and do the same for the impact and then for the beam as well and for the impact I believe it may look a little bit better with a curve like this where it reaches the maximum start size before the particle dies and then it shrinks a little bit towards the end. So let's see how this is looking. And yeah I think now the size is more adequate to projectile and it's very well balanced. The whole effect seems very nice actually. Alright. So the last thing we need is what I like to call a muzzle effect something that happens before or when the projectile is shot in the fire point. So let's see how to do it.
52. 7.10 - Projectile: Muzzle: Now let's once again start with an empty game object that we are going to rename to vfx_Muzzle_v1 vfx_Muzzle_v1 Now let's try to approach the muzzle to the fire point so we can have a better perception of all this looking we do with our character which is a sphere OK so let's also rotate it -90 degrees in the Y, and the first particle system is going to be for the muzzle. This is only going to play one time so it doesn't loop and it will only leave between 0.2 and 0.3 seconds. It's really fast. There is also no need for the start speed and let's turn on 3d start size because we will use in a moment a mesh for this. We are also going to only emit one particle at least for now. OK so we don't need shape module and now let's go down here so we can switch to render mode to mesh and it's going to be a very simple one actually. So let's open a new blender file and with A let's like everything then press delete. So we want to start by adding a cylinder with Shift+A which is going to have only 8 vertices and I'm going to enter in edit mode with tab and press Z to see through the mesh. Now while holding Shift+Alt at the same time we can press right click to select the button vertices just like this. Then we can scale them down with S. OK more a less like this maybe more. Let's press Ctrl+Tab and choose faces and this will allow us to select the top and the bottom faces and then we can press delete because we don't want them. We want this to be open now. I'm actually going to shrink this a little bit more at the bottom. Alright. That's better. Let's also reposition the pivot at the bottom. By pressing Shift+S and then we can choose cursor to selected Now let's get out of edit mode so we can press Ctrl+Shift+Alt+C and choose origin to 3d cursor and that's it. Our pivot is at the bottom now we want to rename our mash to something like muzzle mesh. Alright. So we just need to create the UV maps now. And it's very simple just enter in edit mode with tab, select everything with A and then we can press U to chose unwrap and that's it. If you come here to this window we can see that the gap in the middle is a little bit too big too wide. At least in my case so I'm going to select the vertex with B and then shrink with S and that's it. We are good to save this blender file and then we can go ahead and export this as an FBX Just don't forget to turn on selected objects to click on the scale button and the choose mesh. Down here. Back to unity. Now we wanna import our muzzle mesh and let's disable import materials and animations we don't want them. We can also increase the scale factor to 100 because I already know this is too small for Unity. Now we can apply the changes and we can get back to our muzzle particle system and simply drag the muzzle mesh down here let's also go ahead and re utilize the Impact03_AddScroll material. This one yes. So now this is facing the camera as you can see and we can fix that by changing the render alignment to local. However, it's too bright. As you can see. But we can come here to the ProjectileOut and copy the start color and paste it to the muzzle. Alright. So now it's the same color and it's looking much better. So let's fix the way it goes away by adding a fade from white to black in the color over lifetime. Something like this will do OK. So that makes more sense now. And for the beginning, for when it appears, let's actually use this curve and start size over lifetime. But we don't want to start at 0. It looks better if it starts somewhere between 0.6 and 0.7 OK. I think it looks pretty nice. Now, we can add some random rotation of lifetime something between 90 and -90 or even more. But this should be enough Alright. So now let's add some more randomness to this by making the 3D start size random between 1.2 and 1 in the X and Y axis and between 1 and 0.6 in the z Alright. So now it has different sizes every time it spawns, which is good and it makes more sense. Let's add a second particle to this in the emission. Alright. Like this and I'm just going to turn off these selection wire. We don't need these anymore. So the idea now is to save these as a prefab and let's also switch it to the VFX layer. Don't forget that. OK. So, cool. OK. Cool so we can still add two more things and beam and some particles. And fortunately that's already done. We can come here and duplicate from the Hit with Ctrl+D just like this. Now let's drag them to our muzzle and let's also reset their position and rotation. Alright. So the beam is definitely too big. Maybe 2 is enough in a start size. And yeah. That seems more like it but it's way behind and I'm gonna push it in the z axis. Marla's a value of 0.2. So it's a little bit further. Alright. That's better. I'm just going to make the blue of the beam a little bit more light and I'm only going to change the color of the beam not the muzzle like I did sorry. All right so for the particles we actually want them to have a different shape. Cone is more appropriate to this don't you think. So, with maybe 0.1 for radius is enough and 40 for the angle. Alright. Looking good. There's just a little bit too fast. So it's like start speed and let's decrease the range of this graph to maybe 10. Alright. That seems more appropriate. It looks good. Actually the whole muzzle is working pretty well. Don't forget to apply the changes to the prefab first and we also need to come here to the projectile prefab and drag and drop the muzzle we just created to this slot right here and yeah I think it complements the whole effect very well actually we have the muzzle projectile and impacts and I believe it's completed and looking really nice really cool this skill dispel. Alright. So this one is looking pretty interesting. So let's see how we can create a different version of this. We have seen fire and nature when we created the area of effect attack. Now let's see other elements like for example how we can create electricity which is also an awesome theme.
53. 7.11 - Projectile: Electric Version Part 1: So the idea is to start with our original projectile, rename it to something like, Electric, like this and then we can save it as an original prefab and that way we make sure that we don't mess. the original one. Ok. So let me just push this a little bit up and now like we did with the fire and nature versions we need to find a good color palette so you can choose other colors but I'm going to go with mostly yellow for this electricity. So yeah. This orange near yellow is looking good for the ProjectileOut maybe a bit too bright. So I'm gonna decrease the value here to a darker orange. OK. And for the ProjectileIn I'm just going to come over here to the yellows and that's it now for the particles, I'm going to choose a pure yellow basically only yellow. But I think I'm going to leave the blue. I think that's a really nice touch you will see at the end. You can obviously try different colors. So, for trail I'm going to push this key here and choose a yellow orange. More or less like the ProjectileOut and this time I'm going to add a new key in the middle for a yellow color. Because at the end we actually want to improve this by adding a darker color. So it has a better fade away you know which in this case is going to be a darker yellow. Alright. So yeah that looks nice. Now let's actually save these changes to the prefab and let's just quickly test these out. I'm just going to add the projectile to the visual effects List and here we go. So clearly we need some really cool electricity textures you know. And in fact we are going to create our first sprite sheet our flipbook hand painted animation and you will see it's not that hard. So let's go to Photoshop or to your image editing software of preference and let's create a file called Electric 01. With 1024 by 1024, and paint the background to black and create the new layer you know with Ctrl+Shift+N And this time we need the timeline which is here in wind. Alright. So, this is where we are going to add our frames and I will show in a moment how it works. But for now there's a really cool tool in Photoshop to create electric effects or at least it helps a lot. And it's the free form pen tool which is perfect for what we want. And if you don't find it, you can press mouse one and hold it until this drop down menu appears. OK. So the idea is to use this tool in path mode. Don't forget that and we are going to start by creating a zigzag that goes up and down and more a less in the middle. It gets bigger and then it gets smaller towards the end. And now we need our brush too and we want to select the brush size of more or less 15 pixels. You can increase these or decrease. It's up to you you can try it out. And with a white color by the way. Now back to our free form pen tool P for shortcut, we wanna press with right click and select Stroke Path and here we can select our brush in this drop down menu and make sure you have simulated pressure on. Now if you press enter you will see that we have this nice looking curve that's already looking like electricity you know which is awesome and we can actually delete our path with right click now because we are not going to need it anymore. Now let's add some white outer glow with just around 15 pixels for the size and 50 for the opacity should be enough. You can try different values obviously and now down here in this button, we can add a new frame and this is how it works in each frame. We can choose which layer is visible. So for example now let's create a new layer and let's draw again with a free form pen tool like if the ray was going to move to the next position which is slightly different. You know we can imagine that it goes a little bit up. It grows a little bit as well and then it goes down it goes up again you know it doesn't need to be perfect it's electricity you know. Now again, with the right click we can choose stroke path. Make sure it's set to brush. And the simulate pressure is on. And now we can copy the style from the first layer like this and paste it to our second layer. Then we can delete the path with right click. Now since we are in the second frame we can hide the first layer and now in the first frame let's hide the second layer. You know if you press play we can see that our electricity is starting to move around which is great but we need a few more frames. So let's add a new one and also create a new layer. And now we can actually select the first and the second frame while holding shift and already hide the third layer that we just created. OK. So the idea is to again make sure we create some slightly changes to the last curve and you know, it goes a little bit to the right and it comes down, goes up, its electricity you guys have a lot of freedom while creating electricity. Then we can right click shoot stroke brush press OK and we can directly press right click in the third layer and paste the layer style. Now I'm going to hide the second layer and the other frames are looking good. Oh let's just leave the path with right click. By the way and that's it. It's starting to look interesting. We need a few more frames and basically we can create flip books with 2x2 or 3x3 But you can create as many frames as you want. You can go 4x4 if you want. You know the animation will be smoother but I'm going to aim for the 3x3 which I think is enough for electricity. So let's add a new layer and while holding shift let's select the other 3 frames and hide the layer 4 okay. So I should already have told you this but if you want to change something in your path you need the press control. So this white arrow appears and it only works if you are using the pen tool by the way. And now while holding control with this white arrow we can press in an empty space too unselect everything. If you have any vertices selected and then we can drag to select verticex you wan,t and you can also hold shift to select or to unselect vertices. OK. Now you can press delete, and in order to continue this curve. You need to make sure that this little slash icon appears near the pen and actually I'm going into this one. But for example I want to continue from here so I get my cursor closer, to that Vertex, I click and I redo the line and I'm going to do this again. For example here and I'm going to press Ctrl so the white arrow appears and select the vertex and then delete it. Now if I simply continued the line without that little slash icon appearing, if I went on and use the stroke path. This is what would happen. It would consider these as two different paths. And that's not what we are trying to do here. All right let's me just hit the Ctrl+Alt+Z a few times okay. So basically don't forget to make sure you see this slash. icon, uf you want to change something. Okay so stroke brush paste the later style, hide the third layer and delete the path That's the workflow. Okay. So it's already starting to look like something. And if you want to stop here that's fine. There is no problem with that. But I'm going to create a few more frames. Oh and for example if you don't have the path anymore and you would like to make changes to electricity ray, you can always use the smudge tool. It's not perfect and you have to be careful to not mess this up. And obviously the modifications are a little bit limited to these. But it may help you as you can see it's good for example to push some spikes up and down. You know. Now like I said I'm going to do a few more frames so I'm going to create the fifth frame and also the fifth layer. Now I'm just going to select the other four layers and hide the layer five. This time what I'm going to start doing is create an in-between the fourth frame and the first frame. The fourth and the first layer. So I'm going to turn on the layer 1 and I'm going to create a line in between the layer 4 and the layer 1 More a less you know, it doesn't need to be precise and now we can do the stroke path, paste the layer style, hide the other layers and delete the path Now I'm just going to select the other four layers and I'd layer five. And yes it's looking really cool. It's already as a great feeling now I could stop here and it would look OK but I'm going to create another frame and also add another layer and I'm also once again to do the whole process. But this time create a in-between the first and the last frame. OK. So I'm going to do the workflow, stroke path, paste the layer style and delete the path. Alright looking good. Now I'm going to do something a little bit different. I'm going to create a frame in-between the third and the fourth frame. And I'm also going to create a layer between the layer 3 and the layer 4 now I'm going to hide this layer 7 in the other frames. So back to the fourth frame I'm going to turn on the layer 3 and the layer 4 these kind of messy but I'm going to try to create a version between them. So something more or less like this is fine. No need for big worries. This electricity like I say. I'm going to do the workflow, stroke path, paste the layer style and delete the path. Alright. Looking good, now I'm just going to select the other 4 layers and hide the layer 5 and here we go. It's starting to look really cool now to end this. I'm going to add a new frame but I'm going to reuse one of the layers that is already done. And for this one I'm going to turn on the layer 4. OK. For the last frame the ninth frame I'm going to choose the layer 2 and here we go. It's looking really awesome. And that's it. It's done. We can export this. So first let's save this photoshop file. And to export this. We are going to need to select all the frames with shift and hide the black background. We don't want to export the frames with the black background. And now we are ready to come here to file and down here. Let's select export and choose Render Video. OK. So here you can give a name to the frames and make sure it's followed by an underscore. I'm also going to turn on create new sub folder with the name and you can choose where to export it obviously. And don't forget to set this to PNG by the way, in the format. And here is also how many digits it will have after the underscore the file size you can leave it as it is now. It's very important to come down here and select straight untammed in the alpha channel so it can export these without the background basically transparent which is what we want. And then you can press the render button. Now if you go to the destination folder we have all of our frames exported. However they are all separated and we want to join them into one texture which is called a sprite sheet. And now we need to go to Google and for example I like to use GlueIt But there are a few other small softwares that can do this. And if you don't find these one the GlueIt you can search for example spritesheet tools. So, in one of these links you can download the GlueIt software. And once you download it You can extract it and then you can run these little software. And this is super simple guys. First we want to add all the frames we just exported, right here. And now we only need to say how many columns it will add. So for example in my case I have 9 frames. So I want 3 columns which is going to be a grid of 3 by 3 now we can close these and we only need to save these. And what I like to do is, and what I advise you to do so, is to select one frame and then add the size of the spreadsheet which is in this case 3 by 3. OK and that's it. Now as you can see we have our nicely done electric animation ready to be used in Unity.
54. 7.12 - Projectile: Electric Version Part 2: So let's import the texture to Unity, to the respective folder and duplicate the impact03 material for example and rename it to Electric01_Add, and in front we wanna add the size of the spritesheet. It's going to be really useful. Which is 3 by 3 in my case. Okay. So let's go ahead and start by duplicating the particles and rename it to electric local. Local because we are going to have another one set to world so let's go ahead and assign the electric material to the renderer. Now the way we use the spritesheets or texture sheet in particle system is right here in the texture sheet animation. module. And if we turn that on we can now say that it's a grid of 3 by 3. In my case that's why it's useful to have that name on the material. So basically we don't need to open the texture to count how many textures there are in X and in Y. It's just good practice and it helps a lot. Once it is set to 3 by 3 this curve will automatically snap to a maximum of nine which is how many frames there is in this grid. Anyway let's set the rate over distance to 0 and increase the rate over time to 15. For now and we can start to see this spritesheet in action but our electricity is super small so let's increase the start size to be between 1.5 and 2 which maybe it's a bit too big. We will see. Anyway it's looking better. Let's just turn off noise. We don't want to use that here. And yeah the rate over time seems to be too much. Maybe 10 will be okay. And they are kind of slow. They need to have a shorter life time you know like little zaps of electricity. Maybe 0.2 and 0.4 is OK in the lifetime so. Now let me just show you something really quick about the texture sheet animation. For example, if we come here to the frame over time and if we choose random between two constants we are basically saying that the particle system is going to emit a random texture in this grid in our texture sheet and it's going to be completely random these sometimes can be very useful. You can also obviously choose to emit only one specific texture of these spritessheet. It's also possible. Now I'm just going to change the blue color to an orange one and also increase the alpha values to 30. I'm also going to increase the alpha of the first color slot. To be more brighter you know. OK so it's starting to look really cool and now we can add some random rotation to these and start rotation you know between 360 and -360 because the idea is to have these electricity rays around the projectile itself you see. And it adds really nice touch. Let's just make sure the electricity only appears outside the sphere by setting the radius thickness to 0. And maybe also increase the radius to 0.9 Now in the simulation space is still set to world. Which means when the projectile move these will be left behind and we don't want that. We want them to be around our projectile. Which means we need to change the simulation space to local. Okay. Looking good. Now one of the last things we need is to make the electricity blink you know and we can do that with color over lifetime. And for this to work out we need to match the alpha with a color which means basically that if the alpha is at 0 we want to use a black color but if the alpha is set to maximum we want to use a white color otherwise this wouldn't work, and it will not blink. Because the intensity is a bit too strong and decreasing. Only the alpha won't work. OK so to create a blink we need to have moments of white and full opacity and then it quickly goes to black with alpha at zero and abruptly goes back to white and full alpha. You know we want to create the gap. Yeah basically shutting down the electricity really quick and it looks like it's blinking OK. So a it's like this, will create, a kind of blinking electricity. It's very quick but if you look closely it's there. OK. Looking good. Let's add another gradient to create more randomness and we can copy and paste it like this. We need to drag this gap to be more or less around here OK. Nice. Now one thing that we can still do is add a curve in the size over lifetime. It's going to go from big to small. But at the end let's make sure it doesn't go all the way down. You know that's fine. Okay. You can also use the rotation over lifetime to be between 90 and -90. That should be okay. And yes it looks good with a projectile in my opinion. Yep OK. So let's create a trail of electric particles now. We want to leave some zaps behind and we can do that by duplicating the electric local, and this one is going to be electric world and world is the first thing we are going to change in simulation space the emission is also going to be different. Instead of rate over time it's going to use rate over distance of three. It's a little bit too much but we will reduce it in a moment. This can also move a little bit more between -1 and 1. Okay. And it can also have more rotation in the rotation over lifetime and that's it. Let's apply the changes to prefab let's see how this is looking. So if we focus only on the projectile I think it looks really cool. We have electricity coming out of the projectile and it's leaving a trail behind which is nice. But, still think we can improve this but I think I'm just going to decrease the start size of electric world to be between one and 1.5, and the shape of the sphere is also going to be a bit smaller to 0.7 and I think it's emitting too many little rays. So I'm going to set the rate of a distance to 2 or 2.5 would be fine also. Okay I'm just going to apply the changes to the prefab and let's see how this is looking Yeah I think it's pretty cool what do you think guys and I think it's looking really nice but we can still improve this a little bit more and we are still going to see a few more tricks. What we can still add is something like a ring of electricity around the projectile. So let's see how we can do it.
55. 7.13 - Projectile: Electric Version Part 3: So once again in Photoshop let's create a new file called ElectricCircle. For example 1024 by 1024 let's paint the background to black and also create a new layer. OK so for this one let's create the circle as a guide, and you can come down here and choose ellipse tool You can hold the mouse button down for this dropdown menu to appear. Now more or less in the middle while holding Shift+Alt We can create the circle more a less of these size. The feel is going to be empty and we can choose a red color for the stroke. To align, we can select both layers which shift and press V. So these options up here appear. And you know you can align the circle to the middle with them. I'm just going to decrease a bit the capacity of the circle and lock it as well so we don't draw on that layer. OK. So now let's create a new layer and let's go ahead and pick the freehand tool. You can press P for shortcut. Make sure it's set to path by the way. So I think you know what we are trying to achieve here. Basically is the same as the other electric texture that we have done. But instead of being in a straight line it's going to be in a circle are way more or less like this A bit shaky and zigzagging, you know. So once you have these you can select your brush tool choose a size. I'm going to stick with the same size that I had before. Choose a white color as well. And now with the pen P for shortcut let's do a stroke path where we select the brush and turn on simulate pressure and press OK. You know basically the same process that we have done before and I think it's okay we can delete the path. I'm going to hide a circle since from now on, this is going to be our guide basically. So now let's add the white outer glow with 24 for the size, and 50 for the opacity. All right. Looking good. Our first frame. Now we can add a new frame you know and we can create the new layer as well and I'm going to try not to deviate too much from the first frame. So the idea is to make some, a few changes basically, some of these curves are going to go in the opposite direction. Some are also going to stay in the same. Some are also going to move a little bit outside or inside. You know and then you can press right click and press stroke path. once again. I'm going to delete the path and let's also hide the first layer too and also hide the layer 2 in the first frame. Oh and we can also copy the layer style and paste to the new layer. So, this time we are not going to do as many as we have done before. Let's only do six frames. But if you want to add more frames there is no problem with that. OK. New frame and now the idea is basically the same. So I'm going to fast forward this and you know stroke path delete the path and paste the layer style oh and I forgot to create a new frame by the way and now I also need to hide the new layer in the other 2 frames. So once again new frame the 4th one and the new layer and it's going to be more of the same. Basically make a few changes the previous frame use the stroke path, paste the layer style, delete the path and hide the layer 4 in the other frames and it's starting to look like something but I'm still going to add another frame the 5th frame which is more of the same so I'm going too fast forward this Now only in the last frame the 6th frame I'm going to create an in-between the 5th frame and the first frame you know like we have done before. It's exactly like a morph between them. So we can have a smoother animation and smoother transition as well and here we go. It's looking pretty good actually. I'm really pleased with the end result. And you know in case you want to add a few more tweaks that's totally fine. You can use the smudge tool if you want, if there's something that you don't like. Like we have seen before. You can also erase that frame and try to blend between the previous and the next frame if you don't like one, or you can even add more frames. You know it's really up to you. So I really hope that you enjoyed create this simple animation in Photoshop it was really straightforward and real simple. But I hope it helps you. So now in file we can go to export, choose render video. Choose the location, create a new subfolder set this as a PNG. And don't forget to choose Straight - Unmatted in Alpha Channel. And that's it. Now we just need to open up glue it added the files we just export. In my case it's six frames so 3 columns should be fine. It's going to be 3 by 2 in this case and then you can save it with the correct name which once again is 3 by 2 so, if we went to unity right now and applied these electric circle to a particle system, this is how it would look. Basically from certain angles it's not visible and that's not really good. And this is how we want this to look it's much better. So for this we need to create the mesh in order to be able to see it from every angle. And it's a very simple mesh that we need. So let's see how we can do it. So we can go to blender select everything with A and then delete. We it which Shift+A we want to add a circle that it's going to have only 16 vertices in this case. Which is more than enough by the way. Now the idea is to enter an edit mode with Tab and with E we wanna extrude this only in the z axis which means you can press Z to lock into the axis. And you can insert the value of 0.3 which should be fine. And then you can press Enter let's select everything with A and you can already press U. So we can choose and unwrap. And if we open a new window and choose UVs This is what we have a circle and you may need to center this for some reason it's not central in my case and it can select everything and press G and then you can press Y to only move vertically okay. So that's basically it it's centered. And now we need to modify this so let's press this button down here and select all the verses in the center so we can shrink them with S more or less like this. So it can cover our texture basically. OK we are going to turn On Live Unwrap so we can modify our mesh and blender will automatically update UVs which is awesome. All right. So we wanna add a few more loops in the middle. And for that we can use Ctrl+R And if we scroll up we can increase the number of rings and we want to add 3 loops and then press Enter. And as you can see the UV maps updated automatically which is really useful. Now we wanna unselect everything with A and while we hold shift let's press right click in the upper and lower rings and then we want to scale them down with s just a little bit like these should be fine. Now let's like the ring in the middle while all the shift and push it outside with S All right. So it's looking good. Now in case you want to see how the electric circle looks in here, we can come down here and click where it says Open. Now we all need to navigate to where our circle texture is and then press enter and that's it. This way we can have a better perception. We need to adjust or not. The mesh to our text. OK. So it's looking really good. Oh and as you can see with these mesh our circle will be visible from any angle which is which is great. OK so let's rename this mesh to Ring01 for example and let's move it out right here and now with the mesh selected let's export this as an FBX. And don't forget to turn on selected objects, click in the scaled button and press only mesh down here and that's it. Oh don't forget to save this blender file. You never know it may be useful in the future. OK. Now back to Unity we want to import the mesh as well as the electric circle texture to the respective folders. And we can also go ahead and duplicate the Electric01 material and rename it to ElectricCircle01_Add_3x2 ElectricCircle01_Add_3x2 So it matches the texture you know. Now let's go to our ring mesh because we want to say that we don't want to import materials nor animations and in the scale factor we are going to need to increase this to 100 and then we can apply the changes all right. So now we can duplicate our ProjectileOut and rename it to ElectricCircles for example and doen here we can already go ahead and assign our ring mesh just like this. OK it's actually looks really interesting anyway. Let's assign our electric circle material like this. All right. So now we only need to use the texture sheet animation to have a proper animation. And in my case my texture is 3 by 2 ok and that looks fine. And this needs to have a shorter start lifetime. So let's set it to be between 0.6 and 0.8 which should be fine let's also make sure it's random in the start rotation. OK. And we are actually going to use rate over time between 5 and 7 OK. That looks interesting. Now we can go ahead and add some randomness to the 3d start size for example by saying that it's going to be between 1.25 in the X and Y with a minimum of 1and in Z the maximum can be 1.5 and the minimum can be 0.75 0.75 All right. So now we just need to add the proper colors that we can copy from electrical local. Just like these. And it looks much better much brighter. That's nice and this time we actually want to use the velocity over lifetime. Which is going to be local and in Z it's going to be between -2.5 and -3.5 And we are doing this because we want these circles to go from the front of our projectile to the back. You know and they are way too big in the beginning so let's actually use a size over lifetime where it will start small but not that small you know. And we can already push this a little bit in front just this. So it's around our projectile mesh you know and I think it's looking really cool we all need now to copy the color over lifetime from the electric local or the electric world. You know just like this. So it can also blink. Basically and I'm also going to increase the rotation over lifetime to be between is -720 and 720. I think that, I think that looks really nice. Let's apply the changes to the prefab. Let's see how this is behaving and as you can see there are some details that sometimes makes the whole difference. I think this adds a really nice touch to our electric projectile there's still a few improvements that we can do obviously. But now let's see how we can create the electric impact. OK.
56. 7.14 - Projectile: Electric Impact and Muzzle: So as you know the first thing we want to do is start with original prefab and rename it to Hit Electric. And then you can create the new prefab out of this one. Now, for the beam color we can copy from the electric local. The yellow one for example, but we need to lower the capacity to 15 more or less and maybe add a bit more of orange OK. So for the particles it's quite simple we can copy from the other particles like this and both are looking good together. OK. So I don't think I need the impact in the circle this time. If you want to use them that's fine. But I'm actually going to use some electricity zaps and electric circles from the projectile. Let me hide the impact and the circle. OK. So both need a transform reset and now in the electric local. This is not going loop and we are certainly not going to emit with a rate over time. So let's set it to 0. We instead want a burst of between 5 and 7. That should be OK. The sphere radius seems a bit too big and I'm going to decrease it to 0.5. OK. So they are more concentrated in one spot and let's increase the start speed to 7 actually the maximum. Now that's looking nice with the beam. OK I'm just going to increase a little bit the lifetime and I also think that the size can be bigger. Maybe it's too big. Alright. Moving on to electric circle which is also not going to loop and the rate over time is going to be 0 also because we want to use a burst between 3 and 4. It's also going to have a short lifetime too. And we also need to turn off velocity ove lifetime. We are not going to need it. Alright. That's looking pretty solid. Let's see if it fits the projectiel. So let's save the changes to the prefab and let's go to electric projectile the prefab and assign the new electric Hit prefab OK. So yeah it's looking nice. OK. But I think the zaps are a bit too big and the circles are a bit too small actually. So first I'm actually going to erase the impact and circle. I'm not certainly going to use them. We have enough elements available to make this look good. At least in my case. OK. So let me check the size over lifetime of the electric local. I think they are not shrinking all the way to 0. Yeah they weren't. OK. So that's much better. And for the electric circle let's actually double the 3d start size. OK. So that's much better looking. We see the circles more clearly at the end. OK. I think I'm also going to increase the beam size to 6.5. And I'm going extend just a tiny little bit the lifetime to 0.3 It will be nicer. Anyway ,oh and before I forget the electric circle can be in view. So it faces the camera you know. Okay. I think I'm not gonna modify anything else. Let's apply the changes to the prefab. Let's see what it is looking. All right it's looking really cool like I said I would make the beam last a bit more, but that's fine. Let's move on to the next part which is the muzzle. So like we always do let's start with the original one. Change its name, and save it as a new prefab. The color of the muzzle can be copied from the beam color Okay, looking nice. We can also paste that call it to the beam of the muzzle Alright. So now I'm just going to copy the yellow from the particles. That's fine. And now I think it would look good with some electric zaps. Of course you can use electric circles if you want, if you want to play with other elements. That's fine. So I'm going to copy the electric local and I'm also going to change the shape to a cone. Oh and let's reset the transform of this one. So the radius is way too big and the angle can also be smaller. The start speed actually needs to be less random. In this case something between 1.5 and 3. OK. So yeah, obviously there are too many particles 2 or 3 should be fine. I'm also going to decrease a little bit the start size. Alright. It's looking pretty solid. I think we need to push the electric local a little bit outside in the z axis because it was way too close to the fire point. That's looking really nice. Now let's apply the changes to the prefab. Assign the muzzle to the projectile and see how everything is working out together So yeah, let's see. What you think guys? For me, I think it's looking pretty cool. But, for real I'm really pleased with the end result and we have achieved something that it's cool. I hope you guys are also happy with the end result on your side. Of course. Now, we have seen a lot of things in this course, right? There's still one last topic that it's very important which is the performance improvements topic so let's see what's all that about. OK.
57. 8.1 - Performance: Introduction: So welcome to the eighth chapter which is about performance improvements of effects. And there are essentially three variables that tells how heavy an effect is in unity. One is to measure the amount of triangles also known as tris an effect has. The more the heavier other is by using the overdraw method which works like an x ray vision and the last one is to count the number of batches call also known as draw calls an effects makes. So the triangle count quickly goes up when we are using too many meshes in one effect or when a mesh has too many tris too many faces Just like when they are creating a 3d character they have a certain amount of faces or tris allowed depending on the game and on the platform. Well the same happens with effects. Be careful with the number of triangles and how many meshes you are using also. The overdraw method apparently is not yet available in the new render pipeline at least at the time of recording this, which is in Unity version 2019.1.3f1. So I have to switch to a 3d project where I don't use the High Definition Render Pipeline. This is a viewport mode that you can find here and as soon as you switch it you have these orange tone shading and it works like an x-ray vision. So, the more opaque the heaviest It is, basically the more particles you have the more overdraw will happen. And just out of curiosity in Unreal Engine they actually have something very similar but works as a gradient as you can see meaning that the green is light weight and the red is heavy weight and white is probably super heavy weight. But OK, that's it. The more particles the more overdraw. Now the batches call are essentially how many calls an effect makes to the graphic card to draw something. And basically each material makes a call to the graphic card. So the more materials we use the worse it's going to be Fortunately there is a way to decrease the amount of materials we use, to only one or two per effect or three and it will decrease a lot the number of batches call to the graphic card which is awesome. But don't forget that materials are essentially shaders. So for example if you could make an effect with only one shader that would be great right. But as we've seen we need sometimes an Additive shader, an Alpha Blended shader and another one that makes things scroll So that's it. We have triangles. We have the overdraw and the batches call and we always want to have a nice balance between them. What's also important to have in mind is knowing how many effects are going to happen at the same time. For example maybe you have a mildly every performance wise effect and you try to optimize it the most you can. But since it's going to appear only one at the same time maybe you don't need to worry more about optimizing it even though it's a bit heavy. But since it will appear only one at a time maybe that's ok. This happens a lot in card games or turn based games where you only see one effect at a time or two effects at the time But for example in a bomber man type of game, where you will have dozens of explosions at the same time. Now that's very important to have a lightweight explosion right. It's going to appear many times. So you probably don't want to use meshes, and you only want to have one or two materials. You know. The platform where the game is going to run is also extremely important to know for example obviously for mobile it needs to be super lightweight it needs a lot of optimization but if it's for PC maybe a few more triangles won't hurt actually so that's in terms of theory of performance improvements of effects for games now let's apply all of these and let's see how we can improve the performance of one of our effects, which is a projector.
58. 8.2 - Performance: Projectile Part 1: So if you come here to our projectile scene we can see how heavy an effect is by simply turning on the stats on the top right corner of our game window right here. And here we are able to see the current number of batches calls which is 31 with the current scene and with the post-processing effects too. We can also see the amount of triangles it contains roughly 3600. The amount of vertices too, the resolution of the game window. If I move it to automatically update. We can see the saved by matching and we can also see frames per second. Anyway, what I want you to focus on is the number of batches. I'm going to shoot a few projectiles and then we will see that the number goes up. So yeah as you can see it goes from 32 to sometimes 38 which basically means we have six calls being made to the graphic card to draw our projectiles the impact and the muzzle effect too. And this number even goes up if we shoot some electric projectiles since we are using more materials and meshes you know. So there is also a very important tool to have a deeper look on how each frame is composed. It's really useful and it's the frame debugger, which is up here in the window inside analysis. It's very simple to use this tool. If I shoot the projectile and pause with control Ctrl+Alt+P, I can now enable the frame debugger and what happened next is simply amazing. What we see here if we close this dropdown meanus is the two cameras that we have on the scene and the graphic user interface which are the instructions on screen and if you go through them we can see what each one is rendering. And by the way you can collapse all of these by holding the Alt key and click on these arrow. And if you click again everything is closed now. Very useful and this trick works pretty much on anything with an arrow similar to this one. Okay so now if you come here to the VFX camera we can have a deeper look into the projectile performance and the effects we create we'll be most likely inside forward transparent. Of course you can scroll up and down with arrow keys if you want. So as you can see this is very dark but fortunately and this is an awesome feature we can control the levels which basically allows us to control the amount of white and dark. It's like a brightness controller. And you can also only shoot to see the Red, Green, Blue or Alpha channels. Quite useful too. And as you can see we have this draw dynamic fields here and some of them even have the particle system name. And if you go through them you will see that it's basically each particle system that we are using. It's basically every element that compose the projectile. And right here we can see each shader property being used and their respective values as well. Now if we have a better look we can see that it says why this draw call can't be batches with the previous one. And it says objects of different materials. That's exactly like I said. Batching draw calls, can only happen when particle systems share the same material. So in order to do that we need to gather all the textures into one texture so we can use one material. So we can come here to Photoshop and let's for example create a file that I'm going to call VFX underscore texture01_8x8. But it could be 6 by 6, or 4 by 4. 8 by 8 it's basically the amount of textures it will have. It can have 64 textures basically. In the file size it's going to be 2048 by 2048 and it's very important to use this ratio. It's called the power of 2 ratio, meaning that platforms like mobile and pretty much any platform will perform better with textures that are 512 by 512, 1024 by 1024, 2048 by 2048 and so on. OK so for now I'm going to paint the background to black safe this photoshop file and after that we need to divide this into a grid. For those who are using Photoshop in the newer version all you have to do is come up here in view and choose new guide layout. This little panel appears and mine is already set to 8 columns and 8 rolls which is what you want. And make sure you set the width and gutter to be 0 and turn on rows as well so you can have a grid with guides similar to this. Those who are using the older Photoshop versions it's a little bit harder but, what we can do is divide our text the resolution which my case is 2048 by the amount of textures it will have in the row or in the column which is eight so this will give you 256. Now all you got to do is come up here to the view new guide and we can choose vertical and insert position which is in pixels 256. And here we go we have our first guide. Now we can again do the same which is going to be 512. It's a little bit tedious but that's the only way without scripts. Now it's going to be 768. Then 1024. and then 1280 and then 1536 For example we could insert percentage as well. And the last guide is going to be 87.5% and then you need to insert the percentage symbol like this alright So now we need to the same horizontally. And this time we can use percentage just to show you that maybe it's easier for you. First we need to choose horizontal and then we can insert 50% and press OK and then we can insert the 75% and press OK and then a 25% And now at 12,5% And then at 37,5% percent. Don't forget to insert the % symbol. Yeah it's kind of boring this way but once it's done you can copy these guides to other texture sheets. By the way. If they are 8 by 8 you know. And now it's going to be 62,5% and the last one it's going to be 87,5% and that's it. We have finally our grid done. So yeah it's much easier to do in the new photoshop but yeah that's that's what we got. So now what we need to do is to come to our project folder where we have the assets folder come here and go to Gabriel Aguiar Productions And down here in textures, now we wanna drag all of this textures we want to use in our texture sheet and then we will need to fit them just like this this will automatically snap and make sure you as the shift button to shrink down this proportionally you know. You also need to make sure that you shrink it down to 256 pixels. So it fits perfectly but it should be quite easy since it automatically snaps. And now we drag the circle like this. Then the crack and also fit it at 256 don't forget the flames as well. The impact 01 impact 02 and the impact 03 And we can keep on doing this with leaf with this spiral as well and we don't need the trail by the way we can't use sprite sheets in trail render and by the way so I'm gonna leave that one out. Now the great thing about this is that this files are not the rasterized. Which means that if we wanted to increase the size of our spreadsheet to maybe 4096 pixels, which is double size we have this textures would only be at 50% of their original size which means they still have a lot of quality. You can still even double the size of the spreadsheet and it would maintain the quality as you can see now if I go back to my text resolution of 2048 you can see it shows that we are 25 percent of the original size of these textures and all the others and that's really great. You can resize this quickly for PC with a bigger resolution are for mobile with a lower resolution now for the electric spritesheets that we already have done. We want to select all the frames and only the frames and then we can drag and drop them like this. And for example I'm going to start to align them down here and then it will be much easier in unity to use this in electric animation. And you may be wondering why are we leaving that empty line up here. Well once you have clients and once you are working in bigger projects you will notice that you will always need to create new textures and that empty space for new textures that will come. You know you can basically insert them here. You still have 7 slots, 7 new textures. Now I'm also going to drag the electric circle and once you fill up all of those 7 textures you can keep on inserting new textures down here below the electric sprite. Now I'm going to create groups of the electric circle. I'm going to hold Shift to select them all, and then press control G and I'm also going to do the same for the electric 01 like this and this will allow us to for example move this up here. But don't forget that you need to use shift so you can have a precise movement as you can see I'm moving up 512 pixels which is perfectly aligned and you know all right. So now just don't forget to save this photoshop file and then we can hide the black background and export as a PNG like we always have done before.
59. 8.3 - Performance: Projectile Part 2: Alright so let's go ahead and import the texture sheet we just created to the texture folder. We can also duplicate the beam 01 underscore add material and copy and paste the name from the text. But add in front the shader type which is additive. Alright let's drag the text to and now we can choose one of the effects we have done, like, let's start with a simple one. The hit version one. So as you can see in the stats panel we have around four batches call being made to render this effect and we are going to end up with only two batches call since we only use two different shaders in this effects which is the additive and scroll shader. And as you can see here in the frame debugger the particles and the beam are being made in one draw call. Since both use the material. Anyway, let's assign the texture sheet material we created to the beam renderer. Now we only need to turn on texture sheet animation and insert the size of our texture grid which is 8 x 8 So in order to only choose one texture from the grid we can switch the frame over time to constant and the beam texture is the first one in our texture sheet which means it's zero because in unity it starts with zero. Then it goes to one two three four and so on. Which means this is correct. Zero is the beam and it's working well. Pretty cool right? Okay. So let's do the same for the particles, we can already turn on texture sheet animation set the x and y to 8 and the frame over time to 0 since it's the same texture. Now we all need to assign the material and that's it but yeah no big difference yet since they were only one batch call already. Now for the impact and the circle we are going to see something different, since they were both different materials. So let's start by duplicating the Impact03_AddScroll material for example give the name of the texture but add the add scroll so we can distinguish them from each other. Okay so now we can assign the text and we may need to do some adjustments to these properties but we'll see in the moment in the impact we can turn on text to shift animation and we can say it's 8 x 8 8 x 8 And in my case the frame over time is going to be 6 which is already set since I had to test this. So as you can see it's the 6th texture. If we start counting at zero however once we start testing this out, we immediately notice that this is all weird very weird. Well that's because the values we had before in the shader are too strong and too big for such a small texture. Now it's only a 256 pixel texture, which means we need to for example increase the scale to 75 5x bigger more or less. Decrease the distortion 10 times to -0.01 and lower the speed 5 or 6 times to around 0.05 This way we have pretty much the same effect we had before. OK. Looking good For the circle we can also turn on texture sheet animation. This time it's the first element of the spriresheet which means is the second texture then we can assign the material and that's it looking nice. Now the impact in the circle are being drawn at the same time making only one match call to the graphic card which is pretty cool. However, if we tried to play the whole effect together instead of only getting 2 batch calls sometimes we get the 3rd batch call and this only happens because all of this particle systems are in the same layer and Unity doesn't know which one to draw first. And as you can see the batch from the impact in the circle breaks the batch of the beam and the particles separating them into two different batches to solve this We can select the beam and the particles and we can move the order in the layer to 2, which means all the particle systems that are going to use the additive shader will be in Layer 2 and the impact and circle which are the scroll shader can stay in the layer 0 and that's it. Problem solved. Now Unity knows which ones to draw first. And this way they don't break each other batches call. All right so moving on to the next effect which is the muzzle one let's turn on texture sheet animation. It's 8 by 8. And the impact03 it's the 6th element. Just like the impact in the hit. We can drag the material and that's it. However this one the muzzle particle system will not match with the impact and the circle even though they have the same material and the same layer. You know why? Well meshes cannot batch with particles or billboards. Yep that's right. Using meshes also adds a bit to the heaviness of an effect not only because the triangles count increase but also because it won't match with the other particle systems which sometimes it's quite annoying. And I forgot, but this needs to be in another layer like -1. Moving on now we can select the beam and the particle since they use the same texture. And we can set up the texture sheet animation and let's not forget to assign the add material and also set the order in layer to 2 and look at this only one batch call. Nice. The next one of this group is the blue projectile the first one we made. So I'm gonna start by assigning the add scroll texture sheet material and turn on this module. And turn on texture sheet animation once again which is 8 by 8 And it's also going to be the 6th element. Alright. Looking good. For the ProjectileIn, we're going to need an alpha blended version of our texture sheet. And for that we can simply duplicate the impact 03 alpha blended material rename it, and then assign our texture. Let's turn on texture sheet animation of the ProjectileIn 8 by 8. And it's the 6th element once again and we can assign the alpha blended material and this time we are going to set the order in layer to -2 which means that all the particle systems that use the alpha blended version of our texture sheet, they are going to be in layer -2 All right here we go. This one is not going to batch with any other particle system but at least it's using the same texture. Which saves a lot of space. actually. So for particles it's same as we have done before. Don't forget just to set the layer The trail, well this one cannot be much improved. All we can do is set the order in layer to be -3. Which means behind everything. And it doesn't interfere with any batch call. Alright. So that's it. Let's apply the change to the prefab and let's see the results. If we compare with how it was before we had 37 38 when we shoot the projectile and on impact we even add 40 and then 38 Well now when it hits the wall we are 35 batches call which means we have basically saved 3 batches call which is awesome improvement and believe it or not it's a good improvement. If we really needed to improve this, we would remove the mesh we used in muzzle, and replace it with a simple billboard texture and we could even go further and remove the ProjectileIn which uses the alpha blended shader and we would save already 2 batches call but yeah. That would already have an impact on the aesthetic of the effect and the client may not approve of that and the enormous advantage here is that we are only using one texture for this which means we are saving a tremendous amount of space in the final build of the game. And every time we shoot a projectile only one texture is being used which is awesome. Now the last one we are going to do is the electric projectile and there are a few new things here that we haven't seen yet.
60. 8.4 - Performance: Projectile Part 3: OK so let me just remove this ones and drag and drop the Hit the Muzzle and the projectile electric. And I'm actually going to turn them off. We don't need to see the effects in action to do this. And this can be quickly done by selecting the ones we know that have the same textures, like the beams and particles so yeah. 8 x 8 in the texture sheet and the beam is at zero position Now down here let's assign the additive material and set the order in layer to 2 and that's it. Next one can be our ProjectileOut. Well we know it's the sixth position because it uses the impact03 and it's the additive scroll shader and the layer position is 0. For the ProjectileIn it's the same but it's the alpha blended shader and the order inlayer is -2 Trail is also going to be -3 in the order in layer. And now for the Electric Local and the Electric World we can set them up at the same time. And this ones are going to be a bit different since it's a flipbook instead of only one texture And the way we set this up is with the curve So, let's assign the additive material and set the order in layer to 2. Okay. Now we need to count. So we know this spiral texture is in the 8th position. If we start counting at 0. Which means the first texture of the electric01 is the 16th position and it goes all the way to the 24th position which means that 24 it's going to be the maximum of the curve. And if we start pushing thi up as you can see we get this bezier curve which we don't want. So let's press down here set again the maximum to 24 and now we can set it at 16. And we don't have that curve. It's linear. OK. Looking good. So now with the electric circle let's set it to be in layer 2. Which is going to be a mistake by the way. And we will see why in a moment maybe you already know why. But let's go forward. And let's assign the additive material and set the texture sheet animation be 8 x 8 And now for the curve. Well we know the electric 01 stopped at 24 which means the electric circle starts at 25 and goes all the way to 30. So 30 is the maximum of this curve. But let's click down here first so we can have an linear curve and set the maximum to 30 in the beginning at 25. And that's it. We should be good to go. Oh we are just missing the muzzle which is the impact 03 that is at the position 6. And then we only need to assign the additive scroll material and that's it. Alright. Let's apply the changes to the prefab. Let's see how this is behaving so the first impression that I get is that it may have one batch called that shouldn't be happening. And I'm going to have a deeper look with the frame debugger. OK. So as I suspected something is breaking the batch call of the beam the particles and electric local and world. As you can see we have the electric 01, the electric circles and then the beam and the particles. So yes the electric circles are breaking the batch call. Do you know why this is happening? Can you guess, why this is happening? Well they are breaking the batch call because they are using a mesh and they are in the same layer as the additive shader and since meshes cannot batch with other particle system they simply break the batch call because unity doesn't know which one to draw first. So now if we select is it this hit, it should be only one call. But it's making 3 calls since electric circle it's breaking the batch. So down here in the electric circles let's set the order in layer to be 1 and here we go. We only have 2 batches. That was our only problem. Now let's apply the changes to prefab and let's also change the order in layer of the electric circles of the projectile and apply the changes to OK now once we test this out. We only have five batches call as it should be. And if you go look under the microscope, the frame debugger, we have one batch call from the trail. The 2nd batch is for the Projectile In the 3rd is for the Projectile Out The 4th is for the electric circles and the 5th the last one is for the beam and the particles and electricity and once this hits the wall we still have the trail. Then we have electric circles and then we have all the particle systems that use the additive shader and that are in the second layer which are the beam, the particles, the electricity and that is truly awesome. They are being rendered at the same time. And that's it guys and gals, I really hope you learn this performance improvements techniques. They are really important and sometimes they make a huge difference. And as a good exercise now, you can go ahead and optimize the area of effect attacks which should get some significant improvements since they use a lot of textures.
61. 9.1 - Conclusion: So now what? Well let me tell you one thing. You have a lot of paths you could take from here. For example you can try to create different projectiles you know get creative and make a different mesh. Or a different texture, or even try a different shader. You can improve the trail of the projectiles and make new impacts and muzzles as well. You can also create a new and different area of effect with different theme, different shapes and timings maybe try to create an heal. Which is much slower the dissipation or maybe try to create a Buff effect you know there. There's a lot of things you can do. You can try to recreate the effects that you have seen around. If you think you need to get better at digital art try to create better taxes and flip book animations if you think that's what you need to get better then go ahead and try that. Because now you know what you need to improve. So you can focus on that and try to get better at that area. Either it is at creating meshes or creating textures or creating shaders or creating flipbook animations. You have a lot of option that you can take and focus on that which is great what matters is that you keep on practicing in getting better. And if you would love to have a try in the game industry, you can contact me you can do it in my email, via Twitter, Facebook, YouTube, you know wherever you feel more comfortable with. I may have something for you. Let me see your portfolio first. You can send it to me. And we'll see what happens next. Who knows. I'm always looking for a talented visual effects artist to help me out with the many projects and games that I get to work in. It's not guaranteed but you can send me a message and you may get an answer. No rush. If you want to challenge yourself, you can always try to recreate some of my tutorials on my YouTube channel you know. You can even try to make them better make improvements, performance improvements, there's a lot of options there. You can also participate in the monthly challenge, there is in Real Time VFX forum. It's always different and very challenging and it will teach you how to overcome obstacles and it really gets you out of your comfort zone too you know it's really great. And that's it guys. I hope you learn the basics of visual effects and even more than that of course. But most importantly I hope that you enjoy this and that you are full of curiosity to learn even more. So that's it, guys and gals. This is the end of the course and I really truly hope you like this course. I put it a lot of effort into making this happen and I would be really glad to know your feedback which I hope it's very positive. So thanks for watching guys and gals and keep on learning.