Shader Based Sci Fi Spawn FX | PILOTO STUDIO TECHART

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right all right folks on Unity we go so here I have a little character from Pilot Studio this is one of our skeleton guys and uh of course this is just for the tutorial purposes you can use this to any 3D model you want so let me show you for example we can take the sphere and I can for example add the material to the sphere here and as I move about look at that the effect works perfectly it's completely model agos stick so let us begin so what we're going to do here is that we're going to make a new Shader and I'm going to call this simply spawn tutorial so this is perfect for spawn effects and things of the sort and uh here we have our Shader file so it always opens on the second monitor I apologize but uh here we have it so about the settings here this works for any kind of uh you know pipeline I'm using standard for this tutorial in particular so what I'm going to do here actually is that I'll just grab myself a texture object and we're going to call this alido and I'm going to plug this into the albo part here of our Shader and you're already going to realize that this is enough to create an extremely simple but effective PBR Shader so it's just going to be if I apply this to my little skeleton guy you can see here that now he has just a a lit material and I can go over here and you can see that we have this texture field that we created so in my case piloto Studio uses for most of our TR models currently this gradient map here so I can apply it you can see that we have a standard lit material just with our textures so now it's time for us to create the actual spawn effect right that we're we're going to kind of build here so here's what we're going to do the bread and butter of this effect is actually timing manipulation what we want to do is that we want to make our model glow and also we want to manipulate the vertices of the model based on a slider so the very first thing we're going to need here is of course a slider so let's create a new property and you can call this time you can call this whatever you want I think progress is a good one so it's kind of implied that you know zero is the start and one is the end I think it's a nice way of making it and we're going to promote it into a property and here on the the Min and the max you can put here from 0er to one and now you're automatically going to have a slider this is uh pretty neat from amplifi so here's what we want to do actually we want this slider here to be staggered because if I go back to this little guy hold on you can see here that we have the glow happening and then we have the rest of it happening so you see there's a delay between this and this they happen on a staggered motion so for us to stagger this it's actually pretty simple so what we're going to do is that we are going to multiply one of them by two with just a constant so this is going to be our faster progress slider and then below it we can subtract and make sure you plug this into the a value and we can subtract this by 05 and now all of a sudden we got ourselves if I kind of go over here as I move these you can see that up to point .5 we get nothing and then after 0.5 we start to progress the bottom half of the slider so this is kind of the idea here behind these two but you might have realized that this is wider than this well if we're subtracting 0. five this is going to be in the Shades of Gray that's okay though because we can just grab ourselves another multiply and we can just multiply this by two and when we do that now we restore the values to the original intensity so now we have equivalence between those two colors here so what we're going to do however is that this is one being multiplied by two so this although it looks white this is actually truncating over the one value so this is actually true right but uh what we can do here and this is a pretty free operation is that we can just saturate and what saturate does is that it essentially locks things to the zero to one range so these values will never eclipse the one or the zero mark That's pretty much it however on the top here we want to flip these values and I'm going to get into why we're going to flip them later but for now you're just going to have to trust me and flip it so we have here the one minus nodes the one minus node which does exactly that so you can see here now that these values are flipped see what we're going to do is that we're going to register a new variable a local variable and uh this one is going to be Time 1 and then this one on the bottom is going to be time two so we can save these for later so this is going to be our time logic all right folks so now let's work on the glow part of our effect so you can look here at this sphere and I just kind of want to illustrate what we want to build so as I progress Through Time Let's ignore the verx stuff and you can see here that we have this glow that just Fades away right and this glow I can smooth it out so I can make the gradient really smooth and now you can see here that this is a smooth transition or I can make it harsher so this would be like middle of the pack kind of harshness or I can just make it into a line so this is the logic that we want to create now we want to create this smoothing dissolution so in our Shader here we're going to create just that so what we're going to do is that we're going to press G and click and this allows us to get one of these registered variables here so what we're going to do is that we're going to take the time chew so you can see here that it even highlights so this thing is the same as this thing so this is kind of me teleporting this result here over here you know that's kind of what it does what we want to do here is that we want to make a vertical gradient now this gradient doesn't actually need to be vertical it can be a texture it can be anything you want but for the Simplicity of the effect and usually these types of effects are very simple vertical gradient so what we're going to do here is that you're going to take your vertex texture coordinate so this means that it's the UV sets that are baked into the vertices this matters because um otherwise UV manipulation would apply to this so if you have another piece of logic that manipulates the UVS you could cause trouble and what we're going to do here is that uh we have a float two and the UV channel here set to one so if I multiply sorry if I multiply and let me just multiply these by one just so you can see here so you can kind of see that this is a horizontal gradient gradient and this is a vertical gradient so in my case I just want a vertical gradient so I'm going to use the V output so what we're going to do I don't know why my mouse has the little arrow anyways what we're going to do is that we're going to one minus it to flip it so now you can see here that the vertical is Now inverted the gradient is Now inverted and what we want to do is that we want to smooth step and if I plug this into smooth step and I put this into my minimum value you can kind of see that if I have my time here and manipulate it I'm also manipulating the smooth step you can see here that the gradient is getting lower and bigger based on my manipulation so this would already kind of work however remember that we had a controller for how smooth we want our smooth step to be so one way to do this is that we can create a new float let's make it into a property and we're going to call this emissive smoothness and what we can do is that we have a Min and a max value so the max x value is going to be one and we can set the default to be whatever doesn't really matter now we're going to negate which essentially truns out negative numbers and also doesn't allow it to actually be zero which is important uh more important even so so we don't get a zero in there which would break the effect then we're going to remap and we're going to do a little bit of magic here so we're going to remap our time and our new minimum value is going to be the negated emissive smoothness and everything else we're going to keep the same and then we're going to add those values together we're just going to add our emissive smoothness back after the remap great so now this is going to be our new maximum and if I manipulate this over here you can see here that it's a pretty steep smooth step but as I increase the emissive smoothness it goes back through its gradient form this is pretty standard and as I said here I mean this can be a texture as well so I can for example grab a noise here right let's grab uh this very generic noise and if I put this here you can kind of see that uh it just becomes an erosion using a noise instead of a vertical gradient so and if I change my progress here you can kind of see how that goes of course though as I said I just want a vertical gradient so I'm just going to keep this vertic textural coordinate there and this is going to be our dissolve mask so once again as prais we can just register a local variable and we're going to call this this erosion I guess I mean any name the name doesn't really matter but you know I'm just saving it as a understandable name and we can save this as erosion logic all right great so now we can actually blend this with our actual Shader here so we can preview it so what I'm going to make is that I'm making a color so it's going to be a property here and uh let's call this just colar it's fine and uh you want to make sure you're check attributes and HDR so we can make it emissive and let's make the default value just a plain white what we're going to do here is that we're going to multiply it and uh we're going to grab this fella this erosion fella and we're going to put it over here so you can press G click and then we can choose erosion on the drop down and now we can plug this into emission let's see it in action so where is my skeleton and uh let me change the material here to be tutoral material and now if I change my progress here you see the color is fading away now you might be wondering well Leo this is not fading away nicely like it was on the Shader it's not vertical well the reason for that also let me make it smoother so we can check that the smoothness is working and indeed it is but the reason for that is because this model in particular has a very weird UV it's of course going to be based on the UV right there are ways of you to make UV independent gradients which you can use with that logic I have a tutorial on that uh also in unity which I'll share on the description link so you can check that one out if you want all righty lets so now the last thing we got to do is to actually manipulate our logo vertx offset here and uh make a logic for it to kind of get our Ripley and uh and essentially spawn in from somewhere so what we're going to do here is that um we're we're just going to make a new Vector 3 and this is going to be our spawn point so I'm going to call this starting rooll position and it's going to be a property and the default values don't really matter it can be whatever and what we're going to do here is that we're going to append because we're going to be using me see here how can I is it through callar no oh here we go okay just Auto sets so we're going to a pan and our W value here is going to be set to be always one so that's the only thing we got to make sure here what we're going to do now is that we're going to convert whatever these variables are which we're going to set up later and we're going to do rolled to object and once again we are going to turn these values into Vector 3 so one way to do that is that we can just once again append and we can choose here Vector 3 and when we plug this in it automatically turns it into a vector 3 for us so this is going to be our Target Road position so let me fix here so we're going to register oops register a local variable we're going to call this target R position let's save it up what we're going to do here that we're going to take the actual vertex position of our vertices and we're going to subtract them whoops not adding them we're going to subtract them by our actual vertex red positions so we're going to get a difference between the two and now here's a little bit of the magic because we essentially want to take a altered rolled position and over time turn it into our vertex position to do this this one thing we can do is that we can just lurp and what we can do is that we can keep one of the values of the lurp at zero right because zero remember this node here this local vertex offset is as the name implies an offset so zero means zero offset so it is just a default value default value can be represented by zero and this on the B here is going to be our Al vertex position so we can actually save this we can register local bar and we can save this as roll position offset but the problem is we got to offset these True Values A and B by something at the alpha here and this is why we saved this little guy so what we're going to do is that we're going to take here a new variable and we're going to take our Target rolled position offset and we're going to once again subtract by the vertx position so let me just just to duplicate this node here we're going to do once again this little operation now we're going to normalize these and we're going to make a DOT product so we're going to multiply these vectors because we're clamping them from 0 to one to turn them into vectors and now we're just going to take our vertx position again and normalize again and we're going to normalize that we're going to put this in here so now we have a direction from this from this direction we want to add to our time so what I can do here is that to remember our time logic we have time one so we're going to get our time one here so let me do G and we're going to get our time one so now that we have our time one and our remap we want to essentially remap them and we can create here a vector two just temporarily and we want this to go from minus1 to two so we can put here on the X the minimum is going to be min-1 and the no maximum is going to be to two and now if we add those two things together oh something else we also want to saturate this so it doesn't Eclipse because currently it is going to eclipse the one value because we are adding a bunch of stuff together so it's going to be more than one and we don't want that we want to clamp them at one and now we're going to put this into our Alpha and this should be our logic and we're also adding a little bit of angles into it which is going to be fun now we can just put the G here and we can get our rolled position offset and put it into a local vertex offset now if I save I go here of progress we should see yep the vertices getting sucked out which is rather fun and of course we can change this color to be as weak or as strong as we desire so we can make it into a purple for example look at that oh sorry not wrong glider wrong glider folks we can kind of see here the effect in full play now interestingly we can kind of see here that we have this starting rolled position so we can actually manipulate this and this is going to change change the direction that our character is getting sucked into so this is how you can kind of control the origin point of the suction effect so this should be pretty much it the Shader covers a lot of principles here but overall pretty simple Shader especially for such a cool and versatile effect and uh yeah hope you guys enjoyed it
Info
Channel: Piloto Techart
Views: 36
Rating: undefined out of 5
Keywords: game development, unreal engine, ue4, unity tutorial, unity tutorial for beginners, tutorial, vfx tutorial, spawn effect, spawn effect tutorial, shader tutorial, shader tutorial unity, shader tutorial 2024, unity shader tutorial 2023, easy tutorial unity, piloto studio, Unveiling Spawn Effect Shader Techniques in Unity, spawn, spawn fx, vfx, shader based vfx, shader vfx, amplify, amplify shader editor, unity amplify tutorial, vertex displacement
Id: QVRAoOlW3Gc
Channel Id: undefined
Length: 16min 32sec (992 seconds)
Published: Thu Feb 22 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.