News
2/15/09 - Knitter 0.4.99 Release
This release contains some major feature enhancements that have been a long time coming. The biggest and most visible are the 'tube' rendering mode, which finally brings true 3D rendering of your pattern, and the debug interface and syntax highlighting in the total pattern tab. Lots of other changes went into this release, including major architectural changes to the physical model. In addition, this release uses multiple threads to run the simulation, which should improve GUI responsiveness.
This release should be considered alpha-quality due to the number of major architectural changes. There are some major pitfalls when installing this version. First, the 3D rendering code does not correctly detect video card capabilities, and the OpenGL context's parameters are hard-coded. What this means is that if your OpenGL implementation does not support alpha blending, the program may crash (I had this happen under Ubuntu 8.10 with the nvidia 177 drivers). The solution is to remove alpha blending and reduce the depth buffer to 16 bits in knitter-gui.cpp, and then recompile. Also, this release was built with ODE 0.11, so the 0.9 release available through most distributions is no longer sufficient.
There also appears to be a race condition in this release, possibly inside ODE. I'm still tracking down the source of the problem, but until I can find it, expect hangs, especially on faster machines.
The upside to all of this, though, is that we now have decent quality
renderings that model the effects of the yarn pretty well:
9/19/08 - Oops!
A friendly beta tester informed me recently that the win32 installation has quite a few problems that prevent Knitter from running correctly on a fresh system. In particular, the following libraries are missing: iconv.dll, zlib1.dll, MSVCP71.dll, and the stitch library stitches.xml is also missing. Without the libraries, the program will not run at all, and without stitches.xml, the program won't understand even the simplest k or p stitch. Also, apparently when I added the PNGs for the toolbar, I messed up the installer so that the shortcuts are generated such that Knitter starts in the pixmaps directory instead of its parent. Each of these bugs has been fixed, so if you downloaded the 0.3.0 windows installer, try downloading it again (the new one is about 2.7 MB instead of 1.9 MB) and re-installing. You should be able to simply install over the old Knitter without uninstalling first.
Along with that feedback, I also found out that some of the GUI design is either broken or doesn't make a lot of sense. I'll be doing some re-organizing in the next few minor releases to hopefully help any of you out that can't figure out how to get started. Right now, the most important button is that innocent-looking toolbar button all the way to the right that looks like a refresh button. That's the button that makes the simulation proceed; without it, the pattern will just be a bunch of squeezed-together stitches when it's loaded. Also, for the Windows release at least, the "Precise" method of simulation is broken. I think this is a problem with ODE, so I may try upgrading to the latest version. Until then, stick to "Fast" simulation and everything should be fine.
9/18/08 - Knitter 0.3.0 Release
After several months, the new release is out. Hopefully it was worth the wait; the new release now supports selecting and dragging stitches! This is something that I've always wanted the program to do, and it's finally working in the 0.3.0 release. There have been some updates to the GUI as well. A new toolbar has been added, and tools have been added for each of the different cursor modes that previously corresponded to left (rotate), middle (translate), and right (zoom) clicking on the rendering window. The selection tool is now the fourth option.
Also the rendering mode is now selectable; the old wireframe rendering is still available by selecting it from the drop-down on the toolbar. The default however is rendering using loops that mimic the behavior of the yarn to give a more accurate representation of the fabric. This still has some kinks to be worked out, but it's decent right now. The last rendering option draws using the normal loop rendering, but instead of using the colors from the yarn, it draws the stitches based on whether the stitch is fixed in space or not (red is fixed, grey is free), and the center position of the node is also drawn as a square dot. This dot shows the location you have to click on to be able to select and drag a stitch.
The OSX build of Knitter will be a little bit late this time around. I don't have ready access to a Mac at the moment. I will build an image as soon as I get a chance. In the mean time, if you've got Xcode installed and are a little adventurous, you can always compile it yourself!
Introduction
Knitter is a program for producing and visualizing three-dimensional models of knitting patterns. It uses wxWidgets for a GUI and has been tested on Linux, Windows, and Mac OSX. It should run on any platform that has a wxWidgets port.
The program takes in a knitting pattern (expressed very similarly to traditional patterns, but without ambiguities) and produces a three-dimensional model. You can't tell from the screenshots below, but you can actually rotate that model around and zoom in and out using the mouse. Also, those little red spheres are stitches. The red lines going between stitches represent yarn, or at least "connectedness" of stitches. For lines going left and right, the lines would actually be yarn connecting the previous and next stitches. Lines up and down represent loops in the yarn that connect stitches in different rows. We aren't actually drawing the stitches quite yet (we will in a future version), but this lattice structure should accurately represent the structure of a real project using the same instructions.
One of the goals of this project is to support KnitML as an upcoming standard for exchanging knitting patterns. The current version of Knitter does not support all aspects of KnitML, but it is capable of basic functionality, with support for more complex contructs coming later.
The official SF page is here. It will probably be more up-to-date than this site, so check the official SF downloads for the most up-to-date release.
A Quick Example
The native language for Knitter is closer to a typical knitting pattern. For example, a swatch that's 10 stitches wide and 10 rows tall would look something like:
# Simple 10x10 swatch
sk co 9 turn # make a loop, cast on 9, turn fabric
{ k 10 turn } 9
Notice the braces instead of the * typically used. The reason I used the braces was so that repeated blocks could be nested. Note that if you ran this pattern as is, the stitches would fall off the screen immediately due to gravity. You'll need to fix some of the stitches in space for them to stick around.
# Simple 10x10 swatch, fixed in space
sk fix(-4,0,0) co 9 fix(4,0,0) turn
{ k 10 turn } 9
Here the first slipknot has been fixed in space a little to the left, and the last stitch on the first row has been fixed a little to the right. When the simulation is run, the fabric will be generated and will flop down and be anchored at these two points, as if you were holding them there. See the documentation for more specifics on the language.