It's a plain and fast tutorial, just for one trick of path manipulation, composed in Inkscape itself! I should do this more often.
You say 'arrogant elitist technocrat' like it's a bad thing!
It's a plain and fast tutorial, just for one trick of path manipulation, composed in Inkscape itself! I should do this more often.
A lot of people don't seem to know this, but you have a full library of image texture generators in your system's Xscreensaver library. The individual executables are in /usr/libexec/xscreensaver/.
Run any of the executables in the directory like this:
...and then use Gimp's screenshot tool, single window, exclude window decoration (the titlebar). Now you can edit from there running filters on it, and see what you find. An example design taken from the demo shown above:
...after a few filter effects. Just to point out the possibilities. There's lots of things you can do here, if you explore the modules and find something with an interesting effect that comes in handy.
One problem is that the screensavers which use OpenGL may not lend well to being captured this way, depending on your hardware setup. On my laptop system, I get bad horizontal fracture lines, but on the desktop I don't.
Here's 'noof' with some glowy effects:
Here's 'xanalogTV', for the next time you need a quick generated image for a TV set on the fritz:
'Squiral' can generate some spiffy greeble textures for your next 3D model:
How I did the 'squiral' to greeble one: Screenshot 'squirral' when the window is almost full (right before it resets to a blank screen); edge-detect using the edge dialog at 'differential', 1.0, black; duplicate layer; desaturate 'average'; threshhold that black-and-white layer, moving the arrows to include or exclude as much detail as you want; go back to the color layer and map gradient (I used 'horizon 2'); go back to the black-and-white layer and gaussian blur it at about a 10.0, have the black-and-white below the color layer and bump-map the color layer using the black-and-white layer (adjust these parameters in the bump-map dialog to get the best effect). Sometimes you will get an unlucky shot and end up with white Xs over some of the squares, but otherwise, meh, it'll do from a distance.
Or if you're just seeking inspiration, you can run 'vidwhacker' to get a random surprise image from your home folder with a random filter run on it, capture it, and your challenge is to make it into something coherent.
I've been playing around with the latest version of Inkscape (that's 0.47 on my 'buntu) and noticed that, along with the massive amount of new features it's gained, several old fractal-type functions have been consolidated into just the L-system. So my old Inkscape trees tutorial is outdated. But along with that, the L-System dialog just doesn't seem to be documented in manuals, but various bloggers have discovered it and played with it, like this cool blog post with a great guide illustration, this blog with several posts dealing with L-System, and a few others you'll find when you Google "Inkscape L-System."
So let's dive in! The L-System dialog (extensions-> render-> L-system) is actually a little language all to itself, similar to Logo turtle-drawing graphics. If you click the 'help' tab in the tutorial, there's a few clues there. It's actually an implementation of the Lindenmayer System from mathematics (via biology!).
From what I've observed, 'Axiom' gives the command. It's actually kind of confusing, because you can enter the formula directly in the axiom box, name the formula in the axiom box and enter it in the 'Rules' box, etc. 'Rules' gives, ah, the command. Or the formula(s). 'Order' is how many times we'll repeat the Axiom (?) or Formula. 'Step length' is how many pixels to travel, 'left angle' and 'right angle' is the angle to turn in degrees, and the two randomizers cause the parameters to vary slightly.
Canonically, it looks like you enter functions into the 'rules' box and execute them with the 'axiom' box.
Now, a fuller breakdown of the "language" as far as I've discovered:
Letters A-thru-L: It says you use G-L for moving and A-F for drawing, but try defining 'G=AA..' and watch G draw when you call it anyway. The better description seems to be: Letters A-F draw and letters G-L move without drawing, unless you use them for variable names too. Additionally, the letters M-Z seem to be available for variable names anyway.
(+ , - , |) - Turns left, right, and 180-degrees. The left and right are the ones affected by your degrees entry in the 'left angle' / 'right angle' boxes.
([ , ]) - The square brackets set a point marker ([) and return to it (]). They seem to work recursively, so you can set multiple points ( [A[A[A ) and then return to the third-most-recent point by calling the right square bracket three times in a row ( ]]]A ). Only a Lisp-head would love this.
( = ) - The equals sign assigns a function. (F=A--B)
( ; ) - The semicolon ends a function assignment. Useful only if you're going to declare multiple functions ( X=AA-A; Y=A+AA; )
So, some little rule sets I've stumbled on:
Makes a Levy C curve.
Looks like a lighter, airier version of Levy C.
Gives a really chaotic tiling.
Just for the sake of showing what you can do with this stuff, here's one where I made an order-7 version of that last one, set the path to be width 5.0, converted stroke-to-path with Ctrl-Alt-C, removed fill and set path back to 1.0 - the resulting outline is on the left. On the right, same outline copied a couple times with some filter effects. Now you see where this is going?
Rule: F=FF-F-; (yes, same as above)
Just changing the angle gives this snug triangular weave pattern at high orders.
I have no idea what it is, but it makes a fantastic leaf template at order 7.
An example of a tree or fern shape, this one very basic.
We took the same idea above and made it symmetrical; here it is in four generations at order 1, 2, 3, and 4.
Rule: X=X+YF; Y=FX-Y;
The good old dragon curve, in all its glory.
Perhaps I'll tuck into these again some time. A word of caution on fractals: they are guaranteed to push your computer's processing power to the limit, in just a few clicks! In most of these cases, doubling the last attempted order I showed you would probably be beyond anything but a mainframe. So if you try this on a laptop and the CPU fan is screaming, that's why. It is recommended that you start with order 1, then go up a step at a time, noting when your machine is starting to show signs of lag. Also, the dialog seems to be buggy and prone to crash at the mildest provocation, although that might just be my Ubuntu (is anything ever stable on Ubuntu?).
Some more ideas can be reaped from the Wikipedia page on Lindenmayer Systems. The language given there for various shapes can be translated into Inkscape's L-System dialog without too much effort.
If you're really getting into this toy and you're looking for some new challenges, here's the Wikipedia fractal list. Don't stay up too late, now!
Update Shout-out to TheBrickInTheSky, who continues an exploration of more Inkscape L-system goodness, in more depth than I can go into here.
So there's this game they play on 4chan. You make up a fake, random album. This image, typically posted at the beginning of the game in the /mu/ folder, explains it well:
And I thunks to meself, "That calls for a good Bash script!" But I'm not good enough at hacking to make a good Bash script. So until somebody writes that, here's a lousy Bash script called "make_album.sh".
It uses lynx, wget, and Image Magick plus the whole set of Unix-standard text-mode tools to...
From running this monstrosity in a loop, I managed to get all of the following from a pool of just 200 tries. It is eerie how low the dud factor is here - most of the time duds are due to
This script is not for beginners! Anybody familiar with last year's Image Magick banner generator will remember how complicated my efforts can get. You'll at least want to take a look in it, check to see if it's looking for fonts in the right place on your system (Mine has it where Ubuntu expects fonts to be, but who knows what in blazes is going on on your heap?), and run the script in a directory of its own, so it doesn't overwrite anything like an image you might have saved called "temp.jpg".
That being said, sit back and check out what kinds of crazy results we get!
There's the just plain realistic stuff...
...because SOCIETY IS COMING!
I'm kind of sad that I'll never hear this one.
Come on, she was just posing like this just knowing my script would come along and make an album cover out of her, wasn't she?
Tell me politics doesn't feel like this to you most of the time.
...with DUCK KILLING DUCK! In mid-air!
Ones that had a bad font malfunction but turned out right anyway...
Ben seems unhappy about his life. Even with his nice car.
Look! That guy's running away!
Led Zeppelin is kicking itself right now for not thinking of this one.
Ones where the script made an uncanny image or title matching choice...
We have a man down!
...the kids look a little young for high school, but hey, not bad.
If you can't see the title, it says "Because the house always wins."
...that place where you go to get away from it all.
"Travis burns his lunch" would have been even better.
Perfect for a demo tape. Playing on the laptop, of course, while the executive invites others to listen in.
And some worth special mention...
Best font match to subject.
Wow. Powerful horse, powerful title.
See, it's a cafe, the guy is looking to the empty seat to the right, and having said the album's title, his freshly-dumped girlfriend apparently had no regrets at ending this. Adios! And now he's left with his words hanging in the air, alone. Screw it, I could start a movie this way.
Best all-around. Great harmony, looks like it was planned out.
I looked it up, and "Adult Digital Distraction" is like the Canadian version of "Adult Swim." But here, they sound like a folk-rock band that opens for Phish a lot.
The heck with an album cover, "I've Fought More Monsters Than You" just became the title of the autobiography I'm going to write. Complete with the image.
Sometimes the title makes the entry!
Funny, with all of the parenting movies Steve Martin's made, if he were to release another album of his stand-up comedy, I imagine it would be called "That's something the kids should know." Even if you can't quite read it down there.
You just know this is a whiny emo band.
Wow! Now I have to start a pretentiously arty indie band just to go along with the album cover.
Just another random thing you can make with Gimp filters. By "tie-dye" I mean the shirt design you see on most of the shirts at a Grateful Dead concert. Commence:
1. Pick the full-spectrum rainbow gradient, apply it to the canvas with the gradient tool on 'spiral' (cw here). Get it close to the center, but not perfect.
2. Make a new layer and move it under the top one. This time, pick an FG-to-BG gradient with black-and-white color. Apply it to the new layer with the gradient tool, this time a bi-linear gradient with 'repeat' checked. Again, this will look more natural if it isn't ruler-straight-perfect, so don't bother with the guides and just shoot from the hip. We're going to make a distortion map!
3. Now apply a polar distortion to the black-and-white striped layer. You should find it in Filters -> Distorts, unless they move it by the time you read this. Note in the dialog, we're moving the 'circle depth in percent' slider all the way over to 0 - we want a square frame with a burst design.
4. Open the Warp dialog, last seen at the time of this writing under Filters -> Map. This is the step where you can experiment some to suit your taste. Be sure the top rainbow layer is active and the dialog here sets the bottom black-and-white layer to be the displacement map. Here I have step-size to 20.00 and iterations set to '15.' I'm ignoring the advanced and more advanced options for now.
5. Gaussian blur to about 30.00 (Filters -> blur UTMI*). Then open the color curves dialog (colors -> curves UTMI). Here's another place to play with the settings. Notice that the colors get lighter when you move the curve higher than the diagonal baseline - useful to note if you're going for the printed-on-white-Tshirt-look. Click the curve type a couple of time to get multiple nodes to play with. Just groove around, here!
6. From here, you can use the brightness/contrast tool to bleach it out more, use some other effects such as applying a canvas to look like it's printed on cloth, or undo (Ctrl-Z) a couple of steps to go back and check out that warp map again. In the warp dialog, raising dither size (about yea 15 or so) blurs out the effect in a grainy scattering way, for the more realistic fabric-wrinkles from Tshirt knots; checking magnitude map and using the top layer will make only part of the design warp to the map; changing the rotation angle will also introduce some wrinkles; the other parts all do something too, but just diddle them around this way and explore everything.
Here's one I got:
By the way, digitally designing a tie-dye pattern and screen-printing it on a shirt and actually wearing it where hippies congregate is sure to get you some dirty looks, except for the ones who have a sense of humor enough to appreciate the irony of it.
*UTMI = Unless They Moved It
Talking about Gimp's Resynthesizer tool last time got me thinking about Gimp filters again, and how so many people really don't understand how to use them and hence don't know what they're capable of. So I'm going to spotlight a few of the more intriguing ones over the next few posts. Today, Pikachu, I choose IFS, located in Filter -> Render -> Nature -> IFS.
Some general tips about using the IFS Fractal generator:
NOTICE: This tutorial is done with Gimp version 2.6.6!
Here's the official documentation on the Gimp IFS plug-in. It also links to some hair-graying scientific book, as if we wanted to study for our masters instead of drawing pretty pictures. Foo! Anyway, here's my example:
I start a new file, open IFS Fractal, and the first thing I do is click 'new' to add a fourth shape in the middle.
Now, we want to start out with four symmetrical squares, so we use the bottom half of the dialog to set this up. We can see that shape #1 is at X=0.3, so move shape #3 to X=0.3 too. Shape #2 is at X=0.7, so let's also have #4 (the new one) at X=0.7 also. For the Y axis... here's another bug with the dialog... the crosshair is not in the middle, but rather at about Y=0.45. And by the way, did you know if you put all four shapes at Y=0.45 right now, IFS Fractal will crash and vanish? I just found that out. Anyway, have the same Y values for #1 and #2 and then a different same Y value for #3 and #4. Here I have 0.3 for the top row and 0.6 for the bottom.
Shear all four shapes to -0.4. Set the four shapes' angles as follows: #1: -10.8, #2: +10.8, #3: +3.6, #4: 32.4. Scale the two shapes in the left column both to 0.46. Hey! We have something organic-looking already!
We're going for a sort of pine tree branch here. However, we are not going to try to simulate the branch this way along with the foliage. We have a much better method, making it a multi-step process. Go ahead and do a color transform on shape #2 to brown if you want, though, as this will help the final product stand out. Hit 'OK'.
Now, first thing I do is select the entire shape and hit 'Ctrl-X' to cut it, 'Ctrl-V' to paste it back in, and then the rotate and scale tools to size and position it the way I want it for the time being. We're actually going to use this part like a stamp. Yes, I could have rotated and scaled the shape in the IFS Fractal dialog, but this was much easier. You can see I have also started a new layer, where we're going to do out next step.
This time we're going to do the wooden branch itself, and we're going to be much more sloppy about it because we'll edit this part later. Go ahead and pick a woody brown color for the foreground, start IFS again (be careful it's in the NEW layer so we don't destroy the last shape!), and hit 'reset.' This time, since it's easier to make stick-shapes, just drag the shapes until you have something like this:
I've also rotated and scaled it to taste. From here, we're going to go back and get the first shape, copy it, and paste it several times on the second shape while rotating and scaling to fit things together. Here's the structure after pasting the foliage sections on the branch.
I've added a darkened pine board pattern to the background and gave it a much-needed color balance with the brightness-contrast dialog. We'll call it done there.
Once again, this is intended as a quick and sloppy tutorial, just showing intermediate users what can be done. So far as I know, it's the only other Gimp IFS tutorial besides the official one. Be cool, be loose, and be gimpy!
Continuing our experiment in Inkscape 0.46, we'll find out how to do the more sophisticated isometric tricks.
Any object can be skewed, simply by using the 'transform' dialog. For instance, here's an old ray-trace of mine imported into inkscape and skewed vertically by - remember the isometric magic number! - 30 degrees. Quite handy should the citizens of your isometric town be taking in a matinée!
You might want to scale the bitmap when you import it, smaller in the horizontal direction only. It will look crunched when flat, but after getting skewed 30 degrees it won't look stretched.
This pretty much opens up unlimited possibilities. You can simply draw square tiles in any bitmap editor, import them, skew them, and mash them into the set. Here is a square I filled with Gimp's default 'pine' wood texture, which I then imported, skewed, copied, flipped, and overlapped a couple of sides of our base cube at 50% transparency so the shadows fit, then added a short base block to the top for a roof/trim effect. This cube will now drag 'n' stack just like the base cube does.
You could also do a two-tone bitmap and apply this method to it, then use the vector trace to turn it into a path.
'Perspective' is a new Inkscape feature. To use it, you take any path (and only a path!) and draw another path which will be the perspective to skew. Select the first path and then the second one, and from the menu choose 'effects... modify path... perspective.' Here, let's take some text in a fancy font and with it selected, from the menus we go, 'path... object to path.' Then bump it into the path we want to use...
Being a new plug-in perspective is kind of quirky. It gives me a warning message, but works anyway. Also through trial and error (and error... and error...), I learned that where you begin drawing the target path (the one that shapes the perspective) makes the difference in how the path fits into the box. So if your text goes in sideways, just undo with Ctrl-Z and delete the perspective path and re-do it starting from a different corner. You'll get the hang of it!
Anyway, it's an easy way to make a sign.
We can give a perspective object some depth, too. Here, I've draw a star with the star tool, skewed it 30 degrees, converted it into a path, and from the menus picked 'effects... generate from path... extrude.' I've then taken the result and hit Ctrl-shift-G to ungroup and changed the colors of the original path and the extrusion so you can see what it did.
You might need to play around with the angle a bit (check 'live preview' in the dialog) to get it to match. The angle it extrudes to depends on the original angle of the object. However, making a path copy of the object always sets 0-degrees to dead right and 90-degrees to straight down, in which case our angle would have been 210-degrees - hard right plus 30.
I jazzed up the sign with some framing, lights, and extrusion:
A couple of notes here: 'Extrude' is still somewhat buggy. If you extrude a complex object, such as text, and have stroke turned on so you can see it, you'll notice that in fact extrude doesn't produce a smooth unit, but rather a jigsaw jumble of paths. Some of which will overlap in the wrong places, destroying the 3D effect. If you must, you can ungroup them all and manually fix them, but it's a pain.
Also, the more irregular our objects get, the harder it becomes to get them to behave and snap to the isomentric grid where we want them. Use the transparent tile trick I showed you for the pillar and sphere to force an object to occupy an exact cell.
Well, this concludes the Inkscape isometric graphics course! Hope you got something out of it. Ubuntu doesn't have the Inkscape package up to 0.47 yet, but the next release is around the corner, so I'll probably be doing a lot in Inkscape over the holidays. Just remember this is version 0.46 in this tutorial.
Inkscape Isometric Tileset Tutorial
Continuing our experiment in Inkscape 0.46, we'll take our isometric tileset from the previous part and add some more objects to it.
A brick wall
Some objects you'll want to set to a permanent color. Here, I've taken the eighth-cube base and opened the 'fill n stroke' dialog to the HSL tab, then, without changing the lightness, set the color on each side to hue: 1, saturation: 255. You can also change these colors if you want your bricks to be darker, of course, just remember to keep the consistent color scheme where the top is lightest, the left face is medium, and the right face is darkest (or however you decided on your lighting scheme). Additionally, because bricks have mortar, I've added a stroke colored just a hair darker than pure white. I've also duplicated that, making one cube and one brick shape:
Now just stack-em-up, and group 'em together. Notice that I've gotten the face of the brick wall exactly to scale with the base block.
To speed things up a little, here I've made a sidewalk tile by making two cube-top shapes, insetting the top one and making it lighter, and setting a gradient on the bottom shape from 20% to 40% gray, so we have some realistic lines in the sidewalk. And the grass, I just went crazy with some zigzag paths and gradients, trying to get something besides putting-course green.
Now we come to a tricky one. You've probably figured out that if you try to draw a circle with the circle tool, it's difficult to get it to conform to the tile perspective. Also, dragging it around will be a pain, since the round corners want to snap to the grid the wrong way. What to do? Well, start by drawing a tile shape just like we did for the top of our first cube with the 'bezier tool.' Now draw a circle inside that (make them different colors so we can see what we're doing) with the corners of the circle's bounding box just where they are here:
Duplicate this setup and move that tile above this one, remembering to snap it to grid. Here's the cube beside it for comparison:
Now with the bezier tool, draw a box between those two, with the top and bottom of the box right at the half-way line for our two circles:
Now select the square and bottom circle and combine them into one path with Ctrl-shift-plus. Now do a horizontal gradient fill on this new shape from 20% to 40% gray, while making the top circle 10% gray. Sort everything into the proper stacking order with page-up/page-down if you need to. Group the pieces of the pillar together, but leave the top and bottom squares out of it for now.
Now, select those top and bottom squares and use the fill n stroke dialog to make them transparent - setting the alpha to zero. Keep them selected, and use shift-mouse-click to select the pillar too. Ctrl-G to group them together.
We now have a pillar that behaves exactly like our cube!
As you might guess, it's even easier to create a ball shape this way. Radial gradient to the same standard as the rest of the set.
Of course, you can also draw directly on the grid itself. I could have built this window by stacking blocks, but it was much easier drawing it from scratch. I just do it at twice my intended scale and then scale it down. To scale down precisely, use the 'transform' dialog from Ctrl-shift-M and scale by -50%.
But most of the time it's easier to go on combining the building blocks into new objects, for instance this potted tree on the sidewalk here:
As you can see, we've come a long way since our beginning block! Next time we'll explore an even more advanced level of isometric editing in Inkscape.
Inkscape Isometric Tileset Tutorial
Oh, happy day! Now that I'm upgraded to Inkscape 0.46 on Ubuntu 9.04, I can start doing vector tutorials again. Today, let's see about making an isometric set of objects which can be quickly dragged around to build structures.
The concept here is to have a vector pack, with which we can create images from a set of building blocks, in an environment where we know everything is going to behave. "Behave" is a keyword in isometric art; you have to be an absolute control freak, or the result will look sloppy.
Start by creating a new document and changing the properties. I use a 400x400 pixel work area, which seems to be enough for storing a vector set. Now in the 'grid' tab select a new "axonometric" grid. I have mine set for spacing - 3 pixels, X and Z angles left at the default 30 degrees, and major grid line every 6 lines. This ensures that my major-lines area will subdivide nicely into halves and thirds.
You will want to enable snapping here, too. Turn on as much as you're comfortable with, as long as you can easily drag objects around and have them always stay rigidly within the grid's frames.
Let's start with the really obvious one, the cube. Using the 'bezier curve' pen, draw a flat diamond shape like this for the top of the cube:
We're going to be doing a lot of this. Fill in the other two sides, then in the 'fill 'n' stroke' dialog turn off the stroke and turn on fill. Fill with a color for each side.
Now's the time to decide how to set up light in your tileset. For this instance, I set the top face to 10% gray, the left face to 20% gray, and the right face to 40% gray. This produces the solid block look.
It's important to follow the standard for the whole set, so that later all the pieces work together. It doesn't matter what the shadows are or which way they "point", so long as they're all consistent.
Once you have that, select all faces and group them together with Ctrl-G, then duplicate the cube with Ctrl-D. Drag the second cube to lie next to the first. Do this a few more times, seeing how seamlessly you can make everything look like one piece. Move pieces over or under other pieces by hitting 'page up' and 'page down.'
Now that we have that base, we can duplicate the cube, ungroup it with Ctrl-shift-G, and then drag the nodes around with the node edit tool to make variations on this theme. Here I have made half-cubes slicing from each direction, and one eighth-cube from slicing all three directions:
Now about this time you're saying "Do I have to do this for every color of block in my set?" No, there's an easy way: we're going to create a colored filter the same shape as each piece to lay over it. This is quite easy: select the object you want to color, hit Ctrl-D to duplicate, Ctrl-shift-G to ungroup, Ctrl-shift-plus to merge all paths together, then pick a solid color and in the 'fill n stroke' dialog make the alpha 128 (50%). Now you have a half-transparent color you can lay over the shadowed object. You can change the color without bothering the shadow system.
You can then group the filter together with the base object and drag it around as one unit. Need a color change? Ctrl-shift-G, select the filter, click a new color from the color palette - it will keep the transparency - and group it again to the base object.
Let's try making a ramp next. This will be useful for making roofs. Duplicate a base cube and drag it to a new area, Ctrl-shift-G to ungroup, delete one side, and drag the nodes of the other two sides with the node edit tool so we have a ramp structure. For the triagle part of the ramp, you can just delete one node.
Now, we can leave the side face's color alone. But the ramp part will need a color change or it will look wrong when we use it with blocks. Remember when we set the top face to 10% gray and the right face to 40%? Use the 'fill n stroke' dialog to find out the lightness of each of these values (in the HSL tab) and find the middle point between them (230+((230-153)/2)). The new color for a slope going from top to right will be 25% gray - or 191.5 (we'll fudge here and call it 191). Use a similar method for finding the colors for the other ramp.
Next time we'll examine building more sophisticated objects to add to our set.
Inkscape Isometric Tileset Tutorial