Houdini Tutorial - Fire Spear - Weapon FX

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to a new Houdini course we'll start by going over the extract transform node this will allow us to replace the hammer in Craig's hand with any kind of geometry then we are going to simulate the Flaming sphere Itself by using volumes and particle obvection using different subtools we'll be able to refine the shape of our sphere in the final lesson I also go over how I set up this very simple comp in Hook the completed project files and assets will be available just follow the link in the description hope you will enjoy and let's get started so let's see how this works and I will go ahead and hide all of these render objects and let's start fresh with a new geometry object and let's rename this to effects Craig let's step inside and let's bring in our Craig test geometry let's go ahead and let's press s in our viewport and I will go ahead and grab this hammer and I'll press delete so we can separate this from his body so let's uh choose here delete now selected and we can work on this hammer for now so to use the extract Transformer we will need a reference geometry and a Target geometry it's important to note that both of these geometries must have the same topology so what you can do and this will work in 99 of cases is just freeze the geometry that you have so from this blessed node let's maybe go to the beginning of the timeline I will drop down a shift a Time shift here let's Ctrl shift click this value here to remove the expression and let's leave the frame as one so now our geometry is frozen so this can become our reference geometry I'll drop down a null and let's rename this to ref Geo and our Target Geo will be our regular geometry so the one that has animation so from this blast node let's drop down a null and let's rename this to Target Geo so the extract transform will work with both of these geometries but since we might want to do some modifications here this is actually packed geometry so after this blessed node I can go ahead I will drop down an unpack node and let's reconnect our nodes to this unpacked version just so we are actually working with polygons and not with just one point so again our reference geometry will be this one Frozen at the first frame and our Target geometry is going to be the animated version so let's go ahead drop an extract transform node and place the reference geometry in our first input and our Target geometry in our second input and the result of this node will be this point over here and I will press D and let's just go ahead and make our points bigger so let's go to points here and I will just increase the point size okay so hopefully now we can see it and this point is now storing all of the transform data and in this case if we look at the extraction method we can see that it's extracting the translation and rotation so if I scroll the timeline we can see that this point starts to move and essentially it's going to look at our reference geometry so each frame this will look at our reference geometry and our Target geometry and it's going to calculate for each frame the difference between the translation and the rotation of our moving geometry based on where our reference geometry is so if I look at this point result now we can see that it's roughly where our animated version is so if we want to apply this transformation data back to our reference geometry I can go ahead and let's grab this reference geometry and let's place this as our first input inside a copy to point and and let's use the target points to be our extract transform result here so we are grabbing the static version of this hammer and if I look at the result here for the copy to points we are applying back our animation through this point over here from the extract transform node okay so now we have our animation back and we can see that this will match our initial Crag animation so I can template this to make sure that this works and we can see now that this perfectly matches the movement that we had originally so now what we can do for example is we can alter our Hammer geometry or create new geometry entirely and use our Point data over here to make this geometry match our animation so just as an example from this reference geometry I can go ahead and let's maybe let's do a remesh on this so we have more geometry so over to the side I will place a rematch node and it's important that you do this in a separate chain so that we we don't change the topology of the reference geometry so the topology of the reference geometry and the target geometry must be the same so over here to the side let's do this remesh and let's decrease the target size to maybe 0.03 so we have some resolution let's do a mountain sub to add some noise and this won't be a pretty result but just to give you an idea of some of the stuff that you can do with this technique uh let's go ahead and maybe drop down the element size a bit and adjust this slightly and I'll also go ahead and turn on animation so so we have something like this and if I plug this inside the copy to points this will now follow our original animation so we can also template our geometry our crack animation and let's press e here okay so now our Hammer has this noise applied to it which follows the animation that we had and the best thing about this is that this is very fast to compute so we can see that I'm previewing this in real time so maybe I can make this even more apparent if I increase this amplitude for the noise we end up with something like this and to give you just one more example if you were to have particles that run over this hammer and you want to stick those particles to the Hammer let's maybe go ahead and let's do from this reference geometry we will drop this inside a pop net and let's switch our display back to pixels let's step inside and let's just increase the count so in the birth tab let's maybe add another zero here and let's decrease their life to maybe a value of 2 and let's move them by using a pop wind and I will increase the amplitude here to 1 and inside a geometry Vault I will make this particle stick to our Hammer geometry so the first inputs so inside this geometry Vault I will go to inputs let's set the first input let's make this look at our first Contact geometry which is essentially ourselves and let's go inside here and we will just do a main pause from open input 1 and let's plug the be inside the position here so this will just simply make our particles stick to this Hammer geometry so let's plug the result and let's play the animation so this is what we end up with now there are better ways than this minimum position option here to make our particle stick to the geometry but for the sake of speed let's just use this version and I'll go up and maybe adjust the scroll size for our pop wind and let's take a look alright so we can go up and from here let's also color these particles based on their speed so I will do another attribute Swap and from the V I will generate a length and let's also fit range this value and we might as well do a ramp parameter and let's leave this as color and plug this here and let's promote the source Max for our fit and let's go up let's maybe choose a let's do something like a blue so something like this and we can play around with the maximum value in Source Max so in if I look at the result we end up with something like this and I can just plug this inside our copy two points and now this will follow our animation let's also template our correct geometry so we end up with something like this so the particles stick to the animation and this is super fast and I believe a really efficient way to make particles stick to objects so these are just a couple of examples of how to use this now the cool part about this is we actually donate this reference geometry to be exactly where the animation is meaning that I can essentially place this reference geometry wherever I want in the scene and this extract transform will give me the correct data so I'll go ahead and let's remove these nodes and for example what I can do is I will make some room and from this time shift I will do a match size to bring this in the center of my scene and I can also do a transform and I can grab this geometry and I will just rotate this so it's sort of in a rest state so it's aligned in all of the planes and I can press space bar N3 and hop in some of these orthographic views and I can press rotate and I can try to match it so it's right in the center and aligned with all of our axes so I can push this to the side and let's also go to our other views and I more or less just approximating where this geometry would be perfectly aligned in all of the X's so let's try something like this so something like this should be fine and like I mentioned we will still get the same result even if we move this reference geometry so if I plug this back in our copy two points we have the exact same result and this will follow the animation perfectly so we can check and we can see that it does and the power here is that if I go back to this reference geometry we can have all of our effects right at the center of our scene and uh we can also see that this is perfectly aligned vertically and this is going to give us a huge speed boost and it's going to be a lot more convenient to build our effects because we don't really have to work with any weird angles and rotation so if I were to disable these nodes with don't have to build our effects in this position right here so we can align everything nicely in the center of our world and also perfectly vertically aligned so also now if I were to replace this weapon with a sword or a bat I will first add another transform node over here and with my second transfer node I will want to bring this up this whole geometry up so in the Translate Y over here so the middle value I will just use my scroll wheel and I want to bring this up roughly to where we can imagine that Craig's hand is right in the center of our scene so where he is holding the handle basically which means that if to the side I will do a tube and let's template our reference geometry and look at our tube let's press enter and I will hold down shift and let's scale this in and I will bring this up slightly and also bring the lower end up and try to match our design size of this hammer and maybe scale this in even more I can replace now this Hammer entirely with this tube geometry and let's take a look and up here let's actually duplicate this blast node and I want to preview the result without the hammer so let's press W on this to template the geometry and let's look at our copy to points result and here we have it so this is what we have right now and I can reverse the direction of this tube if I just do a transform here and I just basically if I just rotate this 180 degrees on the first axis and let's go back so now Craig is looking like it's holding a pipe and is about to lay down a bit down on someone another thing that we can do is we can do another transform over here so let's do a new transform and let's look at our Hammer geometry and we want to make this overall bigger so let's increase the uniform scale let's try something like this and let's go in one of the orthographic views and we can see that we are working roughly from negative one here to 3 which gives us a size of four units and the reason we are making this mesh bigger is because we also want our simulation to be roughly Within These bounds so usually when we're dealing with pyro you will get the best results if you work between one and five units for smaller scale effects at least but if I were to disable this we can see that we are only working with one unit basically and this might be a little too small so we will not get the best behavior for our pyro and also we would have to work with really small and sensitive values for the VDB resolutions which we don't really want so we just want to make everything larger and the extract transform will take care of everything else so we can simulate in this region here maybe I can just make this even bigger let's try a uniform scale of four so this might be a good size for our simulation and in the extract transform over here we also have to specify that we want the translation rotation and uniform scale so let's use this option instead and now this will calculate the difference in size as well as the translation and rotation and we can check that this works if I plug this reference geometry in our copy two points we can see that when we copy this over it's going to have the correct size so this will match our animation so let's go back and now we can look at our tube and template the reference geometry so press e on this and we will also want to make our tube overall bigger so let's press enter and let's bring this up and bring out the radius as well so hold down shift and bring this out so now we can use this as a reference for our simulation and let's plug the result here into our copy to points and see how this will look so this is currently the height so this is currently what we have let's look through our camera and for the Flaming spear animation we only want to simulate one side of it and then we will just duplicate it and rotate it 180 degrees and slightly offset it to have the other side as well so we are only going to focus on simulating one side and probably this can still be a little bit taller so let's go to this tube and I can increase the height and we can also control with the center value here where we want this to start so let's adjust the height and our Center start so this is going to be roughly the bounds of what I want the simulation to be so while we work on the simulation we will be able to reference the size of this tube to know exactly what result we're gonna get so let's go ahead and we can grab this transform node and delete this and also disconnect our tube and I'll just leave this hanging here for now and we can start our simulation so let's go ahead and also get rid of this copy to points and in fact I will drop down a null from this extract transform and let's rename this to extracted point so we can refer to it later down the chain and for our flaming spear effects let's go ahead and start with a simple Circle and let's go ahead and template the tube and look at our circles so we know how wide the circle should be and let's go ahead and set the orientation to Z explain and we will decrease the uniform scale to maybe a value of 0.3 and also let's just bring this up to the base of our tube where we want our simulation to start essentially and I will adjust the uniform scale further to match our tube so this should be fine and I'll just increase the divisions here so this will be a good base for our simulation from here we can do a scatter let's turn off all of these options accept the total count and let's just have a few points so maybe roughly 700 should be fine and I want to Source these points into a pubnet simulation but first let's create a velocity Vector for them so let's do an attribute of op and let's rename this to set V Let's jump inside and for our velocity we will middle Mouse click and let's promote this to a constant and for now let's just do a value of 0 1 and 0 so this will essentially just point straight up let's go up and it should be fine for now so let's plug this inside a pubnet and let's step inside for our source let's turn off the guide and emission type should be all points and for the birth let's use a value of 1.5 and a live variance of 0.3 and let's see what this will give us alright so that's pretty good uh one thing that I want to do is let's randomize this velocity Vector so let's go up and inside our attribute vop let's go inside here and we want to generate a random value for all of our points so from the pity num let's do a random and let's multiply our Vector with this random and let's see what this will give us all right so now we have more variation in the speed now the problem is that some of these points will now have a velocity that's really close to zero essentially meaning that they hardly move and I want any given point to have at least a velocity value of 0.1 so from this random let's do a fit range and let's set the destination minimum here to a value of 0.1 so now no particles can have a velocity value less than 0.1 all right and one other thing that we want to do is let's go up and for this scatter let's randomize the global seed for each frame so inside the global seed value here let's do dollar sign FF so now every frame we will get different uh a different set of points and this will make our simulation more uniform so let's go here and this will be perfect one other thing that we can do is we can introduce some more Randomness so before the set velocity attribute let's go to our scatter and let's add an attribute noise float and we will set this to CD and let's decrease the element size a bit let's try something like a value of 0.1 and we also want to enable remap ramp and I will just bring this first handle in slightly to create some contrast so we end up with something like this and we want to turn on the animation as well so let's check this and let's see what we get probably we can reduce the element size even more so let's try a value of 0.06 all right and let's decrease the contrast slightly and now we have some color noise and what we can do is we can get rid of the points that are completely black so from here I will do a blast and group type will be points let's delete non-selected and for the group we will use expression at CD greater than zero so so now this will get rid of all of the completely black points and this is more or less an optional step I think we will have the same result in the end but this is just something I usually like to do to optimize the simulations a little bit but since we are not dealing with thousands of points we would probably get the same result if we have this blast node or not so let's go back to our pop net and see our current result and I think we can remove the display for the tube for now and what we can do from here is I want to taper these points slightly towards the top so we get more of the spear shape so after we simulate for around a few seconds let's go maybe at around frame 65 and we will do a taper so let's drop down a linear taper and if I press enter in the viewport Houdini gives us a bunch of hotkeys to work with here so first we will press n to fit our capture and we can press B to cycle our capture to get the orientation that we want and now I can grab this handle here and I can just bring this in so we can achieve this tapered result so now our simulation has sort of like this pointy shape to it which will help with our move bend down the line so now these points can become a base for a pyro simulation let's first create a density attribute so drop down an attribute swap from here let's rename this to set density and we can base this density on our color since we already have some variation in our color so let's go inside here let's grab our CD let's do a vector to float and I'll grab the first value here and do a bind export and let's export this to attribute density so now we can go up and let's drop this inside a volume rasterized attributes the attribute here will be density let's do a voxel size of 0.05 for now and later we will link this with our pyro resolution and for particle scale I found that a value of 0.02 worked well in this case so we end up with something like this don't worry for now we will have to increase the resolution a bit and let's also turn on velocity blur and let's increase the shutter to one we will set the shutter offset to negative 1 and we will also so increase the blur samples to maybe 10. so we also have a bit of smearing to our volume and this will give us overall a smoother result this should be fine and now I can hold down alt and duplicate this node and here we can rasterize the velocity attribute so the attribute will be V and the reason we want to separate these two rasterized nodes is that I want to do some further modifications to our velocity attribute and we want to have separate controls over this so before our rasterize node let's do a point velocity and let's take a look here let's set this initialization value to keep incoming because we already have the Velocity and we will go to the curl noise and let's turn on this article noise option and we can go ahead and preview our velocity in the viewport so this is what we have currently and I will reduce the scale to maybe 0.5 let's also decrease this pulse duration to 0.7 and a swirl size of zero point 3. all right and I also want to increase the grain here let's maybe do grain 0.65 so these are the values that I ended up with after doing some tests okay so this is our new velocity and now we can grab these rasterized nodes and we will hold down alt to merge these and we can plug the merged result inside a pyro solver so let's drop down a pyro solver and we can now go ahead and Link the resolution of this solver so let's right click copy parameter go to this volume rasterize and let's uh paste relative references over here and do the same thing for our volume for our velocity version so let's right click here as well and maybe we can rename this to rasterize density and this can be rasterize V and I will reduce the voxel size here let's maybe try a value of 0.05 while we do some experimentation so let's take a look now and see what the defaults will give us all right so this is the result and we can see currently that it's a little bit too chaotic and this is because if we go in our sourcing tab over here let's get rid of the temperature and the burn as well we only need to work with density and velocity so we can see here that the velocity is being sourced in as add this means that each frame we add the velocity on top of itself and it's making it accumulate so we essentially gain way too much speed and this can work great when we want to have explosions and more of a burst type effect but in this case what we want to do is let's use instead the pull version here so this will be the more controlled way of sourcing this essentially Blends in the Velocity in time and it doesn't accumulate and we will have to leave this at a vector and we also need to turn on Direction strength here let's leave this as one and we will just increase the acceleration here to 5. so let's look at our result now so we can see now that this is a lot slower and more controlled and this is what we are looking for for the other options here let's go to our fields and let's get rid of this flame field and we will decrease the dissipation to 0.05 so this will make our smoke last a little bit longer and in the shape tab we want to turn on turbulence let's go ahead and let's map this to our density because we no longer have this temperature field and for the values here I found that a value of turbulence of 0.13 was okay and swirl size let's decrease this to 0.3 and let's also increase the roughness to maybe 0.6 and let's see what this will give us all right so this starts off pretty alright but after a while I think we're getting a little bit too chaotic so we might want to decrease this turbulence let's maybe try a value of 0.06 and just increase the scroll size maybe as well let's do 0.6 and see what this will give us okay so this is slightly better but we can see that after a while even though we start off pretty alright we end up with kind of a messy result and in order to achieve more of a straight vertical shape we can create an additional velocity field and Source it in so to the side here let's drop down a box which will essentially become the container of this velocity field and I will template this geometry press enter and let's adjust the size so it roughly fits our currently simulation so I will grab this handle here and let's bring this out roughly around the size of our simulation and maybe I can grab also this corner here while holding down shift and I will just scale this outwards a little bit as well so let's do something like this I believe this will be fine maybe we don't actually need this to be this thick so I'll just scale this in slightly alright I think this will be fine so let's turn this box into a volume now and do a VDB from polygons let's set the voxel size let's set it to 0.05 we don't actually have to link this with our solver resolution we can just do a 0.05 value and let's turn on fog VDB and I will actually rename this from density let's do new well with capital V but you can basically give this any name now if we go to the information tab over here we can see that this new valve field is a float field so we need to turn this into a vector field so let's do a convert VDB and we will do convert to VDB VDB class let's leave this to no change and VDB type will be Vector float so now if I go to the information this becomes a vector field so we will want to create a vector that points to the center of our scene let's do a volume vop and let's rename this to set V let's go inside and to get this direction we can subtract the position of our voxel so let's do a subtract and we will promote the second input to a constant so let's do a constant let's switch this to A3 floats and we will leave this at 0 0 and 0 which is the center of our scene and we also want to normalize this Vector so let's do a normalize from here and we can do a bind export and Export this as our new valve field so let's do new well over here and set the type to be A3 float and we don't actually need this density output anymore so if I were to go up let's drop down in null and let's rename this to new well we can visualize the trails here better if we do a volume slice from here and we will plug this volume size inside a volume Trail and uh let's Point our second input to our velocity field so let's do something like this and we we can kind of see our vectors pointing towards the center of our scene and we want to make some room over here and we also want to add some velocity noise to this so after or rather before our now let's do a velocity or rather a volume velocity so we will drop this here and we want to turn on the option for the curl noise so let's turn this on and we will reduce the scale here and let's maybe also reduce the swirl size and I'll leave the grain as it is so this by default is also animated as we can see and I believe this will be fine for now so let's make some adjustments to our Vector over here inside the volume up I actually want this Vector to not have any magnitude on the Y Direction so we want this to be flat so all of the vectors will point right in the center of our object so we can do this if we do a multiply here after our subtract let's do a multiply and also Pro mode the second input to a constant and for the constant here we'll switch to three floats and we will do one zero and one so now this essentially means that we will have no movement on our up and down Direction okay and we will also want to further control this Vector so we can do another promotion here for this input tree let's promote this to a parameter and we will rename this to let's say pull strength all right so we give it this name and we can go up and now we can control how much we want this to take effect we will also want to combine this Vector with a vector that goes straight up so we can also help our smoke achieve that verticality let's go back inside here and let's simply do a parameter for this and I will rename this to up Vector let's do A3 float and let's just simply add this after our normalize with our other Vector so let's do an add here let's add the tool and Export this to our new well and if I go up I can increase the second value here to increase our upwards motion so let's leave this maybe at 0.5 and now we actually made a mistake we can see that this pull strength is not having any effect and this is because we have to do this after we normalize it so let's get rid of this third input here for our mod for our multiply and let's do another second multiply after the normalize and let's promote this one instead and this will be our pull strength all right so now if I go up I can control how much we want to pull this but actually we can see that here we are pushing out the smoke rather than pulling so we have to go back inside here and let's reverse the order of this subtraction so I will press shift R while selecting this node okay so now we can see that uh the velocity field points up and also towards the center as well so we can now control this movement over here so something that like this I believe will be fine let's Source this in and see what we get so we will also merge this so this new will I will place inside this merge and let's go to our pyro solver inside the sourcing tab let's hit plus and we will do the same pool operation for this so let's switch this to pull and we will set this to Vector the source volume let's point to our new well that we just created and the Target Field will be the regular velocity so just Vel and let's also turn on Direction strength and we will set the acceleration maybe to 5 as well and let's see the result that we get now so overall our motion will be more vertical and it will also help our smoke not go to the sides as much so it will maintain this verticality even more so I believe something like this is actually looking pretty good and this doesn't need to be a high resolution since we are just using this to add vect our points and we can go ahead and from here we will do a file cache and let's set the base folder here I have a job variable let's rename this to well field and since we are going to speed up our simulation later we will need to Cache a lot of frames so for this animation I ended up caching 600 frames so for our end timer here let's do from 1 to 600 so then we can speed up the simulation and do different time shifts so we will have enough frames to work with and I will save to disk so from here we can append the null and this will be our Vel and now for our particle simulation we will use the same base as we did for our pyro in fact we are going to grab all of these four nodes let's Ctrl C and let's bring them over to the side and let's look at the result of our blast and we will need a little bit more points for this so for our scatter I'll just increase this and we can go back and adjust the amount that we need but for now I know that we just need more points so let's drop this into a pop net and inside here Let's do let's turn off guides and emission type all points and for our birth let's use life of 2 and variance of 0.5 okay so now we can do a advect a pop-up vect by volumes and we have to go to our velocity so let's go up let's grab our Vel Ctrl C and let's bring this in over here at the subfield so let's paste this here and for advection type we will do update position let's do velocity update final velocity and if I play the simulation this is the result and we can see that we have this ugly stepping going on over here so to fix this let's turn off use the expression and the expression here will be well scale multiply equals fit and in parentheses at age let's do from 0 to 0.2 to a value of 0 and 1. so I go more in depth about this in my fixed particle stepping video so go ahead and check that out if you want to learn more but now essentially this should blend in the position so we are mapping the velocity scale on our age so now we are blending the velocity scale in over a time period of roughly 0.2 seconds which is this value over here and as a result now we should have a smooth motion okay so this is looking pretty good and now for the second thing that we want to do here is make our particles thinner as the simulation progresses and this is a technique explained in my volume sample and volume gradient video so I also recommend checking that out as well if you haven't already so let's go ahead and we will need to create this gradient field and we will base it on our velocity so going up from this velocity let's do a volume analysis and we want to do a we want the source group to be density so we want to compute the gradient of this density and let's do another null here and let's rename this to gradient field and we can go ahead and grab this so let's Ctrl C let's go inside our pubnet and we will duplicate this pop-out vect by volumes so let's hold alt and duplicate this and plug it in our chain and now we can point our sub to this gradient field that we created and we have to change the field name here to density since density will be the field that we base this on and by default a velocity scale of 1 will give us super wacky results as we can see we just have to lower this velocity scale so let's do something really low here let's try maybe a value of 0.1 and let's play so now this is slightly better we also don't want to update the velocity so we don't want to propagate the velocity to the next frame so we will set this to no change so now we are having a slightly better result but still this is way too strong so let's do another zero here 0.001 and let's press play okay so now this is more the result that we are interested in all right so probably this velocity scale of 0.01 I think this is looking pretty good so let's go up and let's take a look at our simulation and see how many points we are working with I know I need roughly around 500 000 maybe to make sure that this is a high quality simulation let's maybe just increase the scatter we currently have two hundred thousand uh let's maybe just double this so let's increase this to maybe 10 000 points scattered here let's simulate and probably this is good enough because we are going to duplicate and time shift this I think this will do just fine so we can go ahead and cache these out so we'll do a file cache and we also want to Cache the entire 600 frames that our volume simulation is so let's Ctrl shift click over here and set this to 600 and let's save to disk so after we cash this out we can do a re-time and we can speed this up to make it more energetic so let's use a speed value let's use 2.7 and for output and input frame range let's set the input frame rate to 1 to 600 which is the amount that we cached and also we want to extend the output frame range outside of the scope of our timeline so let's use Ctrl shift click and let's also output maybe 250 frames because later we are going to do multiple time shifts we are going to push the simulations further in the animation we want to make sure that we have enough frames to work with so like I mentioned earlier let's do a Time shift from here and let's add a few frames to this so in the expression here let's do dollar sign F and let's add maybe 25 frames just so we start with the shape of our simulation already created so we end up with some thing like this and now what we can do is let's template our tube so this tube over here that we said we were going to use for the reference for the size reference let's template this and this is probably looking pretty fine we can however do a transform here and we can play around with the settings so we can make this uh taller or shorter let's maybe make this a little bit taller and we can go ahead and right click this first value of the scale and paste relative references here and we can also maybe scale this down in the X and the Z directions so we can do something like this and we will use a super Advanced technique here to instantly add more details to the simulation and this is very Advanced what we can do is we can do another transform here and we will rotate the scale on the Y value so let's maybe use a value here of 120 and now we can grab our original simulation and let's do a merge and we will merge this on top so so as you can see this is super high level stuff and this is the real secret of Houdini okay but Jokes Aside this is just a very simple way to add more detail to the simulation and since we have enough frames to play with we can also do a Time shift here and we can also push this further in the animation let's maybe add another 20 frames here so we can just offset the animation and really create more detail so we end up with something like this and I think this looks pretty good and we can un-template our tube now let's do another taper from here to actually create the shape of our spear so let's drop down a linear taper and again I will press enter and let's use n to feed capture and B to cycle okay and instead of using the handles here I will turn on this enable ramp option and I will use this instead so we can have the complete control and I will maybe expand this window and let's go ahead and start to squeeze this together at the top let's do something like this and I might want to increase this at the bottom actually so we can extend the values over one if I use my if I use my scroll wheel here and I will set all of these points let's shift click and let's set them to B spline so let's try something like this let's make a nice interest interesting shape for our sword for our speed rather so we end up with something like this and I think this looks pretty good and we can later go back and adjust this shape if we want to and now before we do the coloring we actually made a mistake earlier when we created our attribute noise float this one here uh the color is actually supposed to be a vector so let's switch this to a vector type and I will drop down an attribute verb and let's grab the first component of this color so let's do Vector to float and we will assign the first value here as our CD so now if I go up we can see that we do still work in black and white but we have this color information that is A3 floats so unfortunately we have to go again and re-simulate all of this so let's save to disk so now to color our particles Let's do an attribute vop and we will base this color on our already existing color information so let's rename this to set CD let's go inside and let's plug the CD back inside our CD and we will filter this through a ramp so let's do a ramp meter in between and we will also want to multiply the overall strength of this color so let's do a multiply here let's promote the second input and this one will be strength and we will go up and let's set this strength to 1 and let's set the display here to pixels and we will do an orange to Black gradients sort of how we usually color our fire so the second value here for this handle let's use an orange so let's introduce a little bit more red in this let's do something like this and if I increase the strength we should start to mimic sort of like what the Flames do maybe we want to introduce more red into this and maybe a little bit more white but I think something like this should be fine and I will go to this taper here and probably I will adjust the overall scale of this or we could go to the transform and over here we can decrease the size on the basically the spread of this effect so I think something like this is looking pretty good and one final thing that we want to do for our particles is I want the particles that are further away from the center of this spear I want them to be more transparent so let's do another attribute verb from here let's rename this to set Alpha and we will use the alpha channel to preview this in our viewport but really we are going to control the P scale of the particles and to create this gradient effect from the center we can use a helper geometry so let's drop down a tube next to this and let's template this and I will press enter and we want to create sort of the same shape of our simulation so let's bring this up slightly and let's decide how big we want our base maybe something like this and for our scale at the top we will bring this in almost complete like so so we're going to turn this into an SDF and we are going to control the opacity of these points based on how further away they are from the SDF so in order to turn this tube into an SDF we have to make sure that we select these end caps option here and we will do a VDB from polygons and we might as well increase the resolution here so let's do a voxel size of 0.05 we will do fill interior and for the exterior band let's use World space units and I can press W in my viewport and if I increase this we can see how further away we are looking from our geometry basically so I believe I can template this and I believe this will give us enough information we probably don't even need as much exterior band but let's maybe just set this to a value of 0.5 and I believe this should be fine so inside this set Alpha I will plug this as my second input let's go ahead and preview this result and let's go ahead and step inside and we are going to use a volume sample to get our SDF information so from op input 2 let's do a volume sample and let's plug our position inside the sample position and we will want to fit this value to our own costume needs so let's do a fit range from here and let's do a let's do a bind export and like I mentioned we will preview this by using our Alpha channel here so let's set this to Alpha this is with capital A so for this fit range node The Source Max will control how further away it is from our geometry so let's leave this at a value of 1 and we want to switch the destination mean and Max so let's reverse this and the destination Max becomes now zero and essentially now is if I decrease the source Max so the range that we want to look out further from the geometry if I decrease this we can start to see that we Fade Out our particles that go further away from the geometry so let's maybe try something like this and we can also decrease the source mean here to also look inside of our SDF so I can also use a value here maybe of negative 0.2 and we can further control this by using a ramp as well so we will use a ram parameter here let's set this to spline ramp let's go up and let's reset this ramp and we will do an exponential ramp here so let's do something like this and select all of these set them to be spline and we can see if I turn this on and off the result that we get so I think this is looking actually pretty good and like I mentioned we are just using the alpha to preview our result in the viewport we want to export this to our P scale so let's use a bind export here and set this to P scale so this is what will actually make our particles fade in the render so I believe with this we pretty much have everything we need the only thing we have left to do is to do the other side and for this we will just drop down a transform and rotate this 180 degrees and we also want to use a Time shift here as well because we have enough frames to play with and again I will maybe push this forward in time maybe let's say 15 frames okay so now when I do a merge this will be our final result and now we can grab our extracted point from over here let's grab this let's do an object merge and bring this over and let's do a copy to points and see how this looks in our animation so let's take a look at the result and let's take a look at our crack animation so if I go in the camera this is what we end up with now this is a slightly offset from where it needs to be and we can adjust the position for this uh maybe we can actually go to our transform properties over here and for our reference geometry we can adjust the height of our object so the second one where we decided our height I can actually play around with this value to have the correct offset here all right and for the handle in the original render I just added the tube so I don't think that this is necessary to edit and we can still go ahead and make further adjustments here if for example I want to bring this down a little bit we can go over here after we or maybe we can go all the way to the top and I can grab this transform and I can adjust the Translate Y value here to bring this closer like so but probably this should be done at the end after we do our Alpha so let's use a transform here instead and let's reduce the Translate Y so we bring this closer to his hands and this is the result so we can do a flick book on this so we end up with something like this okay so this is looking pretty good and this is the main effect that I wanted to show you and now I will just break break down the other elements that I added to this shot and maybe show you a little bit of the compositing that I did so let's go up and this is the effects that we created just now and here we also have a ground geometry okay and a fog layer like this as far as the ground is concerned if I step inside here we can see that this is just a simple grid and let's hide other objects so this is just a grid with a lot of resolution and a UV texture so we can map our material and I also added a mountain node to slightly alter its position a little bit so we are running a noise over this grid with a very small amplitude and for the material for this I believe that I used a mega scan texture uh this Icelandic Rocky ground texture okay so pretty simple and also the light is very simple we just have a sun basically that's pointing uh behind our character so this is just a regular sun with all of the the default settings and finally here for our fog let's step inside and I'm using the camera frostum HDA that I created and I will also include this in the downloads if you follow the download link in the description which is just pointing to a camera and it's creating a geometry based on what the camera sees so we are freezing this at the beginning of the animation and also at the end and we are now using a Boolean Union operation to get rid of any inner intersections between these two objects so by combining these two time shifts we are going to cover the entire area that the camera Sees at any given frame and we don't have to compute this each frame so from here we turn this into a fog and inside a volume up this is where we do most of our operations let's step inside here and we are just grabbing the density and multiplying this by a few things here so for now I will get rid of this connection and the first thing that we are doing doing is we are fading this out from the camera so this is where the camera position is and I'm bringing this into our second input over here so I'm doing an object merge for our camera I'm using into this object for the transform setting here to bring this into the world space of the camera and also I'm packing before merging so we only have one point so when I bring this in our volume up as the second input from here we can do a distance from our voxels to this position of the camera and I'm using a fit range to decide what part in front of our camera I want to fade out so if I increase this we can see that I bring out more or less of the fog that's in front of the camera so this was a value of 25 here and then we are also combining the bounding box of this whole volume so if I plug this back in we are using a relative to bounding box node that we are pointing to our cell so the input here is first input which is the entire volume basically and we are sampling this from a position which we also alter with a noise so for example if I were to disable this and just use the position without this noise we can see that this is the result we are this is giving us a vector result and we are going to use the height of this Vector so essentially the Y value here and we are filtering it through a ramp so if I go up we can control how much we want to fade it from the top by altering this ramp like so and then uh we are just adding a turbulent noise 3D noise to our position where we generate our V box so we can also add some noise and if I go up I also animated this on the Y offset so if I play my timeline we have some subtle animation but I don't think this really makes a much of a difference so maybe this offset value doesn't need to be animated finally we have a pyro big volume and this is only for visualization I set the density scale here to a value of 0.1 for the material for this it's a very simple redshift material so in the material tab for our volume we have just a volume Shader here set to channel density and a scatter coefficient of 4 and an absorption coefficient of three so this is going to make our smoke slightly more thicker also in the material tab for our particles we are creating a simple material that has the weight of the color set to zero we don't have any Reflections so this is also set to zero and we are only using the emission which has a weight of 12 and the weight here controls how much GI we get from our effects so if I were to increase this value we would get more bounce lighting throughout our on our mesh and also throughout our volume as well so in my case a value of 12 gave me the result that I was gave me the result that I was after and for the emission color we are just bringing in our CD by using a particle attribute lookup so very simple stuff and I went ahead and rendered this and let's head over to Nuke and see what we get so this is where we ended and we start from a similar result to this so we don't really do uh a lot of modifications but this is uh where we start so right away we are going to shuffle the diffuse and the specular and the reflection and if I merged all of this together this will give me what's essentially the beauty pass without all of the fog volume and emission so from here I also bring in the depth channel so if I press a I shuffle the depth inside the alpha and I use it to create this black and white mask to grade the essentially the ground that's right in front so when I preview the result here with this gray node we can see that I'm darkening basically what's right in front of our camera so this just adds a little bit of detail and layering to our scene and over here we have so this will be our volume that we get from the light which is our sun and then over here to the side we also have have the same volume that's essentially coming from the Sun but we also have it combined with the GI so for example if I do a merge operation and set it to from we can subtract only the GI that's affecting our volume so this is the GI from the emission I'm running a noise reduction on this so this is the neat video noise reduction which works slightly better than the regular denoise that the new provides but the regular the noise is fine as well and I'm also doing some grading adjustments for our regular GI on our geometry I also run the same reduce noise plugin and then doing some reading adjustments we bring this together and then we just merge it on top of our chain so this is where we end up with over here we have just our volume that's shaded only by the Sun and we do some grading to this as well and I also multiply it with a Ram that I created over here just to fade it towards the top and some final grading here make it a little bit more blue and we add it on top and then we bring in our emission Channel and first I'm using this to shuffle it in uh I'm blurring this out and I'm grading this down so I'm making this darker and I'm bringing it in as our as a distortion layer so over here in the shuffle node this is set to input a which is our emission Channel and I'm Shuffling in the rgba into a new output layer that I'm creating here called dist so this is for Distortion and then I can use this layer inside an ID stored node over here so we can see that the UV channels are set to this this layer that we created and I'm just offsetting the UV scale here so we can control how much displacement we want and this is something I usually like to do whenever I add my particles I like to place below them a distortion layer to sort of achieve a cooler look and it also Blends everything together more cohesively so on top of this we grab our original emission we do a blur and then we do a luminance with a pre-mold so we can select only the very brightest values and then I'm using a saturation node to basically turn this into white and this is going to be the very hard core of this effect and on top of this we have the normal emission pass which is graded down and slightly colored or I believe we didn't alter the color color at all we just graded this down so we can see here that I set the gain here to 0.1 and then this layer we add on top and from the same layer we desaturate this a bit we do a crop and we use the AP glow node which is a free node from Wikipedia and it's my favorite exponential glow so when we add this on top we end up with our final result from here we do a crop I add some motion blur and I add some final grading adjustments so just to increase the contrast and finally this real s Regan node here is an upscale node that's based on some AI model and this is provided on nuke skater we website so I will provide the link for this as well and we can check out the result this will by default upscale our result by four times and for some reason a new crash so be careful when you are using this node but the final result is looking something like this so we can see that the upscaling node really did a nice job sharpening up everything and it also denoised our render quite a bit so I'm really happy with how real is Dragon performs so that's about everything I wanted to cover and I hope this gave you an idea of some of the ticks that you can do with the extract transform node and hope that you can use it in your day-to-day work
Info
Channel: Voxyde VFX
Views: 11,066
Rating: undefined out of 5
Keywords:
Id: ufGmUFZb7Z0
Channel Id: undefined
Length: 58min 30sec (3510 seconds)
Published: Fri Aug 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.