Monday, March 31, 2014

Sewing and Sewing Machines

While cleaning the apartment I was reminded of my collection of fabrics and scraps that were just sitting in the closet gathering dust. So I decided to revisit sewing.

I find sewing to be a uniquely frustrating hobby. This time around, I spent hours on a hand-drafted, perfectly functional t-shirt. From a technical perspective I should have been pleased--the garment was the right size, it was symmetric, and the stitching was neat enough. But unfortunately the aesthetic was...very ugly. The fabric was a heavyweight stretchy khaki colored cotton blend from an old xxl men's polo shirt, which sported a small bleach stain. The goal was to reuse it to make a large sized men's t-shirt. Somehow I managed to make it into a large sized women's t-shirt though, with a tapered waist and boat neck...a very large, weighty, khaki colored, women's t-shirt with a bleach stained, sized for my boyfriend. I threw it away and then threw a small tantrum. Sewing just...it has that effect on me. I hate it.

But hating even more the idea of being bested by this infernal craft, or perhaps just a glutton for punishment, I decided to revisit the men's t-shirt idea again this morning, this time using a more traditional fabric choice (gray thin jersey knit cotton blend from an old full-sized bedsheet set). Everything looked right, since I wasn't cutting any corners, well except maybe one corner was cut...The use of cheap thread.

Sometime in the past I acquired a lot of cheap thread that pills up and snags easily. But it was the closest color to the project fabric and I wanted to use it and get rid of it (not being one to waste). Unsurprisingly the thing snagged in the mechanism, causing the machine to stall and then default into error mode (nice feature on digital machines by the way, to prevent them from ripping themselves apart). The end result of this was to break the automatic needle threader though.

This was as good an excuse as any, I figured, to open the machine up and clean it and learn about it and revisit my project idea to try and interface with it so that I can upload custom stitches to it via USB...the good news is that the motherboard seems to sport a 4 pin serial pinout! So now the t-shirt sits forgotten, pins in place along the seams, while the machine sits in two parts on the table so that I can poke at it with a multimeter and try to get a USB-to-serial interface between it and my computer.

Katniss the cat of course had to inspect the work in progress.


Monday, March 24, 2014

Building A Custom Blender Build (and failing)

I decided to compile my own build of Blender on Windows. The main reason is that the sewing addon I want is a patch, not a script, so I have to apply to to the Blender source code and then compile. I'm typically a Unix user (and most often I'm specifically a Darwin user), so when it comes to using the Windows command prompt, or knowing where certain important system files are, or anything a power user might need, I get a bit lost.

