{"id":288,"date":"2020-02-11T13:10:42","date_gmt":"2020-02-11T13:10:42","guid":{"rendered":"https:\/\/potatodie.nl\/diffuse-write-ups\/?p=288"},"modified":"2020-02-13T08:54:35","modified_gmt":"2020-02-13T08:54:35","slug":"modelling-a-worm-with-bones","status":"publish","type":"post","link":"https:\/\/potatodie.nl\/diffuse-write-ups\/modelling-a-worm-with-bones\/","title":{"rendered":"Modeling a worm with bones"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Figuring out how to model a little wriggler as in the sketch below, I encountered a few problems. I think I understand better now. Let me tell you about it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"540\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-1024x540.jpg\" alt=\"Sketch of a wormlike creature\" class=\"wp-image-300\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-1024x540.jpg 1024w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-300x158.jpg 300w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-768x405.jpg 768w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-1536x810.jpg 1536w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-2048x1079.jpg 2048w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-1200x633.jpg 1200w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/sketchworm-1980x1044.jpg 1980w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Primitive form of a worm<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Create a cylindrical shape that is going to play the role of worm in this story. Rotate the object to have the creature in horizontal position.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"515\" height=\"374\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/add-cylinder.png\" alt=\"\" class=\"wp-image-289\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/add-cylinder.png 515w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/add-cylinder-300x218.png 300w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Worm with a backbone<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Add an armature. Make the first bone bigger by enlarging the radius, if you want. But do not scale the bone afterwards while still in Object Mode, transforming the armature. Scaling in Object Mode will cause errors and  confusion, just like it does when  <a href=\"https:\/\/potatodie.nl\/diffuse-write-ups\/scaling-in-blender-mind-object-vs-edit-mode\/\">working with modeling tools<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Edit Mode create a chain of bones by repeatedly extruding the previous bone. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"404\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/add-armature.png\" alt=\"Create worm armature\" class=\"wp-image-290\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/add-armature.png 668w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/add-armature-300x181.png 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s just a simple skeleton for a simple creature. It just needs to wriggle a little.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Follow the bone<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Back in Object Mode select the cylinder, then the armature. Choose <em>Parent &gt; Armature Deform &gt; With Automatic Weights<\/em> (in Object menu, context menu or press Ctrl-P).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Will it pose?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In Pose Mode rotate a few bones, to see what happens. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"443\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/insufficient-geo.png\" alt=\"\" class=\"wp-image-291\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/insufficient-geo.png 508w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/insufficient-geo-300x262.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s clear our object doesn&#8217;t deform well. It lacks vertices. Maybe a little subdivision (with Subdivision Modifier would help?)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"566\" height=\"437\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/subdivrescue.png\" alt=\"\" class=\"wp-image-292\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/subdivrescue.png 566w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/subdivrescue-300x232.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Ehm, no. Of course the subdivision is applied after the deformation by the armature. Maybe if we swapped the Armature and Subdivision modifiers. (Aha, setting the armature as parent to the worm did actually add a modifier to the worm.)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"403\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/subdivrescue2.png\" alt=\"\" class=\"wp-image-293\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/subdivrescue2.png 600w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/subdivrescue2-300x202.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s bend a bit, but still no good. Let&#8217;s go back a few steps and add some vertices ourselves.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Add worm segments<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To edit the worm (add loop cuts), first clear the parent relationship between cylinder and armature (Alt-P) and reset the armature. (In Pose Mode, select all, press Alt-R). Adding loop cuts while the worm is still deformed by the armature raises a warning, and may possibly results in problems lateron.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Maybe it&#8217;s wise to remove the vertex groups (Bone, Bone.001, etc.) of the cylinder too. They were added when the armature was chosen as parent, but stayed behind when the parenthood ended.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now that&#8217;s been cleared up, add a number of loop cuts, to divide the worm in segments. About one segment per bone makes sense.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the parent-child relation again, and pose the armature.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"377\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/loopcuts.png\" alt=\"\" class=\"wp-image-294\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/loopcuts.png 651w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/loopcuts-300x174.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><figcaption>Loop cuts added. Subdivision still active.<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Order of modifiers<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There is progress, but in places where the bones are bend quite sharply, it almost seems there are too many points now and the armature doesn&#8217;t know where to put them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, now the parent relationship is set up again, the Armature Modifier is added after the Subdivision Modifier that was still active. Better let the bones deform the basic shape, then smooth things out with subdivision.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"347\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/loopcuts2.png\" alt=\"\" class=\"wp-image-295\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/loopcuts2.png 622w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/loopcuts2-300x167.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><figcaption>Modifiers reordered: first Armature, then Subdivision.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Definitely better. Getting warm. Let&#8217;s just make it look a little more like the first sketch.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Getting thin<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In Edit Mode, scale down the cylinder a bit in the YZ-plane (in this case). Scale down the nose and tail face a bit extra to taper the ends.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, these edits can be done without breaking the parentship again.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"481\" src=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/theresaworm.png\" alt=\"\" class=\"wp-image-298\" srcset=\"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/theresaworm.png 735w, https:\/\/potatodie.nl\/diffuse-write-ups\/wp-content\/uploads\/2020\/02\/theresaworm-300x196.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><figcaption>Now, there&#8217;s a worm.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Keep your model simple, but not too simple.<\/li><li>Beware of the order that modifiers apply.<\/li><li>Edit in Edit Mode, not Object Mode.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trial and error tutorial: How to model a simple worm that wriggles using an armature.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,28],"tags":[],"class_list":["post-288","post","type-post","status-publish","format-standard","hentry","category-3d","category-blender"],"acf":[],"_links":{"self":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":10,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts\/288\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}