Houdini Rough Idea: Deformation Based Displacement

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay I just wanted to really quickly take a look at this general idea of using targeted displacement maps that are being driven from within Houdini so this is a a very quick test very rough lots of rough edges to it I still need to be knocked off but this is the general idea of how we could construct some Dynamic displacement within Houdini check it out so I want to talk real quick about uh deformation trigger displacement so there's a lot of discussion points here that we could cover there's lots of ways to implement this the most complex being you know vellum-based Solutions where you can simulate compression and allow the skin to slide over a surface um which is great it's complicated it's a lot of setup so let's start at the very other end of that which is to start building up something that is very simple so what is the most simple thing that we can kind of start with well that's taking a tube right so this is a very simple I'm not going to go through every node here but basically just building uh you know little UV modeled uh tube and then doing some deformation in this case it's a a wire to form uh or sorry that's a wire to form this one was based off of first ones off of just using a Bend right so we're just doing a simple Bend you know on this on this little warm guy here to represent uh what happens when you know uh this could be a finger uh this could be a rope whatever this is I guess ropes don't wrinkle but um so essentially what we do in the most simplistic is we can go in and we can measure the perimeter length of each uh primitive right or face on this case and we measure that when it's um in its rest position then we measured again when it's in its deformed position and then we can take the difference between those two uh that Delta and that can then become our stretch and our our compression so then with this I just did a little bit of remap for visualization and then went ahead and recolored my geometry based on those being that red is going to be my compression and green is going to be my stretch so here we can see that you know that plays out um very simply um and we've got as it curls up we have a compression attribute that's developed and as it stretches out we have a stretch attribute we'll come here to the geometry spreadsheet we can see that and I believe those have been passed uh promoted to the points and some of the reasons for that was the ability to blur those and and make them look as smooth as possible with that we can do some very simple things right we can you know come in and you know we can drive some shading attributes based off of that so you know in the Shader this all looks crazy complex it's not this is just a bunch of turbulence noise to give me some displacement they give me some breakup in the color those kind of things and then you'll see that we're using the stretch and the compression and bringing those in and doing some multiplication to either color correct artifuse which for whatever reason this is rendering pretty white I'll show you the final render but there's a lot of power in this um when we get into you know doing a realistic human character you know you think about Knuckles and faces and how much when we squint it forces the blood out of the skin which would change the subsurface quality and the diffuse quality in there you could remap some some color values as well as your displacement um these are all really kind of powerful pieces so um again this is nothing too fancy it's just turbulent noise and then fitting that which I'm not actually even doing anything multiplying it down and then multiplying that by the compression again I'm just remapping that a little bit to get a bit better of a distribution than when I got out of the Sim so I can mult you know modify that in the look Dev as you will to make this work as as well as possible I went through a couple of different things um we have we have that and then I took that same tube and ran that tube through um through a a different way to animate right so instead of just having it Bend uh if we look at this you know now this um this tube this little worm he's he's kind of bending through a path and you'll see that um kind of moves and wriggles as he goes and so we can see that we're getting compression in certain areas and we're getting stretching now this kind of started to push it to its limit we started to have flicker in some of this because as you're measuring each face uh to capture uh whether it's compressed or stretched you do run into scenarios where a face could be um compressed in One Direction and stretched in another and gives you the same uh resulting value for that primitive as the rest does and so while it is being compressed in one axis and stretched in another uh you're not getting um you're not seeing that so that'll cause some Flicker and some some artifacting at some of these uh at some of the transition points and so you know as this bends and kind of twists around it really is at its limit of what is possible with this I I think the content these are called tension Maps generating attention map really I can't see it being for a human character being anything really more useful than maybe Fingers um I think everything else uh starts to really need a little bit more uh Dynamic of a system Okay so from there we move into our a face right so in this case what we started with um is Houdini's just template head and I did a few things in here I I deleted the eyes out um I've made some UV um modifications uh to the character um to get a result that was actually matching to another character that I'm going to transfer this onto so that became an important part of kind of my initial setup um and then I just I I wanted to increase some edge geometry um in the eye area so I went through and just manually did that this is nothing procedural or exciting just very simple adding some Edge loops and that became our template head so I cleaned that up and got that ready and that head is different than what is the head of uh like my character um so if I go into my character and look you know it's different topology there's these are two different things and I wanted to kind of see how that was going to work um I think ultimately it's better if you have all of your characters using the same topology and then you can um set this up on one character and have it work across all characters because their topology is the same so um so essentially it's really the same thing so this looks fairly complex but it's really not so we bring in our template head geometry in this case uh here we are right it's coming in from our initial setup I probably should have done some of this other setup in that that other area but I kind of made a couple of additional groups uh to allow me to um I was gonna do some some additional facial rigging as a test but kind of put that on hold so um so then uh edit to have closed lips like my character coming in and then all of this in here is really just creating some very simple blend shapes right so that's all that is nothing fancy just using a an edit node uh when we do that um going into this tweak mode and then you can pick whatever it is you need and w-e-r-t allows you to manipulate those rotate scale transform then I connected those all into a blend shape node and with the blend shape node now if we just kind of drag we'll see that that goes is going to go ahead and close this we can see that that is gives me some animation that I can start to work with now just like we were doing before we went through and we measured the perimeter of this so this is the perimeter of the rest pose right so we can see here this is just a heat map showing the results of that right so the smaller faces are going to be blue and the larger faces are going to be red so there's nothing there that's saying where the tension is that's just the the distribution of those values so then coming off of our animation of that we are again doing the same measurement of uh I was doing a dual measurement to kind of do stuff but we actually don't need that anymore so we've got our our perimeter and area and then this is just the same map that we were doing before right to get uh maybe that was necessary to get our our values and then again this is just some remap to kind of help push those into a more viewable space um and then at the end here's my essentially my my two tension Maps one for compression one for stretch so we can see that as they smile we get stretching in this area compression in this area and now we've got this Nifty little head animation that's measuring some of that that change okay same idea that we're going to drive some displacement and we're going to draw some color with our tension map and there you go so now we can see that the colors being driven um as is the displacement now the reality is is where a lot of the idea for this came from was an artist named Chris Jones so Chris Jones had a great post for back in February 2021 doing this kind of very thing so this is uh the results of his work so which is using um uh two different displacement Maps but that then there are lots of masks that get influenced by the blend shapes on the rig right so this is all done inside of blender I believe when I read this and essentially what's happening is um you know those those masks are turning on and off based off of some connection to the rig now if your rig does not live in your same software package or in your shot work then that becomes a little bit difficult if you're not passing that attribute Downstream so these are the two maps that Chris is firing right which we can see that based on expression right when our brow knits together that's one kind of displacement where when our brow raises it's different right same with when our corners of our mouths go up right it triggers smile lines and then when those things come down there's different displacement from corners of the mouth so I took these Maps because they're great and I just kind of mushed them around to make them somewhat fit my little template head just for the purpose of seeing if if what I'm doing it it actually works so now if we look at this one of the problems that we have with this is when we have a smile it creates compression in this direction and when we have a frown it creates compression in this direction so the question becomes what how do you separate those two so you know you could I guess like Chris is doing use masks and something of the sort to try to get these separate areas but that um it wasn't working very well in this setup like his setup is much more articulated uh and that's not the right word much more granular in its approach right so each thing kind of is driving and being driven by by the artist's input right so just like on that blend shape node that I had selected um which gives a bunch of Sliders right this blend shaped node um has a bunch of Sliders that have keyframes on them so ideally this is creating an attribute onto your mesh that then your Shader can call and then you can use a mask to confine it or you know whatever but it gives you the ability to say because I wouldn't want this to just be like attributes on the verts I would want this to be detail attributes right so this this would be passing a detail attribute that would be sneer so for example we could do something like this we could do attribute create and uh what we're going to do is put this on is this right now to be using for this yes it is detail attribute and we're going to call this sneer right because I think that's what was engaged right there it is I'm going to right click copy this parameter and I'm going to come to sneer and it's going to stay float the default is zero but this value I'm going to say paste relative reference and then now we have a snare value that we can see gets set based on what the rig is doing and and then you could have every single one of these blend shapes right to be passed through um to your into your detail attribute so this is the lightest way to carry that if you put this on every Point you'd have a lot of just redundant data that is very expensive and that would not be the ideal and then just like we were showing before where we had a bind node within the Shader that was pulling in compression you would have a bind node that is pulling in sneer and so then you would multiply sneer by a mask that you probably would have painted or a texture map that you had for that um and uh and then multiply that against whatever displacement the sneer should be driving and then you would you would screen that or layer that together depending on what shade you're using shading type or render engine you would merge those displacements together and so you'd get that that's near based off of it I wanted to avoid this because um in the workflow that I'm working in it comes from uh comes in from Maya and so we didn't want to put that extra into the Olympic and so this is about okay great how do we go measuring and again this is measuring based off of the entirety of like each face being measured for its perimeter like and that gave us a kind of a a less than desirable uh result right we got kind of a stack up of the two different Maps it was not easy to isolate because one is not a compression map and one's a stretch map they're both different forms of compression so then um the next version of this was to take our rest head and to just go through and and pick a set of lines that represent kind of the compression that I wanted to track right so you see here kind of I have this you know when we smiled these lines are going to compress when we uh squint uh so this is based off of this map here like okay what would be the what would be the the areas of compression along a singular vector uh along the face or on a singular direction right and then this would be the other so you can see that's the one and then uh and this is the other and then we're copying those onto our animated geometry because it's the same Geo so we can Define it on the one and copy it to the other so they both have that I'm using a great little tool you could make one of your own but this is just from the Houdini Labs a plug for Houdini Labs is Edge group to curve and so it does a great job of taking those curves that I selected and generating edges out of those or or Curves right taking the edges and generating curves now we can see that I've got 79 polys selected here and it makes a single poly line that has multiple points on it which is not what I want because if we go to measure this on the Primitive it's going to measure from here to here which will capture the data that we're talking about but not with the Fidelity of where it's happening that I'm looking for right so if we had a little bit of smile it's going to fire this entire curve versus a magnitude along the Curve right so in this case I use a node called convert line which is great so if we look at this one we now see that at 946 polygons so each between each two points I have a separate primitive that allows me to measure the distance of those and now this becomes just like we had before so we measure the perimeter or length again and then we come into the attribute Wrangle and we take the Delta between those two right and then this is still all the same of just moving that into a space of you know the Delta change was so small because of the scale of this I had to scale down that input Max um and then this is a again stretch and Delta and compression being promoted and then we're converting those to a color so that way we can visualize oh that's actually from into a performer here's the color all right or maybe not somewhere here is a color I actually don't think I put color on this this doesn't this um the color gets defined in the Shader then we come and merge these back together and now I've got these two set of lines uh for visualization uh just for rendering but for our mesh which we can see we're outputting here the way we copy these across is we use an attribute transform which is only is it works just by basic proximity so now based on distance and blend width I'm able to Tran to to Ray an attribute from the curve onto my face mesh and so I'm able to capture based off of that and move those across so now I've got my deform a into Form B which are my two different compression maps and then I'm outputting that mesh and so we'll see that that mesh now has the deformed a and deform B not sure why those ended up as UV attributes I can't remember oh because I had compression and stretch in each one of those so I made I made a a two uh a vector 2 out of that okay because I didn't know if I was going to use the stretch for something else which you could down the road right we the stretch would allow you to reduce displacement on the stretch side and change color and those kind of things so a lot of both of those to kind of come through so and then I'm doing a little attribute blur to soften those out so that way it looks looks a little nicer so if we were to view this and take a look at uh at deform a right into Form B we can see we can see those those compressions happening right so there's from the one to the other just softening outposts a little bit so they're not so hard so that then gives us um the beginnings of this and I went ahead and jumped all the way to wanting to transfer this onto another character right so I I think I did one version a render of this head rig using that but then I wanted to transfer this to my other character so we can see here um and again for an actual animation and rig this is not sufficient but just the general idea saw my character coming in um putting him in Houdini scale doing some stuff to get to just the skin um unpacking and then we're taking this skin right and we're freezing it at the original position and then we're just raying on one of my ring on here I'm just sending an attribute here so what happens is this um Ray and gets the UVS off of my template head right so this was my my character UVS look like this which are different than the UVS of the texture map that I I created off of Chris Jones's work and so I just wanted to say okay great I'm just going to steal the UVS off of this other head I don't need to be perfect right so that's why I took this one and kind of moved it in the same place we blurred the UVS just a little bit or sorry we that's not a blur that's a renamed from UV to UV copy so that way I'm not writing over the original UVS so I can have a unique set and then the ray node if I turn off the transform points right so if we see transform it's taking my character and sucking it onto that head like a rap deformer I can turn that off and now all I'm doing is I'm grabbing the UVS off of that uh because I'm I'm telling to import the attributes from the hit and it's that UV copy and so um that allows us to then use that later for our our displacement map then I'm using an actual point deform where I'm just taking it I'm not even lining it up that great so here's my my head this is my you know head at the you know the rest pose and so I'm associating the rest bows with my resting character and then I'm using the deformation not to drive it it's not perfect again this is this is just meant to be a test but this gives me you know a decent amount of ability to go in and say great you know using the same animation across the two characters now for this we take the actual lines and we're now raying on the deform a and to Form B attributes same thing that we're doing before we're not actually transforming any points we're just ringing those those attributes to capture those foreign so now now this is creating a new attribute so we took this UV copy um which gave me um UV copy I believe is a three Vector it is and so just for cleanliness because I think Arnold uh or whatever I was trying to render this in uh not Karma something else wanted a ub2 I was testing some other render engine and so I just moved this to ub2 because it was very specific as to what it wanted and then we do a little cleanup we get rid of that UV copy uh we're smoothing out these points just a little bit uh because my my yucky deformations made you know up with my point for more less than perfect and then recalculating the normals so from that now we have a character that um if we go out to the stage and we jump into um our material for this we'll see that um so this is using material X so that's why I needed that ub2 so using material X I'm just doing a simple Shader I was using uh for a time I think I turned it off I did I was using my deform a when I was breaking out those two different attributes and my to Form B to kind of combine those so you could see those in the in the color Channel I'll show you that in a second and then here's the displacement as it uses um uv2 as the incoming UV set for this particular texture which is the one that I generated uh the two different textures and then we can see here I'm using deform a and to Form B and each one of those is driving a different texture map as to when it gets multiplied against those and then I'm adding those together and then I'm setting my displacement scale so we come here not too complex of a setup so I've got a grid that's for my background I've got my um bringing in my character applying my materials some lighting some render geometry settings and a camera and so let's just go ahead and jump in here and these I have the character in there twice so that way we can see it once with once without displacement and then we can see the lines that are driving in so it's just giving me the ability to kind of look at what it what it was doing and so we can start to see what this is doing and it's imperfect there's some you know problems with it with the implementation of this but again this is just a quick rough test to see you know what was possible um this has its challenges you see here you know as we start to raise the eyebrows here um sorry I went the wrong way right so we have uh it's triggering here on the the forehead and we can see that we don't really have much triggering down here uh on the other map we can see maybe a little bit right there which is down in here is triggering um but in some of these we still get the doubling up of texture Maps they're not all perfect so here we can see on this one in particular right so we have the brow furrowing is triggered as is some of the brow raising right the compression the half it's here so it all depends on that compression of the surface this is the this to me is some of the limitation of this method versus something more of like along the lines of what Chris did where you each each blend shape um or rig you know deformer is passing an attribute onto the mesh to then tell us what displacement we want to use and that gives us the ability to fire as many displacement Maps as we want and have them uh you know be very targeted this is a lot more General um and you know for the face I think for a poor man's system this starts to work okay so there's again some definitely refinement in here and how do you get this onto the uh an incoming geometry cache I think is really important um you know setting up a Delta between a resting deforming face and the deforming face on the actual animation so there's still some work to be done here but the general idea is is this and it's not complex um it's just a matter of getting the right pieces highlighting the right thing and again I use the literal Edge Loops of the geometry we could go in and draw in very specific Edge Loops instead which would probably be more uh more targeted and I think that would be be an improvement so this is the general idea a general start to um how to go about using um some targeted displacement Maps within Houdini and you know you could drive this uh you know for fingers elbows knees all kinds of things um I think that the sky's the limit you just have to build up that system so I hope this helps and that it creates some questions uh that we can talk about foreign
Info
Channel: Rob Au: 2bitfx
Views: 7,918
Rating: undefined out of 5
Keywords:
Id: oiPAZ0oRvA4
Channel Id: undefined
Length: 28min 27sec (1707 seconds)
Published: Tue Mar 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.