Houdini Algorithmic Live #124 - Procedural Pipe Network

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay hello hello good afternoon can you hear me okay hello so this is Junior horikawa and this is the Houdini algorithmic life tutorial live stream for Houdini uh which I've been doing weekly these days and this is a 124th episode for the live stream and the topic for today is to procedurally convert an end pageometry into some pipe like Network like these um the method itself is not that special it's nothing too complex few look at it really carefully there are some intersections like these so it's not really perfect but at least it had some nice visuals if you look from far away at least so and you could also change in pajama tree to try out different visuals like this one like Jesus and so on so in this live stream I'm gonna show you how you could do such a thing starting from an input geometry from scratch okay so that's my plan and hopefully you'll enjoy okay so as always I am going to start from scratch okay okay so let's start okay start by creating geometry node as always since this is a modeling modeling tutorial I have a question will the pipe be intersecting each other some pipes are intersecting and so in not correct way so it's not really perfect but as a practice for a Vex maybe it's might be interesting so if you want to make it perfect to perfectly intersect to each other or bend in other directions you might need to tweak a lot more by yourself but it's gonna be uh the base that I'm gonna make is gonna be simpler stuff okay I'm gonna use some test geometry to create to start off I am going to use a rubber toy for this example since I've already tried it now first thing I'm going to try I'm gonna do is to since I'm I want to make a kind of a perpendicular or also um I want to make something like straight um angle 90 degrees angle pipes so for this example I'm not going to use any like any angles Which is less than 90 degrees like 30 degrees or 60 degrees and so I'm going to just use the multiplication of 90 degrees so to make it to make this input geometry simple I'm first going to convert this into a voxel geometry okay to make my life easier to align the pipe on it so in order to make a voxel geometry out of the input geometry I think there are a lot of ways to do that one of the way I'm going to use today is to First convert it into a volume using such as ice offset decide the resolutions here this will going to be the resolutions for the fox so the final voxel okay so since these parameter could be used as a Global parameter layer I might want to change those values later so I'm going to create that as a global parameter I'm going to create a new node named as controller and pass that information which is this ISO offset division value which is going to be used as the also resolution okay let's say it's from 1 to 100. okay so that I if I change these you can change the density of the the resolutions of the Fall the volume now after I get this volume I am going to um place a point on each volume value so that I could use it as a guide I can use it as a base point for the voxel surface so uh and I don't really need the infill I just need the outer surface so in order to just get the the outer surface points for this box for this volume I'm going to use the volume wrangle to Define where that is a so I'm going to name this outer surface points hello everybody thanks for joining okay uh let me tweak my settings for the Macintosh a little bit I'm seeing a lot of like uh window this blue window shifting a lot so where do I change it okay hopefully this will solve it okay let me see now where was I uh yeah so I wanted to make a point for the volume just the outside adjuster on top of the surface which is on the threshold area where you have a density and zero density value here so first you need to define the name of the volume I'm going to name this name it density like a default value name then [Music] I'm going to check if the current density at the current voxel is more than 0.5 okay meaning if it is white or not if it is white it should be more than 0.5 there it is if it is black or empty that should be density more less than 0.5 okay now I'm gonna search if I'm looking at this point somewhere on this point I want to look all the Neighbors on Left Right forward backward and top and bottom and see if the the neighbor voxel has a density of zero or one if it has a density equal to zero then you're looking from the density equal to one so those those direction is the position where you have you're going to have a surface wall for the voxel surface meaning let's say if you have tons of voxels right here like this and currently if you're looking at this point which has the density equal to one and all those let's say all those boxes which has the density more than or equal to one has the red value and if the density equal to 0 has a white color value then if you are looking at this point and what you what I'm gonna what I would like to do next is to compare the point between the neighbors compare the difference of these density value if the density is equal like this one and this one then you're not going to have any walls in between them but if the density is different between this one and this one like this one then you should have a surface or a threshold wall in between those two points which is going to be used as a voxel surface same for this one and for this point you're going to have a mole here and so on so like that so that's what I would like to do as a volume wrangle sounds simple so what I just need to do is to create a loop to look for all the six Neighbors hmm starting from the X Direction so you have two Loops four x you have two Loops one y starting two Loops for Z okay starting from negative one negative one I'm gonna use it as a directional value so minus X Direction and plus X Direction um same for all the axes so let's name this um t uh minus one okay like that okay now let's create a index value out of these values out of these i n and T value here first of all the current index is kernel index for this fall voxel index meaning is meaning the indices for X Y and Z direction for this voxel can be expressed as i x i y and I see right now next I am going to create the [Music] the points oops I'm going to create the neighbor index by k um uh now that I think of maybe I can just go with uh the first Loop goes with minus one and plus one and the second Loop could be a index for the vector which could be a written like these so meaning if n is equal to zero then that means x x axis if n is equal to one then y axis and if n is equal to 2 then Z axis in this case you just need to nested loops yeah I think that makes more sense then update the n index for this Vector value with by adding one by adding d i value so if you want to look for the negative Direction negative neighbors you add minus one gonna look for the positive axis Direction then you add positive one since you have I equal to -1 or plus one in this Loop okay so this will give you a neighbor index value for the current voxel now you could get the density value from this index Vector index so you by using volume index function looking for a density value X all right maybe I'm doing something wrong here pre-loaded Shader in symbolic hmm something must be wrong okay I was missing curly bracket okay now now that I have this density value what I want to do next is to compare this current density and the neighbor density here so if the danger density is close to zero then that means you want to have a wall in between those two neighbors or two voxels okay so if next thing you want to make is the point position in between those two voxels so let's calculate or let's get the point position at this neighbor voxel first by using volume index to position and using the density volume index then you'll get a point position corresponding Point position now you have two point position at p and N pause so that you could use a simple function or a simple calculation to calculate the point position in between those two add p and the neighbor Point position multiplied by 0.5 okay and then let's try at this point to this position okay so that makes it possible to create a points just outside the surface and not inside because we don't really need the infill okay so now that I have this point next thing I would like to do is to use apply some normal Direction so that I could use those points with copy to sub node hello casalia is it Paul I have a question here hello is it possible to write away function collapse algorithm completely in facts uh yeah yeah I think it's totally possible I did try that for 2D some time ago it did took a little bit of time to think the data structures but yeah it is totally possible for sure but using python must be really much easier because you can just create your own data structure by yourself but it I think it is possible using vex but it wouldn't um it was okay using 2D for the Vex but when it becomes 3D Maybe you might want to use Python instead because it's going to be much more uh complex yes or even if you want to use it for hexagonal Grid or more ambiguous grid like you see in Town scraper or something townscaper so might be better using python but um the speed might going to be also slow using python so you might need to choose whether you want to choose the complex data structure or simple code but slower version okay what was I so I have Point let's set a normal Direction the normal Direction could be a direction going going from the current Point position to the normal neighbor Point position so could just be a normalized and pass minus at p okay and I might need to set the up Vector as well but let's uh try that later if I really need it okay now that I have normal let's also set a p scale to Define what's to define the size of the plane that I should be placing on each point so the size should be equal to the distance between the points between the neighbors so I'll just say t lengths between the or distance between and pause and at p which should be the distance between two points okay now I have to now now I have to do this to attribute value on each point I don't really need the volume anymore so let's just delete the volume okay I'm gonna choose the volume now that I have points just the points which is wrapping the surface and you don't really see any infill points it's time you place the grid on each point to see if it could wrap up the surface like a voxel geometry let's make it let's make the grid size one one and make the rows and columns 2 to make it simple and let's see what what's gonna happen here by using copy two points okay so maybe the direction is a bit wrong for this grid let's change this to X Y plane okay it's closed but it's [Music] um flipped so one way is to fix is to just reverse the grid here yep and that will fix it okay and looks good you now have a voxelized geometry which can be used as a guide to make a pipe okay and I think the resolution right now is a bit too high yet still too high for the to align the pipe on each great so let's make it small as possible like 20 for now later we're gonna change this value to test out more high-res version but for the testing starting with the low res makes sense I think okay so now I have a box slice geometry and seems to work fine time we're going to create the pipe Network out of this uh surface okay so the method that I'm gonna use is kind of a simple things that I'm gonna do is to pick one of the strip like like this on x y z Direction in any direction in this direction or in this direction randomly just pick one strip then offset this surface to an outer Direction a little bit then do the same again and again on each random strip offset to the outer surface also considering how much it offset it last time so that it doesn't intersect to each other and continue doing that until you decide uh until the number of pipes you want to create and just combine them all together to make it as a something look like a weaved pipe it's not really weaved because you're just offsetting the surface and aligning the pipe on top of the the surface so it's not the real weaving but by picking up random surface one by one and changing the offset value or the surface it somehow looks like it's been weaved so that's my method kind of a Brute Force way to create a pipe network but uh as a visual it looked fine to me so and that was a good practice for me to use Vex for those procedures first process so I'll show you how I did that so to do that I'm going the first thing I would like to do is to just pick one strip and then offset the surface and I want to do this like as a feedback loop one by one if I offset the surface then in the next loop I want to pick another strip then offset considering the offset that I did last time so to do that I'm going to use a for each number on each Loop I'm going to pick one of the strip then try to offset that surface so let's do that yay first I'm going to set up the loop so to become a feedback loop so first I'm going to make it as feedback each iterations make this one two feet Oops why do I have thing okay let me just change the settings for this Macintosh so that the display wouldn't disappear when I touch the corner okay so how do I do that forgot [Music] control center was it totally forgot okay got it okay now it should be fine sorry so make this feedback fetch feedback okay so this is the most complicated part for this live stream to this tutorial live stream so bear that in mind first thing I would do is to pick a random strip on sound Direction either X Direction wiser direction or Z Direction okay so let's do that I am going to use again a Vex wrangle to do that so and to do to just pick a strip by um using one vector as a reference you do need a little bit of vector calculation or better mathematic so let's see how I do that first I'm gonna get the Primitive wrangle then that since I would like to pick the strip randomly I am going to also refer to the iteration value from discount node um get the duration value like that okay now um let's see first of all um I'm gonna have to decide which direction I want to use right either X Direction y direction or Z Direction okay so what will be the best way to do that um well I think I I need a random value to do that first so let's create the random value or random index value I guess for the direction so run Direction is equal to random iteration multiplied by some threshold value or some random value and probably if you want to try if you want to change the random value by yourself by setting the seed you might also want to set the seed by yourself okay and that this will give you just zero to one so and the value that I want is either 1 0 1 or 2. this inside the direction is either as direction is in three side three Direction three axis so I will multiply this by three I guess right and use floor to convert it into an integer value so that you have 0 1 or 2 in this case probably yeah Okay so now that I have this index value let's create a let's just call this random index and let's call the vector value as random Direction starting from zero and I'm going to use this random Direction index as an index value for the vector value just like this so if it's zero then you relax the same to the x coordinate if the if this is one you're accessing to the Y so on and make this one okay so that should make the direction either X Y or Z all right now it's time you use this to uh get one of the strip so in order to get the strip position you also need one more information that is the point position [Music] random Point position on a space where it'll be used as a guide point to make it as a center of the plane so if I explain it sketch let's say you have bunch of grids like that and currently you have a Direction the random direction that this could be either this way this way or in three dimensionally and depth Direction but let's say this is the direction that I have right now now the next thing I would want is the point position of the plane made by this Vector value meaning if you want to create a plane out of this Vector the plane looks like perpendicular grid like that so using the directional Vector value as a normal value for this plane and by using this plane you can slice the strip by just providing the vector value and the center of this plane okay and so what you just need what you need is this point position which could be somewhere somewhere here or here or here anywhere which is on this line if you place the plane position to here then this the plane will look like this and what you get is this uh slice okay so that's my plan and to do that you could randomly specify the point position on a space so let's create another random value in this case I'm going to call this as random position and using again the iteration multiply by some other value plus seed which currently gives you a value between zero to one so if I want to make it as the value in between the minimum bounding box of this geometry to the maximum bounding box of this geometry I would need to First calculate the bounding box information out of this geometry by using get P box like this then fit this function they fit this random value I'm gonna do this in the next line to make sure this will become a vector value the random position is fit zero one random position min max to make sure that the point will be always inside the geometry I mean not inside this boundary box of this geometry which could be somewhere around here it could be somewhere around here but we'll always touch someplace using a plane okay so now that I have a point position as well as the random Direction I can now Define the plane information and it's time you calculate which grid belongs to which grid can be sliced with this plane information okay so let's see how we do that okay go back went back to the sketch let's see what kind of calculation I need to do so I have now a point position and a Direction and I have a bunch of a grid why did I make it diagonal okay so I have Point direction and I have a bunch of grid to check whether it's been sliced by the plane or not okay so what I could do is to calculate the the normal I mean this directional distance meaning I could project each center point of this grid to this Vector value and if I do that if I project this point then the point will come here and now you can calculate the distance between the center point of this plane to this projected point d and if D is larger than the half size of this grid which I can say t if D is more than t then that means the point is outside This Plane outside is strip so this point cannot be included as a strip if we look at this point projected on this Vector value the D will going to be less than t in those cases you could increase include those plane or grid as a part of the strip and in order to project and calculate the distance you can just use a DOT product just normalize this direction normalized Direction I'll call this B then a calculated.product with uh Vector value going from this point to here then you can calculate let's call this I don't know a then the result will be this distance value Okay so the equation itself is pretty easy you just need to do that okay but the thing is um yeah yeah that should do the job so let's try so uh thing is the dot product could be a negative value if you are projecting to the negative direction of the vector so you gotta need to calculate you gotta up use the absolute to make the final top product value positive so let's calculate that the distance is equal to first of all let's create a vector value um vector a is current Point position of the primitive minus this random position okay and the random direction is like this one but yeah this is the access information so now you can calculate the distance using Dot between the random Direction and The Vector a make it absolute so that there will become a distance value now it's time you specify whether it's less or larger than the half size of this grid size now where do I get the size of this grid size which is equal to this P scale that I have here on each point this one so let's pass that to a primitive attribute so that I can use it now can we do that here not sure primitive copying or yeah now I can copy the P scale coming from the point to the Primitive and should be usable inside this Loop if I look at the primitive or not yeah now that I have it here I can now access it to use it as a check checking value threshold value to check whether this distance is larger or smaller than that value so if the D if distance is less than P scale multiplied by 0.5 the half size of the grids then that means that means it should be the strip that what I want to pick up if not those are not the strip that I want to use so let's just try checking it out by coloring the strip geometry with some red color and do we have it yup like that okay and let's try changing the random seed value see if this is working and yeah I think it is working now one problem here I am getting the side uh color side information as well I mean the side surface as well so that I don't really want to include these um so maybe I need to make this threshold a little bit smaller like four and nine or not if I make it four maybe not okay if I think about this point this so if this is the point position ah okay so maybe I also need to uh consider whether this direction this is this is perpendicular this is equal to the Direction which I have defined here so if the dot product between the normal of this face and this direction is equal to one or equal to negative one then I shouldn't include that as a strip so I'll make another conditions Dot between the current normal which I also need to create the Primitive normal directions here in order to check if the Cur the Primitive normal and the dot product of current prime normal and the random Direction is less than one and has to be absolute less than one or less than 0.5 that's the strip that I want to pick up okay should do the job and yeah I think it's now working fine okay looks good now um next thing I would like to do is to just pick the red part the strip part um so I'm just gonna delete all the other stuff so or else just remove the primitive like this okay and the next thing you want to do is to offset this surface to the normal Direction and continue doing this until you get um more many numbers a multiple number of strips out of the loop now the problem with this Loop right here is because I'm using the feedback loop it's trying to use the the result of this strip as the next geometry so I need to fix that a little bit for the next loop I want to pick I want to use the original geometry which is this one to pick another strip but I also want to keep these strip inside a loop because I want to use it as a guide for the next Loop so to do that for the original geometry I'm going to apply a group named as guide okay then um the strip geometry for the strip geometry that I have here I'm going to remove the guide out of the group group delete just primitive and then I'm going to merge these two information one is this guy geometry and one is this strip geometry together and the strip geometry actually needs to be created from the guide geometry so I'm going to just pick the guide using delete and use that to create additional strip okay so that should give you a bunch of strips let's try changing the color for each strip to make it easy to see the differences so I'm going to make this random based on the iteration so Random iteration multiplied by another value like this okay so you can see multiple strip has been created and in the end you can delete the guide geometry here to just get the strip like that all right let's do it now next thing I would like to do here is to offset each strip a little bit so that the strip wouldn't intersect like this one like these yellow strip and green strip are being intersecting in the exact same position so I want to avoid that as much as possible so in order to do that I'm going to offset a little bit a little bit based on the pipe thickness that I'm going to place on each strip okay so to do that I want to Define first I want to define the thickness off each strip which is going to be used as the thickness water pipe later and and use that thickness value to offset the surface and I want to preserve that information to the next Loop so that I could calculate the the new offset value for the new strip so that it's going it's not going to touch the previous strip geometry as much as possible now the calculation isn't perfect if you offset the surface a lot of times then it's gonna self-intersect at some point so in those cases the this avoidance it's not going to work anymore so it's not that smart way to do but at least it does have some effect for initial trial so uh as the initial step should be fine okay so let's do that so in order to do that let's see what I need to do next first of all if I check the previous the original guy geometry and double click the grid it's not selecting everything because every point is being separated as every point is a unique meaning the point is not fused so let's fuse this first to make sure every point is being merged so right now after if used you have 6 52 points before you had 2600 so you the point has been merged and if I double click it everything every surface is connected and okay so this is better now going back to the strip now every if I double click hmm to enable this one first check this one if I double click it okay everything is selected meaning everything is being connected at this moment Okay so let's think how I should offset this surface now the method that I would like to use next is for each trip I want to look for the original guy geometry and see if there is any previously offseted strip for example in this in this case these areas if previously there is a strip placed like these you can see that there's an intersection here so to prevent touching the pipe to each other I want to offset this part a little bit to the upper Direction so that it's not going to touch the blue strip but uh I don't actually need to offset the other surface like these one or these one I mean I do kind of need to offset this one but I'm just gonna ignore that for now to make it simple for the other surface it's not touching to the other strip so I don't really need to offset these so what I want to do is to just offset the surface which is touching this blue strip okay so that you can avoid offsetting the other surface to just inflating strip on each Loop unnecessary inflation okay to make the pipe Network as packed as possible okay so that's what I would like to do and in order to do that you need to give the original geometry the information how much each uh per how much of each surface has been offseted by a strip so to give that kind of information I'm going to create some additional primitive attribute to the original guide geometry now from this part it's going to be a little bit um complex so I'm going to use attribute create then create bunch of information one is how much the surface has been offseted for the strip so I'm gonna make name that as offset size and make it as a primitive attribute okay next I am going to use I'm going to create another attribute for the Primitive and that is going to be the actual pipe size so pipe radius or diameter whichever it is probably a diameter pipe or I don't know maybe I'll just call this pipe size and Float yep so I have two information to Define the size of the pipe and how much it spin offset it for each grid okay now going back inside a loop I'm going to Define um the actual offset value okay so to do that I'm going to use the Primitive wrangle okay let's call this offset value at this point I'm just going to calculate how much I want to offset and not going to move the point immediately I'm going to do that later now let's see what kind of information I need to have um well first of all um let's see well first of all I need one to Define how the the size of the pipe for sure so let's do that by using some random value the scale of the pipe could be random so I mean the radius of the pipe could be random or maybe um based on them on some multiplication of the original thickness meaning original size of this plane so the original side of size of this plane is currently inside the Primitive attribute called p-scale This is the size of the each grid so maybe and so the pipe size should be less than this size for sure so let's have that information first plain size is at P scale and I want to make it make the pipe size random I'm also going to get the iteration value from the second input foreign just like I did previously now let's create some random value using this iteration Rand duration multiply by some random Value Plus seed okay let's change this value a little bit okay and now you get volume between 0 to 1 here and I want to convert this into probably it division number to divide this P size so let's make this an integer value I'm gonna make a value called div num and convert this random value in between one two the maximum number of division okay like that and then finally I can use this value I might need to use our end to convert it into an integer then I'm I'm going to convert I'm going to use this div num to divide this original pea size to give a final pipe scale pipe size so the pipe size is equal to let's rename this to plain size plane size divide by div num and probably I could also apply some additional multiplication to scale this in between 0 to 1. so that in some case the pipe it's not going to fill the every plane but the pipe could be smaller oh let's create pipe size multiplier something like that and let's start off with one okay now that should give you the pipe size let's have it let's apply it to A Primitive attribute pipe size also I'm going to apply this value to the offset size as well the offset size is more of a iterated incremented pipe size value which is going to be incremented on each Loop when you see other strips on behind so start with the original pipe size okay hello everybody and and I'm not sure if I need this information so I'm just gonna leave it for now maybe I might need it later but let's leave it for now okay so now I have the pipe size and the offset size here it's time I could um next thing I need to do is to transfer this information like some something like pipe size or offset size to the original guy geometry so that I can use it for the next Loop okay so let's do that I am going to do to use another primitive Wrangle to pass those information to the guy geometry I'm going to specifically tell choose the guide geometry to pass the information and the information that I need is the offset value that I have created here or P pipe size value that I have here okay now hmm going to first of all look for the same grid in the same position the grid and the same position so the original guy geometry has those uh grid and the strip which is being created which has been created from the guide geometry has the same position so you could get the corresponding primitive number for each strip grid by using something like x y z distance so I'm going to use x y z distance looking at the second input using current Point position to search I'll put primitive number and UV and this primitive number is going to be the corresponding primitive number for each grid which corresponds to each grid on the guided geometry and if the distance is close to zero that's where you want to transfer the value so I'm gonna create the conditions if the D is close to zero or close or equal to zero then um copy the offset size coming from the second input same 4D pipe size okay this is not enough oops the function has to be primary UV from EV okay so transfer offset value okay this is just uh information that I need for each iterations now let's think about how I how I actually offset the geometry so to test out let's make the loop to one so that I have only one strip to test which is easier to see now going back to this information kind of a C2 strip which is fine I'm gonna just offset those two strip uh simultaneously and to do that um kind of think how I'm going to actually moved the geometry so to move the geometry I want to calculate the offset value for each surface strip honest Direction on this direction distraction and so on and for example for this direction I don't want to just if even if this plane is touched with other strip I don't want to just offset This Plane this single plane but I want to offset the whole surface including these one so even if it's touching just one strip it's should affect all the plane to offset to make it look like it's been the angle is 90 degrees based if I make it possible to just offset one plane then the angle is going to be messed up okay am I going to have a diagonal angle like these which might be okay and some point I mean in some setup but for my conditions I want to avoid that but you could try it by yourself but for me I don't want that to happen so if it's touching even for one strip then I want to move everything all together in with same value so that's the rule that I want to set so to make it possible and I'm gonna do some uh preparation for that so first thing I want to do is to Define how much I want to move for each surface okay so to do that you need to check how much uh you need to check whether you have a intersected strip previously created by this Loop and in order to check you can check to this guy geometry and this guy geometry has the information such as an offset size or pipe size and referring referring to this information you would know how much you need to offset okay currently it's zero so nothing happens but uh let's create the setup for reading those information shall we so let's do that by creating another primitive wrangle and try to read oops the information from the guy geometry okay starting to get a bit complex here read set value from guide okay so just like you did here when in order to transfer the offset size from the strip to the guide here you're going to read the offset size and the pipe size from the guide to the strip okay and inclement the offset size so that you know the actual offset value how much you want to offset from the original surface Point position okay to do that um another vex that I need to write um pretty similar to what I did here in order to find out the corresponding grid information from the guide I'm going to use the um XYZ distance so um float the x y z distance looking at the second input group name is guide and you have you're using at p the center of the primitive the search and as an output you get primitive and UV all right now let's assume the Primitive is more than Z more or equal to zero if it's negative then I mean I I think I'm never gonna get Negative in this situation so maybe I don't I don't really need to use this no I have the Primitive number and the UV I can now get the offset size value from the guide which is the incremented offset size from all the other strips so I'm call I'm gonna call this total offset size getting from the guy geometry primitive k and I'm going to update the current a offset size of this script by adding this total offset size retrieved from the grid the guided geometry okay so yeah and that should increase the offset size but currently the offset size coming from the guy geometry is equal to zero so it's just the own offset size defined by this calculation okay this is going to work after second iteration you think when you have found any intersections okay now next you want to what you want to do is to I want to use this current strip offset size to be used as the actual offset distance to move these plane um perpendicular direction or normal Direction and there is a chance in this case there is a chance that only this plane has a high number of offset value and these plane could be zero if there are no intersections or smaller than this one but as I said I want to move every plane on the same side to move in same offset value I want to move in same distance so I want to I want to get the maximum offset size out of all the plane which share which is in the same side and use it as a final offset size value okay so to do that first you need to group each side separately for example these four or just this one or these two one one one one and one one one one and these four and so on okay so to do that so to do that you need to make some connection information to these uh strip okay so let's think how we could do that well first of all we need to split these plane currently everything is connected like these but I want to split it into the side pieces side by side so I could use like something like face component or node to cusp the polygon 20 might be fine and if I double click it now it's being separated into each side looks good and after this I could use a connectivity node to name each side with a class attribute class or any value you you could name class is fine for now okay so so if I look at the Primitive attribute you should have this class and this class indicates the number of the index or the ID of the H side sometimes you have only one side sometimes you have multiple number of primitive as one of the side information okay and now you could use this information to get the maximum value for the offset size on each side so I could use attribute promote to um for the Primitive to the same primitive I could get the maximum based on each side in this case based on each class attribute which will pick the maximum out of four in this case for this side if this one has an offset size equal to one and this one as 0.5 uh this attribute promote will get the maximum offset size in this case 1.0 then use it to map it to all the face which shares the same class okay and then we could use that to actually offset the surface all right that's my plan and let's see let's try to actually offset this now in order to offset using this value here [Music] uh it shouldn't be separated anymore because I want to move if I'm moving this surface I also want to move this Edge connected to this edge here so I should use fuse again to merge all the points together in order to offset by connecting all the edges okay so that's actually create the offset function primitive sir wrangle and it did do I need any other information here probably not so or let's name this strip offset okay so I need two information one is the offset size this is the actual this is the actual offsetting uh value for the surface and we also need a pipe size which is also used for the offset which is being used as a pipe radius or pipe diameter okay so we need we need to get to information one is the offset size one is the pipe size which both are inside the attribute all right now in order to offset you need to access to each of the point so let's get the point point position from the primitive Prime points okay and it's actually time we create an offset okay so let's do that um let's make a loop accessing all the points on each primitive okay get the point number get the um and now I'm going to update the point position using setpoint attrib zero p and the direction that I want to up a move is the normal direction of each face hopefully each face has its normal Direction let's check the geometry spreadsheet at that primitive and if I have n value should be fine these values should be used to offset the to define the direction oh where did my Loop go okay it's been deleted somehow uh loop through all the points get the point number update the point position and [Music] with a normal Direction [Music] multiply by the actual distance you want to offset so that will be the offset size minus the pipe size multiply by 0.5 wanna this is the pipe radius this is the actual offset size based on the Strip created previously so hopefully this will work and finally I'm going to use the add uh option to increment the the offsetting now I have some problem here that is because um here I'm adding like three um because I'm outdating this primitive and this primitive um individually you have two updates here same for these so that's not good it's not really good so in order to avoid this let's make the side face as one primitive so that I only have one primitive on one side combining all those squared as one surface this will make my life easier hopefully so to do that um I could do that before where should I do that so this is where I'm calculating the maximum value so I should do that after this so okay after getting the um the maximum offset size for each side I'm going to combine all these grid which is currently still be separated because it's before fusing I'm going to use a divide node to merge all the faces together like that but it still has a point on the side if you look at a few visualize the point you see those points here so also want to delete that um by using another face node with an option call remove inline points which will which should remove the in inline points just like that okay so hopefully all the side has only full points okay just like that like that and so on okay looks good and now you can now fuse it and offset it and seems it's okay now it everything is offseted cleanly with the amount of pipe size and the offset size I think okay hopefully that's good and now um let's combine it combine it with here replacing the this merge with this final strip see what happens so this is one strip if you increase the iterations going to have the number of strip here and there and let's look for some intersected place and there you go uh there this is where this plane is intersecting with this one so it's being offseted outward a little bit more with amount of pipe radius as well okay and if you continue doing that going to have somehow it's trying to avoid intersecting with the plane but there is a chance that the intersections like these happens and with this setup this I cannot avoid having this kind of intersection so you need to think of additional Logic for this one maybe you could delete these or some do some other Logics with the situations but uh for this setup I'm just going to leave it as it is it's not smart but at least it gives you some kind of visuals so good for starting point I guess yeah having intersection like these might not be really good but let's just leave it okay so let's see if I have another information to give for now I think we could start trying to convert it into a pipe because I already have an information like the pipe radius for each strip and the pipe strip information itself okay so let's do that shall we so I am going to pick so start with start off with just 10 Loops it's fine I guess having all the setup let me also organize some parameters that I could transfer to here something like random seed and so on so let's check what kind of parameters that I made nothing here so this one okay so I have a random seed this could obviously be one of the value that I could use to change the shape and you have another seat here I guess you can just use the same seed value here applied it here no meaning to have multiple number of random seed and maximum division yeah I could bring this here maximum active number five div number you are also having pipe size multiplication value going from zero to one okay what else this doesn't have a parameter this doesn't have a parameters one also doesn't have any parameters so not much okay just these okay so accept let's try changing the parameter see the effect first of all the random seed so you're seeing randomly selected strips okay and by changing the pipe size multiplication you're seeing how much it offset based on the pipe size okay also this will affect how much it offset as well okay now let's actually create a pipe then allori by mid-journey Runway image to video is amazing do you think that we have to give up the effects do you recommend me to try something else I'm 16 years old yeah I mean I've been watching those technique and in Twitter a lot and that those looks really amazing yeah I'm not sure what's gonna happen in the future those like AI Tech we're just gonna give a possibility to possibility to make every FX every effects that used to be that used to be made procedurally or by math uh easily by just using imprompt so yeah creating those images movies could be really easy in the future so you might really don't need to you might really not do not need to learn those mathematics of procedural stuff at all maybe sometime in future but at least um it is fun to use your brain to think how thing works things work logically so maybe those process is not really necessary for production but at least as a puzzle it's still is fun I think it has other language to learn or it could be any could become an ancient language just for intellectual purpose but uh still should be fun okay what was I so let's convert this strip into a pipe shall we so in order to make it as a pipe I'm going to convert each strip into a bunch of lines polylines okay so primitive wrangle so in order to convert the strip into a lines you need to Define how many divisions you um how much you want to split this to into lines and the thickness of the pipe and so on the thickness of the pipe is already inside a geometry spreadsheet which is this one pipe size this is the diameter of the pipe so I could use the half size of this to set it as a radius and that value could be used to define how how much pipe can be aligned in this Edge if the edge size is equal to 1 and the pipe size is equal to 2.2 then you the maximum size maximum number of pipe which can be allayed arrayed on this side is 5 5 multiplied by 0.2 equal to one so you could kind of Define the maximum number of pipes by dividing the edge size by the actual pipe size Okay so let's use that method shall we first I'm going to get I need to get the edge information of this side and this side which is being connected to the other primitive okay so we need to have that information we want to have this information and this information so that I can divide each Edge by specific number of value to create a lines in between those two edges and we the only guide only information that I have now in order to determine which Edge that I want to pick is these connections the neighbor connections so I could get those information by accessing to a half Edge information so let's do that starting from a initial half Edge information from the primitive which could be randomly picked so you don't know which Edge is being picked initially could be this one could be this one could be this one all there's many possibilities so you need to go through at least four Loops in order to check all the edges which Edge has the neighbor and which Edge doesn't have a neighbor all right so and you also need to have a edge size which can be accessed by scale of this primitive if it's still alive yeah still alive so this P scale came from here here this point which is the size of the grid the size of the voxel I mean okay so let's make a loop to check all the edges and if the edge has its neighbor or not okay so and um so I think I'm looking at this whoops I'm looking at those quads everything is in Quad shape so there should be only four points for each primitive so I should only look for four edges hopefully if I'm not doing anything wrong and I'm gonna I'm gonna go around the edge if I'm starting from this Edge Look for the next Edge and look for the next stash and look for the next Stitch okay and to do that you can use a function called hedge next okay now um why am I having error okay so the hatch next just give you a next Edge from the current half Edge and you could also use other function which is called as hedge equivalent no next equivalent now this will give you the the neighbor Edge um if I'm looking at the half Edge which belongs to this primitive where the stop point is here and the end point is here and if this end hatch is the one with that edge then the next equivalent half Edge for this half Edge is the one belongs to the neighbor primitive when the stop point is here and uh endpoint is here so the end point and destination point is being flipped for the next equivalent and if you are looking at this Edge the half Edge starting from this point to this point belongs to this primitive and if you calculate the next equivalent half Edge for this half Edge the result you get is the same half Edge which belongs to this primitive so starting point is here and the end point is here so you could check whether the half Edge is equal to a equivalent Edge and next equivalent if the next equivalent half Edge is equal to the half Edge then that means you are in this corner which doesn't have any neighbors if it's not it's not the same number then that means you're at the neighbor Edge okay so I want to look for it where the neighbor I want to look for The Neighbor Edge which has the neighbor primitive so I should look for this condition the half Edge and the next equivalent half Edge is not equal meaning you have two different office here one through one belongs to this primitive and one belongs to this primitive okay now um I could now get those information which which in this case I want to get the starting point of this off edge and the end point of this half hitch for this one so um how do I get that maybe I could create an array which I could then use it later so how do I name this spts [Music] stands for the point for the starting point or maybe I could just create an empty Point array and just Pan the starting point and end point here so the starting point of the half Edge can be retrieved by um how hatch point or Edge point or Edge Point what was it hedge destination point or starting point here so I want to get the hatch Source Point this is the starting point of the half Edge so get that and let's also get the end point which you can get that by using destination Point function right now append those value to the point array okay now in the end you should have four points being stored in this point array I think let's check that oh and I also need to update this hedge value to the next hedge so that I can Loop all the look around all the edges so let's see I'm going to check all the points value see how it looks like and if you have four point number for each primitive that's a success and this should be in either clockwise order or counterclockwise order not sure which whatever that is but at least the first two belongs to a edge which has the neighbor primitive and the second two set also belongs to the edge which has the naval primitive so that's and if that's the information that I need now I can Loop two times or I could just create um um in this case I need to create I need to calculate the number of pipes that I want to create now all right so let's do that first um let's define the pipe size so the pipe size I can call it as P scale as the current at F at p ipe size multiply by 0.5 considering the pipe size is the diameter of the pipe you should multiply it by 0.5 to make it as radius okay now I also want to create how many number do I want to divide This Plane so and the maximum size of this Edge is this gotta call this Edge size and so Edge size divide by P scale should be the maximum number of divisions and let's use the floor and probably a maximum one so at least you have one pipe okay do it now this is the number of pipes you want to create we can now use it to create the loop which defines how many pipes you want to create on these stripe or strip okay so next next thing you want to do is to define the point position for the for each pipe and you have to Define you have to um divide the Edge by a number then you also need to consider the P scale and also need to consider the point position off the edge so let's first get the point position off the edge okay so let's we I can do that outside the loop probably so let's name it S Plus One e plus one as opposed to e plus two and I already have the answer to those positions S Plus 1 is um point zero P at PTS 0. this one is point zero P PTS one hmm I think I can make it more a little bit more easier making a nested Loop to access to those points vector epos S Plus 1 is equal to point zero p BTS in this case three and finally the end position for the second Edge is two so if I have a grid like this currently I have P0 P1 P2 and P3 and I have currently set this one as s plus one this one has epos 1 this one has a pause two and this one as as POS 2. and I want to connect these to position and divide it by a number of pipes you want to create and those separation values should be defined by the pipe radius all right so now that I have those four point information I think I can make an array here um I I think I could gather those starting point position as one array these uh end position as one array so s positions S Plus One S plus two e positions e plus one e plus two I'm okay now I can make another loop uh yes well in this case I only have two so you can just say two then I could get the S pass which is wait a minute um actually this doesn't really work is it is it uh well it does it does work somehow let's try let's just try it doesn't work I'm gonna rewrite it positions okay and now I'm gonna try creating a initial line connecting the S position and a position although I need to update the value a little bit based on this I later but for now see how this works okay in order to do that I also need to create the point wait a minute after all this doesn't really work sorry sorry but this doesn't really work because I need to learn between the stop position one and starts position two in order to get the in between point position so it doesn't really make any sense having additional Loop so sorry for that okay so this could be calculated by starting from the S position one Plus first of all you calculate the vector from starting position to the end position by subtracting those two vectors then divided by the number of Divisions you have here then multiply by the iteration here plus 0.5 to have a initial offset okay let's see if this works and do the same for the end position two is this correct yeah I think so and all the other is fine now let's create the point to those S position and then position and connecting those two points together okay something went wrong something funny is happening okay what is uh why is this okay something must be wrong here let's see where um first of all this one has to be two yep and it seems like the offset thing direction is wrong okay maybe I need to make this negative all right now the line is on top of the plane looks like it it is okay looks good and now that I have these lines placed on the plane this time I set the P scale as well to each point which is going to be used as a pipe scale the pi free is so e scale P scale okay okay and now I don't really need the strip anymore so I could delete that delete the original press strip and I am only left out with those pipe lines okay let's see how this goes next I'm going to fuse those lines that I've created to connect hold these together using the poly path as well to connect all the separated curve into one using the poly wire to create a pipe and the radius is p scale I could increase divisions and I could check whether it looks okay or not and seems like the pipe radius is a bit too big looking at these it's been intersect self-intercepting so maybe something is wrong let's check so the P scale is currently the pipe size of this hmm about half size of this pipe size but uh I realize that I need for this divisions I need to use this pipe size that diameter instead of the radius so I think by doing it and I think currently I have a cache here reset the cache now the radius looks better obviously that this pipe is intersecting with the other Vibes because this is really thick and this is the intersection that I cannot prevent but I could at least make it a little bit better by going back to the parameter making the pipe size multiplier smaller or making the divisions larger making this also a smaller value having smaller number of pipes so at least you do have some avoidance somewhere around here or here and here so some places do have some waving effect like I want it someplace not like these for these hmm oh well so it's not really perfect at all but at least they work at some point so next thing I would like to do is to make the corner a little bit roundish because currently it's a bit too straight so let's make it a bit rounded and the easiest approach that I could think of is to use the smoothness in this case so let's first before doing the poly path I'm going to use the resample to have to add multiple number of points maybe I should do that before using the fuse and make this number small enough not sure how what's the best number for these it's also checked resample by polygon Edge so that it's not gonna create any unnecessary resample on the corner now you could fuse it and you could use the pulley path then finally use this moves to create some roundness on the corner now the drought how much roundness do I need I'm not really sure it depends it's it's a balance between the number of uh points that you created using the resample and the amount of smoothness you set here if you want to make this as an AUX shape then you have to do the other process you might need to trim some amount of curve here to and replace it with some Arc the real Arc shape but uh the easiest approach is to just use mousse and there is some problem because it's it's been inflating a little bit here so you might need to have more numbers uh more numbers of points in order to avoid that we'll use other types of smoothness well anyway in this case uniform works fine I'll just go with this for now okay at least it if you look from far away it look like it's been an arc curve well it's pretty fakie Arc okay not bad for visual okay so and if I increase the number of iterations here 50 going to have more pipe strip and some interlacing fine some intersecting a lot so depends on which intersect it first so on control how much divisions you want to have here and here this mostly indicates the separation between the pipe if you make it one you're using the whole grid to separate the point if you make it smaller you're going to have some space in between the pipe a little bit but now that I think of um maybe making it maybe I could tweak some algorithm in order to define the pipe size a little bit more to avoid having those two big and I do have some problem here what's Happening Here that might be related to the poly pass nope okay let's see what's going on here so maybe probably due to a fusing using a necessary Point together so if I make this value smaller yeah that'll that should solve the problem okay well okay so let me update the pipe size part a little bit see if I can make it a little bit better in terms of the size hmm not sure if I can but let's see so where was it where did I set the size yeah somewhere around here so hmm first of all I have set the minimum like pipe division to one but if I change this the minimum Pi division becomes larger so probably I could also have this as a parameter name it as naming as min div okay okay also um considering the check okay so D I do have tons of offset here and it's a bit hard to evaluate sometimes there is some offset it doesn't really doesn't really look like it's being affected by the previous offset size so maybe something is not working correctly here let me check but first let me transfer this value to the controller so let's do where is it where is where did I set it this one okay let's name this Min pipe div Min pipe div okay so let's debug the current situations so this I think D strip and D strip should never be intersected in this situation so maybe something must be wrong here so let's go step by step Okay so let's check this one so so I have here and I am getting the this strip okay and what am I doing here so I have in this case in this step I have just get the strip and then I am getting the offset I'm creating offset value how much it should offset here currently it's just a pipe size and how much size do I have here okay these are the size and if I look at the guide geometry which corresponds to this position let's pick those position see how it looks like in terms of attributes okay so okay I have offset it's looks uh looks wrong to have zero as a value here because everything must be incremented one by one so must be wrong must something must be wrong here okay and if I check as you can see everything is being wrapped so nothing has to be zero either this side or this side so obviously something is wrong and I realized I have I have to transfer this offset to the guide from where I have calculated the maximum offset size so it has to be calculated after this after have to transfer it off the size after calculating the maximum to here that's what I need to do I think so replace it here and there you go you have looks like more unintersected ribbons or strip there you go I think this looks more like it less intersections I do still have intersection like these but these are not these are unavoidable I mean it's just a because it's coming from the other uh side but all the other nice I think most of the things are working now let's see the result then okay it looks more like it what the um okay there is some weird thing going on at some point but overall looks good avoiding the unnecessary intersections well the they're awesome but uh moreover much better than the last time okay looks good now let's see some weird point that I saw last time where is it I think it was like this parameter okay here what's wrong at this point huh okay so it's been self-intersecting okay this is a bit hard to avoid so in this case um after having the pipe curve I'm having by something like these okay now this is a bit hard to solve so maybe I could um let's see if I check each line here so probably I could just remove those two small edges and if the edge is less than the radius or diameter of the pipe then maybe I don't really need to have that so maybe I could remove those Edge which size is too small so in order to determine if it's too small or not calculate the parameter use the primitive Wrangle to check whether it is smaller than the radius if the perimeter smaller than and the radius is set as P scale Point attribute this one so let's promote that to primitive attribute promote point to primitive don't delete the original e-scale get the average is fine and P scale then remove those primitive remove frame this will give you a an an end point like this but better better than the last one I think so let's see the result so you do have a end point like this but at least better than the last time so okay so far so good now um if I make this without the okay so there are some split here but same reasons okay so next thing I would like to have is so those joints for the pipe okay I have a question can this pipe avoid intersections so as I said there are intersections that I cannot avoid and there are some intersections that I can avoid now I have already implemented the one that I can avoid in this setup but uh and some plane in this case I'm just offsetting the strip in normal Direction and that's the only things that I'm doing there are unavoidable intersection like these in some case so in those cases you need to have another logic to avoid or I don't know delete specific positions or things like that um so I'll leave that to you because it's going to be a bit more complex to make another logic on top of this but I mean there are many ways to do that I think it's up to you it's up to your imagination how you want to avoid it from here and there are I mean you could start from the start I mean the way I got the strip is just using one plane but you could probably use multiple plane to create more of a snakey like strip not not as straight directional strip but could have like T shaped strip or L-shaped strip or something like that to make it more complex in terms of the connection so it's really up to you how you want to make it as the next step I'll just leave it as a basic initial starting point to give you a space for the update and if you do that if you made any update then let me know okay so let's uh create the joint I'll just make the joint where you have a corner somewhere around here somewhere on here and so on okay so in order to check where you where you have the corner I'm gonna go back to somewhere around here where I have made pipes then make each Edge a little bit smaller in both Direction trim each curve like some with the same amount of distance just like you do in carve but you using curve you cannot really Define the distance how much you want to trim for each curve unless you use for Loop which is too slow I'm going to use primitive wrangle again to trim the Curve by importing the external function call group I'm gonna read the external file called room which include the function called at just frame links which you could use to trim the lengths of the Primitive by a specified links so in order to do use that you need to also have a current primitive links and multiply the permit parameter by some ratio you could trim the Curve now I want to Define how much I trim by the length so first create a parameter to define the lengths then create the ratio by sub Depot dividing the current parameter or just subtract the current parameter by this trim links okay and replace it here okay and this wall enable you to trim and constant distance now if you want to trim the this part here which is the starting point position you need to flip the curve in order to do the in order to trim this part you are trimming from the end point the adjust trim lengths only trim from the end point I I think even if I change this here doesn't really make any sense so in order to trim on the back side at the other side you need to flip the Curve in this case using reverse and do the same process that I did here and recalculate the prim Edge and there you go Okay so trim trim and let's just copy the code itself because I'm just doing the same thing just gonna paste it then also copy the parameter for the trim paste it here this is so that if I change some code here this will be updated as well also the parameter okay now there is a chance there's another chance that this trimmed curve becomes really small again um like in this case less than zero I mean smaller close to zero in those cases I don't want to have the joint there so let's recalculate the parameter and remove those primitive when the perimeter is really close to zero okay so some parameter should be deleted So currently I have 2698 previously I have oh same so maybe that was okay but if I increase the trim value then hmm it's not been deleted even though I should have oops okay some I need to make sure that I don't go over uh the length of the original parameter so in this case I should make sure this doesn't go negative so I should make it Max zero yep you do the job and now still not being calculated correctly okay perimeter on my reading the perimeter correctly I'm not sure so okay so this I do see a lot of zeros here so this should work and if perimeter is smaller than .01 should be deleted okay maybe I didn't needed the space here all right now that should do the job now now what I want to do next is to place a joint cylinder on the end point of this curve okay in order to do that I need also need to set the a normal um value to each point so let's do that in the end Okay so or maybe I could just use Orient a long curve note to create the normal Direction as a tangent vector yeah this will just do it now um I also need to set the P scale how much how what's the size of the joint which should be derived from the original P scale of this pipe so is it does it still have it here so somehow the P scale has been changed when I did the trim so I need to retrieve the original P scale which should be a live tail here or is it still alive here not sure maybe I can try let's create a cylinder a cylinder or two the radius is equal to one let's make the end cap let's make the height a little bit smaller something like that and make this z-axis and use copy to points to place these cylinder to the end point of this curve okay now I think the point is missing P scale okay so it looks like everything is zero where did it ended okay after I have used to delete seems like everything becomes zero so let's transfer this P scale um I think if I will promote this P scale to A Primitive temporarily this is gonna preserved hopefully so I do have P scale after trim yep even after delete yes and finally I could make this back to an appoint attribute somewhere around here from primitive to point there you go now this looks like a bit too large let's check combining the pipe and the joint oh actually it was a bit it was the same size as the pipe so I might need to make this cylinder a little bit bigger the radius scale to 0.1 I don't know 0.2 make the height a little bit higher 0.5 okay and now you could also change these trim parameter how much it close to the corner okay starting to look like it okay y'all well I do have tons of intersections here so it won't be better if I could avoid it for sure okay at least until here I have made it I am converted procedure converted the geometry into a pipe Network all right so let's see um let's give some distance this some shift here I think it's due to the deletion that I did somewhere here nope okay where did I do that this one okay so if I remove that this will give a diagonal shape but this will also give a chance to have this kind of shape um those diagonal shape might be okay like this one but uh I do want to avoid this one self-intersected part how do I determine that hmm it's not just the links I guess so if I look at here it will be great if I could just trim out those small areas hmm well it's been really hard do I have something that I could use yeah I think there was a labs curve or lab split there was some node coming from the labs to split the SP curve forgot the name um Boolean curve maybe this one but maybe not he forgot totally forgot but the Boolean curve should have some hint inside Okay so self-interest okay this one intersection Stitch so combining those two should give an option to shoot be able to split the curve into two let's try these I'm gonna copy and try that with this curve here connecting here connecting here let's check no it's not been trimmed okay it's not intersecting okay hmm somehow I think I need to do like this okay now it's been splitted why do I have things like this here huh hmm doesn't the intersection point it's not really correct is it oh but I I do have points here so maybe I should do that before resampling then then okay now seems to work it's this Okay so I need this yeah okay so I think this will split those curves and now I could and what foreign again hmm let me try connecting these to here still removing the Curve so keep a nice corner but it still has a problem on these side but I guess I could fix that by tweaking these P scale by I don't know 0.5 or something yep but not here okay well then it's either you delete or not so maybe this is not really necessary after all okay well that's that um groom age is specific Library function this is not specific Vex syntax look like more C plus plus yeah it's been um I think it's been written for hair uh related function node there is a groom related node which belongs to hair based node I think and the if you look for the Houdini directory installation directory there is a file name called groom.h which has some functions written inside using the Vex syntax to trim the Curve so I'm just reading those functions by reading the groom.h to access those functions like these which is not really written as C plus plus is just written as FX on other way another Vex so if you look for this file which should be found on the 14 installation folder you should be able to see the source code of this adjust print links okay so um let me think if I could deal with this kind of Interest sections a little bit more I'm not sure if I can or just want to check so for example like this one at least I could see if there's an intersection and if I have an intersection I could just delete those lines that's possible I think but that's not a straightforward I mean that's not a like clean way to fix if you really wanna avoid intersections then you need to rethink how the pipe you need to rethink the pipe alignment itself in this case I'm just offsetting the strip retrieved from the original geometry so if it if this if the offset size is really big then at some point you are getting intersections like these so if you really want to avoid intersections then you really need to rethink how you create the network from scratch the way I did is not really applicable for that because I'm doing it one by one like these and the only operation that I'm using is this offset so you probably you need to update this part to make it more smart to duck the current strip which I'm not doing it I'm just using some meta metadata like offset size and so on so if you want to make it smaller you need to update here and you could probably do that in some way but the way to offset might be really hard to clean to offset the surface cleanly might be the hardest thing at least you do have a bunch of strips and guide geometries retrieved from here or here so you could use it as a guide to create an offset for this strip that you retrieved so should be possible but uh it's not that easy think so I'll leave that to you I mean if I have time uh I'll do that sometime later but uh maybe not today because I know it's gonna take some time I don't know additional two or three hours and so already 4am in Japan time so I think I need to wrap this up in this timing so let me try out the final pipe set up with all the other geometries also being cheaply rendered using principle Shader let's finish this live stream I'm gonna create a matte material set the create the principle Shader and I'll make it white use principle Shader it's also set some environmental light with some I know background texture let's hide that okay and looks overall okay I mean if you look from far away you don't notice much intersections or do here but and let's try all the parameters that I have set something like minimum height variations maximum pipe divisions pipe multiple size okay probably I need to also create the normals there you go and so on two six hey nice and what's Happening Here hmm this suppose not this doesn't supposed not to happen probably again due to these removal code no where does this come from hmm we said oh what's Happening Here okay resample is doing something wrong here because of this intersection Stitch okay then I'll just remove it okay forget about using these okay not bad and if I increase the iterations like 200 you're going to have much more wrapped opt version okay I think this iterations could also be a parameter so let's bring dot up hmm which is uh same as strip number let's make this maximum hundred k and if I change the boxel resolutions like the 10. you have a bigger pixel size if you make it larger one like 40 you have more high res geometry or voxels and you might need to have more strip numbers to wrap it up okay combining with all the other parameters okay not bad okay now let's try with other shapes like pig head to see if it's gonna work yeah and as long as it is close geometry which can be converted into a volume should work now again there's some funny things happening here it's debug that where does this come from huh okay some weird things happening here is this okay some offsets are not working correctly so probably I need to fix that that's probably where the error is coming that's where I don't have a primitive which is which the point number is not equal to four so for a primitive which doesn't have Point equal to four maybe I can just ignore that so if lengths pts is equal to four that's the only primitive that I want to use to create the pipe and everything is gone so why let's see why [Music] let me oh wait no I what I need to check is the Prem points length yep okay now yeah this should fix the problem okay there you go okay let's try with all the geometry scav Squad now this obviously needs a lot more voxels in Z Direction so let's increase the resolutions like 80 there you go the pad yeah so should work for any geometry if it's closed let's give a switch node so that I can switch between those geometries if I use 80 for the rubber toy seems like the resolution is a bit too high so in those cases I need to probably reduce the smoothness and increase the value for the resample to make this cornered so in this case I'm going to reduce the so probably I need to make those smoothness and the resample lengths as additional parameter yeah so let's do that connecting [Music] here and finally the smoothness okay oh forgot one thing I also need to bring The Joint distance this one um pipe joint offset there you go okay let's try with high voxel value and try changing the resample links to smaller value yeah which should make this uh more straight a little bit more and reduce the smoothness yeah like that Okay so it's been proven that this works let's make this back to 20. and for voxel size equal to 20 I don't have I don't need to have such resample links let's make this back to point two smoothness to 10. oops 0.02 okay should do it and the strip number two I don't know 40 Okay so that's probably it uh for today I'm not sure how much it um feed your interest but um hopefully you found it somehow interested it's not really a perfect way to pipelify the object but um at least this could be a start one of the start starting point to do the stuff I think I think there are many directions to go from here so hopefully you find it interested um so that's it for today thank you for joining let me know if you have any questions or feedback or anything if not I'll finish the live stream here as always I'm going to upload the file and you could access it from the video description page or the patreon page everything will be uploaded as freely so you can just use it for your own purpose for free but if you found it helpful if you found it if you want to support me there's a patreon page myself so if you could support me there that would also be great if you feel if you feel like it okay that's it for today I'll do another live stream next week same time so hopefully you could join it thank you and good night see you next week
Info
Channel: Junichiro Horikawa
Views: 31,363
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, volume, rendering, computer graphics, visualization, algorithm, motion graphics, graphics, remesh, quad, flower, plant
Id: Jcinr46UcJE
Channel Id: undefined
Length: 188min 10sec (11290 seconds)
Published: Fri Jul 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.