Realistic CG Dust - Free Houdini Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome to this tutorial on how to make some procedural floating atmospheric particles dust motes i think they're called as you can see here we've got some interesting variation in shapes also their movements are varied and also we've added a bit of rotation as well let's jump right into it so starting off with my empty scene it's gonna drop down a ga container call it dust and we're gonna dive inside so first thing we're gonna do is drop down the box it's going to be our container we're then going to use a node called points from volume we're just giving us some points inside the box we're just going to increase the jitter scale so it's nice and random and visualize points for now we're gonna keep the point separation to the default and then we can decrease that later to get some more points next we are going to add some geometry to scatter to these points so the first dust shape i'm going to create and you can use your own but for now i'm going to show you what i used first one i used was a sphere which i then set to polygon just increase its frequency and i also used a mountain very popular night it's useful for a lot of things just quickly give us some variation and maybe a sphere i'll decrease the radius in one axis just so occasionally if it's rotating get some slightly narrower shapes just a bit more interest really next i'm going to drop down a box and same thing adding a mountain to it and then just making sure that we have enough access divisions so that this mountain can really stop pushing and pulling the shapes decrease the height of the mountain a little bit let me decrease the element size something like that maybe i'll make it a bit thinner one side whatever you like really um i'm gonna use one more and for that i'm gonna drop down a line this is gonna be more like kind of hairs tiny hairs floating around first thing we're going to do is just crease points and then we're going to use a point jitter lots of different ways you can add noise to this line i'm just going to use a pointer so quickly and just decrease the scale next i'm going to drop down a polywire just going to flesh out our line and we're just going to give it some more divisions and decrease the wire radius [Music] maybe even give the line a bit more length twice the length something like that we'll do for now next we are going to use a merge to bring all of these together so i'm going to select all of them and then if i hold alt you can merge them all together by letting go clicking and dragging and then letting go next we're going to drop down a connectivity node and by default the name of the attribute is actually want it to be name see here they've now got name and then that means we can use the attribute from pieces node here by giving the points into the first input see it's looking for point cloud and then this is the geometry library which is essentially what we've created here so that's looking for that name attribute and it's a signing based on the amount of connections that we have zero one and two it's assigning a random integer to that attribute name which you can see here which means that if we use a copy to points so the points go into the second input and the geometry to copy goes into the first make sure we have an instance enabled and then the target points we leave but the piece attribute we can change from variant to name which is that same attribute that we've set here so now if we view our copy to points it's randomly assigned geometry to each point at the moment though there is no p scale attribute coming in which means that they're all defaulting to their original sizes which is too large at the moment so if we drop down attribute randomize we can name this p scale then instead of cd which it's currently assigning randomly you want to assign p scale and this is just a float so it's one dimensional and then at the moment we probably only want to vary between 0.5 and 1 and then we can use this global scale just to bring it down something really small as you can see there at the moment i'd say my tiny pieces of hair are probably too small in comparison to our slightly larger shapes so i'm just going to drop down and transform here and then i'm going to use the uniform scale to just bring up the size of this line the next thing we're going to do is add some random orientation so to do that we're going to use an attribute randomize again and this time we're going to set it to n which as you can see has randomly offset the starting position if we hit -1 in these and we'll just add a wider range that it's randomizing between so that's our random starting positions the next thing to do would be to add some movement so to do that we're going to be using an action which we can call animate i'm just going to color it using c i can pop open this little color grid and i'm just going to color it something nice and bright so i can find it easily and if we dive inside we're just going to use some noise to add some movement so i'm just going to go with the top one flow noise and i'm going to pipe in p into position then i'm going to use an add which is going to add this noise back into the original position so at the moment the default is 1d noise we want 3d noise pipe that into the second input of the add and then into the p so if i move this offset you can see what it's doing so we're just going to play with a few of these settings first we'll probably be to increase frequency and then to make this anime over time we're going to be using this time attribute which we can pipe into the amplitude if we hit this for real time toggle hit play you can see it's moving them at the moment it's probably too far so to give us some control we're going to be using multiply constant and i'm just going to set this to something a lot smaller hit play you can see it's moving a lot slower now so the next thing i want to do is add a bit of variation in their speeds just to make it a bit more interesting so i'm going to use a random node which is going to take in the point number give us a random output of zero to one which we can then fit and control in here so this is essentially the min speed malt speed and this is the max so if i use another multiply here at the moment if i press play you can see that it's varying between zero some of them are not moving at all or barely others are moving at one so i just want to bring up that min value to something like two just so there's always a bit of movement next we're just going to add a tiny bit of spin so that they're not just statically flowing throughout the scene so to do that we're going to be using a wrangle which you can drop here and this one we can call orient so what we're going to do is we're going to initialize a float attribute called angle and then we are going to set angle to at frame which is the current frame number that we're on because obviously we want this to change throughout time and we'll leave it at that for now and then we're going to set a intrinsic attribute called orient which this copy to points knows to look for so at orient equals we're going to use a function called quaternion so the first input is going to be our angle and our second is going to be that normal attribute that we set earlier then just below it we're also going to initialize another intrinsic attribute that the copy to points is looking for called up up we're just going to set to our normal attribute as well as you can see that's immediately done something hit play it's already doing some random spinning however we want to vary up the speeds and also control the max amount of speed that we're going to get so the first thing we're going to do is initialize a custom channel float that we're going to call malt and then if we hit this gives us this parameter so we're going to set something small so now they're spinning a lot slower we also want to add some variation to the speeds so to do that we're going to multiply our angle by a fit no one function which is going to take in the random output of our point number very similar to almost exactly the same way that we varied the speeds inside the vox but this is how we do effects and that's using the point number as a seed and then we're going to set the min to be a custom channel float we're going to call min and then the max to be custom channel float we're going to call max just give it two brackets at the end and hit this max is gonna be one min is going to be pokemon and if we hit play you can see little spinning at random speeds as you've probably noticed our strings our tiny hairs are currently spinning around a funny pivot point we want it to be spinning using its center mass of gravity so to do that we visualize our line you'll notice it's growing out from the center you want to centralize it so we just take our length and paste relative references in our y of our origin we can then minus that and times it by 0.5 which makes this procedural now so it's always centered which is handy so now for you to visualize our final output you'll see that the strings are now spinning around their center of gravity all right we're getting very close now our first frame they're currently all pointing upwards so to fix that we're just gonna add an offset to our angle so right at the end of all of our effects stuff we're just going to add a number something large like 200 will do and that's just going to offset it so that we start off slightly more interesting beginning orientation all right now you have all the controls you need so you keep tweaking this and you can keep adding some more shapes if you want to scatter randomly this should update procedurally i'm just going to quickly set this up for rendering to show you how that would look so i'm just going to call this node out dust just dropping a null and we're going to want some correct motion blur so we're going to need to calculate our velocity so we can use a trail node for that which we can set to compute velocity that's now giving us some velocity some v which is essential for rendering then if we go out we can just drop down another geo container call this ren dust i like to color them pink now we're going to use an object merge to look for this dust container and then inside that null that we've named out dust that means that no matter what we're always going to be rendering the part of the network that we want to render next we're probably going to want a camera so i'm just going to drop down the new camera and hit the padlock and just position that somewhere i like something like that and you probably noticed that my dust is probably way too big still so in my p scale i'm just going to bring that down we're then going to want to assign a material to our dust so if we go over to our material context we'll just drop down the principled shader all this dust probably set base color something a bit brighter and the roughness we probably want something a bit high activity something about 0.5 but you can play around with this and i ran dust and then i'm going to set that to our dust material then in our out context and then drop down the mantra node and just to give you a heads up on a few settings i found useful first being obviously using physically based rendering and then you just need to make sure that your pixel samples are quite high otherwise you might get flickering something like that then my limits always set something small don't really need much color limit can also be brought down then the next two things would be allow motion blur and then either you can render with the depth of field enabled or in your images tab you can add the extra image plane shading depth which is probably the much more common practice in a production workflow however if you don't have any post processing software that can use a depth pass then i would recommend using enable depth of field which you can control using your camera if we visualize our handles we can then right click and use our focus handle which at the moment is set a bit too far away so you want to move this box to the center of where you want to focus and then this just changes how much blurring you get away from that center something like that we can then turn on depth of field here by right clicking on one of these light bulbs so at the moment you can see it's really shallow this is not 100 accurate so it's much better to a formal render before we do that though we obviously need the light so i'm just going to drop down an environment light and then by default you get some environment maps for free with houdini which you can find a dollar h fs which you can probably see is one of your bookmarks and i'm just going to use this hdri hdri haven lenon map you can also go to hdri haven website download other free maps now that i have that i can then go over to render and after testing this out you may not have any issues with flickering if you use high enough samples but if you're still getting persistent flickering there's a few tips i can show you one of them being if we go to our mantra nodes and hit edit render parameters then in our create parameters we can look for a parameter called jitter in our sampling which if we hit this arrow we can then add to our mantra node hit apply and accept and we can see this jitter is currently set to one turn that to zero that may help your issues of flickering i hope you found this tutorial useful thank you for watching
Info
Channel: Carvalho VFX
Views: 31,047
Rating: undefined out of 5
Keywords: cg, vfx, render, tutorial, learn, materials, mantra, lighting, atmospheric, fog, particles, copy, points, procedural, motes, dust, how to, easy, short, cool, fx, daniel, de, carvalho, artist, digital
Id: Zu0t2C3TIag
Channel Id: undefined
Length: 18min 47sec (1127 seconds)
Published: Sun Feb 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.