Unity VFX Graph - Magic Orb Effect Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the effects graph has been around for a while and many of you have been requesting that I make a few tutorials we did so I decided to recreate the first visual effects story I made this one but this time with unity the effects graph and I end up with this but then I started playing around make a few more variations and I end up creating some pretty cool orbs but this is the one that I'm going to show you how you can do the others are exclusively available my patreon page the links in description in case you are interested all right so let's say we can create this bad boy I'm using Universal render pipeline in unity 2019 dot 3.7 and the only thing we need to do before we proceed is to go up here to the package manager in window and we need to scroll down until we get to visual FX graph if you don't see it go to advance it and turn on show preview packages once that is installed make sure to also install shader graph and the first thing we can do is go ahead and create with right-click a visible effort graph and we can drag it to the scene and then press on edit so we can open up the visual FX graph window I'm gonna duck it here and I'm gonna make some room then turn off target game object we don't need that and as you can see we also have the blackboard where we can add variables but what we want to do is first delete this all of this we don't need that we wanted press spacebar and search for trails we are going to start with the trails this one the simple ads and trails we get these cool standard trails so as you can see up here we can control the rate but we have a capacity that is basically capping our rate so let's increase the capacity to around 1,000 on the right we also have this trips capacity that is set to 32 and we could change that to 1,000 as well or even more let's just add a float let's control this rate with a property that we can use in the inspector we are going to call it trails pound rate and it's going to be exposed so we can control it in inspector with a default value of 30 and we can connect it here to the rapes don't here in initialize particle basically when the particle is ponent we don't want to use set velocity so we can remove it and we can also remove the set color from a gradient we want to use a single color so let's press spacebar to search for set color all right and we can also control this color in the inspector so let's add another property a color one rename it turn on expose it and drag the property down here and then we can select a color I'm going to choose the blue and increase a little bit the intensity all right something like these now they are almost out spawning overlap it to each other so let's fix that and let's search for a sphere so they spawn in a sphere shape and as you can see if we open this up we can control the radius of this sphere and this is a value that's going to be useful to control in the inspector so I'm going to add a float name it size for example it's going to be exposed and the default value is going to be one with this size now we can multiply it and say for example that it's going to be multiplied by one so any value that we input in the size parameter it's going to be multiplied by that one and it's going to be super useful in a moment you will see now what we can also do is have control over the trails lifetime so I'm going to add a float we're default value of 1 in exposed as well one is going to be multiplied it 2 times 1 for the minimum and another for the maximum the minimum is going to be 1 and the maximum tree just like this which ends up being super useful in case we want to control the lifetime of the trails directly in the inspector now the cool trick comes when we go to the update particles basically we have a turbulence here that keeps on moving the particles around with this motion and what we want to do is actually conform them to a sphere to a sphere shape basically they try to fit inside that sphere and if we increase the radius we create a pretty cool effect as you can see so we are going to once again use the size multiply it by 1.5 in this case and connected to the radius and as you can see they have an attraction force that is too high so let's decrease that to around 10 and the stick force which is the force at which it is trying to stick with a sphere shape is a bit too high to reach it around five should be fat now for each particle this is spawning a strip basically a trail and we don't want to set a lifetime here we can he narrate values directly from the particles so let's see narrate the lifetime cool and let's keep the update particle we are going to go back there in a moment and let's go down here to the output particle strip quiet and as you can see we don't have control over the sides so let's add a set size and disable the set size of a lifetime we are going to use it in a moment and once again with the size parameter we can go ahead and create two multiplied nodes when for the minimum like 0.01 and the maximum 0.02 we want we can create a random number with spacebar feed them the minimum and the maximum disable constant we don't want this values to be constant and connect to the size and it around to be super small but that's because we have set size of a lifetime off we want to turn it on and happier in the inspector the composition is not going to overwrite the size value it's going to add and we now make sure that the trails go from big to small throughout their lifetime now the cool thing here is that we can go ahead and select all of these notes and with right-click we can create a group selection I'm going to name these trails now for the next one we want an empty particle system because we can in fact create empty particle systems and the first thing that the particle system needs you can start by this pound and we want to search for a burst a periodic burst something that is going to keep on emitting particles every x time we can emit the only one particle for this one this is going to be the beam by the way with an interval of one second just gonna create some space over here and the particle also needs to know its lifetime so that's when initialize particle comes in and we can say it at the beginning that we want to set the lifetime to be two seconds what a particle so needs is a texture and for that we have this quad down here that we can fit a text I'm going to select the default particle and as you can see it's really tiny so we can go ahead and control the size of this particle directly in this quad and we can once again use the size and multiply it by let's say 10 yeah that's really big because we still don't have color so let's add a set color and now let's reuse this color property appear drag it connected and as you can see it's really intense and cool things that we can divide these basically we can divide color let's say for and as you can see it becomes really dull but that's because we are using an alpha blend mode let's switch it to be in allottee now that looks much better but particles appear and disappear are of nowhere so it's controlled their alpha the transparency with an odd color of a lifetime and in this graph we don't need these keys right here we just need this first kid to be to be zero and then add another key up here which is going to be 100 and we can also add another key in the end without any alpha and these fades in and fades out particle which looks much smoother all right cool we can also group these and rename it to bheem now for the last thing we need and the coolest one we can search for simple and then choose simple particle system and the first thing we want to do here is assign a text we can also assign the default particle and switch the blend mode to additive and once again we also want to make sure that this particles found in a sphere shape so initialized particle we are going to set their position to be in sphere mode and once again we can use the size to multiply it lets say by 2 that fits well and for this set velocity I'm actually going to set minus 0.5 which I'm going to copy and paste and down here the maximum is going to be 0.5 oh and let's not forget to increase the capacity to a big value like this one and create a new float so we can have control over the spawn rate going to be exposed and with a default value of let's say five thousand particles and they are super bright because we need to control their size they are to be so let's add a set size down here disable the set size of a lifetime and I'm going to use a random number between 0.01 and 0.02 and as you can see they are really small but we can also do is disable set color of a lifetime because we want to set a simple color and then we use the color property in the update particle now we need to update the position of these particles and for that we are going to use a turbulence that will make them move in different directions just going to increase a bit de-spawn rate to 50,000 this is what's going to melt your GPU what we also need is to conform these particles to a sphere once again and we could control the radius of this sphere by using the size multiply it by let's say 2 and as you can see now the particles try to fit to the radius of that sphere and the really cool thing comes now we just need to make some room because we are going to add the purling curl noise to D with this node we can create some really cool effects for example if I connect this to the conform to sphere more specifically to the center to the X&Y you will notice that the sphere is being offset and that's because we need to first get the position of the existing particles so we can use it as a coordinate for the purling choral noise but before that we can add motion by using the time nodes so they keep on moving then we can connect the x and y to the coordinate of the paralleling current lines and that's when we start getting some really cool effects this motion of the particles is already looking pretty decent but they are really scattered away as you can see and the way we fix that is by using a remap node basically we are going to remap the old values that are between minus 3 and 3 to minus 1 and 1 and if I replace the connection now to the center X&Y of the sphere what we get is a more concise motion for the particles and if we increase the range of the remap of the old values the particles get even more constrained it seems like minus six and six is a good value a good range to create a nice motion and we can also reuse this read map to reuse this purling Karl noise to affect the field position of the turbulence the difference is barely notice but if we start increasing the intensity and the drag to five we get this beautiful cluster of particles around the sphere in a sphere like shape and the size comes really Andy when for example we want this to be smaller and these automatically adapts as you can see or we want this to be bigger and if we increase the spawn rate we get something really beautiful playing with visible effects graph is really entertaining and you can do a bunch of stuff for example now if we wanted we could create a second color something purple and we could feed this color to the trails and here we go we have something super attractive with just two colors we can also switch the second call to be yellow I think it really blends in nicely I mean the possibilities are really immense with this and I really hope that I've showed you a glimpse of how powerful this tool is and that you have enjoyed also the stereo as usual all of these herbs are available my patreon page and I'm gonna say thank you to all my patrons your sport really helps keep these videos coming and a special thank you goes to the super mega patrons which are Andriana Bottega alejandro fart ero Gamescom gobbling black he Maria's PC Josh Mac karmic true Amendola Kenley Oscar Simsek solo philosophy Morello Steven Melton TK and Artem Jim thank you all for your amazing support it is very much appreciated and I hope you all have enjoyed this video thanks for watching and see you in the next one you
Info
Channel: Gabriel Aguiar Prod.
Views: 97,679
Rating: undefined out of 5
Keywords: Unity tutorial, unity effects, unity special effects, game effect tutorial, unity magic effects, particle system, unity particle system, orb effect, unity particle effects, unity particle tutorial, unity game effect, Game Effects Tutorial, unity vfx, unity vfx graph, vfx graph, vfx, tutorial, magic, orb, unity gpu particles, unity gpu, unity magic orb, unity orb, unity vfx graph introduction, unity vfx graph tutorial, unity particles, graph, unity, gpu, particles, unity graph, fx
Id: 7bMOhNUA1bI
Channel Id: undefined
Length: 16min 30sec (990 seconds)
Published: Tue Apr 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.