{"id":50956,"date":"2020-10-13T06:00:25","date_gmt":"2020-10-13T10:00:25","guid":{"rendered":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=50956"},"modified":"2020-10-13T12:46:57","modified_gmt":"2020-10-13T16:46:57","slug":"project-bug-hunt-6-model-madness","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=50956","title":{"rendered":"Project Bug Hunt #6: Model Madness"},"content":{"rendered":"<p>One of the major goals of this project is to see if we can furnish a space station. That is, we want to load in some models and arrange them around the level in ways that make sense.<\/p>\n<p>My first thought is to build some crude models, just to prove that my idea is sound. I don&#8217;t want to stop programming so I can re-learn 3D modeling. I haven&#8217;t done any serious modeling since the turn of the century, and all the technology has changed since then. So I figure I&#8217;ll just make a few basic cubes to represent the various objects in terms of size.<\/p>\n<p>That wasn&#8217;t a good idea. It just didn&#8217;t give me the sense of whether or not the system is working. I could see it was <b>probably<\/b> working in theory, but that wasn&#8217;t a very satisfying way to conclude this exercise. I don&#8217;t have any screenshots of this experiment, which is fine since the screenshots would be roughly useless.<\/p>\n<p>So let&#8217;s skip that misadventure and jump ahead to the point where I finally open up Blender and decide to make some models.<\/p>\n<p><!--more--><\/p>\n<h3>Blender<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/blender_strange.jpg' width=100% alt='Back in 2006 I made the joke that the Blender interface was like the Dark Dimension in Dr. Strange. At the time, I could only find a tiny little 320x200 example image from the comics. Things are VERY different here in 2020. I could probably fill my hard drive with all of the Marvel comic pages available through Google Image Search these days.' title='Back in 2006 I made the joke that the Blender interface was like the Dark Dimension in Dr. Strange. At the time, I could only find a tiny little 320x200 example image from the comics. Things are VERY different here in 2020. I could probably fill my hard drive with all of the Marvel comic pages available through Google Image Search these days.'\/><\/div><div class='mouseover-alt'>Back in 2006 I made the joke that the Blender interface was like the Dark Dimension in Dr. Strange. At the time, I could only find a tiny little 320x200 example image from the comics. Things are VERY different here in 2020. I could probably fill my hard drive with all of the Marvel comic pages available through Google Image Search these days.<\/div><\/p>\n<p>You might remember that <a href=\"?p=641\">I nearly lost my mind trying to learn Blender<\/a> fourteen years ago. I revisited it a few years ago and found it improved, but still <b>maddening<\/b> to learn. My &#8220;workflow&#8221; would go something like this:<\/p>\n<ol>\n<li>I want to select an object, so I click on it. But the left\/right mouse buttons are reversed compared to literally every other program ever made, so instead of selecting, I move something I didn&#8217;t want to move.<\/li>\n<li>In trying to un-do that move, I manage to open up a mysterious and unwanted context menu.<\/li>\n<li>In trying to close the unwanted menu, I accidentally select one of the mysterious operations it offers.<\/li>\n<li>Nothing seems to happen? So then I try to select the object AGAIN, but this time I remember to correctly use the wrong mouse button.<\/li>\n<li>That menu thing I unwittingly selected a second ago now goes into action, performing an unknown operation on the object.<\/li>\n<li>I hit Ctrl-Z to undo, but then an object I created a while ago will vanish.<\/li>\n<li>I hit Alt-E, which in all other programs would open the Edit menu, but instead it begins another unknown operation. Maybe an object is being somehow changed as I move the mouse or whatever. I hit escape, but that doesn&#8217;t seem to let me out of this operation. So I hit delete, and now another object vanishes from my scene.<\/li>\n<li>After spending twenty minutes painstakingly building these objects, this chained attack of trick inputs has obliterated half my work. I lose my mind and declare vendetta on the developers forever.<\/li>\n<\/ol>\n<p>To be clear, this isn&#8217;t <i>exactly<\/i> how it worked. I can&#8217;t give you the exact buttons I pushed or what crazy things happened as a result, because I often didn&#8217;t understand what was happening or I did wrong. But this is what it felt like: A long chain of compounding mishaps because nothing worked the way I expected.<\/p>\n<h3>The New Blender<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/blender_start.jpg' width=100% alt='This program starts AMAZINGLY quickly. It&apos;s three seconds between the moment I click the icon and the moment the program is ready to use.  Given the sheer complexity and power of this software, that&apos;s miraculous. Compare that to any modern video, photo, or even code editor.' title='This program starts AMAZINGLY quickly. It&apos;s three seconds between the moment I click the icon and the moment the program is ready to use.  Given the sheer complexity and power of this software, that&apos;s miraculous. Compare that to any modern video, photo, or even code editor.'\/><\/div><div class='mouseover-alt'>This program starts AMAZINGLY quickly. It&apos;s three seconds between the moment I click the icon and the moment the program is ready to use.  Given the sheer complexity and power of this software, that&apos;s miraculous. Compare that to any modern video, photo, or even code editor.<\/div><\/p>\n<p>This is no longer a problem in version 2.8 and beyond. The change in usability is so drastic that I&#8217;m surprised the Blender community didn&#8217;t revolt. If I spent years training my muscle memory to do everything backwards and sideways, then I&#8217;d lose my mind if someone came along and made the interface work the way newbies expect.<\/p>\n<p>But for whatever reason, this didn&#8217;t happen. Everyone seems cool with the new Blender, and it&#8217;s about a thousand times easier for me to learn. In fact, this is easier than the programs I learned back in the 90s when 3D modeling was much simpler. I manage to get the basics down in just a few minutes, and in less than an hour I have a steady workflow going. It&#8217;s not a fast workflow or anything, and I&#8217;m still making awkward and confusing blunders, but I&#8217;m getting real work done.<\/p>\n<p>After a few hours, I have a small collection of objects to work with. I&#8217;ve decided to build more or less conventional office furniture. I know the plan is to make a space station \/ ship of some kind, so mundane objects aren&#8217;t really on-mission. My rationale is:<\/p>\n<ol>\n<li>I know this first round of objects is going to be really rough. Two weeks from now I&#8217;m going to look back on the stuff I&#8217;m making now and cringe<span class='snote' title='1'>Note from the future: I was right. I hate these objects now, but I still haven&#8217;t gotten around to replacing them.<\/span>. So these objects are, ultimately, doomed.<\/li>\n<li>Since these objects aren&#8217;t going to be around for long, I want to make some things with a familiar purpose and scale. If I build office furniture that&#8217;s incorrectly sized or arranged, then that will be obvious right away. That&#8217;s not necessarily true if I build (say) a warp core and a bunch of space control panels.<\/li>\n<li>Office furniture is fairly simple. It uses lots of basic shapes, flat surfaces, ninety degree angles, and simple textures. I don&#8217;t need to do any intricate modeling, build any fancy textures, or worry about getting textures to line up between different curved surfaces.<\/li>\n<\/ol>\n<h3>This is Fun<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/blender_lamp.jpg' width=100% alt='A floor lamp for 46  triangles. This is exactly the kind of work I was doing in 1998.' title='A floor lamp for 46  triangles. This is exactly the kind of work I was doing in 1998.'\/><\/div><div class='mouseover-alt'>A floor lamp for 46  triangles. This is exactly the kind of work I was doing in 1998.<\/div><\/p>\n<p>It&#8217;s been almost 20 years since the last time I did this kind of work, and I forgot how fun this can be. Back in the 90s, I was very focused on making low-poly models. Every model was like a little puzzle: <i>&#8220;How can I evoke the intended shape while using the fewest polygons possible?&#8221;<\/i> That kind of work is a bit more technical than general modeling. <a href=\"?p=35448\">The job wasn&#8217;t always great<\/a>, but this is one of the parts I really enjoyed.<\/p>\n<p>As time went on, there was less need for artists to fuss over individual polygons. The job became gradually less technical and more artistic in nature. If you needed a dining room table for 26 quads<span class='snote' title='2'>A quad is a pair of triangles. We don&#8217;t make that distinction these days. Now everything is expressed in triangles.<\/span>, then I was your guy. If you wanted &#8220;A late-period Federal dining set in mahogany with leather upholstery, using the attached inlay pattern.&#8221; then you should give the job to <b>anyone<\/b> but me.<\/p>\n<p>So this project is taking me back to the work I did in my late 20s. In fact, I&#8217;m having so much fun that I end up spending almost a week making all kinds of crap. I have more than enough objects for the next stage of the project, but I don&#8217;t want to stop.<\/p>\n<h3>Flat-Color Was a Mistake<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/blender_desks.jpg' width=100% alt='Ew. This grey lump is supposed to be some kind of double-desk thing.' title='Ew. This grey lump is supposed to be some kind of double-desk thing.'\/><\/div><div class='mouseover-alt'>Ew. This grey lump is supposed to be some kind of double-desk thing.<\/div><\/p>\n<p>I&#8217;m really struggling to get the textures to line up nicely. Partly this is because I&#8217;m still new to the Blender UV mapping interface, and partly because I&#8217;ve foolishly made my office furniture with beveled edges<span class='snote' title='3'>Or are these chamfered edges? I can never remember.<\/span> and now I&#8217;m having trouble making that work. Back in the day, most of my furniture was made of cuboid shapes and texture mapping was fairly straightforward.<\/p>\n<p>But it doesn&#8217;t look right to simply project a square texture onto these non-square desktops. We get partial texture pixels all around the edge, and that makes it look like things are misaligned. I keep fussing with it, trying to get the seams to line up with the 135\u00b0 corners, but it doesn&#8217;t really work.<\/p>\n<p>So then I get the bright idea to do everything in a flat-shading style. I love the flat-shaded polygon look in real games, so maybe that will look cool here? If the desktop is all a single color then I don&#8217;t have to worry about making the texture line up.<\/p>\n<p>Ugh. No. While I love this art style, I don&#8217;t know how to do it properly. My desk ends up looking unfinished rather than untextured. Besides, the rest of my game is leaning towards a pixelated late-90s aesthetic. That is mutually exclusive with the flat polygon look.<\/p>\n<p>Whatever. When I started I wanted to use basic cubes so I didn&#8217;t get bogged down making art, and here I am a week later letting art style concerns distract me from the programming work at hand.\u00a0I do my best to ignore how ugly some of this crap is and open up Visual Studio so I can get back to programming.<\/p>\n<h3>Welcome to Space-IKEA<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/bughunt_furniture1.jpg' width=100% alt='Here is a bunch of crap I made. ' title='Here is a bunch of crap I made. '\/><\/div><div class='mouseover-alt'>Here is a bunch of crap I made. <\/div><\/p>\n<p>Actually, no. I just can&#8217;t resist making more stuff. I make some generic computer cabinets. A soda machine. Some random pipes and panels to go on walls. Some benches. Potted plants. Light fixtures.\u00a0Doors and doorframes. Some wall-mounted display screens.<\/p>\n<p>I decide to make computers. For whatever reason, I gravitate towards making chunky computers with CRTs. That doesn&#8217;t make a lot of sense in a space-station future, but it&#8217;s what I&#8217;m interested in building and it makes for more interesting and challenging models. I make a few modern LCD screens, but their shape is so simple that it&#8217;s not very fun.<\/p>\n<p>I don&#8217;t have the furniture placement code done yet &#8211; we&#8217;ll cover that in the next entry &#8211; so for now the program just takes all of the imported models and arranges them in a big grid outside of the level like some sort of weird furniture warehouse.<\/p>\n<p>A lot of this stuff looks like crap, but it&#8217;s good enough for the proof-of-concept work I&#8217;m about to do.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the major goals of this project is to see if we can furnish a space station. That is, we want to load in some models and arrange them around the level in ways that make sense. My first thought is to build some crude models, just to prove that my idea is sound. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-50956","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/50956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=50956"}],"version-history":[{"count":14,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/50956\/revisions"}],"predecessor-version":[{"id":50974,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/50956\/revisions\/50974"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=50956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=50956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=50956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}