Houdini Algorithmic Live #108 - Strip Encoding

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
boom hello good afternoon this is June jorikawa this is this is supposed to be weekly live stream for Houdini reading alchemic life this is a tutorial live stream for Houdini which I've been doing weekly but for this two weeks I've been a bit busy doing all sorts of works and workshop wasn't able to do the live stream so here it goes um it's been around two weeks okay so the I still want to continue doing this so let's do this so the topic for today topic for this week is to uh create a strip out of an input geometry bunch of strips wrapping the geometry like this you can also change the resolutions by changing the resolution of this instant mesh and another things that I want to implement today is to uh kind of be able to peel these chips procedurally using kinfx like this to give a little bit of interest on this strip encoding so that's my plan for today and from scratch okay hello hello everybody so for today it's going to be the let me first tell you the base um workflow for today how I'm gonna implement this so first of all what I'm going to do is to prepare an input geometry as always obviously and next what I'm going to do is to create a quad mesh out of a geometry and pedometry using a plugin from side effects Labs called instant meshes this is an algorithm developed by a researcher in eth Switzerland which will enables you to create a quad mesh like these a nice quad mesh like these from your input geometry and I am going to use this as a base to create a strip quad faces okay then I'm going to create a flow using for each Loop to create a bunch of strips out of these quad mesh like these randomly and then finally I'm going to create some code to be able to unroll the surface unroll the strips using keyfx procedurally as you can also change the angle how much you want to roll and probably the timing as well like that okay so that's my plan for today hopefully all gonna be interesting all right so I am going to create this uh tutorial from scratch I just wanted to show you the base process what it's going to be like because this is probably going to be a bit long to explain but as always I always explain it from scratch so hope you'll be able to stick with me all right so as always let's start from geometry node then first thing first we need to prepare geometry in order to uh create a stripping strips quad strips so any geometry is fine I'm going to use a test geometry which is uh complex enough to test out if it's just a sphere box might be that too easy that might not have many conditions unexpected conditions so it's probably better to use a rather complex geometry like these you have then surface like here you have a concave area here and so on but anyway I still need to fix this geometry a little bit because I want to make it as a one continuous solid geometry and I am not sure if this is a solid one especially inside a mouth or where the eye is so I'm going to make sure that this is going to be the solid closed mesh so what I'm gonna do is to create a mesh out of VDB so first I'm going to convert this into VDB with some high-res and I do see some edges here so maybe it might be better if I could if I do the subdivisions before just before convert it into VDB so that it gets a bit more smoother okay then make this back to a polygon to make it as a solid geometry also make sure that you check fill interior so that the older um volume is going to be the volumes inside this geometry is going to be filled so that's come it's going to become a solid geometry then converted this back to a polygon okay I guess this will be okay to test out in order to convert it into a quad mesh so let's do this and let's also create a group node oh you can not hear me let me see let me see if I can uh raise up my volume how's this can you hear me my microphone pretty close to my Mouse all right uh where was I so I'm going to make a group node or primitive say this is geometry or Geo okay let's uh cover this with the group Okay so what I want to do next is to convert this mesh into a quad um faces so in order to do that I'm going you need a side effects Labs being installed in your Houdini application which you can do this from here if you go to the launcher you will see you can download or install the side effects labs based on your version of your Houdini okay I'm using 19.5 so I have installed this one to be able to use it and if you have installed it successfully you should see those icons on side effects Labs tab from somewhere from here okay now if you have it installed you can use this Labs instant meshes which you cannot really use it in default if you are using Macintosh I mean if you're using Windows that's not a problem because you have this instant meshes in a specific folder but in terms of Macintosh you don't this is not pre-installed so you have to download it by yourself so you should go to the link you should click this button to open up the link where you can download the instant meshes application which is this one here if I'm using if I'm using Macintosh you download this if you're using Windows you don't really need to do anything okay then if you have installed Macintosh then you have to place that instant meshes dot app into a corresponding folder which is placed in this directory now you can check what that is by going into a window a script export paste that expression paste it and you should be able to see the corresponding directly for that so then you can now go to that place by opening up open up the um go to folder finder message and then there you go you can open that folder and I have already copied the applications inside this folder which is called instant meshes dot app for Mac if it's Windows that's EXE if it's Linux something else then once you copy that file you have to go to that place go to that application using clicking this directly button and inside instant meshes.app contents Mac OS and there you go you choose this one now you should be able to see the quad mesh being appeared now it also has the original mesh being covered you also have the original mesh and you have also have the quad mesh so you don't really need the original mesh be merged so I am going to delete that by using this group that I created if you're using Windows I think the version for the instant meshes is 2.0 which doesn't really have the original mesh so maybe you don't really need this process but anyway I'm using Mac so so just delete it now you are good to go with this quad mesh okay looks nice and you can change the resolutions of this quad mesh by changing the number of polygons right here inside instant meshes okay like that and the parameter I would like to use for this one is I mean any parameter is fine it's not much parameter you can choose either you want to make it quite dominant which enables you to create also a triangles and sometimes a how do I call this a polygon with five faces five edges okay if you only want quad faces you should check this out you should check this off in our case we want to create a strip from a quad faces so I guess it's good to go with without this checked on and deterministic not really sure what that what this do honestly looking at the result on and off can't really tell the difference okay so I guess I'm okay either way so I'm gonna make this checked on for now right so I guess it's also a good idea to have this being globally parameterized so that you can control this later so let's give a no node try to copy that parameter okay polycount is fine okay now I I can earn access to this polycon from this controller okay looks good let's go a bit lower as for now so that I can test out quickly though if I make this low res I have a little bit of problem on this ear because the ear it's a bit thin so let's make this a little bit thicker by modifying the VDB a little bit so I'm going to use bdv3 shape SDF to delete delete means inflate which will make the geometry a little bit inflate it will make it a little bit thicker now I might have going to have some problems where it has a small connections like these so let's also fill that up just um get rid of the mouth by making this go or making this reshape a little bit smaller so that you can have enough opening like these maybe that's good yeah maybe this could be a good condition to test out if this is also going to work or not all right so looking at the polygon okay good enough for testing and I want to make sure if this is like one continuous solid object so I'm gonna check that by using a connectivity node for primitive and you can check if every node is connected by looking at the geometry spreadsheet looking at the Primitive Tab and if the class is more than zero then you that means you have like separate geometry but if the class is all zero then that means everything is connected so it looks good but just in case something um class might be more than what zero I might need to give a little little fix code in order to make it as a solid geometry so let's create that kind of situations by making this a little bit fatter in this case I might going to have an inner geometry yeah like that so right now you it seems like it's a closed geometry but if you go inside if you open up the geometry using clip you somehow see a another geometry inside yeah I like that where the mouse is so you want to get rid of this one for later process so in order to do that I'm going to measure the area based on the connected geometry based on class which comes from connectivity node and then each primitive stores the total area of each connected pieces like this so one of the connected piece has 30. 13.26 as an area another one where the class is equal to one half point two and what I'm going to do is to just get the largest area connection so in order to do that I'm going to create a little script here and also I'm going to sort the geometry based on sort the Primitive based on the area so that the largest area comes first in terms of the ee index okay like that um oh um someone commented uh George commented use Labs delete smaller didn't know that one exist Labs delete small parts oh that looks good okay let me try let me try again checking the connectivity maybe I can just do this oh maybe I needed it hmm not yet I guess so I should check with this one uh let me see what I need to do here extract large pieces okay I guess that's needed oh yeah worked nice thank you this works out great okay so no script is needed if you're interested in using Code like you would also do this but let's skip it if it's not necessary all right that's good so let's just do this and go to the next step so um also going to calculate the normal at this point just in case I might going to need this then connect this to a new node which I might going to refer to later okay so um Fallout said I would like to see it done with Vex as well so I could also show you how this might be able to do using Vex so in my case what I would do first I calculate the connectivity calculate the area and sorted out based on the area so that the largest comes first based on the attribute area and check reverse primitive sort then what you're going to do now you just get the first primitive class by which comes from the connectivity this mean first primitive in the index then if the current primitive inside primitive wrangle class is not equal to the first primitive get from the first index then just remove it now the number of primitive 2104 this one two thousand one hundred so so it's the same you are good to go without any small parts so that's uh another way but it's comparing this one to this one obviously this is much easier yeah all right that just in case as for your reference may be the technique could be used for it other purposes all right so let's go to the next part um let me cover this with the network again okay so what I would do now what I would like to do next is to start creating the strip okay so the one I'm gonna do uh the way that I'm going to create a strip is recursive recursively going to create a strip so first thing what I'm gonna do is to choose like random edges or your own chosen Edge from one of the Primitive from this geometry such as these Edge just pick one of the edges and what I'm going to do is to simply try to follow a similar process that's used in labs Loop from selection okay this Labs from selection is pretty cool what it does what it does for you is to enable you to select the looped quad from selected Edge like that which is pretty cool the problem with this one is that um problem is this is that um you somehow have these cross selected Loop like these and I don't really actually want that I want to be able to have only a sing I don't want to have any like Crossing like these instead I just want to have an ending I just want I want to have some splitting at the corner this way or this way right so one way to do is to create a similar process without using Labs form selections by yourself and try to implement the similar process but try not to cross the already created section already created strips so that you can unroll it later if not you can try to use this one instead and create a split where you have a cross that's another possibility um so um I guess the latter process just trying to use this one and then try to create try to like split the cross part will be easier I guess so I might want to do this but the way I did it previously is just done it [Music] by my own algorithm came up with my own algorithm but that might take some time so maybe uh I didn't really tried it before but I could try to use this one instead to see if it's gonna work okay I have a question um if you wanted to convert these selections into a spline how would you do that meaning to collapse that selection into a spline I think like taking a bandage wrapped around the head and convert it into a bandard of thread of string well I could show you that later um yeah I could show you that later I mean I I am going to do that later for unrolling purpose okay but simply um you just take a connected piece from selected primitive for example if you have selected this primitive then if it's a strip you know that the connection is the neighbor the number of neighbor polygon is always two one two okay and you know where the edge is where it's connected to the other polygon by looking at the half Edge so by getting that getting those half Edge informations you'll be able to get create the line connecting from this to this okay and you do the same for all the quads and then obviously in the end you'll be able to create a thread or string out of a primitive so that's the way okay hopefully it makes sense so shall we try to do this from this Loops from selections because this looks easy to use isn't it you don't really need to care about the more more of uh half edges by yourself for these connections so looks pretty good cool but we have to kind of uh solve this kind of situations by ourselves how we're gonna solve this and so on okay so how are we gonna do this how we're gonna approach with this strip and say we have started from this Edge and the prim the strips goes to this direction [Music] and the first um strip should be able to go straight because there's still no Crossing yet but then this goes like this this goes like this goes like that it goes like that and then you start to have a cross here okay this is where you want to create a split right here and right here so in order to check that you might need to [Music] um run through the strips one by one to check whether you need a split or not otherwise otherwise well let me just try try to get this corner like the cross cross primitive and just randomly pick one of the edges to split and if see if this is gonna work relative wrangle if not maybe I'm just going to first of all try to implement by myself without using this one and later on I can come back to this one to see if there's any other way to do that so um the output quad group is quad loop so looking at the quad loop and also where it has a quad loop I want to split it into a separate geometry so let's create a split like that so you can extract the strip only the strips like this then maybe I don't need this then I can count the naval primitive by using poly Neighbors okay and if the neighbor polygon the number of neighbor polygons is equal to four that means you are at this cross Center then that's where you want to create a cut or split to the edge one side or other okay either this side or this side okay so I'm just going to get the first half Edge from this primitive which is which you can get it from Prim Hedge the none yeah okay so let's say this is this is the starting point and this is the end point for the half Edge go from this point to this point so let's say this is The Edge that I have just picked here now what I want to do next is to get this Edge number which is the next hedge is this one and the next half Edge this one so you do the next operation two times to this hatch so the other side hedge is Edge next and do the same hedge next again to go to the other side all right now I can now get the this hatch and this hatch and what I want to do next is to give a edge group to each of the half Edge so that I can specify these edges to cusp or split so in order to do that you need to have a point number for each half Edge so I'm going to get the T1 from the half Edge you can get the Source Point using function call hatch Source Point and the point patch destination point okay that's for the first half Edge and for the other side can pretty much do the same thing just change the variable now you have one Edge with two points another edge with two points you can now set the group to the edge let's name this cusp 2D this Edge the order doesn't really matter you can start from EPT to SBT one in terms of the edge group okay that now hopefully this will enable you to select these edges let's see if this is the case first I'm going to check again the connectivity to see if this is all connected as one piece just in case all right and after I have splitted these edges the connectivity changes should changes should change the class number should increase so that's what I'm looking for it's so let's see if that's gonna happen so in order to split the edge I'm going to use the Edge cusp and the group is cusp and also check this cut boundary points which would increase the vertices it didn't really increase the vertices I'm not sure if it's going to work but let's see if the now I have connected uh the connectivity and let's see the number of classes changes and it did yeah so based on the connectivity let's try to color pieces and see how it's being distributed primitive random form attribute class okay so this seems to be the connection now this looks a bit weird but overall looks pretty nice okay you have a little bit of problem here you also need the split and here okay so it seems like it's I don't know how what's going on here let me check so you need to figure out for each of those Irregulars because this might gonna have okay so obviously this is not a good condition you don't really want to have this kind of conditions here so in order to fix this well you need to do probably so okay here here here all right so this could be the problem right here where you have kind of a regular square piece creating a triangle with three squares most of the time you should create squares with four squares but this one's instead creating triangles with four three squares so we need to fix this like um situations obviously so how we do that but for now all the other part looks okay it's not really a one continuous uh things because it's been splitted so if you want to make sure that if one of the pieces going to be really long also covering these crosses this one wins over these crosses then you have to calculate it recursively but that's going to take a little bit of calculation time so let's go try to go with this approach for now but we still need to fix this part for sure okay so the condition that I have set here is the neighbor polygon is equal to four so this also the condition also applies here as well so probably you do have a split since this one has been splitted here I guess there is a cusp on this Edge as well let's check bye selecting the point try to move that point if this is not connected okay yeah then that means you have splitted this Edge so what I want to do next is to try to also split these edges being connected that so we need to figure out the conditions of this one okay so in this case if you look at each primitive you have three Neighbors okay and let's see if you have that kind of conditions anywhere else like this one yeah this one also have three this one also have three but other than that I don't see it so maybe that might be a good condition to test so let's do that shall we I'm going to after I have splitted the corner the cross Center I'm also going to try to split the primitive that is connecting with three primitive three Neighbors and I want to make sure that I am not splitting this part but just this part which is which is which you can see the conditions that you don't have a other side primitive for this Edge for this Edge and this Edge you do have a primitive on the other side but this but for this Edge you don't really have the Primitive on this side so I guess you there is a rule too be able to specify only this Edge to be splitted so first of all check if the poly number is equal to 3 right then again I'm going to get the half Edge just like I did randomly now what I'm going to do the next is to probably just go over all the edges four edges because I'm only working on the quad I know that there is always a four edges so I can just loop with four to check all the four edges if you have specific condition okay so off edge is equal to Edge next I'm just calling next four times overriding the original hatch meaning you always come up with a new half Edge if you start from this one then the next one is this one next one this one next one this one and you're gonna do this four times okay so that you can check all the half Edge now in order to check if there is a primitive on the other side you can check it by getting the next equivalent half Edge by calling the function called Next equivalent okay so if the half Edge for this primitive goes from this point to this point the next equivalent goes from this point to this point the order is reversed okay but in this case where you don't have a next primitive than if you if the half edges go from this one to this one then the next equivalent half Edge will be from this one to this one become the same half Edge okay because you don't have the other side so that's the way you can check if there is a polygons on the other side so if off edge is equal to and next equivalent Edge off edge then that means you don't have any next primitive so the other side will be going to be splitted so just split it half Edge half hatch half Edge is going to be the next next half edge off this one so looks confusing but if you try to draw it in your mind will be easy okay so this should be the edge that I want to split this one then in order to split it you need to have again the end point so let's start like that then finally you can set D group T apt here we go shall we just check it with the color and see if you have selected the correct edges um okay I don't see anything so maybe I'm just I'm doing something wrong now I see it okay looks good um I might need to change the name of the edge group all right so looks good this is exactly where I want to split um all right so it's split it cusp 2 okay now let's try again to color the strip and there you go nicely split it alright so everything else looks fine I guess I could just continue um okay I have questions will you provide a project file um yes after I have finished the straight stream live stream I'm going to upload the files the very file that I'm creating right now to make it health you can download from our video description page of this live stream or from the patreon um uh this is something I really wanted to learn thanks if you can just quickly go over concept a bit more that will be perfect and maybe talk about and alternative Pro approach or is it really know though uh hedge next is your own defined variable right well no pitch next is the function defined in Houdini anybody can call it you can check that by going into the Vex function page from side effects if you search for hatch next you have there's a function preserved in Houdini which you can call to get the next half Edge numbers these half edges are really important data structures for geometries which you you would use a lot if you're going to do the geometry processing using vex so you might want to look into these functions okay you could also go to the half Edge section here on Vex where it explains what it really is in Easy manner right well explained so now that I have the initial strip I just want to continuously doing this again and again to the other uh leftovers which is these pieces okay doing the similar operations until you are filled with the strip okay this is looking nice actually and in the Vex we're all going to make design course you don't have a lesson on point clouds I would like to do a lesson ongoing Cloud functions ah I guess that's correct maybe that's a good topic to go for yes I I'm going to I think I'm going to do that sometime all right so let's continue um so where was I so now that I have these I think I can just reuse these functions and again and again recursively to those leftovers so let's create a for Loop recursive for Loop to be able to do that make a feedback loop fetch feedback and I guess we should start from the original piece this one uh maybe this one from base here okay now first thing first in order to use this Loops from selection you need to select the initial Edge okay that means that means you need to have some kind of a way to select the edge initially or for each feedback or each each Loop probably I can just do this randomly probably so how shall we do this maybe the initial Loop could be random so in order to select the edge randomly from the input geometry I don't know what's the best way I don't really know what's the best way maybe I'll just use the attribute wrangle make it as a detail then just select whatever Edge inside the geometry okay now how do we do that hmm let's see let's see what I did previously I guess I could just get a random points out of those primitive then just get the Naver points from that point then you get an edge so the number of points you can get from end points and the number index can be retrieved by just multiplying the randomness to this points with the seed value the randomness is in between zero to one and multiplying by the number of points will give you some index let's also make it as an integer then get this is this is going to be the point number which in which I want to select randomly and the next Point number let's say this is pt1 the next Point number could be a neighbor point to this point so never tt1 and 0 0 means the first neighbor point now let's say this is the randomly picked Edge and set Edge group zero start um 51 pt21 all right let's see and let's try to color this with start see where where is that start Edge okay right now it's right here if I change the seed just randomly changes all right I guess that's fine okay and let's make the feed Loop just equal to one so that it will be just one Loop just copy the whole process to here and let's try to use that start Edge group instead of just picking by yourself like that and see if this is going to work okay seems like it's working and if I change now this is a Sim rather simple Loop if I change the seed now sometimes I get really busy connections like these which I don't really like because there is all a lot of like just one pieces might not be a good start maybe I need to figure out what's the best start seems like I often get this kind of massive connections maybe it's due to this primitive but it's really based on the if I there is kind of a no way just oh wait maybe I can stop picking up the Edge by limiting the number of steps here but now the problem is it just offset some random Edge which I don't think I like it but I also don't like this condition this wall if I just pick one of the pattern maybe I can I'll pick the smaller Edge instead so let's say the maximum connections will be 100 okay which will create this kind of a small connections which I don't really like but it's so in order to not to have this kind of conditions you have to implement this node by yourself so that you can have more flexible control on but okay so that's a little bit of bummer but so well maybe I can go back later to fix this one maybe as a past process but for now let's try to see if I can go with this process now what I wanted to try out is to change the seed see if I can have different starting point and yeah looks looks nice all right overall looks good and then where was I so what I wanted to do is to continuously doing this for the other leftovers okay a bunch of questions what do you mean by recursively so what I mean by recursively is to do the same process over and over again than what I have done here to the leftovers which is these one okay these are the leftovers which doesn't have a strip yet so I'm just going to fill the strips with these over and over again until it just eats up everything okay all right let's see so in order to do that I might need to set some groups so let's say going to create the group called empty to the initial white geometry right then going to create a split node just before connecting to the look from selections and use empty now the empty comes from the left the other side comes from the right side and the other other one that's been created as a strip I'm going to attach a group called strip right so the strip comes from the right hand side and the mt1 comes from the left hand side right now this is also the what is it this is going to be the next empty um candidate right which should be added with this one and the one that's been converted into strip you should remove the empty group so use the group delete and just delete empty okay then all you need to do next is to it's also name this new strip what you need to do is to merge all everything together for the next iteration okay everything merged now if you go to the next iteration did it change anything nope that is because you need you also need an additional information which is this start group for the edge you have to pick the new start Edge from this new empty geometry so let's also try to do that I think it might make sense to just pick an edge from one of the geometry which is attaching to the border of this empty geometry so let's create a group called group for the boundary Edge maybe for the edges okay now the boundary has been selected what I'm going to do is to con find the edge which which is connecting to the boundary going perpendicular so something like this or this or this or this okay so in order to do that in order to do that what's the best way let's see what's the best way hmm I might also want to have a another group which is for the point which is also for the boundary so that I can only look at those boundary points to check to start find the edge starting Edge okay so from these edges I just want to find the single starting Edge just gonna use an RGB Wrangle with the detail all right so first thing first let's get the Point numbers which has this boundary group as a point so end PTS or boundary BTS is expand Point group standpointful group will give you a number of points the point list which has a specific group in this case boundary all right now I'm just going to randomly pick the points from this and see if you can get the starting Edge out of that so and PPT is equal to bpts names of the pts multiplied by Randomness again some kind of a seed number not just a single seed but since this is a for loop I could also use the Loop iteration as a seed value so that each Loop will give you the different numbers okay something like that and make it integer then hopefully this will give you the random point out of the boundary points now next thing you want to do is to get the perpendicular Point neighbor point if you have picked this point you want to pick this point which goes from perpendicular to the boundary so you want to Omit getting this one or this one but in order to do that you need to check if this point is on top of the boundary or not okay so you can use this boundary Edge group to check so um the condition is the condition is four wait first of all I need to get all the neighbors from BPT then look for Loop into this Neighbors to check each of them to see if this is on the border or not okay so to check in on Border I'm going to use a function called in Edge group which you need the input the group name Point number one point number two so when the edge group is again the boundary then the first point will be vpt the next pointer will be the neighbor point if it is on the order you want to skip it so zero you want to use that okay so in that case [Music] um the start point I'm gonna set the start Point here start set Edge group start vpt neighbor one how's that and let's check so where is that do we have it somewhere okay here we go so this is on the edge you have an edge like this now if I change the seat number I want to make sure that this goes okay with any kind of c number where is it okay this one's good this one's good okay this one's good so so far it looks good so let's go with this one see if it's gonna work Okay so first Loop second Loop I do see an edge being created looks good third third Loop another strip being created fourth and if you just increase this start to see strips but the color is every every color is of its same so I want to change that gonna bring this one to the end all right although I want to also make the empty to White so that I can see which one's empty okay so you still have some empty spaces even if you've done 100 iterations what have I done thousand iterations okay now I think you have failed the pig head with a bunch of strips sometimes you have a small strip like these which sometimes you get it you cannot avoid it so let's have a little bit of bummer but what if I increase this number to something 300 still okay now let's go with 200 for now and what I want to make sure is that I want to stop as soon as there there are no like any candidate anymore to fill in the space I mean meaning no new empty space no new empty primitive is available in those cases I don't really need to do the loop anymore so I want to make sure that when to stop that okay so if I look at the current Loop which is a thousand I still have a pieces left which has been left over which if I look at these you can see the characteristic of these pieces that everything is just one primitive one primitive which is not connected to any um other primitive as a neighbor so if you only have primitive that has no connections then that might be the conditions to stop looping so in order to get that kind of information maybe you could create some attribute for that first of all you get you count the my primitive Neighbors what was this for this is all okay so this is to calculate the stop condition first you call Q8 the number of primitive by getting the poly Neighbors all right like that then just place it as an attribute or primitive for now then you get the Primitive attribute called length yeah zero so if you have if you have more than one for this one equal or more than one for this length then you still can find the start edges but if you only have zero then that's the time to stop so let's get the maximum or out of these primitive attribute by using attribute promote more primitive to detail just get the maximum set it to Max then then check the detail okay so I'm going to check this number and if this is equal to zero then that's the time you should stop doing the loop so I'm going to go to this forage and there is a parameter in order to stop the loop so I'm going to create the expression looking at the detail value from the new empty node checking the Max lamb value and if this is equal to zero that's when you want to stop and you can see that the loop has stopped at 289 . console you have omitted other 700 loops which makes it a little bit faster for operation all right looks nice looks nice now let's check with other parameters like the number of polygons or the instrument meshes see if this is this still works okay looks good maybe I can also set the parameter for the the number of the max length for the strip okay which is set to 200 right now so let's copy that parameter to the node controller I'm gonna name this strip next strip thing I guess I want to make this I want to make the maximum two thousand okay right and if I make this the thousand what would happen not bad not bad well I do have a little bit of problem right here so maybe I can I might be a good idea to uh reduce the number after all okay well let's also reduce the number of polymathons for testing fast testing okay I could also change the random seat I could also have a parameter as a random seed which I had set two times somewhere one for the random start Edge okay this one and I can just reuse this seed to the other seed so I'm just going to copy this one and I have it right here paste it oops okay now I think I am now able to change the randomness as well all right all right starting to get interesting hopefully now in terms of creating the Strip This is pretty much it now the next thing I want to do is to create the unrolling part how I how we can we make a peeling effect to this strips okay in order to do that I'm going to use a kinefx a rig function okay let me know if you have any questions so far not I'm just gonna continue all right so in order to what I want to do now is to create a peeling effect which is which I'm going to use a first of all I'm going to convert these strips into a polyline then going to create a rotational um interaction or movement using rig attribute wrangle then I'm going to copy that movement or transformation back to the original strip using a deformation right so first thing first let's convert this primitive to a bunch of lines or polygons polylines before going into kinfx sections explain the concept again um doesn't much have a concept it's just uh play that I'm doing weekly in this week I'm just trying to encode the geometry the input geometry which could be anything other than pig head it could be like sphere or anything and just convert it into a bunch of strips or Square strips then full fun I'm just trying to make it peel animation out of it not much concept here just for fun does it make sense not anything practical in terms of the artificial like concept not much I just find it could be fun I mean you could also like unroll it to a flat like surface and you could maybe send it to a digital fabrication machines like laser cut or paper cut cutting machines and Stitch it together by yourself to create a physical object that could also be possible because this is just a strip of squares it's easy to unroll into a flat face flat surface that might be interesting things to try out all right so let's see first thing first let's convert this into a polyline now in order to do that I want to make sure that each strip is being splitted and you can check that by double clicking to one of the faces and only the connected piece will be selected and I think everything is being splitted to a strip so that's cool that's cool so if you get the neighbor out of the selected piece you only get the connections between you only get the neighbors from the connected pieces so if I get the neighbors from this primitive you only get this one and this one so knowing that you should be able to get this Edge and this Edge using the half Edge informations get the Middle Point Middle Point connect it create a line simple as that so let's do that primitive for angle first of all let's create create that kind of conditions looking for the Primitive having two Neighbors then get the half Edge get the Middle Point connect the line first thing first get the neighbor Primitives all right then if the lengths of neighbors are equal to two then you want to start looking for the half Edge which shares which have the neighbor primitive again we did it we did this kind of searching somewhere when we were looking for the starting Edge so we can just copy uh no not this one cross Center three Center yeah somewhere around here maybe I can just copy all these and reuse some of the code that I wrote copy go back and so so getting the first half Edge randomly Loop four full times okay get the half Edge get the next equivalent Edge then if it is it's equal meaning there's no a neighbor primitive in this case you get a you created a edge group but in our case we want to look for this edge here where you have a primitive Naval primitive so the condition should be not equal meaning you have a neighbor primitive then you get you can get the next next half Edge if if you're looking at this half Edge then the next next half Edge will be this one and you should be able to get the starting point for this Edge but you also need this point as well so you need two Edge points and one for the half Edge all right maybe I can just do everything inside this condition here and I don't really need to set the edge group but instead I won't just I just want to add the line so in order to add the line you need to have you need to create the new points in the middle meaning you need to know the position for this starting point and end point get that information using vex okay okay that's for one of the edge this is another Edge then calculate the middle position just by adding two points together and divide it by two divided by two all right finally I can create a new point for those Middle Point and connect it as a line okay how did it go it's a bit hard to see because I also have the overlay primitive so let's remove that to see if it did work all right nice now I still have the leftover primitive which is the one on the edge where the neighbor primitive number is equal to one so we also need to create the conditions for that one so let's think what will be the conditions in order to create the connections in this case before removing the primitive so we need to create the line like this since we don't have any neighbors for this primitive on the other side we need to search create the other conditions in order to create the lines connecting like these so if you have only one neighbors then that means you're just going to use that neighbor primitive connect it with other edges which is pretty similar to what I have written here okay so I guess you could just say to less than two that might be just fine and there you go it's just fine if I remove it every primitive has been removed and you have a nice line string line connections convert it from a strip and we can use this for Keen FX all right so in order to use it for kinfx let's clean this up a little bit fuse poly pass to connect all the lines together as one polyline so you have like 208 pulley lines and it should be the same number with the number of connections or number of strips so let's also check that going into a primitive check the class numbers and what's the maximum Plus 228 13 so seems like you are a missing some lines which could be the one that has only one primitive like such as this one let's check if we have lines on top of this primitive nope we're missing we're missing it so I guess we want to create that one as well preferably this if this one goes across the line that will be great but let's not make well this gonna be a bit of too many conditions to search for so just just try to create the random directions either this way or this way either way is playing so to do that that is the condition where the number of polygons number of neighbors is equal to zero so in terms of when The Neighbor number is equal to zero week I guess we need to do something else rather than doing this okay so in that case in that case let's see what will be the best um well in that case I guess I could just say before if the lengths of police is equal to zero and or just zero then I can just use this hatch as it is without checking the next equivalent oops nope actually that's not a good idea because it's creating in both Direction somehow that's not really good just um okay as soon as it's been added you can just break the loop and that's it okay that should do it all right then the number of primitive because becomes 213 which is the same as the total number of which we've seen here cool or is it one number larger than this one [Music] not sure am I missing some thing here let me see if Lings police says e code larger than zero eat it this will keep the single primitive I'm gonna check if you have a line created to those places what if can remove hmm okay okay now I see it um the reason why this one the total number of primitive connected pieces are a bit less is because probably the one line have connected other pieces together that might be the reason to become a big one polyline okay so I guess that's not a big problem let's just remove all the Primitive okay so now it's time to try to use the kinfx to first of all animate this somehow I am going to use a Rick doctor first of all in order to create the initial transformation information to each point so we we can use the rig wrangle all right looking at the point should be able to see the local transform and transform and that's the Matrix transformation matrix you want to control over rig uh wrangle rig wrangle now what I want to do is to try to create a rolling effect or how do I say um rotation effect to the strip looks like it's being rolled peeled like orange okay that's what I would like to try out in order to do that you need to figure out how um what's the access for the rotation what will be the angle for each point so on okay so first thing first I'm going to try to just do this manually to check if it's going to work so in order to rotate the point wrote um roll the primitive using array triangle and now I can use the rotate [Music] get the Matrix local transform and rotate it by some angle using some axis rotation axis if I increase this so to see that the pieces are being rotated based on this angle but this is exactly not the things that I'm looking for first of all I don't really want to rotate the the starting point of the primitive so I need to figure out the specific angle for each point also the axis should be equal to the perpendicular directions from each point so that's also must be figured out so first thing first I'm going to create a tangent Vector along the Curve using Oriental long curve which will create a tangent named as n like that these blue lines these blue vectors are going to be the tangent which is n the up I don't know what up is see this could be the term perpendicular about not sure if I can use this as it is for rotational axis um pretty decent but the one that I like that I want that I I'm looking for is the one that's aligning to the surface but these ones are inserted I mean going up going inside the surface this one is going outside the surface so not very useful so I'm gonna recreate the perpendicular directions instead of using this one referring to the normal of the original geometry and try combining with the tangent Vector of this curve I'm going to create I'm going to estimate the rather best up Vector instead of this one so I'm going to turn this off then go back to the original geometry with the normal on okay connect this one here so I think I can refer to this base which you have the clean normal directions let me change the normal to points okay so let's refer to the space to get the normal Direction on the surface there you go oh I'm going to calculate the up Vector by myself or not maybe not the upper Vector but the axis Vector for the rotation for each point so first thing first I'm going to get the closest point informations by using a XYZ disk function from the current Point positions you get primitive and UV then you can get the normal Direction using frame UV form one the name of the attribute you want is the normal frame would be all right then that's the normal you get and now you what you want to have is the one that's um the cross Vector between the cross product of this normal and the tangent Vector of this point so axis is equal to cross the tangent is currently set as at n and this is the normal Vector coming from the surface then calculating the normal product and normalize it you should be able to get the tangent vector and let's apply this to a point attribute and check I'm going to create a new marker to visualize this axis okay and if this Edge or if this direction is aligning to the surface that's what I want and looks like this is what I want and this is going to be the rotation axis I'm going to rotate the Primitive way along with this axis which will create the rolling like that in this using this axis okay looks nice we created now everything is ready going back to the rig instead of just using x-axis I'm just going to use the one that I've just created and also for the angle I want to make the angle based on the Point position so I am going to sort the Primitive for the polyline points based on the vertex order just in case so that the point order will be from start point to the end point then I'll get the [Music] first of all the Primitive number out of points using Point prims this will give you a primitive number which has this point then get the total number of points belongs to this primitive by calling print points okay now you can search for the current index of this point inside this primitive inside this point list which is just call it PT which is a um what was the function um find yeah find PTS which will give you the index of this list and using that index oh I guess I name this index using that name is an index you can finally create in which position the point is being placed for each point by dividing the index by the number of and to make sure that this is in between 0 to 1 I'm going to subtract by 1 for each index or just this one all right this will give you a volume between 0 to 1 . if it if the value is equal to zero then the point is in the first point the starting point if this is equal to one the point is in the end point right and I'm just going to multiply that value to the angle and there you go based on the position of the point you are now rotating you are now fixing the starting point but just rotating the end point just like opening the peace peeling the piece now I don't I still don't like the effect it's moving a bit too fast initial initially I'm also would like to fix that I'm gonna start rotating slowly then open up bigger so yeah the first angle should be really small I guess then becomes really big or either other way around if I make this three okay let's make this maximum to three so initially it's rotating a bit too fast and also don't want to rotate these parts initially you just want to start gradually rotating from this part to this part so in order to do that I think I need to create a conditions um the speed to control the speed of this rotation okay so let's think oh we can do that so um I guess I could have I could set the angle to the maximum as a parameter then other than this parameter I could have a maybe a slider value to control the animation so let's give that value how do I call this I'm gonna create the parameter call F which goes from zero to one and using this I would like to control this angle somehow give an angle as a variable depth and let's see if I mult just multiply f as it is and see what happens same as before now next thing I would like to do is to try to limit the value p um based on this F value So based on the position of this slider I also would like to control the range how much range I'm going to use out of this p okay sounds a bit confusing but what I just want to do is to use a fit function or this p and use f as a minimum value then probably one for the maximum for the sources and then remap it into an angle like that then you start to see a bit more like what I want maybe the angle is a bit too far and I might also need to add a little bit of numbers to this one okay okay so start to get something what I wanted having gradually rotating the pieces but I still see that angle the initial angle is a bit too high names and I want to make make it so that the zero is where you are closed uh you you have the closed Edge and then you're opening up by making this F value to one so probably I should go minus one one minus f okay now next thing I'll like to do is to figure out maybe I should also change this angle the maximum angle gradually based on this F value somehow so let's see if I can use 501 for f and set the angle from zero to the maximum not sure that's good maybe the other way around nope not that one not that good if I just use and go angle which is pretty much the same as before and multiply this by a small number something really big still not really not looking that good um what else I could do I don't know maybe I can just reuse angle as it is after all probably not that bad I guess it's a bit too chaggy all right anyway I mean it doesn't look that bad terms of the station maybe the initial gesture is a bit too big all right I want to see if I can fix oh maybe yeah not that bad okay let's try to go with this for now and we can come back see if I can change this update this a little bit later now what I'm going to do next um it's easy just changing these polylines but what I want to do is to feed this animation back to the original strip okay I want to do the same effect for each strip but if when it comes to a strip it's not that easy to do because um the rig Wrangle only works on the points or the polylines so what I'm gonna do I am going to use the deformation one of the deform node to do that capture the conditions and deform based on those movements and in this can in for this uh capturing I wanna capture exactly I want to capture uh really precisely so I think I there are no such precise capturing node exist in Houdini I believe in order to do that you need to again do some scripting so any capture will be okay but for my case I'm just gonna use a simple one while your capture okay the wire capture captures the geometry using polyline then using wire deform you can deform that to capture geometry based on the source and the goal okay this will be the source curve this will be the goal curve and using those two informations you can deform the Curve I mean deformed uh capture geometry in this case I'm going to capture this one now how do I do that um so in order to capture the geometry since everything is sticked together and since if I just connect this to a wire capture as it is and connect a polyline to the second input you see a bunch of those um wires trying to capture the strip all at once which is not really ideal everything is being like interfering to each other so it's not really doing well so instead of doing everything at once I'm gonna do each strip one by one capturing each trip one by one might not be really effective maybe they are other way but I don't really know that if anybody knows the effective way to capture the geometry using polyline please let me know but the way that I'm gonna do is this way so I'm just gonna show it if you know the other way I am more than happy to hear it okay so for each connected piece meaning for each strips I'm going to for Loop do the for Loop and for each one of them I'm going to capture 1.1 okay in order to capture you also need to have the corresponding polyline for the second input which corresponds to the this primitive and in order to get the corresponding primitive corresponding polyline from this input you should share some kind of informations over this one and this one okay so what I'm going to do is to copy this class attribute to the created polyline so that I can refer to that class to see the paired polyline for primitive four strips so this one the class goes to here and this print class will be deleted at this point so I'm going to copy this class when the line is being created set frame improve zero four maybe I can just use attribute transfer or the Primitive that's been created and just copy the Primitive attribute called class and the condition you can just remove the distance threshold copy it from the original geometry would that work Maybe not maybe this is a bit too ambiguous conditions so I'll just do it right here set trim group attrib zero class okay now let's make sure that the class has been transferred yes now after using the poly pass the class again disappears okay like that so we need to um bring the classic game back again hopefully this time attribute transfer might work transferring just a class I don't need a point and seems like the grass has been transferred nicely all right hopefully this has been transferred then I can try to use that primitive attribute just search for the corresponding one so primitive triangle first of all get the reference class by checking the class coming from the second input which is this one and then if the current class is not equal to the reference class then remove it then you get the corresponding curve compare with the Primitive here it is it is responded okay so you have the nice pair so you can have a one two one wire capture connection let's set the parameter to a decent number like this one okay well I don't know if this is good enough but let's also check the attribute roll point and okay so you see these conditions here and I'm not sure if this is good or not but let's say let's hope this is good and everything has been captured hopefully everything has been captured by this let me check run I'm just gonna randomly pick the edge this being captured seems like it it's seems like it's been captured yep although although I'm seeing some weird negative values here which might not be good well might be okay all right hopefully this is okay and now I can try using a wire deform first of all connect the capture geometry to the first input the rest wires meaning these curves which is not moving to the second and the one that has been um transform to the third and something exploded okay so something must be wrong sure okay so we gotta have to fix this okay obviously everything is going wild nothing is really good Okay so so where should we go first if we just pick one of it see if it's gonna work and okay I guess uh one of the reason it doesn't work is the number of polygons on the left hand side and the number of falling on their right hand side is different there might be there might be the condition like that um so let me check let me check so I want to make sure that then there are no missing class or this one and this one adjusting case I think the hopefully there are no missing pieces but I'm gonna make sure that there are no by doing what I did similarly last time first of all get I can copy the function that I wrote this one right here then instead of using this one going to search the number of primitive which has the class called which has the same class so find battery well and the number is equal to zero then obviously you should remove that capture geometry so playing Scream it equal to zero I want to remove it okay oh okay well seems like the crap class hasn't been transferred correctly because this those pieces not supposed to be removed okay so that's the problem now I see the problem the problem is this attribute transfer for sure damn it so instead of using the attribute transform I'm just going to use a primitive wrangle to make it a bit more safer to transfer the class just want to pick I'm just gonna pick the point from the primitive probably just get the second one the second point then um get the position of that point then get the point or maybe I can just do use the XYZ distance so I see distance from the second input using this position primitive and UV then I can get the class from this primitive then I can copy that class to your own attribute cream points okay how does it go Okay so hmm did it transferred nope didn't okay this one has a class this one doesn't have a class okay what did go wrong pinpoints so I got that point cut that position [Music] I got the wait um gonna have to get the Primitive from the second input there you go okay no more removed primitive so that's that should be okay now the capture has been done supposed to be done correctly and what happens now I should get all the informations all right well something is working okay something is working bad for some reason okay okay I guess that is due to how the uh this capture this Mario capture works let's look at where which one is that piece okay if I'm getting the right connection so the one that's messing up is this piece this piece right so now that I know which one's missing up let's see what's the condition here okay so this is the condition now this is a looped one like that now this is obviously it's hard to capture even though you have even though the edge is being collapsed or even the edge is being splitted what it captures is the whole connections and this one and this this points being joined when you capture using this one so obviously you need to figure out how to modify what's been captured here okay so let's see what's the number for that looped one okay I guess I shouldn't do this but instead should check class 197. so should the num number should be equal to mine seven or not six okay so let's see how the wire goes okay obviously it's just capturing like that this whole like sphere is covering everything up including these edges together that's not really good and also maybe the radius is a bit too big kit smaller but still you still have some problem here so we need to fix some captured information here so that it's it's gonna be become a clean capture okay so in order to do that we need to look at what is actually the captured data what is the attribute stored for the captured data if you look at the point attribute there is attribute like capture ring zero capture wire w000 capture wire zero w01 and it's pretty new you see attribute with this kind of uh bracket doesn't seems like a vector value doesn't seem like a full value something else Matrix maybe but I'm not sure so I have figured out that there is a node called capture unpack capture attribute unpack seems like these attributes are the packed version and in order to be able to modify these values you need to unpack it first and pack back again after you have modified it so after you have unpacked the attribute you are seeing something different you have to specify what kind of capture you're unpacking so we are unpacking wire capture the form information going back to the pointer angle you start to see something more user-friendly not user friendly but uh easy to understand this is a array of vectors I assume or float arrays so yeah probably this is the array of vectors so I assume that you just need to modify the x value of this vector and the Y value of this vector and probably just captured index capture index must be the number of primitive I might not need to modify this one but instead I think I need to modify this one instead let's see what's this value is about I'm going to view that attribute to see what could that be let's make the size a bit bigger okay it says everything is zero not very useful am I writing correctly while your capture data hmm maybe you cannot like create a information's from an array of vectors so instead of doing that let's try to visualize the original one why you capture the ones that says Warrior capture so just remove okay now it says something so you have to do all your capture informations one is this could be corresponding to the one that's on the x coordinate this one could be for the Y and the third one is always zero so we need to consider so if you look at this you have 0.7 on the edge point eight or 0.79 on the edge that's overall pretty much the same I'm assuming these are the these are related to the radius of this captured while you're capturing so probably how much it's been affected by these wire captures so maybe one will be the maximum zero would be zero percentage captured so I guess this could be modified to one to just capture hundred percent okay for the second input or the second value if you see it so D Spot It says 0.9 this is 0.7 0.9 0.8 and it's going smaller going from this walkway to right here and starting to get closer to zero but suddenly you are having 0.7 here now that should be the problem this should be equal to zero for this side for this primitive but for this side for this primitive this should be equal to one okay so obviously you are seeing some number errors on this Edge so that I guess that's the one that you need to fix and to do that just need to do it programmatically so let's do that and in order to solve that problem those numbers I am assuming those a number the second numbers are coming from the UV of the original curve the the captured curve which is this one okay this curve each curve has its UV starting from zero to one in this case this could be the zero this could be one So based on those UVS I can modify this value modify each point um wire capture data based on this hey that's my plan let's do this okay so how do we do this what's the best way um I guess there are many ways but um we want to fix for each point so I'm going to use Point wrangle each point has this wire capture data which I want to fix and the first value could be one the second value could be dependent on this wire UV the closest wire UV all right so fix capture data now first thing first let's say how we can update this wire capture data using wrangle it seems like it is a array of vectors so let's say if that's the case um testing there you go okay it works so I'm I guess I assumed correct you have one vectors as an array inside and I'm just modifying that value now the first value could be equal to one assuming this is the percentage of capturing the effectiveness of the captures so I'm just gonna 100 I'm just gonna capture 100 percent okay and for the second input that's the key should be based on the UV of this curve so how do we capture that and I have to do it based on the primitive so first of all I'm going to get corresponding primitive of this point which is point cream [Music] and ptnum zero it could be equal to zero I mean if you pick this point it could be either this primitive or this primitive it doesn't really matter I guess I just want to check uh does it matter I guess that it wait um I guess it doesn't really matter I guess I think I think wait let me think let me think so once I get the primitive I can get the center point of the primitive and then get the closest point to the Curve and obviously the center point of the Primitive is on top of the curves so you should be able to get that UV and from that point um from that maybe I can get the line information [Music] where you have touched from the center of this primitive face and you either need to get the point either this one or this one in terms of the UV the one that's close to the uh the original point that you were looking at either this one this one this one this one will be the point you want to use and you can just get the UV from that either this one or this one so I guess you need additional information in this case a converted like that one that's converted into line this is polyline which is just one primitive this is the converted line which is converted into each lines and by converting into each lines you'll be able to get the end point by picking up the primitive so I can refer to that information as well all right I think this should work so first of all the center of primitive and then get the closest um UV so and T Prim no I guess I can just use a line as an information so maybe I don't really need the wait I still yeah I do need it so that's what I want to do next is to get the line primitive using x y z distance to this third input which is this one using the center point position to get the line number UV what you need right now is this line number here and from this line number you will be able to get two points because this is all line and for each point you want to calculate the point position I mean you want to retrieve the point position convert it into a position calculate the distance between the one you are looking at inside a point Wrangle so so it doesn't look so smart I know but I don't know what's the other way and look for the shortest distance which is going to be the one that you want to use for the search for the UV so if the E1 is less than D2 then this position one is closer to the original position Original Point position which belongs to pt1 and we want to search for the corresponding UV from this position one to the actual polyline which has the UV that you want so um search position search position is it going to be position one else okay now you can start searching for the UV Target cream Target TV again you do the XYZ distance from second input this time you use S position l no T Prim PV and the UV that you want is tuv.x okay hopefully that's the one and then finally apply that U to the second value of this capture data let's see let's see if I got this right now where did the parameter go okay I think I need to after you have unpacked the attribute you need to pack this again capture attribute pack in order to be able to use folder deformation right something goes wrong because I have to rename this okay so let's check the number so you have both zero and one close to 0.9 this is equal to close to one I guess to one hopefully not sure it's a bit hard to see but we can see it by checking the deformation finger crossed nope still have some problem yep not really good still have some problem here gotta check okay what's going on here I'm gonna make sure I also didn't really fuse it anywhere because if I did that that's also a problem and also probably the number here the wire capture ring this could be the one that's saying that's the number of uh the captured geometry which supposed to be the one that's related to this curve primitive index which is from 0 to 212 this is for some reason this one has from 213 starting from zero so we have one more primitive exist that doesn't sound correct does it don't for some reason hmm interesting so that might be the reason that might be the reason okay just gonna try to get what's the last one this will be the last one and do we have that polygon my polyline there you go here if we check this check the class they're done okay well this is this seems correct um so I guess we are having some missing class numbers somewhere not sure what that is these numbers supposed to be the same okay there are some gaps here White nope hmm I am assuming the order is being um messed up here so that might be the reason and I also need to make sure that the number of classes here and the number of classes here is the same so I guess I gotta do the other way around as well something like that okay the number of classes to 13 chapter 13 the same okay it looks correct okay so probably the order of this one has been messed up when I have used a polypath or I'm gonna make sure that it's ordered based on the class okay so how's that there you go oh no nope um interesting first of all it's not really capturing a hundred percent but it does in some respect okay well I would save point ID of the path divide for pass removal points from the path and keep new generated points um save point ID of the path divided path remember points from the path and keep degenerate points to make it a bit more smoother I guess okay I guess something is not really capturing well here supposed to move along with the Curve but this one's not really not being captured well so something must be wrong here and maybe the condition written here must be something wrong and this is really funny what's going on here oh so you still have some problem this one being sticked so I guess the modification that I've done here the fix that I tried it's not still working I miss you so let's see hmm I guess I could try this as this as as it is for now class is equal to 197. so maybe I can try to just pick that just try using one capture to this so this is okay not working obviously so need to fix this hmm all right what if I didn't really cap fixed it still has some problem should have some problem okay what's wrong here so for the point I have got the Primitive numbers and get the center points right and get the okay after I have packed it I'm going to try and move this yeah show up so okay okay obviously that's wrong because this one is zero this one is zero but this one is 0.8 wait wait wait point zero zero point zero zero point eight one eight huh yeah obviously that's wrong I guess the condition that I wrote here is not really good me okay uh uh wait I think I need to do this here like that well still not good hmm all right yeah just a small just a big problem just a big mistake which I always do the wrong input number that might be the problem all right let's see how this works there you go there you go yeah now it seems to work I mean the wire capture is twisting the geometry which I don't like it but uh I don't know how I can fix this because this is based on the wire capture transformation which I'm not sure how you can fix this maybe I can set a normal value to the Curve that might be the way to fix not sure nope you might need to fix the rotation of the curve itself but I am not sure how we could do that does this work nope doesn't really fixed the rotation doesn't really do anything nope well put that aside I think it's working so let's see if it's gonna work for everything starting over zero all right finally finally okay cool now I think everything is going fine instead of those twisted rolls which is I don't know how to fix this because this is based on the wire deform I don't know what's going on inside um no idea if you can fix this probably using some information from the Curve orientation off the Curve but is it like able to fix it I don't know this is pretty funny this condition here wire wise I think it's fine but uh primitive wise it's flipping and if you look at the Curve if you visualize the normal I guess it's based on the normal and probably the up Vector as well so what if I update the normal con angle normal Vector value and copy access to up what would happen same doesn't really make doesn't really change anything funny if anybody know about this please let me know but I guess I mean that's fine fine what happens if I make smooth yeah I did normalize it huh funny hmm obviously this part is flipping how's that is it the same if I use something like poly path or not only tube poly wire do you get the same result if that's the case then maybe I can't do anything well it's not really twisting nope so I guess it's due to something inside wire the not show oh oh this one oh this one huh wait this one seems to work this looks clean clean oh yeah so no transformation no local transformation seems to work somehow okay that's cool that's more like it that's more like it and having smooth might make sense so just gonna put it all right so I guess I don't really need these nope cool nice uh uh I guess the Smooths is a bit too strong [Music] let's go without it for now still look cool nice all right so that's for I'm rolling that's for the strip peeling takes a bit of time to implement sorry for that especially this part how you can modify the capture sort it out and so on but I learned a lot so that finally I'm going to merge the the peeled strip together with the base to see it oh it's gonna animate it and also organize some of the parameters that I've created throughout the setup okay first of all I can bring the the angle and this F value to the controller so maximum angle the F value of my peel ratio and always angle probably I could multiply this by pi to make it more sense or number what else is really don't have any parameters on those this these are just the functions yeah these are just functions so we have rather a small number of parameters in this case I guess oh it's been hidden maybe the bass is a bit too big make it a little bit smaller drink it a little bit smaller so that the peel the skin will be shown up just move a little bit to the negative direction of the normal this is normal Direction no not yet hmm I think I'm moving on okay that should do it cool and right now everything is peeling at the same time if you don't really like that timing you could um go to the rig attribute Wrangle modify a little bit of p-value here for example for example um say he could be I don't know maybe subtract by some random value based on the point position no not the point position but the Primitive number I guess multiply by some seed multiply by light on 0.5 something this will change the starting speed of when the peeling start some peeling starts faster some peeling starts later and in order to make everything goes to the end or you also need to fix some of the stuff so hmm goes from [Music] if I do it like this oh wow interesting I have to subtract no I don't think so hmm [Music] this should not go less than this minimum value so uh it's a weird movement doesn't look correct thing that I want is want to make sure that these purple gold all over to this place from zero to one even though I change the timing so I need what I need to do is to change the speed how fast it moves right so if you have more offset like this one the speed has to be faster so in order to make it faster this is the f is just the ratio which goes from in this case one to zero confusing uh foreign can I change this to hmm yeah so this goes to one to zero going to smaller Direction more value you have it becomes to zero more rolling you get all right okay that makes sense and then there's a possibility that this goes even if it goes equal to one since the p could be minus 0.5 which will give you um this zero hmm now this goes from zero to one so in this case only the half of the rotation will be realized even if you go until one It's Gonna Make It Go over a 0.5 or maximum and I guess guess what you could do is hmm get that random value stored subtract here get the maximum of hmm still not going to the end does it interesting hmm I need to do this oh okay that seems work or not yeah I guess this does work let's go until the end pretty funny what if I increase the random ratio to one two well it didn't really change anything wait a minute if I make this zero okay well then that's no good that is no good the initial idea is that I wanted to have an offset this doesn't really give any offset does it no so that's no good floating around like this don't make sense okay I'll just go with this for now although in this case maybe I don't really need this hmm getting confused getting confused so if I have this what does it mean what does it mean this all sit here that means that means hmm I might need to increase the speed here for the f but how maybe not this one [Music] I don't know I'll just leave it as is sorry um my mind is not really working well but overall looks okay maybe this could be parameter as well offset like the starting offset ratio how fast it's going to start rotating and then if I don't limit this um f number here F value here from 0 to 1 then I can just finish until the end maybe yeah that's that's more easy to set in those cases those cases um I need to maximize I mean Clump the value to some if I if the if it appeal ratio goes more than one like two gonna make sure that this one doesn't go off the surface so in order to make sure in order to make that sure he pee goes over Wait f so this should not go less than zero there you go wait if that's the case if if you increase F like really big there's a chance that this goes minus hmm maybe this could be random minus random okay that way should work okay now I can try animating this by setting the pure ratio by multiplying I mean using the frame base value like time Maybe T was it t ier two bit too fast then like that two five and you could try changing the angle speed all set change the starting position and then all that set you can try out different like setups different geometry different number of polygons different C and so on let's try with other geometries like rubber toy and see if it still works there you go it should work for any geometry like sphere there you go and you could also increase the number of strips say six thousand quad maybe I can also increase the maximum strip lengths two thousand takes a little bit of time to calculate okay well um interesting but uh I do see some patterns here not bad not bad but let's make it a little bit each strips a little bit longer by making less cross nice it's nice it's more like a mustache hmm okay like it and seems to work well anybody have any questions so far if you are here let me know if you have any questions if not I think I'll just gonna finish this live stream for today what else I could try pig head cool all right yeah I think I like it I think I like it it's a bit weird that this rotation conditions for these maybe I want to fix that angle a little bit so I can let's see how I can do it wow so right now everything is using the same angle which might be okay but hmm What If I multiply this by f looks a little bit better is it one yeah better multiply by f if I Look From Here If I multiply by one multiply by f usually looks like this hmm now in this case one is better so it [Music] um hmm could be related to P then not so hmm so much divided by V p is okay one minus p this is rather a big pick gesture it's also interesting but not so good it's pretty hard looking for the best I guess I guess after all using just a normal angle as it is is fine seems like hmm probably well you can look into it yourself just test out um one where can be used I don't know I don't know let me know this is just I'm just doing this for fun so just to practice my X I mean I did use this for a workshop that I've been doing but um other than that not so practical what I do is to apply wallpaper to a wall like playback animation sounds interesting yes that sounds good that sounds interesting you could obviously use this for a plane I think in terms of playing you don't really need to make it solid so you could just I mean those in this case you don't really need to make it as a quad because this is already a quad face all right well let's say if I connect it here we get diagonal piece interesting what if I make it hmm I think the version 2 of instant mesh which is available on Windows will enable you to feed the flow curve to make the control the flow of the insta mesh the version one which is available Macintosh is not possible to set the curve by yourself so that's sad interesting now this one looks pretty cool in terms of the animation doesn't it okay well I guess that's I guess that's it for today thank you for joining today and sorry for all the Huss on that I had especially with the wireframe capture but overall uh in the end it I think it becomes better so quickly satisfied you at least it was a interesting enough for me to try it out so I will save the file and share it with you you can download the files from the video description page of this video live stream also I'm doing a patreon page so you can also download from there for free the video is also going to be archived so you can watch it later if you're willing to watch and that's it hopefully uh you'll enjoy it thank you and good night this is 3 30 A.M in Japan time to go to sleep okay good night oh
Info
Channel: Junichiro Horikawa
Views: 201,058
Rating: undefined out of 5
Keywords: houdini, sidefx, live, tutorial, procedural, procedural modeling, parametric modeling, parametric design, parametric, fabrication, digital design, computational design, 3d, design, isosurface, lattice, structure, 3d modeling, modeling, computational, generative, line drawing, drawing, illustration, fractal, reaction diffusion, celullar automata, simulation, trail, particle, vfx, mitosis, magnetic field, field, volume, rendering, computer graphics, visualization, algorithm, motion graphics, graphics, remesh, quad
Id: TxKhkgm0Tr4
Channel Id: undefined
Length: 208min 54sec (12534 seconds)
Published: Sat Oct 29 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.