3. Geometry Preparation for Muscle Sims — Transcript
Full transcript
- 0:01so now that John has given a broad
- 0:02overview of the muscle setup we are
- 0:04ready to go into more step-by-step
- 0:07detail for each node I've also switched
- 0:10from the capara to this minur model as
- 0:14it has more complex muscles which will
- 0:16be better suited to our needs now the
- 0:19first thing we want to do is to make
- 0:20sure that our geometry is prepared
- 0:22correctly for the muscle simulation so
- 0:26let's start off by reading in the muscle
- 0:28model typically what you will do in a
- 0:31production situation is you will read a
- 0:33static muscle model from disk either as
- 0:38a USD file or an almic file perhaps fbx
- 0:42or bgo and that depends on your personal
- 0:45preferences but I will just show you
- 0:47some gotchas for those of you who are
- 0:50new to
- 0:50Houdini if you read in an almic file you
- 0:54will see we clicked on the info pane
- 0:57here we have 49 points
- 1:0049 Primitives and down here it shows
- 1:04that those 49 Primitives are packed
- 1:06almic now pack almic are very fast to
- 1:10read but they are not particularly
- 1:13useful for simulating so what we want to
- 1:16do is we want to get these into polygon
- 1:18form and so the best way to do that is
- 1:21with an unpack node
- 1:23now if you're reading in a USD file
- 1:27you'll want to use unpack USD instead
- 1:32or unpack USD to
- 1:34polygons but for almic just the unpack
- 1:36should be good and now you'll see that
- 1:40we have 13,000 and something points and
- 1:43Primitives and The Primitives of type
- 1:44polygon so that is excellent that is
- 1:47what we need however you might have a
- 1:49case where the almic was created by a
- 1:52different
- 1:53software you might still not have
- 1:56everything in polygonal form and in that
- 1:58case you'll want to add a con node after
- 2:01you're
- 2:02unpack and that will convert them to
- 2:05polygons and then you should be good to
- 2:08go so that is the first crucial step is
- 2:12to read in your geometry and make sure
- 2:14that it is in polygonal form the next
- 2:16step is to make sure that your model is
- 2:19in Scales of meters because many other
- 2:23software packages use centimeters as
- 2:26their default scale whereas Houdini uses
- 2:28meters and if you don't scale down your
- 2:31model the simulation will behave as if
- 2:34it is a giant so let's go into the front
- 2:37view with space bar
- 2:39three and with the Grid on got something
- 2:43else displayed so let me just hit Space
- 2:46by F to frame the muscles and we can see
- 2:52that this is 200 M tall which is
- 2:55definitely not what we want we want him
- 2:57to be about 2 m tall so I'm going to put
- 3:00drop down a transform
- 3:02node connect that up and to convert from
- 3:06ctim to meters we're going to set the
- 3:09uniform scale to 01 now it looks like
- 3:12it's disappeared but it's actually just
- 3:14down there so if I hit space bar F again
- 3:16it will frame in
- 3:18on the model and we will see that it is
- 3:21now 2 m tall which is perfect let me
- 3:24just remind you that if the rest of your
- 3:26production pipeline is working in centim
- 3:30units you will probably want to scale
- 3:32your final result back up again before
- 3:34you export it so then you will put down
- 3:37another transform node right at the end
- 3:39of
- 3:41everything before your whatever type of
- 3:44file caching you want to do and you will
- 3:47set your uniform scale to 100 and then
- 3:49that will scale it back up to the
- 3:51original scale that it
- 3:53was all right I will go back into
- 3:57perspective with space bar one
- 4:01and now let's look at our bones so for
- 4:05our rest bones we also want to make sure
- 4:08that it is in the correct scale as well
- 4:11as being
- 4:15polygons oh yes one thing I wanted to
- 4:18add uh don't get confused by this being
- 4:21by these being stash nodes
- 4:23basically in production environment you
- 4:26would use something like this what I
- 4:28have done is I've created created a
- 4:30stash node after I read my file in like
- 4:33this you see it's empty by default when
- 4:35you create it when you click stash input
- 4:37it will take whatever it's reading from
- 4:39disk here and save it into the file it's
- 4:42important to know that in
- 4:45Houdini when you're reading in a file
- 4:48it's not saving it into the hip file by
- 4:51default it's always just pointing to
- 4:53disk and loading it into memory as it
- 4:55reads it but if you want to actually
- 4:57save it into the file you use a stash
- 5:00node and click stash input now most of
- 5:02the time you would not do that the only
- 5:04reason I'm doing that is because I'm
- 5:05sharing this file online where it's
- 5:09easier to not have to worry about having
- 5:11a lot of external files along with the
- 5:14hip file to um pass along but if you on
- 5:18a shared network in a in a studio or
- 5:21something you will probably just read in
- 5:24files from disk so that is the logic
- 5:28behind why I have these stash nodes
- 5:32here okay so back to the
- 5:35bones so the bones need to have a t POS
- 5:38attribute now the muscles will
- 5:40eventually also get a t POS attribute
- 5:42but they will be created automatically
- 5:44by the muscle nodes but the bones need
- 5:47to have the T POS attribute created
- 5:49manually so the way you do this is if
- 5:53you press Tab and go to character
- 5:56effects muscles you will see
- 6:00that there
- 6:01is a set T pose
- 6:06option as well as an extract T pose
- 6:09option so let's start with the set T
- 6:13pose you'll notice is this is actually
- 6:15creating a node called rest position but
- 6:19the set T pose is an alias for the rest
- 6:22position node with the rest attribute
- 6:26already set to the name that the
- 6:30is expected by the muscle nodes which is
- 6:32T pose when you create a just a plain
- 6:34rest position
- 6:36node the default name for the rest
- 6:38attribute is
- 6:40rest it's completely fine to create a
- 6:44rest attribute node and manually change
- 6:47this to T pose I can see my
- 6:51keyboard
- 6:53but this Alias is just the helper for
- 6:56you to do it quickly
- 6:58okay so what this does is it takes
- 7:01whatever incoming position which is the
- 7:04P value the position is saved as a p
- 7:07point
- 7:08value into the P
- 7:11attribute and what this does is it takes
- 7:14whatever value is incoming in the P
- 7:16attribute and saves it to a an attribute
- 7:20called T pose and if we even look in the
- 7:23geometry
- 7:25spreadsheet we will see
- 7:30that
- 7:32the T
- 7:34pose attribute and P attribute
- 7:39match let's look at our bone animation
- 7:43so don't worry about the bone animation
- 7:45how I've set this up we just need to
- 7:49assume that you will have bone animation
- 7:51coming in in some form in this case
- 7:54because I've used the rest
- 7:55attribute and deformed it the the rest
- 7:58bones and have formed it to create my
- 8:01animation I already have a t pose
- 8:03attribute but let's say you're in a
- 8:06situation where your bone animation is
- 8:09coming in without a t POS attribute
- 8:12firstly let me just add that your bone
- 8:14animation and your T POS bones your rest
- 8:16bones should be blend shapable their
- 8:18point order must match but now let's say
- 8:22you have some type of animation and we
- 8:24need to set the T pose attribute so I'm
- 8:27going to say set T pose
- 8:31now in this case we have animated bones
- 8:37so we don't want to set the animation to
- 8:39the T pose that's contrary to what one
- 8:43would expect so what we're going to do
- 8:45is we're going to take the rest phones
- 8:47we're going to pipe it in as the second
- 8:49input and what it will do when there is
- 8:51a second input connected is it will save
- 8:54the P value of the second input into the
- 8:57T pose attribute instead
- 9:00so now we've created a toose attribute
- 9:03that is containing positional value of
- 9:07the second input even though the first
- 9:09input is dynamic now I mentioned earlier
- 9:14there's also the extract T POS now what
- 9:16the extract T POS does it's also an
- 9:18alias for the rest position node but
- 9:21here the mode is said to extract rest so
- 9:24what this does is it does the reverse so
- 9:27instead of saving the P value into T
- 9:30pose it's going to take the existing T
- 9:32pose value and replace the P value with
- 9:35that t pose value so now you see it has
- 9:39removed the animation the normals are
- 9:41still animating but the P
- 9:45value has been replaced with the static
- 9:48rest POS P so that's just to explain
- 9:52what these two nodes do in my case
- 9:55however my animation already has a t
- 9:57pose attribute so I don't need to worry
- 9:59about this but now we need to think
- 10:03about our pre-roll for the bones if
- 10:06you're lucky and you work in a pipeline
- 10:08where animation is exported with a
- 10:10pre-roll for you then that's great and
- 10:12you don't need to worry about this but
- 10:15that's not always the case so let's have
- 10:17a look at this Nifty little node and how
- 10:20it can help you so firstly for your
- 10:22muscle pre-roll you want to set your
- 10:24mode to blend into
- 10:26sequence when a parameter
- 10:29is bold like this it means it's not set
- 10:32to the default value so the default
- 10:34value is hold but instead we want to set
- 10:36it to blend into sequence next we'll see
- 10:39this T POS tab also is not set to
- 10:41default and that's because we've set it
- 10:44to use the attribute instead of initial
- 10:47frame because our initial frame on the
- 10:49animation isn't in the T pose so instead
- 10:52we're going to say use front attribute
- 10:54and the attribute will be called T pose
- 10:59now let's go to the main tab the first
- 11:03tab the initialization frame is the
- 11:07first frame of your animation or the
- 11:10last frame of your pre-roll so basically
- 11:14the pose that you want to grab from the
- 11:16incoming animation which you want to be
- 11:20the last frame of your pre-roll or we
- 11:23can let's say the target pose
- 11:26so here I've used frame 11 because in
- 11:29this case I set up the animation to
- 11:31start at frame 11 if you have got
- 11:33animation before frame 11 the pre-roll
- 11:36will just ignore
- 11:37it okay so I want
- 11:40my pre-roll to start uh sorry my
- 11:43pre-roll to end essentially on this
- 11:46Frame the initial hold is the last frame
- 11:49at which you want the T pose to be held
- 11:52at so all frames before this Frame will
- 11:56be on the T pose including this one and
- 11:58then from there on
- 11:59it will start blending to the
- 12:02initialization frame pose and the number
- 12:05of frames that that blend occurs over is
- 12:08going to be determined by the pre-roll
- 12:11duration so as you can see with this
- 12:14we're going to have it blend from T
- 12:17pose into that initialization frame and
- 12:20then the animation continues now I just
- 12:23want to point out something important if
- 12:25I template this incoming animation so
- 12:28that we can compare
- 12:30incoming animation to the pre-roll we
- 12:32see this matches perfectly and then
- 12:34obviously as we'd expect for the
- 12:36pre-roll part it will differ from the
- 12:41incoming
- 12:43but say you want to increase your
- 12:46initial
- 12:47hold right so what we have now is that
- 12:50we have until frame five we have the T
- 12:55pose being held and then we're going to
- 12:57have 10 frames of pre-roll
- 12:59but then that will overshoot our
- 13:01initialization frame so now our
- 13:04animation will no longer match the
- 13:06incoming animation after the
- 13:07initialization frame so to prevent that
- 13:10you need to make sure that these two
- 13:13numbers added together plus
- 13:16one adds up to the initialization frame
- 13:20so that means that if you want to give
- 13:22it an initial hold of five and you still
- 13:24want your animation to start on frame 11
- 13:27your pre-roll duration needs to decrease
- 13:29to five frames so now the animation
- 13:32lines up and we have a pre-roll of five
- 13:35frames here and a
- 13:38hold up to frame five here so just
- 13:42important to note that this is a frame
- 13:44number this is a number of frames this
- 13:46is a frame
- 13:47number let's show this in a more typical
- 13:50frame range for
- 13:52production so here I have my animation
- 13:56starting on frame 101
- 14:01one okay so what I want to
- 14:04do let's look at it here what I want to
- 14:08do is I want
- 14:10to have my pre-roll start on frame 990
- 14:14so I will set my initial hold to frame
- 14:15990 that's the last frame that I wanted
- 14:17to be on the T pose and I just realized
- 14:20I made a little mistake here when this
- 14:22was zero and
- 14:2410 um this isn't strictly speaking the T
- 14:28pose
- 14:30so just be aware of that I would either
- 14:31have to change this to zero or uh reduce
- 14:36increase this to frame one and reduce
- 14:38this to nine just to get it to be more
- 14:45accurate um but coming back to this one
- 14:48so in this case my animation is starting
- 14:51on
- 14:53frame1 my initial hold is frame 990 so
- 14:57that's the last frame that I wanted to
- 14:58be at T POS space where I have to frame
- 15:00it and then I'm going to let the
- 15:04pre-roll last for 10 frames so that this
- 15:07plus this is a th and then plus one
- 15:09equals that so that is perfect now it
- 15:11should line up great and you'll see if I
- 15:16increase
- 15:17this no longer lines up so this we will
- 15:21have to reduce to six to
- 15:25compensate all right so the more if your
- 15:29initialization frame is locked
- 15:31essentially if you want to add a longer
- 15:33pre-roll you will have to reduce your
- 15:36start frame numbers
- 15:38here okay let's go back to original
- 15:43file
- 15:45and now we have our bones with a
- 15:47pre-roll I can turn this template
- 15:53off now let's make sure that our muscles
- 15:59are correctly
- 16:02named now the important thing for the
- 16:05muscle names is that the muscle nodes
- 16:07expects the name to be stored as an
- 16:10attribute called musclecore
- 16:14ID and here looking at my
- 16:17incoming um
- 16:19attributes I see that I have a name
- 16:21attribute but I don't have a muscle ID
- 16:23attribute now in this case where there
- 16:26is a name attribute that's great I can
- 16:28just just very easily create a muscle ID
- 16:31from the name attribute and to do this
- 16:34I'm not going to use a muscle ID node
- 16:37okay it's very important you only need
- 16:39to use the muscle ID node if you don't
- 16:42have any names incoming on your
- 16:45geometry um it doesn't matter what the
- 16:48name of the attribute is that stores the
- 16:50name but if there is some form of name
- 16:53coming in you can use that and I will
- 16:56show you how the easiest way is to use
- 16:59an attribute
- 17:02copy and you just
- 17:05connect both inputs to the
- 17:07same incoming geometry and what it will
- 17:11do is it will copy an attribute from the
- 17:12geometry to itself but you can tell to
- 17:15give it a new name so I will use the
- 17:18name attribute I will give it a new name
- 17:20when I copy it and I will call it
- 17:22musclecore
- 17:24ID now this little warning here isn't
- 17:28too important but I'll just change my
- 17:30group types to Primitives because my
- 17:31attributes are primitive attributes so
- 17:34now if we look at the info we'll see
- 17:36that the name attribute still exists but
- 17:38now there is this new attribute and we
- 17:40know it's new because it's bold here and
- 17:44it is muscle
- 17:45ID and in the geometry spreadsheet in
- 17:47The Primitives tab we can see that these
- 17:51two match so now we have a muscle ID and
- 17:55that's perfect we don't need to do
- 17:56anything else uh if you have a name
- 18:00that's coming in in a different form
- 18:01perhaps as a path attribute where you'll
- 18:04need to do a bit more editing to extract
- 18:06the name from it I will have a separate
- 18:08video in the advanced topics to cover
- 18:10that but I don't want to get uh too
- 18:12sidetracked now so I will leave that for
- 18:14separate video but now let's say we're
- 18:18in a situation where we don't have any
- 18:21incoming name attribute whatsoever now
- 18:24this is a situation where we will want
- 18:26to use a muscle ID node
- 18:31okay so I'm going to create
- 18:36it oh I just want to also show sometimes
- 18:39if you create it and it's not connected
- 18:43you'll get an
- 18:44error and the best way to get rid of
- 18:46that error is just to hit control+ c um
- 18:49it didn't really happen properly in this
- 18:50case but sometimes it happens for some
- 18:52of the other muscle nodes and then it's
- 18:54useful to know just hit contrl C we'll
- 18:56get rid of that error it's just a
- 18:58stashing Arrow
- 19:00so what we want to do is we want to
- 19:03enter the viewport state for this node
- 19:06now all the muscle nodes have viewport
- 19:10States so to do that you select the node
- 19:14you move your cursor to the viewport and
- 19:16you hit enter so now you'll see it this
- 19:19has come up this is the group selector
- 19:23um and normally when you're not in a
- 19:26viewport state that brings it up you can
- 19:29either bring it up with the nine key or
- 19:32with the this um button here but seeing
- 19:36as it's part of the viewport state or
- 19:39this node will come up by default with
- 19:42the correct setting so now when you're
- 19:44in this viewport State you can just
- 19:46select a
- 19:47muscle hit enter and this will pop up so
- 19:52that you can rename it now the only
- 19:54requirement for naming is that muscles
- 19:57on the left side need to start with L
- 19:59underscore and muscles on the right side
- 20:01need to start with r underscore and the
- 20:04default is going to assume that it's
- 20:06uppercase L and uppercase R you can
- 20:09change it but I will just stick to the
- 20:11default for Simplicity sake so
- 20:15lcore
- 20:17pectoralis
- 20:19major sternal so I've just abbreviated
- 20:23this a bit so that in situations where
- 20:25there's not a lot space to see the name
- 20:27it isn't cut off
- 20:29okay so now we see that it's showing up
- 20:32as pie 15 still but as soon as I move my
- 20:34mouse it will update so now you can see
- 20:39the name of this muscle and it's shown
- 20:42up here you can also select from this
- 20:46list instead of from the geometry itself
- 20:49so let's say I want to do this one hit
- 20:52enter L
- 20:55pectoralis major this is the close
- 20:58cicular
- 21:00part and so on and so forth I can go in
- 21:03and rename all my L muscles now for
- 21:06musles that are in the central line that
- 21:09don't have um corresponding left and
- 21:12right muscles there is no uh standard
- 21:16convention that's expected but I like to
- 21:19use Capital
- 21:20ccore to make it easier to group later
- 21:23on if I need to so select that hit C
- 21:29and now
- 21:32um these other two Central muscles are
- 21:35not really proper
- 21:36muscles but let me quickly talk about
- 21:39them I'm going
- 21:41to use control click on the template of
- 21:45the rest bones so that they
- 21:48display as properly shaded instead of
- 21:52um and wireframe worde when they're
- 21:55templated but basically the idea here is
- 21:59that we don't want empty
- 22:02gaps between muscles and Bones where the
- 22:05muscles can collapse so
- 22:07this volume here is just there as a
- 22:11placeholder to stand in for all the
- 22:15organs and viseral fat that are located
- 22:19in the belly cavity um as it's a waste
- 22:23to have it all broken up separately it's
- 22:26much simpler to just have one um muscle
- 22:28volume stand in because we're only
- 22:31really interested in The Superficial
- 22:34muscles right because those are the ones
- 22:35right under the skin and so those are
- 22:38the ones that we will be seeing but
- 22:41things under those superficial muscles
- 22:43can be a lot
- 22:44simpler so I'm just going to call this
- 22:48one because it doesn't correspond to an
- 22:50actual name I'm just going to call this
- 22:53C
- 22:55belly cavity
- 22:58and then this one over here it's a bit
- 23:02of a cheat this trapezius should have
- 23:05been a bit thicker actually to make up
- 23:08for more of this volume but again it's
- 23:10just to fill in some of that volume so
- 23:12that these muscles don't collapse so
- 23:13it's just a simplification
- 23:15of what's normally in this
- 23:18region and I'll just call it
- 23:22C neck
- 23:25filler and now I've named my central
- 23:28muscle
- 23:29I
- 23:30accidentally exited the viewport State
- 23:32because I'm using a mouse I'm not used
- 23:35to um but we're back in it now
- 23:39um and while we're here while I was
- 23:42talking about these sort of um
- 23:46standin volume filling muscles I'm also
- 23:49going to talk about the bone geometry
- 23:53bit in that you'll notice the rib cage
- 23:56is a solid mesh instead of individual
- 23:59rib
- 23:59bones um and that is just to simplify it
- 24:03number one the fewer points you have in
- 24:07your bone Collision mesh the faster your
- 24:09sim will run because um every point in
- 24:13your sim is going to look at every other
- 24:16at every point in the Collision mesh so
- 24:18the more points are the longer the
- 24:19Collision detection will take so
- 24:22simplifying your bones is going to save
- 24:25a lot of sim time and also the few
- 24:29High detail cavities and crevices there
- 24:32are in your bones the less your danger
- 24:35there is for the muscles to get trapped
- 24:37in funny holes but if you would like
- 24:41some of that nice um surface detail of
- 24:44the ribs you can always use a a volume
- 24:47like this but with the rib um profile
- 24:52sculpted
- 24:54in and you can see in general the other
- 24:57Bones have been simplified
- 24:59phont and you could probably even take
- 25:02it a bit further many people suggest
- 25:06removing
- 25:07patellas you probably don't need all
- 25:09your hand
- 25:10bones
- 25:12Etc okay so now let's talk about
- 25:14symmetry a bit so I mentioned that you
- 25:17need the convention is to use lore for
- 25:20your left muscles so you can see here
- 25:23for each muscle that I named it's
- 25:25created a new tab if you make a typo you
- 25:29can go and edit it here afterwards and
- 25:32that will
- 25:34update um you can also delete any of
- 25:37these if you're not happy with them but
- 25:40let's say we want to mirror our muscles
- 25:43which we typically will if we only have
- 25:46one side to begin with so I will create
- 25:48a muscle mirror
- 25:50node typically we create this later down
- 25:54um in the workflow but I'm just going to
- 25:57put the down now to demonstrate how the
- 26:00naming Mirror Works
- 26:03so firstly I'll show a handy little
- 26:06trick with why I like to um use the
- 26:10ccore for the central muscles if we
- 26:13select one of these Central
- 26:15muscles as I'll group and I'm going to
- 26:19replace everything after
- 26:21ccore with an asterisk also known as a
- 26:24wild card which means
- 26:27anything match ing the pattern ccore but
- 26:30now instead of saying equal to we want
- 26:33it to be everything that's not equal to
- 26:34this so to do that we put in an
- 26:36exclamation mark before the equal sign
- 26:38so now this is saying muscle ID not
- 26:42equal to
- 26:44ccore fill in Wild Card pattern so now
- 26:48if I hit enter you will see it has
- 26:50mirrored everything except these Central
- 26:53muscles you'll see what happens is let's
- 26:56find some muscles that have actually
- 26:58been
- 26:59named here so now you can see that it's
- 27:02gone
- 27:03from all the lore pectoralis it has now
- 27:06changed to rore
- 27:08pectoralis so the muscle mirror will
- 27:12pick up the prefixing of course if you
- 27:15had the right side that you're mirroring
- 27:17you would change it to r underscore and
- 27:20if it's perhaps it's lowercase r instead
- 27:22of uppercase R you would do that to if
- 27:25you wanted
- 27:26lcore um
- 27:28you would do it that
- 27:30way undo whoops but now let's say we
- 27:35have our left and right muscles there to
- 27:37begin with so let me just create a
- 27:39muscle
- 27:41mirror on the original muscles and now I
- 27:45don't have anything named so I can't use
- 27:46the names in the group so instead I'm
- 27:48just going to have to select them and
- 27:52control to deselect what I don't
- 27:56want hit enter
- 27:59so
- 28:00now this is mirrored so now if I use a
- 28:04muscle ID
- 28:09node and so just to be clear in this
- 28:12case I've mirrored it but perhaps your
- 28:14muscles are slightly
- 28:16asymmetric it will still work with
- 28:20this so I'm going to select
- 28:23this and just for Speed sake I'm just
- 28:25going to make this L Peck and now you'll
- 28:27see this says alpek this says RPC so it
- 28:31has
- 28:31automatically renamed the
- 28:34corresponding muscle on the other side
- 28:37um and replace the L with r and you can
- 28:39see the pink color shows that that
- 28:40muscle's been renamed and the purple
- 28:42color shows that that is the
- 28:45automatically renamed
- 28:47mirroring muscle so that is how the
- 28:51muscle ID works with Symmetry and again
- 28:53if you don't want to use l capital L and
- 28:57R you can change these or if it's right
- 28:59or left you can swap
- 29:01those similarly we want to make sure
- 29:03that our bones are named and there's no
- 29:06uh preset for the bone name
- 29:09attribute but I like to use bone ID if
- 29:13you
- 29:14have an attribute already coming in
- 29:17that's great you can just use it as is
- 29:19maybe it's a name you can just use it
- 29:23but let's say you're in a situation
- 29:25where you don't have any names you can
- 29:27use the ID node on the bones
- 29:33too now okay this is the case where the
- 29:36error isn't going away so I'm just going
- 29:37to hit contrl C and it will get rid of
- 29:40it now in theory you can change this to
- 29:44a different attribute name I did have
- 29:46some issues with this so I think it's
- 29:48safer to um
- 29:51just use
- 29:53this as muscle ID first and then change
- 29:56it afterwards so
- 29:59so I'm just going to type whatever
- 30:01because I'm not really paying attention
- 30:03right
- 30:04now but what you can do is you can do an
- 30:09attribute
- 30:11rename you can also do an attribute copy
- 30:13I'm just showing a different way make
- 30:15sure you're in the Primitive Tab and now
- 30:18you're going to go from muscle ID to and
- 30:22it doesn't matter what this is but I
- 30:24like to use bone ID uh but I do actually
- 30:27already have a bone ID attribute so I'm
- 30:28just going to call it bone ID
- 30:31new and now you will see that there's
- 30:34this bold attribute so it's new B ID new
- 30:38and the muscle ID attribute has gone
- 30:40away so the difference between the
- 30:41attribute copy and the attribute rename
- 30:44is the attribute copy will
- 30:45keep the name and just duplicate it with
- 30:48the new
- 30:50name and the attribute rename will
- 30:53change the name and thereby removing the
- 30:56old name
- 30:58okay so that is how you can create a
- 31:00bone
- 31:02ID just delete these because I already
- 31:05have a bone
- 31:06ID there is one last thing that we want
- 31:09to do before we can start properly
- 31:11setting up our muscles for simulation
- 31:13and that is to ensure that there are no
- 31:15intersections between the muscles as
- 31:18well as between the muscles and the
- 31:19bones now why don't we want these
- 31:22intersections strictly speaking Vellum
- 31:25can handle points that are intersecting
- 31:27on the first frame of the simulation in
- 31:29the sense that it doesn't cause them to
- 31:31explode like something like FM might but
- 31:35it does this by disabling collisions on
- 31:38the intersecting points from the first
- 31:40frame onwards and this can have some
- 31:42unintended consequences such as if you
- 31:45have intersections between your muscles
- 31:47and your bones you can often get gloopy
- 31:50looking muscles and if you have
- 31:53intersections between muscles and
- 31:54muscles that are quite large if the
- 31:57intersection area is quite large then
- 31:59I've seen that the muscle to muscle
- 32:01constraints don't always get created
- 32:04correctly in that area another thing to
- 32:07look out for is if you have a quadruped
- 32:10for instance so it's a bit hard to show
- 32:12it here but a quadruped will typically
- 32:15have an a rest position it the back leg
- 32:18will be quite close to the
- 32:20abdomen and if you have the leg muscles
- 32:24penetrating the muscles of the abdomen
- 32:27then as that leg swings backwards you
- 32:31can have stretching and pulling of the
- 32:32muscles if they're penetrating so those
- 32:34are some of the reasons why we want to
- 32:37do a check to make sure that our muscles
- 32:39have no intersections now I will do an
- 32:41advanced video to show how to actually
- 32:44fix
- 32:45intersections but for this video I just
- 32:47want to show how you can check for them
- 32:51and you can use that to either kick back
- 32:53a muscle model to a modeling department
- 32:56or you can if the problems are small
- 32:58enough you can maybe fix them with some
- 33:00small sculpts or
- 33:02edits and um I recommend the sculpt tool
- 33:06if you are not familiar with that new
- 33:08node in 20.5 so for checking I have
- 33:12created this
- 33:13subnet it's not a node yet it might
- 33:17become one in future versions of Houdini
- 33:20but for now I just left it as a subnet
- 33:22so that it's very easy to share and if
- 33:26you want to turn it into an HDA
- 33:28go ahead so the first input is going to
- 33:32be the muscles and the second input is
- 33:33the bones and then you'll see there are
- 33:35three outputs which I've merged together
- 33:37just for display reasons the first
- 33:39output is going to be they're going to
- 33:41be colored spheres to show where the
- 33:44intersections are if you don't have any
- 33:46intersections you won't see anything
- 33:48second output is going to be muscles
- 33:49third output will be
- 33:51bones and so I have already ensured that
- 33:55this model is clean and without any
- 33:56intersections
- 33:58but let's just add some back in so I'll
- 34:01put down a peak
- 34:02node and I'm going to set the distance
- 34:04to
- 34:0501 and now we see these spheres pop
- 34:11up so there are three
- 34:13colors the Orange is for muscle to
- 34:16muscle
- 34:17intersections and that is between
- 34:20separate
- 34:22muscles you can for all of these you can
- 34:24change the color you can change the
- 34:26radius you you can change the intensity
- 34:29if you want it to Glow more and you can
- 34:31also change your muscle opacity and your
- 34:33bone
- 34:34opacity so these will show where the
- 34:38muscles are penetrating one another the
- 34:42next one the muscle self
- 34:44intersections are showing where there
- 34:47are um faces or points from one part of
- 34:51the muscle penetrating another part of
- 34:53the same muscle so there's this option
- 34:55here display as points which will
- 34:58display the Spheres as points
- 35:01instead just so that when you're zooming
- 35:03in it's a bit easier to see it's not the
- 35:06actual geometry isn't completely
- 35:07obscured by the
- 35:09Spheres um and this will be useful if
- 35:11you just wanted to go in and maybe use a
- 35:15sculpt little smooth to get rid of that
- 35:19but I will add that the self
- 35:21intersections aren't as critical to
- 35:24resolve as the muscle to muscle or
- 35:26muscle to bone ones are um your muscle
- 35:30solidifier will often get rid of that
- 35:32for you basically it will get rid of it
- 35:34if you aren't doing a remesh separately
- 35:37beforehand if you just use the remesh
- 35:39inside the muscle solidify it will fix
- 35:42any self
- 35:44intersections but you just need to be
- 35:45careful because that can change the
- 35:47shape of the muscle a little bit in that
- 35:48area so this option is added so that you
- 35:52can flag it ahead of time and fix it if
- 35:55you want to have more control over with
- 35:57the final shape and then lastly there
- 36:01are the muscle to Bone intersections
- 36:03I'll turn the spay points off and you
- 36:06can see them as spheres and I'll also
- 36:08show here in the info
- 36:10pane let me turn all of these
- 36:13on and you can see that each of these
- 36:17have a corresponding group muscle to
- 36:19Bone self intersecting muscle to muscle
- 36:22and you can see that it shows how many
- 36:26points there are now these points are
- 36:27just doesn't correspond to points um on
- 36:31the actual geometry it's points created
- 36:33by the intersection detection so there
- 36:36going to be more points typically than
- 36:38there are intersections but if you have
- 36:40zero for all of these then you know you
- 36:43are intersection free and you can
- 36:45happily continue with setting up your
- 36:47simulation one final thing I just want
- 36:50to mention is this is a little bit slow
- 36:54and because it's doing things like
- 36:56editing the opacity just for display
- 36:58reasons um I wouldn't use any of the
- 37:00output of this for Downstream
- 37:03calculations in the Sim just keep this
- 37:05off to the side and carry on working in
- 37:09your main stream here for any further
- 37:12steps um you can of course if you had a
- 37:17situation where you made edits you
- 37:20can for instance put down a sculpt
- 37:23node before and the input will update as
- 37:27you
- 37:28or you can keep this displayed but
- 37:31select that and enter the viewport state
- 37:34for
- 37:35your
- 37:36selected sculpt node or whatever I'm
- 37:39just going to turn off
- 37:41that and what you can do
- 37:44now is let's say we want to
- 37:47fix the Sol intersection here so I will
- 37:53use smooth maybe reduce the
- 37:56strength and
- 37:57and you can see it updates it's not the
- 38:01fastest it's a bit of a slow update but
- 38:05it you can um see the results of your
- 38:08tweaks in real time almost real time so
- 38:11then once you're happy with that you can
- 38:13carry
- 38:15on working Downstream from here and
- 38:18leave this off to the
- 38:19side all right in the next video we will
- 38:23start solidifying the muscles for
- 38:25simulation
About this transcript
This page contains the full transcript of 3. Geometry Preparation for Muscle Sims by Houdini, generated from the public captions YouTube serves with the video. The transcript has 5,754 words across 850 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.