YouTube2Text

3. Geometry Preparation for Muscle Sims — Transcript

by Houdini · 5,754 words · 850 segments · language en · Watch on YouTube

Full transcript

  1. 0:01so now that John has given a broad
  2. 0:02overview of the muscle setup we are
  3. 0:04ready to go into more step-by-step
  4. 0:07detail for each node I've also switched
  5. 0:10from the capara to this minur model as
  6. 0:14it has more complex muscles which will
  7. 0:16be better suited to our needs now the
  8. 0:19first thing we want to do is to make
  9. 0:20sure that our geometry is prepared
  10. 0:22correctly for the muscle simulation so
  11. 0:26let's start off by reading in the muscle
  12. 0:28model typically what you will do in a
  13. 0:31production situation is you will read a
  14. 0:33static muscle model from disk either as
  15. 0:38a USD file or an almic file perhaps fbx
  16. 0:42or bgo and that depends on your personal
  17. 0:45preferences but I will just show you
  18. 0:47some gotchas for those of you who are
  19. 0:50new to
  20. 0:50Houdini if you read in an almic file you
  21. 0:54will see we clicked on the info pane
  22. 0:57here we have 49 points
  23. 1:0049 Primitives and down here it shows
  24. 1:04that those 49 Primitives are packed
  25. 1:06almic now pack almic are very fast to
  26. 1:10read but they are not particularly
  27. 1:13useful for simulating so what we want to
  28. 1:16do is we want to get these into polygon
  29. 1:18form and so the best way to do that is
  30. 1:21with an unpack node
  31. 1:23now if you're reading in a USD file
  32. 1:27you'll want to use unpack USD instead
  33. 1:32or unpack USD to
  34. 1:34polygons but for almic just the unpack
  35. 1:36should be good and now you'll see that
  36. 1:40we have 13,000 and something points and
  37. 1:43Primitives and The Primitives of type
  38. 1:44polygon so that is excellent that is
  39. 1:47what we need however you might have a
  40. 1:49case where the almic was created by a
  41. 1:52different
  42. 1:53software you might still not have
  43. 1:56everything in polygonal form and in that
  44. 1:58case you'll want to add a con node after
  45. 2:01you're
  46. 2:02unpack and that will convert them to
  47. 2:05polygons and then you should be good to
  48. 2:08go so that is the first crucial step is
  49. 2:12to read in your geometry and make sure
  50. 2:14that it is in polygonal form the next
  51. 2:16step is to make sure that your model is
  52. 2:19in Scales of meters because many other
  53. 2:23software packages use centimeters as
  54. 2:26their default scale whereas Houdini uses
  55. 2:28meters and if you don't scale down your
  56. 2:31model the simulation will behave as if
  57. 2:34it is a giant so let's go into the front
  58. 2:37view with space bar
  59. 2:39three and with the Grid on got something
  60. 2:43else displayed so let me just hit Space
  61. 2:46by F to frame the muscles and we can see
  62. 2:52that this is 200 M tall which is
  63. 2:55definitely not what we want we want him
  64. 2:57to be about 2 m tall so I'm going to put
  65. 3:00drop down a transform
  66. 3:02node connect that up and to convert from
  67. 3:06ctim to meters we're going to set the
  68. 3:09uniform scale to 01 now it looks like
  69. 3:12it's disappeared but it's actually just
  70. 3:14down there so if I hit space bar F again
  71. 3:16it will frame in
  72. 3:18on the model and we will see that it is
  73. 3:21now 2 m tall which is perfect let me
  74. 3:24just remind you that if the rest of your
  75. 3:26production pipeline is working in centim
  76. 3:30units you will probably want to scale
  77. 3:32your final result back up again before
  78. 3:34you export it so then you will put down
  79. 3:37another transform node right at the end
  80. 3:39of
  81. 3:41everything before your whatever type of
  82. 3:44file caching you want to do and you will
  83. 3:47set your uniform scale to 100 and then
  84. 3:49that will scale it back up to the
  85. 3:51original scale that it
  86. 3:53was all right I will go back into
  87. 3:57perspective with space bar one
  88. 4:01and now let's look at our bones so for
  89. 4:05our rest bones we also want to make sure
  90. 4:08that it is in the correct scale as well
  91. 4:11as being
  92. 4:15polygons oh yes one thing I wanted to
  93. 4:18add uh don't get confused by this being
  94. 4:21by these being stash nodes
  95. 4:23basically in production environment you
  96. 4:26would use something like this what I
  97. 4:28have done is I've created created a
  98. 4:30stash node after I read my file in like
  99. 4:33this you see it's empty by default when
  100. 4:35you create it when you click stash input
  101. 4:37it will take whatever it's reading from
  102. 4:39disk here and save it into the file it's
  103. 4:42important to know that in
  104. 4:45Houdini when you're reading in a file
  105. 4:48it's not saving it into the hip file by
  106. 4:51default it's always just pointing to
  107. 4:53disk and loading it into memory as it
  108. 4:55reads it but if you want to actually
  109. 4:57save it into the file you use a stash
  110. 5:00node and click stash input now most of
  111. 5:02the time you would not do that the only
  112. 5:04reason I'm doing that is because I'm
  113. 5:05sharing this file online where it's
  114. 5:09easier to not have to worry about having
  115. 5:11a lot of external files along with the
  116. 5:14hip file to um pass along but if you on
  117. 5:18a shared network in a in a studio or
  118. 5:21something you will probably just read in
  119. 5:24files from disk so that is the logic
  120. 5:28behind why I have these stash nodes
  121. 5:32here okay so back to the
  122. 5:35bones so the bones need to have a t POS
  123. 5:38attribute now the muscles will
  124. 5:40eventually also get a t POS attribute
  125. 5:42but they will be created automatically
  126. 5:44by the muscle nodes but the bones need
  127. 5:47to have the T POS attribute created
  128. 5:49manually so the way you do this is if
  129. 5:53you press Tab and go to character
  130. 5:56effects muscles you will see
  131. 6:00that there
  132. 6:01is a set T pose
  133. 6:06option as well as an extract T pose
  134. 6:09option so let's start with the set T
  135. 6:13pose you'll notice is this is actually
  136. 6:15creating a node called rest position but
  137. 6:19the set T pose is an alias for the rest
  138. 6:22position node with the rest attribute
  139. 6:26already set to the name that the
  140. 6:30is expected by the muscle nodes which is
  141. 6:32T pose when you create a just a plain
  142. 6:34rest position
  143. 6:36node the default name for the rest
  144. 6:38attribute is
  145. 6:40rest it's completely fine to create a
  146. 6:44rest attribute node and manually change
  147. 6:47this to T pose I can see my
  148. 6:51keyboard
  149. 6:53but this Alias is just the helper for
  150. 6:56you to do it quickly
  151. 6:58okay so what this does is it takes
  152. 7:01whatever incoming position which is the
  153. 7:04P value the position is saved as a p
  154. 7:07point
  155. 7:08value into the P
  156. 7:11attribute and what this does is it takes
  157. 7:14whatever value is incoming in the P
  158. 7:16attribute and saves it to a an attribute
  159. 7:20called T pose and if we even look in the
  160. 7:23geometry
  161. 7:25spreadsheet we will see
  162. 7:30that
  163. 7:32the T
  164. 7:34pose attribute and P attribute
  165. 7:39match let's look at our bone animation
  166. 7:43so don't worry about the bone animation
  167. 7:45how I've set this up we just need to
  168. 7:49assume that you will have bone animation
  169. 7:51coming in in some form in this case
  170. 7:54because I've used the rest
  171. 7:55attribute and deformed it the the rest
  172. 7:58bones and have formed it to create my
  173. 8:01animation I already have a t pose
  174. 8:03attribute but let's say you're in a
  175. 8:06situation where your bone animation is
  176. 8:09coming in without a t POS attribute
  177. 8:12firstly let me just add that your bone
  178. 8:14animation and your T POS bones your rest
  179. 8:16bones should be blend shapable their
  180. 8:18point order must match but now let's say
  181. 8:22you have some type of animation and we
  182. 8:24need to set the T pose attribute so I'm
  183. 8:27going to say set T pose
  184. 8:31now in this case we have animated bones
  185. 8:37so we don't want to set the animation to
  186. 8:39the T pose that's contrary to what one
  187. 8:43would expect so what we're going to do
  188. 8:45is we're going to take the rest phones
  189. 8:47we're going to pipe it in as the second
  190. 8:49input and what it will do when there is
  191. 8:51a second input connected is it will save
  192. 8:54the P value of the second input into the
  193. 8:57T pose attribute instead
  194. 9:00so now we've created a toose attribute
  195. 9:03that is containing positional value of
  196. 9:07the second input even though the first
  197. 9:09input is dynamic now I mentioned earlier
  198. 9:14there's also the extract T POS now what
  199. 9:16the extract T POS does it's also an
  200. 9:18alias for the rest position node but
  201. 9:21here the mode is said to extract rest so
  202. 9:24what this does is it does the reverse so
  203. 9:27instead of saving the P value into T
  204. 9:30pose it's going to take the existing T
  205. 9:32pose value and replace the P value with
  206. 9:35that t pose value so now you see it has
  207. 9:39removed the animation the normals are
  208. 9:41still animating but the P
  209. 9:45value has been replaced with the static
  210. 9:48rest POS P so that's just to explain
  211. 9:52what these two nodes do in my case
  212. 9:55however my animation already has a t
  213. 9:57pose attribute so I don't need to worry
  214. 9:59about this but now we need to think
  215. 10:03about our pre-roll for the bones if
  216. 10:06you're lucky and you work in a pipeline
  217. 10:08where animation is exported with a
  218. 10:10pre-roll for you then that's great and
  219. 10:12you don't need to worry about this but
  220. 10:15that's not always the case so let's have
  221. 10:17a look at this Nifty little node and how
  222. 10:20it can help you so firstly for your
  223. 10:22muscle pre-roll you want to set your
  224. 10:24mode to blend into
  225. 10:26sequence when a parameter
  226. 10:29is bold like this it means it's not set
  227. 10:32to the default value so the default
  228. 10:34value is hold but instead we want to set
  229. 10:36it to blend into sequence next we'll see
  230. 10:39this T POS tab also is not set to
  231. 10:41default and that's because we've set it
  232. 10:44to use the attribute instead of initial
  233. 10:47frame because our initial frame on the
  234. 10:49animation isn't in the T pose so instead
  235. 10:52we're going to say use front attribute
  236. 10:54and the attribute will be called T pose
  237. 10:59now let's go to the main tab the first
  238. 11:03tab the initialization frame is the
  239. 11:07first frame of your animation or the
  240. 11:10last frame of your pre-roll so basically
  241. 11:14the pose that you want to grab from the
  242. 11:16incoming animation which you want to be
  243. 11:20the last frame of your pre-roll or we
  244. 11:23can let's say the target pose
  245. 11:26so here I've used frame 11 because in
  246. 11:29this case I set up the animation to
  247. 11:31start at frame 11 if you have got
  248. 11:33animation before frame 11 the pre-roll
  249. 11:36will just ignore
  250. 11:37it okay so I want
  251. 11:40my pre-roll to start uh sorry my
  252. 11:43pre-roll to end essentially on this
  253. 11:46Frame the initial hold is the last frame
  254. 11:49at which you want the T pose to be held
  255. 11:52at so all frames before this Frame will
  256. 11:56be on the T pose including this one and
  257. 11:58then from there on
  258. 11:59it will start blending to the
  259. 12:02initialization frame pose and the number
  260. 12:05of frames that that blend occurs over is
  261. 12:08going to be determined by the pre-roll
  262. 12:11duration so as you can see with this
  263. 12:14we're going to have it blend from T
  264. 12:17pose into that initialization frame and
  265. 12:20then the animation continues now I just
  266. 12:23want to point out something important if
  267. 12:25I template this incoming animation so
  268. 12:28that we can compare
  269. 12:30incoming animation to the pre-roll we
  270. 12:32see this matches perfectly and then
  271. 12:34obviously as we'd expect for the
  272. 12:36pre-roll part it will differ from the
  273. 12:41incoming
  274. 12:43but say you want to increase your
  275. 12:46initial
  276. 12:47hold right so what we have now is that
  277. 12:50we have until frame five we have the T
  278. 12:55pose being held and then we're going to
  279. 12:57have 10 frames of pre-roll
  280. 12:59but then that will overshoot our
  281. 13:01initialization frame so now our
  282. 13:04animation will no longer match the
  283. 13:06incoming animation after the
  284. 13:07initialization frame so to prevent that
  285. 13:10you need to make sure that these two
  286. 13:13numbers added together plus
  287. 13:16one adds up to the initialization frame
  288. 13:20so that means that if you want to give
  289. 13:22it an initial hold of five and you still
  290. 13:24want your animation to start on frame 11
  291. 13:27your pre-roll duration needs to decrease
  292. 13:29to five frames so now the animation
  293. 13:32lines up and we have a pre-roll of five
  294. 13:35frames here and a
  295. 13:38hold up to frame five here so just
  296. 13:42important to note that this is a frame
  297. 13:44number this is a number of frames this
  298. 13:46is a frame
  299. 13:47number let's show this in a more typical
  300. 13:50frame range for
  301. 13:52production so here I have my animation
  302. 13:56starting on frame 101
  303. 14:01one okay so what I want to
  304. 14:04do let's look at it here what I want to
  305. 14:08do is I want
  306. 14:10to have my pre-roll start on frame 990
  307. 14:14so I will set my initial hold to frame
  308. 14:15990 that's the last frame that I wanted
  309. 14:17to be on the T pose and I just realized
  310. 14:20I made a little mistake here when this
  311. 14:22was zero and
  312. 14:2410 um this isn't strictly speaking the T
  313. 14:28pose
  314. 14:30so just be aware of that I would either
  315. 14:31have to change this to zero or uh reduce
  316. 14:36increase this to frame one and reduce
  317. 14:38this to nine just to get it to be more
  318. 14:45accurate um but coming back to this one
  319. 14:48so in this case my animation is starting
  320. 14:51on
  321. 14:53frame1 my initial hold is frame 990 so
  322. 14:57that's the last frame that I wanted to
  323. 14:58be at T POS space where I have to frame
  324. 15:00it and then I'm going to let the
  325. 15:04pre-roll last for 10 frames so that this
  326. 15:07plus this is a th and then plus one
  327. 15:09equals that so that is perfect now it
  328. 15:11should line up great and you'll see if I
  329. 15:16increase
  330. 15:17this no longer lines up so this we will
  331. 15:21have to reduce to six to
  332. 15:25compensate all right so the more if your
  333. 15:29initialization frame is locked
  334. 15:31essentially if you want to add a longer
  335. 15:33pre-roll you will have to reduce your
  336. 15:36start frame numbers
  337. 15:38here okay let's go back to original
  338. 15:43file
  339. 15:45and now we have our bones with a
  340. 15:47pre-roll I can turn this template
  341. 15:53off now let's make sure that our muscles
  342. 15:59are correctly
  343. 16:02named now the important thing for the
  344. 16:05muscle names is that the muscle nodes
  345. 16:07expects the name to be stored as an
  346. 16:10attribute called musclecore
  347. 16:14ID and here looking at my
  348. 16:17incoming um
  349. 16:19attributes I see that I have a name
  350. 16:21attribute but I don't have a muscle ID
  351. 16:23attribute now in this case where there
  352. 16:26is a name attribute that's great I can
  353. 16:28just just very easily create a muscle ID
  354. 16:31from the name attribute and to do this
  355. 16:34I'm not going to use a muscle ID node
  356. 16:37okay it's very important you only need
  357. 16:39to use the muscle ID node if you don't
  358. 16:42have any names incoming on your
  359. 16:45geometry um it doesn't matter what the
  360. 16:48name of the attribute is that stores the
  361. 16:50name but if there is some form of name
  362. 16:53coming in you can use that and I will
  363. 16:56show you how the easiest way is to use
  364. 16:59an attribute
  365. 17:02copy and you just
  366. 17:05connect both inputs to the
  367. 17:07same incoming geometry and what it will
  368. 17:11do is it will copy an attribute from the
  369. 17:12geometry to itself but you can tell to
  370. 17:15give it a new name so I will use the
  371. 17:18name attribute I will give it a new name
  372. 17:20when I copy it and I will call it
  373. 17:22musclecore
  374. 17:24ID now this little warning here isn't
  375. 17:28too important but I'll just change my
  376. 17:30group types to Primitives because my
  377. 17:31attributes are primitive attributes so
  378. 17:34now if we look at the info we'll see
  379. 17:36that the name attribute still exists but
  380. 17:38now there is this new attribute and we
  381. 17:40know it's new because it's bold here and
  382. 17:44it is muscle
  383. 17:45ID and in the geometry spreadsheet in
  384. 17:47The Primitives tab we can see that these
  385. 17:51two match so now we have a muscle ID and
  386. 17:55that's perfect we don't need to do
  387. 17:56anything else uh if you have a name
  388. 18:00that's coming in in a different form
  389. 18:01perhaps as a path attribute where you'll
  390. 18:04need to do a bit more editing to extract
  391. 18:06the name from it I will have a separate
  392. 18:08video in the advanced topics to cover
  393. 18:10that but I don't want to get uh too
  394. 18:12sidetracked now so I will leave that for
  395. 18:14separate video but now let's say we're
  396. 18:18in a situation where we don't have any
  397. 18:21incoming name attribute whatsoever now
  398. 18:24this is a situation where we will want
  399. 18:26to use a muscle ID node
  400. 18:31okay so I'm going to create
  401. 18:36it oh I just want to also show sometimes
  402. 18:39if you create it and it's not connected
  403. 18:43you'll get an
  404. 18:44error and the best way to get rid of
  405. 18:46that error is just to hit control+ c um
  406. 18:49it didn't really happen properly in this
  407. 18:50case but sometimes it happens for some
  408. 18:52of the other muscle nodes and then it's
  409. 18:54useful to know just hit contrl C we'll
  410. 18:56get rid of that error it's just a
  411. 18:58stashing Arrow
  412. 19:00so what we want to do is we want to
  413. 19:03enter the viewport state for this node
  414. 19:06now all the muscle nodes have viewport
  415. 19:10States so to do that you select the node
  416. 19:14you move your cursor to the viewport and
  417. 19:16you hit enter so now you'll see it this
  418. 19:19has come up this is the group selector
  419. 19:23um and normally when you're not in a
  420. 19:26viewport state that brings it up you can
  421. 19:29either bring it up with the nine key or
  422. 19:32with the this um button here but seeing
  423. 19:36as it's part of the viewport state or
  424. 19:39this node will come up by default with
  425. 19:42the correct setting so now when you're
  426. 19:44in this viewport State you can just
  427. 19:46select a
  428. 19:47muscle hit enter and this will pop up so
  429. 19:52that you can rename it now the only
  430. 19:54requirement for naming is that muscles
  431. 19:57on the left side need to start with L
  432. 19:59underscore and muscles on the right side
  433. 20:01need to start with r underscore and the
  434. 20:04default is going to assume that it's
  435. 20:06uppercase L and uppercase R you can
  436. 20:09change it but I will just stick to the
  437. 20:11default for Simplicity sake so
  438. 20:15lcore
  439. 20:17pectoralis
  440. 20:19major sternal so I've just abbreviated
  441. 20:23this a bit so that in situations where
  442. 20:25there's not a lot space to see the name
  443. 20:27it isn't cut off
  444. 20:29okay so now we see that it's showing up
  445. 20:32as pie 15 still but as soon as I move my
  446. 20:34mouse it will update so now you can see
  447. 20:39the name of this muscle and it's shown
  448. 20:42up here you can also select from this
  449. 20:46list instead of from the geometry itself
  450. 20:49so let's say I want to do this one hit
  451. 20:52enter L
  452. 20:55pectoralis major this is the close
  453. 20:58cicular
  454. 21:00part and so on and so forth I can go in
  455. 21:03and rename all my L muscles now for
  456. 21:06musles that are in the central line that
  457. 21:09don't have um corresponding left and
  458. 21:12right muscles there is no uh standard
  459. 21:16convention that's expected but I like to
  460. 21:19use Capital
  461. 21:20ccore to make it easier to group later
  462. 21:23on if I need to so select that hit C
  463. 21:29and now
  464. 21:32um these other two Central muscles are
  465. 21:35not really proper
  466. 21:36muscles but let me quickly talk about
  467. 21:39them I'm going
  468. 21:41to use control click on the template of
  469. 21:45the rest bones so that they
  470. 21:48display as properly shaded instead of
  471. 21:52um and wireframe worde when they're
  472. 21:55templated but basically the idea here is
  473. 21:59that we don't want empty
  474. 22:02gaps between muscles and Bones where the
  475. 22:05muscles can collapse so
  476. 22:07this volume here is just there as a
  477. 22:11placeholder to stand in for all the
  478. 22:15organs and viseral fat that are located
  479. 22:19in the belly cavity um as it's a waste
  480. 22:23to have it all broken up separately it's
  481. 22:26much simpler to just have one um muscle
  482. 22:28volume stand in because we're only
  483. 22:31really interested in The Superficial
  484. 22:34muscles right because those are the ones
  485. 22:35right under the skin and so those are
  486. 22:38the ones that we will be seeing but
  487. 22:41things under those superficial muscles
  488. 22:43can be a lot
  489. 22:44simpler so I'm just going to call this
  490. 22:48one because it doesn't correspond to an
  491. 22:50actual name I'm just going to call this
  492. 22:53C
  493. 22:55belly cavity
  494. 22:58and then this one over here it's a bit
  495. 23:02of a cheat this trapezius should have
  496. 23:05been a bit thicker actually to make up
  497. 23:08for more of this volume but again it's
  498. 23:10just to fill in some of that volume so
  499. 23:12that these muscles don't collapse so
  500. 23:13it's just a simplification
  501. 23:15of what's normally in this
  502. 23:18region and I'll just call it
  503. 23:22C neck
  504. 23:25filler and now I've named my central
  505. 23:28muscle
  506. 23:29I
  507. 23:30accidentally exited the viewport State
  508. 23:32because I'm using a mouse I'm not used
  509. 23:35to um but we're back in it now
  510. 23:39um and while we're here while I was
  511. 23:42talking about these sort of um
  512. 23:46standin volume filling muscles I'm also
  513. 23:49going to talk about the bone geometry
  514. 23:53bit in that you'll notice the rib cage
  515. 23:56is a solid mesh instead of individual
  516. 23:59rib
  517. 23:59bones um and that is just to simplify it
  518. 24:03number one the fewer points you have in
  519. 24:07your bone Collision mesh the faster your
  520. 24:09sim will run because um every point in
  521. 24:13your sim is going to look at every other
  522. 24:16at every point in the Collision mesh so
  523. 24:18the more points are the longer the
  524. 24:19Collision detection will take so
  525. 24:22simplifying your bones is going to save
  526. 24:25a lot of sim time and also the few
  527. 24:29High detail cavities and crevices there
  528. 24:32are in your bones the less your danger
  529. 24:35there is for the muscles to get trapped
  530. 24:37in funny holes but if you would like
  531. 24:41some of that nice um surface detail of
  532. 24:44the ribs you can always use a a volume
  533. 24:47like this but with the rib um profile
  534. 24:52sculpted
  535. 24:54in and you can see in general the other
  536. 24:57Bones have been simplified
  537. 24:59phont and you could probably even take
  538. 25:02it a bit further many people suggest
  539. 25:06removing
  540. 25:07patellas you probably don't need all
  541. 25:09your hand
  542. 25:10bones
  543. 25:12Etc okay so now let's talk about
  544. 25:14symmetry a bit so I mentioned that you
  545. 25:17need the convention is to use lore for
  546. 25:20your left muscles so you can see here
  547. 25:23for each muscle that I named it's
  548. 25:25created a new tab if you make a typo you
  549. 25:29can go and edit it here afterwards and
  550. 25:32that will
  551. 25:34update um you can also delete any of
  552. 25:37these if you're not happy with them but
  553. 25:40let's say we want to mirror our muscles
  554. 25:43which we typically will if we only have
  555. 25:46one side to begin with so I will create
  556. 25:48a muscle mirror
  557. 25:50node typically we create this later down
  558. 25:54um in the workflow but I'm just going to
  559. 25:57put the down now to demonstrate how the
  560. 26:00naming Mirror Works
  561. 26:03so firstly I'll show a handy little
  562. 26:06trick with why I like to um use the
  563. 26:10ccore for the central muscles if we
  564. 26:13select one of these Central
  565. 26:15muscles as I'll group and I'm going to
  566. 26:19replace everything after
  567. 26:21ccore with an asterisk also known as a
  568. 26:24wild card which means
  569. 26:27anything match ing the pattern ccore but
  570. 26:30now instead of saying equal to we want
  571. 26:33it to be everything that's not equal to
  572. 26:34this so to do that we put in an
  573. 26:36exclamation mark before the equal sign
  574. 26:38so now this is saying muscle ID not
  575. 26:42equal to
  576. 26:44ccore fill in Wild Card pattern so now
  577. 26:48if I hit enter you will see it has
  578. 26:50mirrored everything except these Central
  579. 26:53muscles you'll see what happens is let's
  580. 26:56find some muscles that have actually
  581. 26:58been
  582. 26:59named here so now you can see that it's
  583. 27:02gone
  584. 27:03from all the lore pectoralis it has now
  585. 27:06changed to rore
  586. 27:08pectoralis so the muscle mirror will
  587. 27:12pick up the prefixing of course if you
  588. 27:15had the right side that you're mirroring
  589. 27:17you would change it to r underscore and
  590. 27:20if it's perhaps it's lowercase r instead
  591. 27:22of uppercase R you would do that to if
  592. 27:25you wanted
  593. 27:26lcore um
  594. 27:28you would do it that
  595. 27:30way undo whoops but now let's say we
  596. 27:35have our left and right muscles there to
  597. 27:37begin with so let me just create a
  598. 27:39muscle
  599. 27:41mirror on the original muscles and now I
  600. 27:45don't have anything named so I can't use
  601. 27:46the names in the group so instead I'm
  602. 27:48just going to have to select them and
  603. 27:52control to deselect what I don't
  604. 27:56want hit enter
  605. 27:59so
  606. 28:00now this is mirrored so now if I use a
  607. 28:04muscle ID
  608. 28:09node and so just to be clear in this
  609. 28:12case I've mirrored it but perhaps your
  610. 28:14muscles are slightly
  611. 28:16asymmetric it will still work with
  612. 28:20this so I'm going to select
  613. 28:23this and just for Speed sake I'm just
  614. 28:25going to make this L Peck and now you'll
  615. 28:27see this says alpek this says RPC so it
  616. 28:31has
  617. 28:31automatically renamed the
  618. 28:34corresponding muscle on the other side
  619. 28:37um and replace the L with r and you can
  620. 28:39see the pink color shows that that
  621. 28:40muscle's been renamed and the purple
  622. 28:42color shows that that is the
  623. 28:45automatically renamed
  624. 28:47mirroring muscle so that is how the
  625. 28:51muscle ID works with Symmetry and again
  626. 28:53if you don't want to use l capital L and
  627. 28:57R you can change these or if it's right
  628. 28:59or left you can swap
  629. 29:01those similarly we want to make sure
  630. 29:03that our bones are named and there's no
  631. 29:06uh preset for the bone name
  632. 29:09attribute but I like to use bone ID if
  633. 29:13you
  634. 29:14have an attribute already coming in
  635. 29:17that's great you can just use it as is
  636. 29:19maybe it's a name you can just use it
  637. 29:23but let's say you're in a situation
  638. 29:25where you don't have any names you can
  639. 29:27use the ID node on the bones
  640. 29:33too now okay this is the case where the
  641. 29:36error isn't going away so I'm just going
  642. 29:37to hit contrl C and it will get rid of
  643. 29:40it now in theory you can change this to
  644. 29:44a different attribute name I did have
  645. 29:46some issues with this so I think it's
  646. 29:48safer to um
  647. 29:51just use
  648. 29:53this as muscle ID first and then change
  649. 29:56it afterwards so
  650. 29:59so I'm just going to type whatever
  651. 30:01because I'm not really paying attention
  652. 30:03right
  653. 30:04now but what you can do is you can do an
  654. 30:09attribute
  655. 30:11rename you can also do an attribute copy
  656. 30:13I'm just showing a different way make
  657. 30:15sure you're in the Primitive Tab and now
  658. 30:18you're going to go from muscle ID to and
  659. 30:22it doesn't matter what this is but I
  660. 30:24like to use bone ID uh but I do actually
  661. 30:27already have a bone ID attribute so I'm
  662. 30:28just going to call it bone ID
  663. 30:31new and now you will see that there's
  664. 30:34this bold attribute so it's new B ID new
  665. 30:38and the muscle ID attribute has gone
  666. 30:40away so the difference between the
  667. 30:41attribute copy and the attribute rename
  668. 30:44is the attribute copy will
  669. 30:45keep the name and just duplicate it with
  670. 30:48the new
  671. 30:50name and the attribute rename will
  672. 30:53change the name and thereby removing the
  673. 30:56old name
  674. 30:58okay so that is how you can create a
  675. 31:00bone
  676. 31:02ID just delete these because I already
  677. 31:05have a bone
  678. 31:06ID there is one last thing that we want
  679. 31:09to do before we can start properly
  680. 31:11setting up our muscles for simulation
  681. 31:13and that is to ensure that there are no
  682. 31:15intersections between the muscles as
  683. 31:18well as between the muscles and the
  684. 31:19bones now why don't we want these
  685. 31:22intersections strictly speaking Vellum
  686. 31:25can handle points that are intersecting
  687. 31:27on the first frame of the simulation in
  688. 31:29the sense that it doesn't cause them to
  689. 31:31explode like something like FM might but
  690. 31:35it does this by disabling collisions on
  691. 31:38the intersecting points from the first
  692. 31:40frame onwards and this can have some
  693. 31:42unintended consequences such as if you
  694. 31:45have intersections between your muscles
  695. 31:47and your bones you can often get gloopy
  696. 31:50looking muscles and if you have
  697. 31:53intersections between muscles and
  698. 31:54muscles that are quite large if the
  699. 31:57intersection area is quite large then
  700. 31:59I've seen that the muscle to muscle
  701. 32:01constraints don't always get created
  702. 32:04correctly in that area another thing to
  703. 32:07look out for is if you have a quadruped
  704. 32:10for instance so it's a bit hard to show
  705. 32:12it here but a quadruped will typically
  706. 32:15have an a rest position it the back leg
  707. 32:18will be quite close to the
  708. 32:20abdomen and if you have the leg muscles
  709. 32:24penetrating the muscles of the abdomen
  710. 32:27then as that leg swings backwards you
  711. 32:31can have stretching and pulling of the
  712. 32:32muscles if they're penetrating so those
  713. 32:34are some of the reasons why we want to
  714. 32:37do a check to make sure that our muscles
  715. 32:39have no intersections now I will do an
  716. 32:41advanced video to show how to actually
  717. 32:44fix
  718. 32:45intersections but for this video I just
  719. 32:47want to show how you can check for them
  720. 32:51and you can use that to either kick back
  721. 32:53a muscle model to a modeling department
  722. 32:56or you can if the problems are small
  723. 32:58enough you can maybe fix them with some
  724. 33:00small sculpts or
  725. 33:02edits and um I recommend the sculpt tool
  726. 33:06if you are not familiar with that new
  727. 33:08node in 20.5 so for checking I have
  728. 33:12created this
  729. 33:13subnet it's not a node yet it might
  730. 33:17become one in future versions of Houdini
  731. 33:20but for now I just left it as a subnet
  732. 33:22so that it's very easy to share and if
  733. 33:26you want to turn it into an HDA
  734. 33:28go ahead so the first input is going to
  735. 33:32be the muscles and the second input is
  736. 33:33the bones and then you'll see there are
  737. 33:35three outputs which I've merged together
  738. 33:37just for display reasons the first
  739. 33:39output is going to be they're going to
  740. 33:41be colored spheres to show where the
  741. 33:44intersections are if you don't have any
  742. 33:46intersections you won't see anything
  743. 33:48second output is going to be muscles
  744. 33:49third output will be
  745. 33:51bones and so I have already ensured that
  746. 33:55this model is clean and without any
  747. 33:56intersections
  748. 33:58but let's just add some back in so I'll
  749. 34:01put down a peak
  750. 34:02node and I'm going to set the distance
  751. 34:04to
  752. 34:0501 and now we see these spheres pop
  753. 34:11up so there are three
  754. 34:13colors the Orange is for muscle to
  755. 34:16muscle
  756. 34:17intersections and that is between
  757. 34:20separate
  758. 34:22muscles you can for all of these you can
  759. 34:24change the color you can change the
  760. 34:26radius you you can change the intensity
  761. 34:29if you want it to Glow more and you can
  762. 34:31also change your muscle opacity and your
  763. 34:33bone
  764. 34:34opacity so these will show where the
  765. 34:38muscles are penetrating one another the
  766. 34:42next one the muscle self
  767. 34:44intersections are showing where there
  768. 34:47are um faces or points from one part of
  769. 34:51the muscle penetrating another part of
  770. 34:53the same muscle so there's this option
  771. 34:55here display as points which will
  772. 34:58display the Spheres as points
  773. 35:01instead just so that when you're zooming
  774. 35:03in it's a bit easier to see it's not the
  775. 35:06actual geometry isn't completely
  776. 35:07obscured by the
  777. 35:09Spheres um and this will be useful if
  778. 35:11you just wanted to go in and maybe use a
  779. 35:15sculpt little smooth to get rid of that
  780. 35:19but I will add that the self
  781. 35:21intersections aren't as critical to
  782. 35:24resolve as the muscle to muscle or
  783. 35:26muscle to bone ones are um your muscle
  784. 35:30solidifier will often get rid of that
  785. 35:32for you basically it will get rid of it
  786. 35:34if you aren't doing a remesh separately
  787. 35:37beforehand if you just use the remesh
  788. 35:39inside the muscle solidify it will fix
  789. 35:42any self
  790. 35:44intersections but you just need to be
  791. 35:45careful because that can change the
  792. 35:47shape of the muscle a little bit in that
  793. 35:48area so this option is added so that you
  794. 35:52can flag it ahead of time and fix it if
  795. 35:55you want to have more control over with
  796. 35:57the final shape and then lastly there
  797. 36:01are the muscle to Bone intersections
  798. 36:03I'll turn the spay points off and you
  799. 36:06can see them as spheres and I'll also
  800. 36:08show here in the info
  801. 36:10pane let me turn all of these
  802. 36:13on and you can see that each of these
  803. 36:17have a corresponding group muscle to
  804. 36:19Bone self intersecting muscle to muscle
  805. 36:22and you can see that it shows how many
  806. 36:26points there are now these points are
  807. 36:27just doesn't correspond to points um on
  808. 36:31the actual geometry it's points created
  809. 36:33by the intersection detection so there
  810. 36:36going to be more points typically than
  811. 36:38there are intersections but if you have
  812. 36:40zero for all of these then you know you
  813. 36:43are intersection free and you can
  814. 36:45happily continue with setting up your
  815. 36:47simulation one final thing I just want
  816. 36:50to mention is this is a little bit slow
  817. 36:54and because it's doing things like
  818. 36:56editing the opacity just for display
  819. 36:58reasons um I wouldn't use any of the
  820. 37:00output of this for Downstream
  821. 37:03calculations in the Sim just keep this
  822. 37:05off to the side and carry on working in
  823. 37:09your main stream here for any further
  824. 37:12steps um you can of course if you had a
  825. 37:17situation where you made edits you
  826. 37:20can for instance put down a sculpt
  827. 37:23node before and the input will update as
  828. 37:27you
  829. 37:28or you can keep this displayed but
  830. 37:31select that and enter the viewport state
  831. 37:34for
  832. 37:35your
  833. 37:36selected sculpt node or whatever I'm
  834. 37:39just going to turn off
  835. 37:41that and what you can do
  836. 37:44now is let's say we want to
  837. 37:47fix the Sol intersection here so I will
  838. 37:53use smooth maybe reduce the
  839. 37:56strength and
  840. 37:57and you can see it updates it's not the
  841. 38:01fastest it's a bit of a slow update but
  842. 38:05it you can um see the results of your
  843. 38:08tweaks in real time almost real time so
  844. 38:11then once you're happy with that you can
  845. 38:13carry
  846. 38:15on working Downstream from here and
  847. 38:18leave this off to the
  848. 38:19side all right in the next video we will
  849. 38:23start solidifying the muscles for
  850. 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.