Houdini 16 Masterclass | Hair & Fur

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this masterclass on hair and fur and Houdini 16 my name is Chi Steph Kinski I'm a senior technical director for side effects software let's start off with an overview of things we'll cover first off we have a new set of object level tools that replace the fur object that came before it they represent a far more flexible and modular approach to grooming then we'll look at actual grooming techniques and we'll see how you can use the same set of sub tools to manipulate both guide curves as well as the full generated here both in the viewport and at render time and we'll take a step beyond the actual gear related tools that we ship and we'll see how we can use the power of Houdini shops in general to manipulate our grooms as well as the generated hair and finally we'll see how we can use a new set of low-level sub tools that we ship to build hair effects from scratch without using the object level infrastructure that we provide and with that we'll also look at how you write grooms to disk and how file i/o works in general to get an overview of the entire workflow let's look at the sampler project it's just all rubber geometry with an Fe M simulation run on it and it gives us an opportunity to look at the object level tools that we have a brief look at some of the sub tools as well as simulation and hair generation let's jump over to Houdini and the scene I've got here is relatively straightforward I've just got my lighting and cameras here some simulation bits and then this is the static geometry and the simulator geometry let's go get that from the camera so this is the FIM simulation in a teen and these are the four operators so first off we have guide groom and this one has a very simple purpose basically it generates the guide curves according to the density parameters and so on that you said here and then it has an editable network inside where you do the actual manipulation of this guide course and these curves are then later used by simulation and hair generation I can bypass the editable network inside where I've have some customizations already set up and this just gives you the result of just these parameters here so density scatter seed and so on I will go into more detail about these later let's turn that back off and jump inside so this is the basic structure of the editable network inside here and one big difference what we have before is everything is happening in one network so there's no longer any separation between manipulating guide curve geometry or painting skin attributes it's all flowing through this graph so we've got all the bits that make up the groom coming in here most important are the guide curves and the skin and then the VDB of the skin is used for some by some operations to compute collisions and avoid penetration with the skin geometry and then these operators all have three inputs at least and three outputs and that lets us flow the others data through the operators so the skin coming into the second input here is also coming out of the second output and the nice thing about that is you get a very clean graph so for example if the operator down here required some skin attribute that's coming up from coming in from the inputs here it has access to that through this output so you no longer need to reference skin geometry from up here and end up with a messy network and another advantage is that all of these operators can occur in any order so you don't have all the skin painting painting first and then all your guide manipulation you have complete control over the order of operations and it's all very flexible let's jump back up next up we have guide you form unhide the simulated geometry again and kaity form is very simple simply moves the guides with the animated mesh there's no simulation at this point they just keep the groom that you set up and the way it gets that groom is by this reference to the to a groom object so all of these we call room objects and this is a reference to the actual object not a specific geometry like the curves or a skin inside the operator itself knows how to extract that information and then we add the animated skin and that's necessary because the guide room doesn't actually know about the skin it doesn't have any reference to them we just have the static geometry here and then we also have caching controls where you can write out a sequence it's often not necessarily because and necessary because this is quite fast to do in the first place but you can do it there and then we have guide simulate so this one again takes a reference to a groom object in this case it's the Jackie form so it uses that that's as the base to run its simulation on the wires play that back this is cache to disk you can see that happening here I've got some turbulent wind running on that as well you can use this to actually run a simulation without a Houdini effects license so in Houdini core you can still use this these built-in material parameters forces so we've got wind with turbulence and drag and some new clumping controls as well as collisions and caching of course and the final piece of the puzzle is the hair generation so this operator again takes a groom object takes the stimulated guides here also takes a reference to a skin VDB it can generate that itself as well but here you can write it to disk and reference it and then similar to the guide groom we've got controls over density so this time that's responsible for actually growing here let's bypass the editable network inside for now this just gives you the basic generated here and then here I can change my density relaxation and so on and then I've got some extra controls over how the guide curves influence this here let's have a quick look at what those parameters do so the influence radius controls how large of an area each guide has influence over if I reduce that you'll actually see that some hairs will disappear let's go up in density again to make that a bit more visible so you want that to be at least high enough to cover character and then maybe a bit higher just to smooth out the effect of individual guides so you basically want each hair to find at least a couple of guides or three or five and then a more subtle control over the interpolation between guides is this influence decay so the higher that is the more the influence fades with distance so it effectively makes the interpolation more localized you can see that here where is it good spot maybe here so if I go even higher you can see these hairs follow that one guide much more closely you know and if I reduce that the effect becomes smooth out to the point where you lose a bit of the fidelity of the simulation so somewhere in between that seems to work quite well now actually looks a bit lumpy here still so probably I need a bit higher radius and maybe go down a bit on the influence now you may find that some of these areas work well and then others there to smooth out like here then you can actually go in and override some of these attributes but to look at that in detail let's get rid of this and see how we can set up something like this from scratch I'll get rid of my existing for our nodes unhide the simulated character and then just start with this switch the grooming desktop because that just gives me quick access to all the shelf tools I need and then it also switches me to the hair specific radio menu which is this one so that's very useful to just navigate between the various objects that make up the groom and then you get quick access to procedural guy tools here and interactive brushes over here but let's start with the add four shell tool so as that asked me to select a static mesh and then an animated mesh the animated mesh is optional at this point but if you do pick it then you get a guy deform like we've seen before and the hair will show up with the animated character so you can see the hair is generated here as well as the guy the guy deform node showing up there it's just verify it sort works so that's everything moving with the simulation but for now I actually want to jump to the guy groom so let's unhide that and I also want to display the generated hair in the static position so one way of doing that it's just disabled use animation here and that'll ignore the animation coming from guy deform another way that sometimes more efficient just reference the guide groom directly in the hair generates so I can drag that in here and then regardless of use animation it's static and there are no time dependencies or anything and it you skip that computation that guide you form is doing so it can be quicker and now one thing I want to do is paint some areas where I don't want any hair I could have done that as well by selecting polygons up front when I ran the ad for a tool but for something like this where I want fur on most of the character I actually prefer to just scatter all over and then just curl some areas so let's increase density a little bit overall and then I don't want any hair in the eyes so one way of doing that as you can paint density you can use this override menu here anytime you see this it means you can override the value of these parameters with skin attribute you can paint directly from the parameter interface here or a texture now texture painting is not supported in the viewport yet but you can bring in an external texture here we'll use a skin for now but actually instead of painting density I'll paint length here and the advantage of that is that the all the hairs around the area that I paint stay in place and the density around the fringes doesn't reduce so let's use that instead so the attribute for painting is called length scale by default that's okay for me and then when I click that button I actually jump into the skin geometry and I get these two nodes at it so a trip create to create the attribute in the first place defaults to one here because it's a multi-player against my length values so by default there's no change and then the length the paint song and with that I'm ready to paint actually I'll just paint the background value the black here which should make all these guides just disappear and shorten around the edges and one thing I like to do for this specific task is just reduce the soft edge of the brush that just makes it a bit easier to paint exact neuro values to make sure that the guides are actually code so when when your paint exact zero now you don't get any of the roots remaining there I can see the points it's just the points of the mesh here but there shouldn't be any points of their guides or one thing I should mention here with this specific character when we look at it here I'll just go inside you can see the legs are separate objects that just intersect the body and we get some guides grown inside here one quick way to fix it in 1816 is just with the boolean so boolean set to Union actually creates a union of all the separate meshes in the geometry and it's a very quick way of just very cleanly resolving that now it doesn't give you clean quad geometry or anything but it's very exact now on top of this basic culling I also want some length variation across the body and to do that I could paint the same mask but let's let's just look at a different way of doing it I know use guide tool set length so that's one of the procedural tools that we have and uses the guide process knows what the operation set to set length and one way I can work with this is just set an absolute value so that's that's the default here and that just completely ignores the length of the incoming guide and just rescales the curves to this specific length I can also multiply if I want a relative adjustment so by default one doesn't have any effect and then I can increase it and multiply whatever is coming in so that'll preserve length differences that you already have in the input let's just set like a high uniform value here just increase it and then I've got these masks up here to control where that effect occurs so that's one way I can vary this so for example skin mask let's just call that length mask mask is a bit too generic and then we have the same paint button that we have at the object level but in this case because we have all the data here in one place we have the skin coming in here we that can just add these operators right there so by default it's masking everything there's nothing happening what if I paint value of one year we get that operation occurring now in those places let's just quickly paint all the legs I just want some longer hairs in those areas so we get something more interesting for the simulation I won't go into too much detail with this one just yet I think here I accidentally painted some areas when I culled but let's ignore it for now now another thing I want to do is just give the groom some initial direction so one way to do that is with this initialize and there are various tools to create the initial hairs here I just want this guide initialize guides that gives me basically something where they here just roughly flows around the character it's just a we're simulating like a static wind with just a uniform direction and it has this tangential to skin parameter we just get the hair is flowing around the curve the curvature of the character a little bit it's a nice quick way of setting up something like this you always want going to want to do something on top of it but it's just a quick start and then to get some more control over that I can use a lift operator second adjust the guide process again set to lift then I can control how much I want guides to point away from the skin and it also has this follow skin contour similar or it can make hairs not just stick out straight but follow the curvature of the character so when I go lower you'll see that nicely flattening against the character now the guy deform up here picks up those changes right away so you can see the same room there just preserve that as the character is moving and the hair generally it should do the same thing except I have to plug in that guide to form again make sure use animation it's toggled on and actually to see that a bit better let's jump over to the hair shader make that a bit brighter I'll just make that brighter and more saturated and then jump back to the hair object and increase the thickness here a little bit and I can hide the guy to form alright so that's all working so it's very basic at this point but let's just try I try to get a render out of this so one thing to note is that all this hair generation happens in sumps so this object level hair generated node it uses swaps to generate the hair based off the guides and when it's rendered through mantra mantra cooks that sub Network and this is also true when you when you apply custom operations inside the editable network here so I can jump inside this and actually use the same tools that I used before in the guide groom to do things like length variations and clumping for example guy tools set length since I had the hair and hair gen object selected and current in the parameter editor set length will now be applied in there so same set of tools I've got the same sort of inputs here it's just that it's in this case it's already animated it's following the the guy deform and when I do something like set the length multiply I can randomize per hair so this is no longer working at the guide level it's actually manipulating individual hair so you can see these these variations happening there at the hair level and the same way is something like clumping so I've got this clump operator that's actually using the hair some soft so this is all applied at the hair gen level and I'll just make it look a bit nicer let's go up in quality a little bit more here's 20,000 density then we can go down in thickness a little bit so you can see that working through this immunity the simulation as well and another thing you might want to do at this stage is just add some frizz so frizz to reduce the amplitude and this is a good one where you can use the curved mask instead sort of mask will give you control over where on the along the curve the effect happens so by default we just have this linear ramp here which increases from root to tip so you see I disable that again you can see more of an effect at the root when I enable it there's less at the root but the tip stays largely untouched then you can manipulate the ramp directly if you want to control the effect of that but you also get these controls here for doing that a bit more quickly you can set the fall-off and you can also set this affect position where you can control where most of the effect occurs so in this case it's now in the middle of the curve with the fall if you can get nice control over the gradient and you can also just get it at the root but not at the tip and then of course that works together with the other of masking options so something like the noise mask here you can vary that for areas of the character I'll just increase my gain here that's basically like a contrast on the noise so you can see that very clearly lower frequency so you can see areas where there's lots of frizz and then where there's a bit less lowering the gain again acts it a bit more subtle so all these things work together and I could paint a skin mask on top of this as well well let's just leave it like this for now I think or maybe just a bit more another level of clumping sore one thing with this hair Club operator just increase the iterations here and it then splits the existing clumps into more with control over how that happens so gold feedback will basically make the subsequent iterations stick more to the previous level so I increase that you'll see more clearly the first level of clumps and how the the next comes follow those and tightens reduction just reduces tightness with each subsequent operation so when I reduce that you'll see you'll see the subsequent crumbs being more defined well we'll look at that in more detail and a more realistic example let's just leave it at this for now jump back up and I'll add simulation into the mix so to do that you usually want to do that on the deformed guides for something like this you can also simulate the guide room and the modular structure of these tools allows you to do that so when I when I select the guide room and click the animate shelf tool up here it'll simulate this it will insert itself in the chain between groom and guide deform and it can actually be useful to just work on the static room using physical simulation you just drop the hairs a little bit and then keep grooming on that but in this case I'll just do the standard like short workflow of just simulating the deformed guides so with a guy deform selected I'll simulate look at these blue guides now telling me that it's the coyote form let's hide here Jen and the wire solver that we use in here it does tend to be a bit fiddly it does take some tweaking I know that for this simulation works a lot better if I just reduce the spatial scale there are some other things I could adjust but this should work okay I'll just simulate that and speed it up for you all right so that's simulated for few frames now let's play that back so you can see the wires swinging with the legs there nicely let's see see it very clearly here let's see what that does to the generated hair as well and they seem to follow nicely there now since this cooks at render time and the procedural that actually generates the hair and needs access to the input information so it needs access to whatever groom object you have plugged in here you need to render that groom object as well so in this case I need to render our guide simulate it's not going to work when I just hide that which is verify that works here but all these objects are set up to not render anything visibly they just need to be there for the procedural to be able to access that geometry so right now mantra is generating that hair base of that based off those guides and we get the clumping and everything happening and you can see you can kind of see the simulation like the hair is lagging behind there probably have a bit too much thickness and everything but not going to dial this and with too much more detail to look at more of that let's jump to a more realistic example with an actual character and a more carefully designed groom so with this example let's first look at the overall structure of the scene you'll see from the network error and just by selecting I think that the object level here that the groom is made up of distinctive parts and the main purpose of that is just to help with setting up each parts properties so for example is something like the eyebrows by splitting this off into a separate groom object I'm able to set global properties for things like frizz and clumping whereas if I was to combine this with other parts of the groom I'd have to paint masks for all these things and the same is true for something like the beard and the mustache now an important part of this is that the guy groom objects here each of them references a specific node within the skin geometry it's all the same the same geometry but they're all referencing a different branch you'll see that here if I click through a few of them they all have a different reference up here there are two purposes of that one is there are some attributes here that I just create in preparation for the groom and they're usually only necessary for that part that I'm working on so I can avoid multiplying these and accumulating these and then propagating these through all the parts of the groom where they're only needed in one part and then the other aspect is when I changed something in one of the branches it only causes a Rico on that part of the groom as well so if I had them all in one imagine all of these in one chain and you change one thing at the top you cause everything down there to coke and then also every part of the groom to Rico so all the hair would regenerate and all the guide processes would recoup so I can avoid some of that so for example bypassing one of these will only pause a short time to recoup the eyebrows now let's take a look at how some of these parts of your groom I actually constructed you'll see that in a complex groom like this the radio menus are still very useful I can still jump into guides and jump between the parts of a specific groom here because the tools are able to figure that out based on the reference paths so I can jump between my crewmen here and jump into guides jump into here but let's jump to the guide snow height that right here and you'll see this one is made up of an interesting combination of tools we actually have the comb note here which we've had for quite some time but it's still just as useful and maybe more useful now with the new set of procedural tools so all this does is manipulate a vector attribute on the skin in the viewport so you can go in here and brush the direction of that attribute let's change the opacity just to make it very visible and this is then picked up by this guy process node here which I just destroyed it's using that fur direction to override the direction that it sets per guide and it actually has this button here which is very similar to the paint button you saw before in this case it will create that cone note let's actually look at how that would work from scratch so let's get rid of this and in this case they will be crazy because I think we have a set lift operation here and that doesn't quite know what to do when the guides are facing straight out in the normal direction we will fix that here with a comb node so just create that let's actually make our visualization a bit better here let's just scale up those vectors and then as I paint that you'll see the guides reacting I think we can hide our visualizer No so this is an interesting combination of tools because it remains fully live and procedural unlike the curved brushing tools that you have appear in the shelf it doesn't require an eerie caching so we just set up an attribute and then we remain fully procedural or something like the blend and these sliders here they will work to then modulate the effect that you paint the direction that you paint and you can of course keep working after that so we have a set length operation here and then a lift which looking from the top again you'll see the nice effect of the follow skin contour just so just setting next to zero next thing here is stick it out more straight and then one makes it follow the contour and you'll see that more when I lower the lift value well that's that's leaves I'm sticking out a bit and then of course it's very quick to go in and adjust these things so I could I have multiple things combined in one guide process here so I could paint an overall mask for these just by using the skin mask but I can also go in and adjust individual things so one thing you might want to adjust this the lift here let's say I want to vary that a bit so I'll use a skin attribute lift and just start painting that just adds a paint node to the chain here I'll disable symmetry so let's just lift some here's a bit Marshall since this is a multiplayer I want to go above two now and then you'll see the effect of that maybe a bit less opacity here so maybe these ones want to stick out a bit more so it's very quick and easy to vary the effect there and then next we have a fridge you'll see we also have a phrase operation at the hair level so if I jump into here we have the same thing again and the purpose of these is well the the one in the guide room if I disable all of these so we just see the effect of the guides on the cleanly generated here you see some of that coming through here let's also display the guides so you see some of that coming through here and it's a more coherent effect so it smoothly interpolated and then the frizz in here gives you more randomization between individual hairs that's actually let's disable that for now let's look at how we can control the interpolation at the hair at the hair gen level here so back at the object level again you can use the influence radius here let's just try to we have that from the current value you'll see that the effect again it's more local and it follows the individual guides a bit more closely just half that again so yet more and more at that but again I like to usually make that fairly smooth and then dial in dial in the specific look with the influence DK so just raising that I'll double that now again gives you more localized effect double that again and lowering it gives you a smoother interpolation and that just makes sure that every hair you set the rate is high enough so that every hair finds a few guides at least so then in the simulation it tends to look better that way but you still get that that detailed look where you don't lose any of the fidelity of the simulation and the setup of the guides curves let's jump back into hair Jen let's just look at the effect of each of these so again the frizz just add some additional randomization and then we have clumping with a very small clump size very simple here just set the global clump size and a stray read of course you could paint the clump size as well to vary things let's maybe try that so skin attribute clump size and again we want to go above to here to increase the clump size so you see it's very it's very easy to create variations there and what's a detail and create something realistic quite quickly just by just by stacking these individual operations and then just another phrase each each operation becomes progressively more subtle but they just add up to do something fairly realistic in the end now let's make some modifications to the beer just to look at different techniques that we can use there so I'll jump into the guides hide the hair again and I already have this operator here which is just empty at the moment what I want to do is add a few operations here to essentially create a style for the beard so I'll just make that a bit longer and then set Direction point it down a bit more and then I'll use the blend to just reduce the effect a little bit and add some phrase to the guides something like that and now because I have all these in one in one operator now I can use the skin mask to paint an overall task for all of these so let's try that so by default it's all at one so by default the masks are always set to zero in this case I think I want one everywhere so just set the opacity is one and apply all and then I'll just paint some areas where I don't want the style to to be applied so I'll reduce my opacity again and I can go in and paint these areas and you can see the guys reacting right away and you can see that we're both reducing the lengths as well as the the frizz so it's very quick to do something like this and then of course I can work in more details so this is my overall mask and I can now still adjust all these settings and you can see you can see that the the effect only occurs where I wear my mask is still painted to a value of one and now for more subtly effects and variations again you can combine this with overriding individual parameters so if I wanted to do something like create more high frequency frizz in some areas I can do that let's just check how many segments we have on the air here maybe I want to increase that a little bit use something like 16 just so I can represent my just my curves are able to represent a higher frequency freeze value and I'll use a skin attribute here and let's just paint that so again I multiply by two you can see that happening there so the first becomes more more frizzy now another thing I can use here let's just get rid of that again I probably seen this guide attribute option here so I can use that as well there's no paint button there because it relies on attributes on the guides so very useful for randomizing with some more control or just driving these at these operations with anything you want for example you can just create a wrangle node here let's remember the attribute of frizz frequency scale I'll copy that so if I just paste that in here and set it to two you'll see the frequency double for everything but then of course you can randomize that so I could randomize based on the primitive number for example or then fit fit the zero to one random number that I get out of that to a different range so for example variation between 0.5 and two very easy to do or just as another quick example you can use the relative bounding box so that gives me a normalized value vector value across the whole bounding box of the guide so if I use the x-axis of that you'll see the Friz value increasing from left to right so here there's hardly any frizz and here there is a bit more so all this stuff is it's very easy to set up you don't have to go to the extreme of the wrangle note either you can use something like the a trip randomize sup and all kinds of songs that are there so for example let's just set that up as well primitives at your name for his frequency scale you can see that reacting there they can do something like a normal distribution set the middle value at one and then just scale the randomization around that so you get full control using any any of these subsets re there or anything then you want to make yourself but you don't have to then going to the go to the lengths of reproducing all this math our code that is I've been in here to apply the phrase you can just create the attributes that you need and then overwrite them and apply them using these nodes now let's try another thing let's also add some clumping to this beard so I'll use the radial clumping the defaults don't work very well at this at this game of this character I'll just reduce the clump size here I think I want a bit less frizz makes the clumping or the crazy there's still quite a bit of space between these clumps sometimes that happens due to the hair with scale here because the clumping takes into account the width the thickness of individual hairs based off their P scale attribute in this case we don't have one on here on the guides so it creates a default value in this case it doesn't work that well so we can reduce that here and then you'll see the clumps getting closer to one another I'll leave a little bit because it just makes it look a bit more natural and then something I'd like to do before clumping as well is vary the length a bit so I'll create some length randomization you see that they mostly and the hairs of a clump mostly end at the same point and it just looks more natural when you have some variation in there so I'll just go back to my set length here and change that to a randomized or straight with the values that I was using before but just randomized it a bit so I have some shorter hairs in there as well now with this one let's go in and use a skin mask as well I just want the clumping to happen in a few areas just sending something a bit more subtle again dosimetry just do a bit here all right and then let's have a look at what this looks like in here now so unhide two here and you'll see so I did I did like something at the at the guide level but it propagates nicely to the hair to the generated here and again we can control that at the hair gen level with this clump crossover so setting that to zero makes it follow the guides very closely and then one randomize it a bit you can still see some of the effect of the guides just because they are close together in space no I've got the wrong one here select in the viewport unhide the guides so you can see some of the effect there but it's not very clear you usually want something in between or just go very close and then add additional variation in the hair Jen so let's try that here so again something very useful as applying those operations at both levels so I'll use the guides the guide based clamping which is also respected in the simulation by the way so when you simulate this they will stick together but I'll do an additional level of clumping in here just to break up the clumps within the clumps this cold feedback again makes subsequent clump iterations follow the previous ones more closely so you get more of the effect from the previous one and then I'll just add some frizz on top again you'll see that a lot of times you're using the same tools over and over but you just combine them to create the specific effect that you want now the final part I want to look at with this character is the hair let's jump into the guides for that as well you'll see it uses a combination of procedural and brushing tools so the procedural to set up something very rough maybe a bit too tonk to then brush into shape so I think this was actually an earlier version of what we tried to achieve then cut it down again with just procedural tools so that's just a length multiplier with some randomization if I change the blend vellieux here you can see the effect of that the hair Jen takes a right a while to recoup in this case because of multiple levels of clumping right there for now so there's one to set the overall length and then another one to do randomization on top of that then there's nothing stopping you from going in again and using the brushing tools so that's what's happening here and the great thing with this is you still retain some level of procedural ISM so at the moment this would be blocked like if I make some modifications upstream they're not gonna propagate automatically I'll just show you this but then you can you have the recache button here which fixes that so for example if I add some frizz let's just play this one for now so we can see the result live so just some randomization and the guide room doesn't pick that up but you can re catch strokes here and you retain all the room that you did and but you just incorporate that phrase as well let's just maybe continue with some operations here like let's use the cuts hair tool so you can do things with these obviously that are very difficult to achieve with just procedural tools I mean I could do something like a boolean or a clipping on the hairs but it's often just more convenient to just go in with the brush tools and then again I can still adjust things up here let's get rid of the phrase again recache and everything propagates all these careful grooming operations that you did they are preserved of course it has its limits like if I change the length drastically here like let's just make it let's just make it way shorter then of course the brushes that I made in a certain position here are not going to have any effect anymore that cutting that I did there but it's very useful nonetheless let's jump over to hair generate for this so here you'll see again very straightforward some frizz up front and then the hair clumping just see the effect of that so here you have the first one again and splitting that and splitting it again and there's just a skin attribute to paint where that effect occurs I think this one was actually set up in the skin geometry so I'll jump to that so they are just in wrangle attributes here that set it based on Rams but you could just as well painted it's just regular Houdini attribute so you can create them any way you want so again for a very distinctive style it's it's fairly easy to set something like this up with the same tools as well but sometimes it helps to just use that combination of procedural tools to set things up initially then maybe jump over to guide guide brushing tools and the structure of the tools makes it very easy to do that so next let's go a bit beyond the built in fur tools and let's look at how we can use the general powerful in Aesop's i'll combine it with fur i'm using this font back here so it's basically just a font G on the tree looking like this that I'm driving some four attributes here and later we'll do some other more custom effects with that and basically what's happening here is I'm creating an attribute on the primitives that gives me the distance to that geometry for each curve and then that's what's driving the scale factor here let's look at it in a bit more detail so this is just my geometry there are no special attributes on it and then the Rays are set to minimum distance and with transform points off so the points just stay in place if I transform the point there which is all jump on to the front they're turning on point intersection distance and that gives me there's this attribute per point so some of them will be very close sitting right on right on the function Yama tree and some will be further away and promoting that to the primitives with a minimum promotion method so that gives me for each curve it gives me the shortest possible distance to that font geometry and that goes into this attribute pop and is remapped using a ramp let's look at so get the effect of that on the set length on the guide process is set length here so first of all I can control the range of the effect so a minimum value here I set that to zero it breaks a little bit because some of the points are not quite sitting on the surface and then an auto range and I've kept this ramp or I can control the fall-off so this will make a fall-off if it's deeper most of the hares are still along here more linear fall-off or something like this and then in addition I've just got this random offset so this just offsets the position along the ramp randomly to make it a bit more random when I set that to zero you can see the effect becomes quite smooth especially when I have greater radius and this just randomizes it a bit more let's jump inside here I'll just give you a quick look let's ignore these parts for now basically what's happening is it's taking the distance attribute typing that into a fit and then using these distance parameters that you saw at the top as inputs as my range and then just mapping that to 0 to 1 and over here this just adds my random value that's the green box here and these are just feeds into a ramp and exports a scale factor I'm also exporting a just attribute I call font mask which just gives me one where there's the font and 0 where there isn't and then this randomization no one detail I want to point out here I'm doing the randomization based on the ID attribute that we get on the primitives if I jump up just middle click on the hairs you've got ID here and that's quite an important one basically you don't want to do it based on the primitive number sorry that broke something because there are some things that can that can mess with that primitive number for example if I use my limit only box on the hair generate here to speed up the computation you'll see that with a method I'm using now the random values stay the same I get the same length that I get without it and the same with pruning so when I activate pruning of course some of the hairs disappear as you want but the ones that remain stay at the same length and you'll see if I jump inside here it's just a quick mark on that control 3 I control 1 here so if I connect the primitive number instead the result changes right away and also it changes when I activate the limited bounding box and when I prune the hairs disappear but also they're remaining here it's change lengths so let's set that back it's always important to use that one and of course I can use that now I can use that mask but then I can go back to the guide process and just adjust things there so I'm using the blend belyeu here to set to leave some remaining distance so the the attribute just scales to a complete zero and some areas I'll just set that to like 0.82 just shorten the airs there and of course you can use this for our to drive anything you want in the guide process and other subs then another thing I'm doing here can use the same sort of base set up to create some clumping around the font instead so that's not just driving attribute it's creating I just like quite different effect let's see what that looks like with with the whole fund just bypass the internals for now so I can quickly adjust the bounding box just cooks a bit quicker that way now this one the setup here is quite simple as well we take the same font geometry and I just copy some lines onto that notice that the font geometry is some detail though can we see that so there's some mesh detail I just did a rematch on the font quickly show that here it's the remesh so copying lines under the points will create quite a few lines and then I'm back to regular guy process nodes so here just set the direction to point down a little so it's just minus one and Y and then a blend fell you to control how much they point down and some random bending so that's a first of all the uniform bending here and then on top of that this random n value just break things up a bit and then just some additional phrase and then in the hair climb the only difference to what you saw before is instead of using the built-in sort of clumping where it jumps all over and realize on on the skin mask and everything to paint out areas now we plug in we use the fourth input to plug in custom curves here and you don't really need any special attributes on these we have a few but none are required it just uses whatever you give it the one thing you have to make sure is that things are consistent with animation so if this these inputs are come and animated so sometimes you have to do some extra work there to make sure that everything stays static but in general you can use any number of stops you want to create these custom effects where it gets a bit tricky is with referencing external geometry so usually I'd recommend writing things to disk that you need in here and referencing it right right in here if you do use external geometry like if I had a separate object here you have to make sure that you render that as well and just set it to - invisible so the best way to do that it's just at the Edit rendering properties just at VM renderable set that to zero I'll just turn that off in other words and then make sure this renders and the same with since since all this is generated at render time by a mantra make sure that it has access to the guide room networks at render time as well because it there's a reference to those and it requires those at render time what I do here is just put all the rooms into forest object so since our name consistently I can just use this pattern here that's the easiest way to do it you can also just display them of course but then they might be in in the way if you're grooming sometimes when you just concentrate on here let's actually see what that looks like rendered now you'll notice the bounding box that I've set here is ignored at render time so you can just render it and still get the full here let's also try another variation of this I'll just leave my clamping on here but additionally I want to create some color variations here based on that same effect sultry and an attribute pop again let's jump in here we don't need the Global's and I'll just find to do the font mask attribute that I created before remember that's just a mask telling me where where we have to fund so I created that here it's just the compliment so basically one minus the match the distance mask coming out of here that's my font mask and then I want to use that to mix two colors I'll use a color mix for that that goes into the bias and then for now I'll just set that to black and white so where there's a where there's fun it'll be black and when we export that to see blind export export that to a color name CD so just the standard any color attribute name I want this should be a there should be a primitive running on primitives I could have created just created a primitive fault yeah so that works and it's going to propagate through to the render as well but let's actually get some more control here and we will set will reset the shader values the shader color values to white so we have just full control over the color using that attribute so let's go white here you set your 800 and I think we are rear end during still let's cancel that this goes whites I know we can just directly set the colors here let's try to dial in something similar to what we had for the hair color 10 works use Houdini orange here side effects orange not too accurate so very quick and easy to do that kind of stuff as well of course there's a bit of weight to a bit of memory memory footprint to creating these extra attributes so it doesn't always make sense to do it this way you might want to bake some of this two textures but if you're not too concerned with it and with with a character like this it doesn't matter all that much I think you can do it one trick you can use here it's just cast well first of all you want to clean clean up some of the attributes possibly but you can cast some attributes like the color to 16-bit values that saves a bit of memory as well can verify that here that shows up as a little sixteen to assign also to be half the memory and that's fine for for these values that are in there zero to one range you don't need you don't need more than that so this will just show up in the render when you have tint with point color enabled so remember that one now in this final segment I want to look at some of the lower level sub tools that we provide so we'll forget a bit about the object level first Pacific infrastructure that we have and we'll jump down the level just looking at the hair gen submit submenu in the tap menu you'll see that we have quite a large collection of nodes here that you can use to build hair related things or just other general effects and procedural modeling tasks let's start with familiar here Jen actually so here generate is the equivalent of the object level operator you'll see that the interface is essentially the same this node is actually used internally by the object level tools so the object level tool is essentially just a thin wrapper around this you get all the power of it and down here as well and I can just plug in skin mesh here and that will right away generate some curse for me let's just make them a bit longer now one thing that I'm missing is the nice shading that the object of the tool set up so for that we need to change some properties on the object as well as a sinus shader I'll just jump up you just want to go to the misc tab here and enable shade open curves in viewport so that gives me the nicer shading where it also respects the width attribute that hair Jen creates so on the attributes and appearance type here it's using that ramp to set up the PowerPoint width attribute so you can modify my ramp here and that'll show up in the report now just like with the hair Jen object and of course I kind of signed a shader so if I just grab here shaker from the material palette drag that on there that works let's just make that black at the roots here and then red at the tips jump back so another way I can work with this as I can use guide curves that's the second input here so the first two are for the static versions of the two so aesthetic mesh and then animated mesh aesthetic guides and animated guides well for this example I just worked with the static version so that's let's make this a bit Spicer and we'll actually use this hair Jen to create guides for us like this and then use another hair Jen plug that into the skin again and then actually use the output of this so they're curves that's the guide curves for the second one make those a bit take her as well and quite a bit denser maybe a bit less so now whatever I do to it - these sparser curves will have an effect on these so one thing I can do for example let's just use the guide initialize again that needs a skin input so the second input here will output the skin geometry and then it also requires a VDB let's just check here skin VDB so I need a VDB from polygons from the skin so there's a bit more work involved of course but you can use this to create more custom effects and just plug everything together exactly the way you want it so let's just point those straight down and I think I might need a bit of exterior band on this is follow for some of these effects to work well so I'll specify that in world space and just make that a point one and I'll actually fill the interior in this case maybe point two it's just necessary for something like this effect where the curves actually stay quite far away from the surface for that to work well you need the exterior information of the PDB it's work and then of course all the generic tools like lift it all works the same way set my lift value here you can see it affecting the generated hair right away another example useful stop is the guide collide with VDB let's plug that straight in here now you can use that in a similar way as the lift let's just lower these a bit more and I think we need a slightly larger radius here so you can use this to push hairs that might be penetrating the skin away from the skin so you use the push amount and arrange to push them out and there's a soft fall off with the range here I think these flickering hairs are actually this is a book in the viewpoint right now doesn't appear in the curves let's use a few more segments though go sixteen sixteen so that works another thing you can do with a guide glide you can plug in an external geometry let's grab something like I don't know the rubber toy again I'll just fix those intersecting legs on it with a boolean its height or external Taurus just look inside here so without the boolean I've got the intersecting legs with the boolean that's gone just a union of other all the pieces all the disconnected pieces and now I'll just transform that to intersect with my hair here let's just display the guides and template this one split up here now I'll reduce my lift just so I have some intersections happening just point them straight out or down a little and then you'll see when I plug my custom we need be into the fourth input here now oh I don't have a VB yet let's make that a actual PDB and again I'll use fill interior and also set the exterior band - then let's actually visualize this on either lower resolution as well so now you see the effect of that happening let's visualize the polygon version of the roller toy you'll see it as a that I can get a nice soft fall-off there just by adjusting these parameters probably pushing a bit too much but let's adjust the range and then push around I can also if I just want that I can disable skin collisions as well so the skin is traveling through the third input and output here from up top it's disabled skin and then adjust the push range to just work against the rubber toy you can also use two separate ones of course just do the skin collision first if necessary so this can be used for all kinds of effects you can use it for something as simple as this or just as part of your guide grooming to make sure you don't have any intersections with cloth of the character or something like that and it's even stable enough to use in an animation directly so you can you can have a moving character there and it'll work quite well for that as well no let's are gonna add another example I will take my rubber toy just actually take that into a new object these let's do another hair gem with some length and I'll just create a few hairs this time let's look at each tangent space so this is a fairly low level technical one but basically the purpose is to give you a nice consistent vector space along the curve that you can apply certain operations and for example the frizz operator uses it to apply the noise consistently it's basically when this when this combination of character and hair no deforms our rotates moves through through the scene let's just try that plug the animated version into the the animated skin input here and let's rotate that actually let's change that to a big flag here to the transformed version so rotate that you'll see that the the vectors stick to their character there and the way that works is it grabs and grabs that initial direction from the skin UV gradient by default you can also specify the direction at the root explicitly and then it uses that to set the vector direction at the root of the curve and then propagates that along the curve minimizing twists around the axis of the curve itself so that means when I do some operations here like phrase for example that's a bit crazy but it's actually a good example let's just increase the resolution here a bit then maybe set that to a lower frequency so you'll see that the direction here stays quite consistent from point to point just tries to minimize that that twist around the curve and that really helps when you have for example when you have a simulation going on that throws the hair around quite wildly it's important to do this for things like curling where you need a consistent space to work with now in this final segment I want to look at some of the operators I want to highlight is the PAC room as well as the unpacked room so again just this up in here and the purpose of this one is to package your groom and all the parts that make it up into a consistent format so it takes as input the rest guides the rest skin the animated guides and the animated skin so in this case let's let's consider these to be our static guides so this is going to be our groom so we just plug in the guides here and the skin and then this will make that our animated version I'll just add some quick keyframes here template that again let's just move that for a second then plug these guides and see here and the skin now I can plug that well before I can plug that into here I need to unpack it again so let's unpack room so that's basically the the opposite of this and now I have a single wire here that contains everything and the way that works is it just merges everything into a set of four peg primitives I jump over to the geometry spreadsheet here you can see those named here so you can see the individual parts and of course you can do all the vehicle operations with PEC primitives so if I just add a packed edit I can change the viewport display to bounding box you'll see those are just four packed primitives now not the individual curves and I can write that to disk as one unit so the advantage of that is you track everything as one entity so you can't have diverging a diverging room and a diverging set of simulated curves or something like that let's just write out let's just check that my animation work there let's just write out those twenty-four frames like that in the background and so the unpacked version I can plug that into the hair Jen here so I'll ignore everything coming from from the top because I can I now have a self-sufficient groom that contains everything that I need for the final hair generation one kind of quirk here is I need to cross some of the wires so they don't they don't just plug in straight the reason for that is we decided to make the rest input the primary first input here just because it makes sense to grow curves from the from the skin rather than just putting the guides in first but it just means that the skin you get that from the second input here so you have here its guide first then skin so you just cross these two wires and then the same for this I hide the rubber toy there you can see the result taking into account that animated version and it's all coming from disk now so if I jump around here you'll see the result of that the character moving through there and that's exactly the way it works in our object level tools as well let's just jump back to those I have a guide semi right here so jumping inside we have a we have an unpacked room here so when this is basically the guides coming in from that reference from that room object reference that we have on the object level and when in that reference between those objects they actually travel as that packed unit as well so we have an unpacked groom here that picks apart these objects and then we simulate the guides and add some attributes to the skin whatever is necessary and then pack that again and then the file trash is actually what you see exposed on the caching tab here and then this is our output with that is used by later objects that may reference this one and this is just used for individual references of the individual parts so works exactly the same way and you're free to use these operators at the sub level as well that concludes this master class on here and for a new Dena 16 and I just want to thank you for your time and interest well there's always more things to cover and greater detail to go into I hope what I've presented here has been relevant and useful for you thank you
Info
Channel: Houdini
Views: 20,039
Rating: 4.8740158 out of 5
Keywords:
Id: vwtl_al11P4
Channel Id: undefined
Length: 73min 47sec (4427 seconds)
Published: Thu May 04 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.