Patreon Particle Shader Overview

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is an overview and basic tutorial for the particle shader which spawns particles from the surface of any mesh if you would like to get this right now it's available to all $10 plus patrons I'll leave a link in the description and let's cover this let's cover these settings so by default I'll just reset this by default you're gonna get something like this where you can sort of it you can see the mesh underneath it's got that shadow from the light coming up there and then there's these white particles to spawn all over it so what's happening here is the mesh basically spawns particles from every triangle and every truck there's like an equation that checks the square surface area of a triangle on your mesh and then spawns particles based on how large that area is and the spawn points are randomly distributed over the triangle so an area like the face that has a lot of really small faces will have actually just like a chance for each face to spawn a particle so that it doesn't get super dense and then places with longer longer faces rich polygons will spawn more triangles because they have are the spawn more particles because they have a larger surface area and that's basically how the spawning works so let's cover the settings the particle shader can be found underneath poyomi patreon particle two and then either transparent or cutout right now the cutout version of the particles also makes the mesh cut out and the transparent version also has like a transparent mesh that is the way it works right now and it may change in the future so you can select them individually but just be aware that that is how it works right now so we're using the transparent version and the first setting is basic lighting so if I enable basic lighting and I adjust the lighting color or the intensity you'll see that the lighting changes now you're not gonna get shadows or anything like that this is really basic it's just it's literally just taking the lighting color and then the environmental lighting and then just applying those to the mesh so you're not getting directional lighting or anything like that really simple really fast the color and alpha controls the color and the Alpha if you're in the other version of the shader so poyo me patreon particle to cut out be alpha still works I believe but yeah you're gonna get those cut it only has like a free few different levels of transparency so you're not gonna get the same kind of results but you still change the color and all that the texture is the texture of the particles so in this case it's just a bunch of hearts hopefully you can see this properly nothing too crazy there I believe you can title them yeah you can tile them and looks like this one's clamped so that textures clamp so it's gonna do weird stuff in your toilet but you can tile them if you need to do that so like I mentioned earlier the spawning is controlled by the surface area of the triangles so if I adjust the particles per centimeter squared to be lower you'll actually get less particles spawning and then if I increase that you'll get more and more up to I think the limit is 10 particles per centimeter squared or per triangle so if you have really big triangles you're not gonna be able to get a super dense amount of particles just because I know people would put millions of particles on their avatars and then all of a sudden you got a cool crasher and that's the somehow what we're doing so it is limited but if you if you have a model that has like really specific needs and like it's a giant model and it has really big like surface area are really big triangles you can contact me and we can talk about upping that women but by default you should have no issue with this alpha cutoff does the exact same thing it does normally in the shader when you increase it hey let's see if I can get really close to one of these heights as you increase it it'll cut off more and more of the edge of the heart until you go to above one and then it'll cut out the entire image so I don't know how well you can see this on YouTube but there's a thin black line and as I increase the Alpha cutoff it actually sort of it erases that line around the hearts so they all blend together that's all it does the same as a toon shader the minimum render distance is actually the minimum distance you can see the hearts so one thing I noticed with this is everybody runs up in jams their face right inside your model they're like how much does it make me like and if you have a it's the same as particles if you stack a ton of particles in one spot it's gonna make you lag so I have a minimum render distance and as you get close to it you can see the particles actually vanish so you never have that situation where someone jams their face and they're like oh it's making me lag because they just won't render you can't like it's not being rendered so well you can but not in this case you can increase that decrease it it's at point two by default because for example if I was in this model and I was seeing from inside the face I would actually see all of these particles in front of my face and with the minimum render distance you actually it just doesn't under any of those particles cuz they're so they're so close to your camera so I would just leave it at point two by default it'll also stop the annoying people who Jam their head in it to try and lag the color range or the start color range is just the color range of the particles so you can I'm just gonna take away the heart because it's red and doesn't show this very well let's go to the circle actually so you can see the particles are just choosing a random color inside the gradient and you can change the gradient to whatever you want you can make your own gradients it's pretty powerful so if I just like spawn something in here and then do this you can get pretty nice variation in color and it looks pretty good it's easy and it looks good and that's what counts the movement mode is basically how the it's how the particles move when they're spawned right now there's only two if you want more movement modes in the future or I really have any suggestions just leave them in the request section in the discord and I will do them because if you have an issue and you don't say anything it's never gonna get fixed and sadly a lot of people never really say anything so feel free to leave requests or post problems even if they're really small it helps out in the end so I'll cover spiracle movement first and then I'll cover the linear one spherical motion causes the particles to move randomly in a like sphere shape so you control the speed and the size of that sphere but you don't you don't control exactly how it moves so you can see here there's a scale min and Max that's the minimum size of the particles and the max is the maximum size note that if you make your particles really big like this you will start to cause performance issues because they're all rendering over each other and that's quite expensive so by default I like to make them pretty small not super small but pretty small and then the speed is just the min and Max speed is how fast they're moving in which direction they're traveling in so if you set the min speed to like negative 100 and the max speed to 100 they're all just gonna be moving between negative 100 and 100 so we want to keep them visible so we're just gonna leave it at 5 and the radius is the radius of the sphere that they're moving in so if I increase the radius they're gonna be moving far or much further out and one thing you have to note here is that this is just a shader these aren't actually particles so if I look to the side the particles are gonna disappear and you can adjust your bounding box so that it doesn't do that but for the most part if you're gonna have like a huge like particle simulation with particles like spread out really far just use actual particles this is more for stuff that's like tightly bound to your avatar and I think that covers everything for spherical motion so let's move on to linear movement all right so you just switch this to linear and by default they're all they're gonna be randomly moving in a direction a and they go in a straight line but the direction of that line is controlled by your offset min and offset Max and basically what that is is set this back down set this to 1 so that the 1 0 0 so they're being offset vertically by 1 and if I make the min negative one and Lemax one they're gonna have basically a chance of going anywhere between one Y and negative one y so one would be like up here and you see a lot of the particles actually aren't reaching the end a lot of them are just sitting here that's because they randomly move in that range they don't always go the full distance and there's a setting here let's just set this back to 1:1 so you can see there's a lot of blinking stuff down here there's actually setting at the bottom called normal spawn range and that means that particles will not spawn so if you set this to zero it means that particles will not spawn unless the normal is within a hundred and eighty degrees of the direction they're traveling so if you want stuff to only like go up you can set the spawn range to zero and then they'll only spawn from the stuff going in the same direction and you can increase that so it's like really small basically if it's going the exact same direction that's gonna be one and if it's going the exact opposite direction that's going to be zero so if you imagine the top being one because they're all going up the side would be zero and the bottom would be negative one I think I said it was zero down here before it's actually negative one so up is one sideways is zero and bottom is negative one unless you and if you rotate it it should still simulate properly they'll still go up but if I wanted it to go to the side like this you can see that the normal spawn range is now sideways so this is 1 this is 0 and this is negative 1 useful if you just want to avoid stuff like this blinking the minimum speed is the same for as it was in spherical motion it's basically just the minimum of speed these circles will travel and the max speed is the max and the speed of each particle is just gonna be a random value between the min and the max so if I set them both to 0 they're not gonna move at all if I set max to 10 and min to 0 it'll go anywhere between 0 and 10 so let's leave the minimum at 1 and the max at 10 and the start alpha is how opaque it is when it starts so I can make it like zero and it'll start invisible and then become opaque as it reaches the top but I'm on cutout right now so it doesn't have all of those different levels of transparency so let's just switch over to point O me patreon particles transparent and it's still not super obvious but it's definitely a much more gradual fade up to nothing and if you increase the end max size to the same as the start should be even more obvious yeah so now they're not getting so small you can't see them so you can see that gentle fade out the minimum the start mid size and the start max size are just it's the range of starting sizes so if I wanted it to say start between 0 and 0.2 it'll start there and I wanted to end at 0 it'll shrink down to 0 that covers that now if you wanted to move in all directions you could actually just set the minimum sizes to negative one and the max 2yr than that size is the offset and now it'll just basically go in any direction because you're telling it to just go between anything so it'll do this and an issue you may have but this is that if I go inside this can see there's actually a ton of particles simulating inside it and that's because something that spawns here may just go backwards and if you want to not waste time rendering things that are going inside the mesh you can actually use the normal spawn range again just set that to zero and now stuff will render only inside or only outside because it matches the direction it's going to travel nothing will be going backwards so that's just a little like nice thing you can do I'm gonna slow these down before I show you flipbook because it will be a heck of a lot easier to see foot book alright alright let's cover flip book flip book works very similarly to how it does in the main toon shader I think there's a few or there's less settings in this but it works pretty much the same so you enable flip book and then it looks messed up because you have no flip book selected now you need a texture array you can do that by either right-clicking a gif and then going to pull me texture array and then from gif or you can select a bunch of images that are the same size and then go 2.0 me texture way array texture array from images and that'll turn all of these images into an array so we have 19 selected in this case so let's go back here grab our texture array and put that in the slot now you'll see that it's all just a check mark and we selected all of these but the first one is a check mark and the reason it's not changing is because we said the total frame is 1 and the total frames is actually 19 so let's go back here set that to 19 the frame rate is 30 so it's going through 30 per second we can slow that right down to like 5 you can see it traveling between them so if you had like a smoke particle or something like that you could use that it doesn't support sprite sheets at the moment just because this code was taken from the tomb shader but if enough people want it it's something I could definitely do feel free to leave a request in the discord so you can also have a random starting frame so that they're all in different parts and then you can actually set the FPS to zero and then they're all just gonna stay on whatever they started pretty cool so you could for example select like a ton of emoji and then have like all of the emoji floating around you if that's your thing and the scale offset and all that do the same thing they normally do actually no they don't they don't do anything I'm gonna remove that I believe you can change this yeah so you can change the scale or the tiling and offset up here the scaling offset here was for something else in the tune jitter so I'll be removing that right after I make this video so just ignore that for now manual control should work the same way it does yes you can manually control which particles being shown which is really useful if you had like specific effects you were trying to show so say you had a character with emotes and you wanted like hearts to pop up when you did a certain like gesture you could say have hearts on frame to set it to frame 2 and then the hearts would show up pretty useful anything below zero will just cause it to play normally and that's all cool but it definitely does not look like this so let me show you how to make it so that it looks like this so the first thing we want to do to get that effect is to hide all of the stuff in front because as you can see here you don't see like little black circles floating all up in front of this they're only on the sides and the easiest way to do that is with stencils so let's disable flipbook which doesn't have that setting I said the offset and the scale setting anymore I already removed it good job so let's enable or disable flipbooks and we're going back to these circles let's increase the density of these circles go to linear linear motion and then we want the end size to zero that's that lets increase the distance they're moving a little bit point one point one and then we're gonna increase the density alright I guess that's as high as it's gonna go oh yeah cuz it has some that are going inward as well that makes sense so I'll probably put a setting in here later to make it so to make sure that they're all going outward and you don't have any particles going inward because that can be pretty annoying I'm gonna set that to zero of the normal spawn range and now I'm going to go into the stencil settings pick a random number like 50 to set that for both of these because they're gonna need the same value and now I want to render only on the outside and to do that I will set the stencil compare function for the sphere to always and it's gonna always replace where it's drawn with the value of 52 and now I want all of these particles to look for that value and if where they are being rendered is 52 then just don't render so we want to not equal 52 so basically what you're seeing here is wherever the spear is those pixels are set to 52 cents evaluate the stencil value for the pixel is set to 52 and then when these particles go to render they go all right so if the value isn't 52 render me and because the value is 52 where the sphere is they don't render on the sphere and you get that sort of outline look and you can increase the distance all the particles are moving if you want so that the outline is more obvious you can increase their start and stop or you can increase the start size to like point zero four and when you get that look and just set the starting color to none and the color and alpha to black or red or whatever you want now you can get that sort of aura looking thing looks kind of like a Sun and I think that covers everything in the particle shader so if you have any questions or you need help with it feel free to join the discord there's a link in the description and if you want to check this out or buy it there is also a link in the description to the patreon this is part of the $10 tier and that gives you whoops the $10 tier actually gives you 10 shaders name I believe one two three four five six seven eight nine ten yep ten so it's ten dollars for ten shaders it's a pretty good deal feel free to sign up check it out thanks for watching
Info
Channel: poiyomi
Views: 5,114
Rating: undefined out of 5
Keywords:
Id: st0VfqTPNto
Channel Id: undefined
Length: 24min 2sec (1442 seconds)
Published: Wed Aug 28 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.