I have not yet produced a successful build. To illustrate a point about how difficult these things usually end up being, here are some of the issues I've run into so far:
  • I had no previous setup for Windows so I had to choose what tools to install, namely: a git or svn client, a compiler, a build system
  • I installed mingw64 in a directory with spaces in the pathname which is a no-no
  • I needed to add some directories to my Windows PATH variable
  • I retrieved precompiled libs for Windows but put them in the wrong place initially
  • I was not sure what command to actually use to install using the cmake-generated Makefile (mingw32-make, which confused me because I'm installing 64-bit blender with mingw64)
  • The compiler failed because of libmv, so I just decided to disable that in the build, as I don't need that feature in Blender
  • The process failed due to complaints about the openimageio library...and I had no clue how to proceed, so I decide to switch to using SCons instead of CMake, since somebody mentioned that the daily Blender builds are done with SCons and minGW
  • SCons installer can't find Python in the registry...I find out I need 32-bit Python, and I installed 64-bit Python
  • SCons errors out early, and I learn I need to set a flag BF_TOOLSET=mingw, which I just pass in the command line because SCons doesn't see my user-config.py file for some reason...
  • After a long time, build errors out. More online searches suggest the problem may be due to the fact that I am using gcc 4.8 and I need to get 4.6 instead...
  • Now the build fails compiling files to do with Cycles when using SCons...
  • Now the build fails at the linking stage when compiling with CMake-gui...
The bullet points seem to fly by quickly...but keep in mind that each, on average, required significant time in google searches, trial and error, and CPU time to actually diagnose and get past.

The good news is of course the availability of builds on graphicall.org and of course you can always go to http://www.blender.org/download/. Still, I'm hoping I can get this figured out someday soon.

Saturday, March 22, 2014

Exploring Materials in Blender

Up to now I was ignoring most of the options I had in the Diffuse settings section of the Materials settings panel (for Blender Internal). There are other ways to get the right 'lighting feel' for objects, including using the Node Editor, using light sources themselves, and using other aspects of the Materials panel, but I feel that this is a powerful one.

Here are two blends using just good old Suzanne. The experiments focus largely on distortion and painterly feel using the node editor, and colors manipulation using the Diffuse section of the Materials settings. Key aspects:
  • The RenderLayers output are the monkey heads on a transparent background
  • A noise texture is used to with a Displace node on the monkey heads to create a rough-edges paint feel
  • A wood band texture is used with a Displace node to distort the monkey heads shapes in a psychedelic way
  • The monkey heads are mixed with the paper texture via a Soft Light node and overlayed onto the paper with an Alpha Over node
The paper texture is from cgtextures.com.



Watercolor Test

I tried another watercolor blend using the node setup provided here. Once again, this is the cloth-on-a-stick object I created with the basics cloth physics capabilities in blender.


This blendersartists thread discusses this style and another setup in detail. I will explore this style in more detail later in order achieve some specific results I'd like to see.

Thursday, March 20, 2014

Styles Comparison Test

I set up a scene and rendered it in four different styles. This should help people unfamiliar with 3D graphics techniques to really understand the power behind these tools.


The images above correspond with the following styles:
  1. Plain
  2. Freestyle and ink shader
  3. Watercolor nodes
  4. Cel shader
Attribution section:



Sunday, March 16, 2014

Cloth and physics test

A quick test of the cloth simulation.


It occurred to me that having the clothing move with the rig for the character might be tricky. I figured it would be a lot simpler to have every clothed character start out in a basic 'Vitruvian Man' position, and then actually animate the body to get to the final pose. Enabling cloth physics, now the animated body will push the clothes into position.

The basic steps for this test:

  • The mesh starts off as a flat circle with a hole in the center, evenly subdivided into quads.
  • I place this flat circle mesh around the model waist and pin along the perimeter of the top opening.
  • I do a first physics simulation to get the skirt to drape downwards, then apply it to the skirt mesh
  • I animate the leg (single keyframe was sufficient)
  • I run another physics simulation to have the leg push the skirt
Things are moving along...! I need to practice character rigging though, because I have a bunch of unrigged body meshes from blendswap that I would like to use.

Attribution section:

Saturday, March 15, 2014

Virtual Dressmaking Test #1

Here are some more interim results on virtual dressmaking. They are pretty ugly results, at least from a fashion perspective, but they illustrate the techniques I've been experimenting with so far.


There are still a lot of issues to iron out (yep, a pun). The yellow dress below was meant for someone less busty than the model I put it on. I like the way the physics worked on the hem though.



All the jewelry here are just simple torus meshes run with the cloth physics and high stiffness and damping parameters. The bracelets are like very thick rubber. The necklace stretches itself out and then lays flat on the blouse. I did try to use some of the other physics simulator options (rigid body, soft body) but I couldn't get the parameters right and the meshes were not behaving the way I wanted. Whatever works though...

Attribution section:

Friday, March 14, 2014

Where are our historical dressmaking archives and archivists?

Let me start off my saying that I'm not a lawyer. I feel that this should be obvious, and that only a statement of the opposite would constitute a reason to believe otherwise. But I've been at the butt-end of our overly litigious American society's caprice before, and now I'm wont to take this and any potential legal threat somewhat more seriously. So to reiterate, I am not lawyer, and don't take what I say as legal advice.
Continuing...

Where are the internet's historical dressmaking archives and archivists? Surely, many dressmaking patterns and instructionals have entered public domain by now, and ought to be digitized and vectorized.

My verdict? While there are some freely distributed scans out there, available in low or medium resolution bitmap format files, the offerings are few. There is no centralization or organized volunteer effort to make them into vector graphics. Before I started my search, I think I half expected we'd be at the point of open source software, freely distributed, that used a form of pattern file with the addition of use measurements to generate printable, routable pattern graphics. I didn't find any such resources.

But what I did find was a closed-source community, slow to take advantage of technology, confused about copyright law and prone to spreading misinformation, that ultimately preferred hoarding designs to sharing designs. Most notably, I found a prevalent belief that a published and copyrighted pattern cannot be used to make garments for sale without explicit permissions or licensing agreements.

That's just not true. Copyright of a pattern extends to the pattern representation itself, not the concept of the pattern. This handout from copyright.gov explains it very clearly. "Copyright protection is therefore not available for ideas or procedures for doing, making, or building things; scientific or technical methods or discoveries; business operations or procedures; mathematical principles; formulas or algorithms; or any other concept, process, or method of operation." Also,  "Copyright protection extends to a description, explanation, or illustration of an idea or system, assuming that the requirements of copyright law are met. Copyright in such a case protects the particular literary or pictorial expression chosen by the author. But it gives the copyright owner no exclusive rights in the idea, method, or system involved."

To understand how copyright relates specifically to fashion and garment making, the concepts of useful articles and separability are key. It turns out that those in high fashion, following in the steps of boat hull designers, would like to further protect their designs, but have not successfully done so yet. Even if the legislation they seek does pass eventually, that copyright would only cover a term of three years.

In summary, the whole idea that a dressmaking pattern is by default restricted to "personal home use" is standing on some very tenuous legal legs. Of course, if you have the time and money you can stretch the limits on what can you can register and legally defend as a design patent or trademark.

As part of the more general discussion about copyright law in the United States, I'd like to point your attention towards the Copyright Term Extension Act and 'the concept of 'forever less one day.' So mark your calendars for January 1, 2019 and expect a full show of force.

Thursday, March 13, 2014

Blender Cloth Test #2

Alright, today I have some better results from another simple cloth & clothing test.

I created the simplest shirt I could think of; you can see the outline of the pattern pieces (same for front and back) behind the figure in the following sequence of images.

I used the sewing add-on I discussed in the last post to sew together the pieces. Then I ran another simulation to drape the clothes on the body. Finally, I added a large piece of fabric for a scarf and let it fall over the shoulders of the model. You can see how it starts out as a very simple shape which only takes a few clicks to make, and becomes a very nice scarf.


I still need to refine my skills in terms of setting up the physics simulations to best achieve the results I want. I also need to make some meshes based on real sewing patterns. Finally, I need to figure out how to rig the clothing to move with the character. I would most likely perform a final simulation after posing to make the clothing drape more accurately on the character.

Attribution section:

Wednesday, March 12, 2014

Blender Cloth Test #1

Today I'm experimenting with cloth. I would like to use the physics engine to shape the clothes for the characters in my project.

Below are some of the simplest cloth tests you can do. Place a square piece of cloth above an object. Enable collision physics on the object and cloth physics on the cloth. Run simulation.

Flat shading is a visual style that I really love.

Smooth shading test. Subtle outlining.
Suzanne covers her eyes with a sheer cloth


Now I need to create clothes. I found this add-on for sewing clothing in Blender which seems very promising. Basics of the sewing add-on:
  • Model pieces (you can use actual garment patterns to create these)
  • Use edges to mark the 'threads' that will pull your garment together
  • Use the sewing strength feature in the cloth physics tab to pull together the garment
I wanted to make a sheer wide neck beach type shirt, but I made the neck way too large, wasn't sure how to shrink it, tried pinning it to the model by the shoulders, and after just way too much time decided to throw on some materials and render it anyway, because mistakes are lessons too I guess.


My real life garment creation skills are just about this bad. Next time I promise something better.

Attribution section:



Tuesday, March 11, 2014

Blender Level of Detail Test

Studio LLB has a quick tutorial on using the Freestyle line thickness modifier (distance from camera) to deal with level of detail issues. I saw this blend by DimitrisC and while I really liked it, I felt like it could be improved a little in terms of level of detail issues, because the part of the mesh furthest away from the camera turns into a mess of outlines and draws a lot of attention in my opinion. You can build the blend he provides from scratch following the tutorial on his blog, but I just wanted to play with the outlining so I used the mesh provided in the file. Note: I disabled the Node Editor effects in the original blend file.

Guide to images in the sequence below :
  1. Only the Edge feature (Render -> Post processing -> Edge)
  2. No outlining at all, for reference
  3. Freestyle without thickness modifier
  4. Freestyle with thickness modifier 'distance from camera' using an approximately exponential curve dropoff

That was a refreshingly easy exercise...Getting Freestyle settings right isn't easy, and Freestyle is pretty slow to render, which makes it frustrating when you are trying to explore a huge variable space.

Attribution section:


Blender Experimentation #1

I'm not very creative about post titles, so I'm going to start calling these "Blender Experimentation #[n]." This doesn't apply retroactively to the stuff I posted before today.

Today's experiment involved this female head model from Blendswap.
I was inspired by the 'exploding faces' style on this other model from Blendswap.
I created my version of the exploding faces as such:
  • Duplicate the head (I used two duplicate layers)
  • Displacement modifier to scale along normals
  • Build modifier, or randomly select faces in edit mode, to break down the head
  • Manually delete areas of too much detail (mainly the facial features)
Lighting was done with Environment lighting only and the material is the result of briefly experimenting with settings using Toon for both the Diffuse and Specular shaders.

No nodes or Freestyle

Edge Nodes

Freestyle

Edge nodes and some extra fun with the compositor

It reminds me of cover art for Mona Lisa Overdrive.

My other main project today was reading about copyright law. There are some literary works I'd love to try adapting as graphic novels. Many are not public domain nor will they be anytime soon. I'm mostly interested in releasing any work I do for free online, which is unlikely to be a problem (complete text of these novels is all over the internet, free of charge). But if I ever wanted to a print run, I might find myself unable to negotiate a reasonable contract for the rights to do so (I doubt the estate of some of these authors would be interested in dealing with such a small print run anyway...they save their efforts for dealing with big movie studios). I may very well still attempt to work on these projects, maybe just focusing on a few key scenes, but with the understanding that they will be purely a free and online sort of work. I could always do merchandising I bet, since the actual novel text or story won't play into that, and my visualization of the characters would be an example of a highly transformative type of work.

Sunday, March 9, 2014

My First Completed Blender Project


"Hands." Click to view full size.

So I finally completed my very first project in Blender. I decided to make it all with open source software, so I used the Gimp to layout the final comic. Actually what happened was that I wanted to use my copy of Photoshop but I left the laptop I installed Photoshop on was at the hackerspace and I didn't want to venture out into the cold at 3am for that.

Attribution section:

Saturday, March 8, 2014

A Collection of Blender Styles


Still playing around in Blender. Aiming to do some kind of more abstract short piece to help me practice. Rereading A Lesson Is Learned But the Damage Is Irreversible for inspiration.

Attribution:
The figure is from http://www.blendswap.com/blends/view/71173
The chair and the room are from http://3dmodels.katorlegaz.com/

Here's a collection of styles from blendswap:

Halftone Shader http://www.blendswap.com/blends/view/66588
Pen Sketch http://www.blendswap.com/blends/view/67692
Ink Shader http://loran-cg.blogspot.fr/2014/02/ink-shader.html
8-bit http://www.blendswap.com/blends/view/44982
Basic Ink http://www.blendswap.com/blends/view/44708
Four Freestyle setups http://www.blendswap.com/blends/view/18717
Edge Nodes http://blendernpr.org/bnpr-exclusive-edge-nodes-part-3/
Ink and Watercolor http://www.blendswap.com/blends/view/64712
Cel Shader http://www.blendswap.com/blends/view/70987

I've outlined a bunch of things I need to learn to do in Blender to make what I'm trying to make, and it definitely feels daunting. I'll just have to keep practicing until I get there I guess...

Thursday, March 6, 2014

Blender Room Mockup

Set dressing test using files found online that are licensed to allow for commercial use of adaptations (typically Creative Commons Attribution 3.0). Some links to good 3D model repositories like this:
Below is a quick test. Flat white materials all around, rendered with just the edge features and a simple Freestyle lineset with distance from camera applied to line thickness.


Set dressing feels a lot like playing the Sims. I'm leaning towards continuing to work on this one before I jump into my first big planned project.

Saturday, March 1, 2014

Learning to Blender: Nonphotorealistic Rendering

I started learning Blender in pursuit of an old dream: make a graphic novel with 2D style art using 3D rendering techniques. To avoid burnout (the learning curve is really, really steep) I find it helps to spend time doing research: collect inspiration, download resource files, find tutorials, browse forums, and find examples of styles you want to emulate and styles you want to avoid. For inspiration I also picked up Transmetropolitan Vol. 1. Very good stuff...good thing there are nine more volumes and one special edition volume to read.

I'm still not ready to work on a graphic novel project but I'm getting there and it is definitely starting to look more feasible. I've gotten the hang of the compositor, which I mostly use so that I can have my linework and inking render layers done separately from coloring/fill layers.

Here's a great resource: a Blender ink shader. Download the .blend file and stick whatever subject you want in there for instantly great results. Here are some experiments I've been doing with this and the compositor.