Houdini Masterclass: RBD Smart Activation Workflow

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello my name is Alessandra martini and then working the effects for film TV and television for about 15 years or something and today I'm going to show you something very useful I'm going to show some example of destruction that I've been doing in the past those have not been has not been not with Houdini but the technique that have been used to do certain to achieve certain aspect of it they're actually the same and we're gonna see today how to transfer that inside Houdini so the things I want to show you is what I call a smart activation so we do have this road that has been prefect and those chew chunks that are moving apart from each other and all those in-between chunks let's call them the way they are automatically activated based on the distance between the shoe original chunk so basically what is happening here we can see very well over here is that those chunk and those chunks they actually belong to a way bigger chunk let's call them chunk 1 and chunky and all the time chunk that form the edges they look around them for other chunks and if s if they find that a trunk closes to them they live on a different account they form a partnership relationship and that relationship is basically the initial distance and once they move apart from each other more than a certain amount that we will decide those chunk will get activated and so fed into the receiver disorder and so you will make all the simulation be driven by a durational single schooch incarnation and so this is also a good way you can you to iterate through animation Department and ndynamics since the animation is actually driving the whole setup and there are other example the ground here has been done with the same concept has been reflecting this case this one is just for annoy and then the animation of the main big chunk has been done by animation and then once the system is appearing in dynamics we can just play and based on distance and velocity of the original shank the in-between shank at activated and fed into the Russia body soul and this one is another example so this again all those job has been perfect and once the main big chunk has been generated chunka chunka cat apply a prostitute to fragment all the edges and then all those edges to older chair I just get applied this procedure which based on the original big chunk animation they decide if they get activated or not and if they do they get decided for which velocity there you must use and what spin and so on and so on so on but everything used the same concept and so it's a it's a very cool method to use that will speed up also the iteration process and will make it also very believable like this piece so we will do it in Edina so we will do something simple like this kind of fix to the plane of big box and we will end up with few chunks to make it fast to work on just for tutorial purpose and those chunk will have a name in this case is piece 1 2 3 410 and if we look closely those are actually piece the same chunk as those and so we will see that all those edges they're actually fact met in this case and using Voronoi but usually especially now that the very cool tool him up and this HD a4 lynnie that tasks a friend of mine the work at the way task and of defects very talented effects artists NT did the way works defeat the geometry israel and so the same concept has been used for those destruction we have been using a very similar tool but not for Houdini to actually tree frog which are another handsome men applied the procedure on a second step the concept is this hope is once we pulled the fragment done on the edges in this case and using Voronoi was proposed there will be tacked in a package geometry and so those black points represent the pivot and then we will run through a point cloud iterator and for every piece in this case is this one that has been highlighted with this color we look around itself within this radius and it will find all those other pieces and all the pieces that we want that we do not want have the pieces that are living on the same bench hug as we do and so all those pieces will get skipped but once we find the closest point that live on a different hunt in this case piece eight while us living on this zero one we will establish a connection which is simply distance and that connection will tell us which is as partnering up to wish other piece belongs in a different song and so cookies of two different edges and then this is somehow the result you will get some sort of stitch all along the edge that are bugging pieces from differential and this one is what we will end up with once we had that we could check this distance everything a simulation time and if the distance in case of a certain amount we will know that just their toes edges are breaking and so right at the moment we are gonna activate those pieces and fed them into the Russian body solder okay so let's open Houdini and let's do it I'm using Houdini 17.5 indeed Burton build 173 let's create a geometry node and smart activation I assume before we proceed I assume you know Beck's I assume you know a little bit of dub and I assume of course you know salt so let's start let's build the box everything and we now is to generate a simple case scenario in order to have the data necessary to apply this mutt activation algorithm so I'm not gonna stop on every step by step and explain everything that do is assume you know and you will follow a slip but in case you will find certain step no easy to understand anyway just leave a comment and I will be happy to reply so let's do a box ten zero point five ten and let's make some sort of square wall let me make the background dark have the grid I like it better so we're gonna break it this object in Satan chunks lay down a nice offset that's good enough to scatter some point and we say about ten and let's give some one more factor first input is the geo second input us the cell guide points maybe let's change the global seed and find something more Amadeus mmm yeah something like this I like it okay now let's so this will generate a name attribute per Trinity Leavitt telling us the name for every piece from zero to nine so ten pieces and this will be the name we will carry on through the end because it will be very important about you will see let's move this up with that form node may be 10 and tttt degree should be good enough so we will make this fall and let's assemble and with the first one we will generate the name and we will clone this guy and with the second one we will just pack it back I'm doing this because then I can branch out and do other stuff we need from you frog man's okay I usually do those black okay and then here is okay so let's do a sphere to collide - okay and let's place this year let's make it the polygon maybe five even six let's move this up one let's give it a name just to be correct for what is need to pack a geometry this one is a sphere and it would be at this point for it's a point and let's pack it okay and that's not this guy perfect in this asphere okay and this one will be coalition object th coalition okay and now let's drop down Network and on the first input is the wall on the second input is the sphere let's dive in let's lay down our IG body solver okay wait let's lay down a cavity note okay let's lay down deck head Alvida packet object and this will be our RVD wolf and let's lay down a ground that we need to call light tube let's mash the stew and here we got this now for this RBD wall let's import the the wall fragments oo P input that and we go up once and input the first input of the stop back tip to evaluate and here is our wall and let's clone the sky this would be our sphere and let's merge those true okay and this one will be input 1 and it would be a static object and so now okay if we play that's what we got it's very cool that's exactly what we need okay so let's call the top floor s Slayer out top floor s Flores make it black as always and here let's improve to just they are BD are the wall okay so we got our lowest geometry fully nothing breaking and now we are gonna create some edge fragment and then we're gonna see how to implement the smart activation technique so let's get the gnome package show me tree since we had to modify the geometry self and let's lay down average for each connected piece without a limit the connectivity and let's change the piece attribute from last name and this one will be in peace so the single one coming into the for loop okay and let's delete the inside faces which we don't need so inside the little selected let's keep holy the outside and let's capture some point to it like so maybe 250 let's increase the duration here something like that and let's be the bee front particle okay so we rate little volume out of it something like so and let's lay down a volume up and let's perturb this volume through turbulence noise let's plug the fib let's and let's multiply the incoming density by this noise and let's promote a few of those that's enough okay and maybe here it's a bigger 31.3 I think is the amplitude okay and now let's counter some point inside ear okay and let's go inside the volume Bob and contrast a little bit the output of it so and let's remote parameter and let's set it to four maybe that's good maybe a little last three four five yeah I like it okay let's lay down our heart factor let's plug in the audition and Gio coming into the loop and less fragmented using those parties perfect maybe we can increase a little bit will be a little slow to process of them but we're gonna make it just after so it's okay okay I like it that's very good now once we were annoyed ease this is which is one of the ten we need to process this piece originally originally coming with a name attribute and in this case speed zero but once we fragmented further the new foreigner will generate a new name attribute they belong to every one of the single pieces so they will get numerator what we want we want to carry on this name attribute originally we had and transfer it to Odin increases so we can do that to meet another good copy and let's plug this here and this here the geometry we want to copy from and actually it's the very opposite okay and we don't want to mesh the key attribute then we want to call the the name and so now if we look everyone asked the same name as the shock that is coming into the loop and that's exactly what we want one things we want one we want to do we want to promote this to point level and change the name since we are gonna generate a new one later on and so let's lay down another promote okay and we want to promote from primitive to pine and we want to change in the name and eventually the leaders of the original one and let's call it name old okay and let's process this so I wanted to do a little bit less pieces just to go fast but since you are doing it let's do it so we got some nicer result out of it they should be fast enough we are already a little over alpha seven seven out of ten eight out of ten nine almost there there you go this is good enough so now what we want to do let's lay down a moon oh I do lay down an iris okay okay and let's bake it okay so we are almost there one things we need to do we need to generate a new name attribute because now we got name all the neighbors tell us that every one of those pieces let's assemble this first okay and let's carry on the name old so every one of those pieces since now they are package geometry they belong to this zero so we're talking about all of those or all of those they have the same name old value as the same name as the chunk that coming from on top of that we generated a new name attribute which actually numerate them so cool now let's start to implement the smart activation algorithm first thing Steve first things first we need to create an attribute which will be the ID of every piece and so it we do an integer attribute I call it the PC ad and it will be the same as the point number okay and so now we get this which is exactly what we need okay so this one is piece I did miss making this capital okay so now we do another angle where we will do mostly the at this part of the job and this will be the smart activation actually no even it will be hard mei-ling God okay so the first things we will do we will find our closest partner that is not leaving this same shark shark okay so there are a little things that I always do to is more of a convention every time I have an attribute that I want to use inside the code that usually remark that a tribute to available and use it so I can say the typing of their for example if it is a string like in this case and let's call it my chunk chunk I will wrap it to this okay so I won't have to type every time to use it aspect but I will just either my child and this child this variable will hold this attribute value which are in shorter will tell me we'll tell me which additional big hunter that coming from okay now now next things we need to do is since we're using the pointer mechanism we're gonna set up our point cloud attribute and so first we need the radius and it will be a charmer float obviously limit the radius second we need to tell how many points we want to consider so it's a max point variable and it will be a shun an integer or max points okay and then finally we can define handle which will carry on the point cloud open function and they will be from this geometry if we look for P we those value okay and you will use this radius within this distance and you will try to find us many point that's me a stones max points okay let's create those and let's say the radius to one M max point to one hundred just for start okay so let's let's say they far enough tribute call partner and let's set it to -1 and let's define some variable we will need later so first of all we want to know which chunk the pieces we find around us through the point cloud belong to and so we will store that information inside the ER and for now we'll be just an empty string and let's remap also the piece the piece I did inside this integer variable so piece I did which is the one we defined up here and then let's hear it and then let's define some variable we use later so let's call it all that ID let's set it to zero and then let's do order PT a set e to minus 1 and then let's count for our loop and even this one let's set it to minus 1 so at this point we are ready to order ready it would be whatever so this ad will be the ID of the current point we're processing and inside already we will store the piece ID of the point we find while other PT will be the point number of the point we find okay so let's use a while and a mechanism and let's iterate through our point cloud ok ok so first things went cloudy no Dini they're already ordered from the closest to the fourth s where the closest is actually our self since we don't want to consider ourself because we have access to it already inside the Wrangell which is the point which is currently inside the wangle when we look around we want to skip it we want to skip our self in order to do that that we can simply say if count is less than 0 she's currently is minus 1 then increase the count of one and that's it and so we do nothing to us we just keep our self otherwise else we want to do something to the next boy from the next point on and so let's import some some value from the point we find so let's use PC input and on the handle and we want to import the name all then we want to store it inside the or main variable also what we want to import what we want to import is the point number okay and we want to store it inside the order TT variable and also what we want to import to is the PCD of the point of the point we found and this will be we want to wear this attribute then we want to store it inside this out this file cool so basically what we did is from this point we skip this point first with with this little trick setting the come to minus one and skip it it if it is less if this minus one and just increase one so from now on we're gonna get to the other point and once we skip our self we find one of the other and once we find one of the other we're gonna ask them hey you can you tell me which is your P CD which is your point number and which chunk name are you living with because me myself I'm living on piece one and so I really hope you are not living on the same chunk as me because that's a reason for me not to be interested in you but if you are living on a different chunk for example piece eight then like this guy then I would be interesting you and so let's do this so the way we can do it is simply since now we know the name old so the name of the chunk of the pieces we are we found and we also know the name of the chunk we are in our self we can simply say if my junk is different other name okay okay so now now if we are inside there we found a point that is living on a different hunk and also since we evaluated the pattern attribute to marijuana that's mean everything that coming to the loop if it is minus one that's - not me process it and so if it is this will be no minus one but it will be something else that's mean that that point we're currently processing is being already partnered with somebody else and so we don't want to change it along the line and so in order to prevent that we are gonna put this condition that we are gonna say if you is okay if I not be process it which is obviously minus 1 then we say if partner is equal equal to minus 1 okay then here we are gonna set your partner to the other PD okay so that's your partner which is this point number and also we are going to set some attribute on the other pity so on the partner itself and so what we are gonna set points attribute what we're gonna set is we're gonna set the piece again and so it will be on this geometry is ideal that's what we want to set for which point or other PT and wish bad way our piece I did so now they will match and we are gonna set this also we are going to set it will be the partner so 0 and we are gonna set that pattern of valuing for our admin and it would be this point we want to deal with and then the partner would be us our point number and then set okay let's put this here and then once we are idea we just keep counting for every point we don't need to but just to be precise okay cool let's see we make any mistake gosh now and little typo okay so partner okay name old name name old okay there are way too many ones so let's see you see the other pity count and Endel name old order name point number variable another type of okay and there should be way more fast enough they're not just one good so now what we did this does point that partner max one they are most likely the object in the chunk in the middle that they could not find the corner reach any closest chunk the live ones aren't different in itself within the distance of one okay so the more interested is and the less - 1 we will get hey technically is just because at some point we are just not patterning more than what anyway if we keep this to 1 and we go here and we let down a point wrangle and say if partner is single equal 1 then remove myself ok ok and now let's make this venue smaller we will see that the - Wanda were all the centerpieces and all the other one they're being fattened up so there are ready to check against each other okay one more things that we need to do here is we need to initialize this initial distance between average Hank and his partner and so he realized distance with closest partner and so as always as per my convention that storage this into a variable ok and then let's in Salida available dist for distance and then we can do is if if the partner value is higher than 0 so if you actually a partner then I want to know the position of your pastor and so part position is equal to point and this geometry and I want to know the tip and it will be there for the point it would be the partner point okay and distance it will be equal to the distance between ourselves and in in our partner of position and then later on we can do as you need distance is equal to distance type so now if we look here again am I making any mistakes and columns a is something of okay this works so now what we do is if we look this so all the partner with all the points the chunk that has no pattern obviously they have an initial distance of zero but as soon as we get a partner we will know how far away we are so chunk 5 9 1 9 he will live it will be zero point zero eight units away from its partner which is point number 650 that's pretty much the concept okay so now to validate this let's create point out of both those so let's delete the geometry and keep point let's lay down another ad and let's create a line between the the customer so let's say piece Heidi okay now here my group I have tribute icily and they are you elite so here we are at these points pretty much so now we found a partner and we initialize at the distance okay so what we need to do now is since we have this name on attribute to which actually tell us which we chunk every one of the small belong to let's confirm these two this this coming Laura stop so let's Lanie in three groups rename and let's rename its name to a mold okay and you go that's the only one we have now let's create a point wrangled and let's plug the new chunk with the personal information we just calculated okay she's this pretty much and let's get the Laura's simulation coming from God okay and now let's transfer this animation to this okay so what is happening now is that this simulation coming from that which is the lawrence us name attributed the match now is called a mold that match the mold that match and the name of the we upon this one also on the trim atiba the intrinsic value added information about is its transformation one of them is the transform and the other one is the food packet transfer which is spectacle transfer which is this one which actually us everything in there as rotation and translation and obviously scale which are taken into the value anyway what we want to do is now we want to read those map transformation matrixes and use them to transform those using the same name so in short every piece that belong to what they're coming from the same chunk will get transformed by death correct a relative laura's chant we were first we first look from here we looked into here and find which piece have the same name old value as this piece and so to do so we will bow I mean et it's equal to find attribute value attribute pal and what we will look we will look into the second input geometry so input one and it will be a point attribute and we will look for an attribute called named old mold and we want to match it against against the value of our self attribute mold okay so now this integer we store the point number of this geometry that actually at the same value of any point number in this geometry and so once we have done that we can simply query the transformation matrix s from this geometry using captain intrinsic and so we will start with the rotation so it's a matrix three and three it will be equal to renaming trinsic and which prim intrinsic we want to query so from the from the first input so this input we want to query the intrinsic hold transform and from which point on pity okay and then we will copy and paste this guide and this one will be up at the full transform and this one will be a matrix for okay so now that we stole the transformation matrixes we can even still a few other information for example the LA City and angular velocity so fact or other V will be equal to point from the second input so we want to steal V from this point and also we want to store the angular velocity which is lovely and it would be dominant second input you will be W and from this part okay so now we can transform it and first of all let's set ourself three intrinsic source a dream intrinsic and it's on our self and we want to set the answers for and for our current number currently processing in service wrangle and we want to set it with the information we store we stored the useless all with the rotation in this case and we want to set it okay and we will see them now oh yeah so sit another rotation are baked the rotation are working now the other things is missing this the translation and so we will do it with our matrix for since those are package geometry and they are only point they only need to the only things we need to do is really simply multiply this by this transformation matrix for prime C was precise okay so now they are all moving correctly based on the Laura's simulation okay and now few more things to do is to set up a velocity to the other video we stole before and to set our angular velocity W to the other W least or before and so now here we will let B and W working coming from the original dot the rest dot okay cool and here okay at this point we are here and we can see the animated high-res basis on Dolores simulation firmed up and the connection between all the efficient edges and so the next step will be to to measure those line and when they exceed the initial distance we store it to mark those pieces has broken so let's do it let's create another pointer angle okay and let's call it ma broken piece okay so let's first things first we are gonna create an attribute called found it will be our marking attribute them we are gonna set it right away to zero then we are gonna as always my power Kutner are yet after nap okay now if we looking the partner attribute we will see that who got a partner there is a value above zero and who doesn't is a value of minus one and so to to optimize a little we we can check against this attribute and simply say if the if the partner is bigger than 0 greater than 0 and also if has never been found ok then what we can do is first gather the partner position so partner seashore is equal to point zero e of this pattern point and we can gather also its velocity after Nobel is equal to point zero and this pattern point and then we can measure the distance again and this will get checked every frame and selector approaches as a float so float list is equal to distance between ourselves and the partner position okay now since this distance calculated every frame and since we have our initial distance here okay what we can say is if this distance is greater than whatever initial distance our peers have distance plus a little bit let's se let's set it to zero shoe for now and we will change it later so what we can do here is first of all mark them so simply found us plus and also let's mark their apartment so set point after good 0 found and this point and let's see let's set it 1 and let's set it ok another things that we can do is to set the current point velocity and so what we can do is set V equal to our currently plus the partner velocity and just divide it by 2 so we get a little bit of both now at this point we shall phones apologize okay now we shall have this attribute that mark the the broken pieces and so if we go ahead we will see that they goes from 0 to 1 now the only weird things are just notice is that some of them are already 1 and I do believe that the reason is because we are over set in their pattern and so perhaps we can we can avoid to set the part-timers posture and so let's comment this out and let's double check so another good there zero as the shoots at the beginning and they're getting one after a little bit okay so that's good so now all we want to do is to finally set the Russia body after good active and so let's lay down another pointer angle and let's put it set active and the back hold the cover okay and so here what we can do is as always partner tonight equal to I have to partner and so yeah we can simply say if you have the marked font is more than zero on this more than zero so if you be marked then you are going to be active if equal one and also you are going to be of color red one zero zero and we are going to do the same also for the relative part of and so set point our trip and so zero this geometry we want to set the active this guy and we set it to one let's reset it let's copy and paste and let's set the color forget after as well and so this will be a red and this will be sitting okay so now here we can simply do what it would promote since they are packet limited and just promote colors from foreign to primitive so we can actually see it and yeah perfect so now those got activated now there is a very little problem that we are going to fix is that if we look here some of those pieces they get activated and they activated again because they get back very close to each other and so the distance go below the tree shot and and so they go back to not be found and so they go back to an active value of zero in order to fix that we will do a little subs order that will accumulate frame by frame and so once they become one they will never go back to be zero anymore and so let's lay down a solver okay okay and let's get what even thought let's create a pointer angle let's input one of the first preview frame on the second and here let's just grab a new frame found below so we have found this equal to point one we want to get the phone's of every point and then just let's add this bar to the current found bar so found and now just to be safe let's just clamp this guy 2:01 Oakland he found one okay this should fix that and so let's go back and check perfect okay so now just to test it let's increase and it'll be this distance maybe say one very cool so now what we can do though is to randomize a little bit this distance per piece and so let's build a little random tree shot so let's do it we should okay let's create the unknown value equal to this point left fitting um okay let's create three shows slider or to channel float threshold okay so let's create the sky okay then random equal to channel channel float brand okay and then that's greater means it's equal to three shows - ran and then float max is equal to three should plus friends okay and now float you know and is equal to v one are indeed between mix means max okay and so also to not have at 0 at the very bottom of those father let's set these to 0.01 and a bigger value here okay so let's create this let's set the ratio to zero point you still and so now what we need to do is distance is equal to this final distance plus final render and that should be all about it okay okay so okay let's do a big number here and about the same there perfect okay so it's working I feel like this should be good enough maybe don't be a little small okay that's perfect so subs all their great phones okay so we're almost there what we need to do now is to create a dotnet look so doc network okay iris and and let's put this together so tragic body solar gravity okay a ground okay let's match those and packets geometry okay so this we said this hour of the wall and let's import it once okay okay so now here we can say overwrite attributes and this active value will get ripped from the above table every frame and we can also said since we did set its velocity over here we can go here and set this to him at a velocity from point velocity okay so we didn't set angular velocity yet but it's just a question to set it above over here and so let's see what we get oh I forgot one things we need to be here and set these two animated static objects okay No the show beads maybe why dozen dozen animate not even I needed to rest at the top Network now everything at activate the automatic is pretty cool okay so straighten out IRS we are almost there one things few things we still need to do is to so we got attrition limit random number and perhaps since the velocity is just right of one from the preview Laura stop maybe we can float we can add a velocity multiplier of equal to channel float well Mort okay so let's create it within the set is to show and now what we can do we can we can set the angular velocity as well okay W angular and then here we can just do this w w Angela and then here we can say yet we times equal how did we call it the mold the mold and also we can do the same with tongue what our velocity velocity and then here we can say V that W is equal x equal and okay and let's this to show as well so now just for the sake of it let's increase these to 5000 and let's make it 5,000 and let's bake it okay let's watch to some playlist to the final result to it higher setting for Voronoi and see what it look like very cool so we can see that all the in-between pieces that get activated correctly they have some some sort of realistic direction where the chute and rotate and the result is very believable and is very good to work on Loris geometry in this case is very very very various but if we consider that we started from here and this is what we had so you a bunch of very simple pieces and with some little trick we got to something very complex like this American - and of course if you prepare the geometry in advance and cut the geometry most properly now it's just a simple Voronoi this one is a very high respond it has some nice balance in it there are some nice pieces and also is very good to see how the velocity that we set actually worked very well when the pieces move a rotate but if you consider where we started from and what we were working on which was lighting this one is very fast to iterate through very fast work direct is just a bunch of pieces you can even work on those separately setting some custom velocity to make them do exactly what you expect them to do and then just going through a very simple and short setup like we did you can achieve something very cool like this one and this one is another one with two more close-up so everything is taken care by the tool and you just do the rough cremation or simulation of the low res pieces it's very good and they'll be using this since almost 10-15 years I started to do this and then I just carried this simple technique on and over and over and over along the year so this one is what the activation look like this one is our fastest to complete everything we did during the Houdini session so you can literally m/v sorry check in real time whatever that could be the activation is what you SPECT and if not you can just tweak it before going into the dots so for example if we want to get less of the edge we can just go back and make smaller values here we need to wrestle for the subsolar to pick up and now we will have a smaller selection radius for for the pieces okay let's make it even smaller variable a very small one so and yeah so that's pretty much it hope you enjoy it and hope it is useful and you're gonna end up doing something good with this so thank you so much and bye bye [Music] [Applause] [Music]
Info
Channel: IDAVFX
Views: 12,585
Rating: 4.9447002 out of 5
Keywords: Houdini, Rigit Body Destruction, Destruction, Demolition, Destroy, Design, New, VFX, Visual Effects, Attache, Masterclass, Attributes, Names, Constraints, Zerstörung, kaputt, brechen, break, pieces, dust, smoke, rauch, cracking, crack, fragments, frags
Id: s9DjkDt-6Js
Channel Id: undefined
Length: 69min 47sec (4187 seconds)
Published: Fri Apr 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.