I mentioned in one of the Second Life Forums (Fora?) that I would try to give a simple example of how to create clothes in Second Life. And, in particular, show how to make smooth 'cuts' using Paths (Bezier Curves) and how to avoid the Dreaded Jaggies using the Gaussian Blur.
I've decided that the way to do it is to step back first and talk about Paths, aka bezier curves and how one works with them, and thinks about them with GIMP. So what I will do here is create a simple Path in GIMP and show you what is possible. If you want to do some reading on the math behind this you can google Bezier Curves. If you'd like to get a 'hands on' feeling of what we'll be doing go here:
http://www.math.ubc.ca/~cass/gfx/bezier.html
Give it a little time to load into your browser and then use the handles and move the end-points to play with the Bezier Curve it provides.
If you're jumping into this without the preceding posts in this blog, I'd suggest you take a look at the Tools, Credits and Caveats post found here:
http://robin-makingstuff.blogspot.com/2011/02/tools-credits-and-caveats.html.
It will tell you how to get the various tools you'll need, starting with GIMP (free!).
Ok.... now let's talk about clothes.....
There are two big problems with clothes. The first is creating nice smooth 'cuts' in your clothing item. And the second is avoiding the Dreaded Jaggies. That's where a diagonal line looks more like a staircase than a nice smooth line.
In this post, we're going to deal with the first problem, how to create smooth 'cuts' in your 'fabric' as you make clothes. The solution to this problem in GIMP is to use Paths, which are in fact, bezier curves.
Working with Paths is another of those things common in computers with graphical user interfaces that is easier to do than it is to explain. I'd suggest reading through this post once. Then reading through it a second time and try to do the examples yourself. You'll wonder pretty quickly what all the fuss is about. :)
Lets get started!
Step 1: Open GIMP, create a new Image of 256x256 pixels. Then find the Path Tool on the Tools window and create a coarse, first pass, unrefined Path. Take a look at the path I've created below:
There are two things we're going to work on here:
- Connecting a curve to a straight line.
- Connecting a curve to a curve.
So.... the thing we need to do is to grab the second segment in the middle and drag it. Use your mouse, place the pointer over the middle of the second segment, press the left mouse button and hold it down as you drag the mouse as shown in the image below.
As you drag the segment you'll notice that two handles appear, one on each end. Use the mouse to grab the lower handle and move it around. What we want is a smooth connection between this second and the first line segment. If you make the line that is attached to the handle look like it is a straight line extension of the first line segment, you'l have the smooth connection we want.
Looking at it from the second line segment's point of view, that line is tangent to the curve at the point it connects to the first line segment. If the word 'tangent' makes you think that someone might be mispronouncing the name of a small orange-like fruit, dont worry. There will NOT be a test.
Now take the second handle and drag it in the direction shown in the picture below.
The exact angle you drag the second handle to in the picture above is not particularly important. BUT! The next step will be!!
Use the mouse to drag the third line segment from the middle as you did with the second to expose the handles. And then take the left-most handle and make the line it connects to be straight when compared with the line on the second handle on the second segment.
Whew! That's a lot of words to describe something pretty simple. Look at the picture below.
Now let's pause and look at what we've done.....
We've connected the second line segment smoothly to a straight line on one end and connected it smoothly to a curved line on the other end. Success! We've achieved our goal!
Now we can repeat the process, working our way from line segment to line segment smoothly connecting and creating curves. Be sure to leave the last line segment straight as we did with the first. When you're done it will look like something like this.
Yay! It looks pretty good doesn't it?
Go ahead now and play with it. Move the points around. Stretch the handles out so they're really long. Experiment! Play!
There's a handy trick you will want to know about. If you place your mouse in the middle of a line segment and press 'ctrl' on the keyboard you'll see a very small + appear. That + indicates that a new point will be added when you click the left mouse button. Then you can move that point around as you've done with the others and play with it as well.
Oh, one more thing! Go to the Layers window and click on Paths tab. (look at the image above) You'll see a thing under that tab that looks a lot like a layer, but in fact it is the Path we have just created. And yes, there are a lot of fun things we can do with these, almost as much fun as the things we can do with layers! But we'll save that for a future post. *winks*
On the next post we will use Paths to create a top. I'm thinking of creating a nice tank top. What do you think....? Red?
robin