Tuesday, January 05, 2010

Growing Digital Grass

Okay, this is a small thing, but I liked it, so I'm gonna talk about how I did it. Nyeh.

Wife wanted a grass border for her blog. I poked around in Gimp for a while, learned a bit about paths, thought I'd do a half-dozen blade-shaped paths, create brushes out of them, and stamp a grass border. Learning about paths took up my mental energy last night, and I quit and went to bed.

Tonight, I thought about using Blender, and googled "blender grass". I found this tutorial that shows how to grow grass using particles. I followed it, mostly, but found a couple of twists. One was that using a Spot lamp didn't do too well for my purposes, as I wanted to scale the image down and repeat it, and the color variations didn't match too well on the sides. Second was that just scaling the plane from side to side skewed the grass blades, and scaling it on X & Y thinned out the particles too much.

So I changed the lamp from Spot to Sun (I accidentally tried Hemi, which looked awful), and instead of scaling the plane, duped it, ending up with 3 planes side-by-side, which looked much better. Changed the background to white, rendered, and saved the JPEG.

Then loaded the JPEG into Gimp, scaled it down a good bit, widened the canvas, and grabbed a chunk of grass that I wanted to duplicate. As I rect-selected it and hit copy, I just happened to notice that a brush was created from that selection. Very cool! So I switched to pencil mode, and "stamped" a row of grass, cropped it down to wide and not-high dimensions, and put it up on her blog.

FWIW, I grabbed the daffodil image (with CC permission) from Flickr and used Gimp on it as well, to create the image border and title text.

Yeah, having fun with graphics!

[Edit: Oh yeah, the border! Assume a Creative Commons-BY-SA license. Gimme sec, I'll figure out how to add it to the image...]


No comments: