4
www.linuxformat.co.uk 78 LXF52 APRIL 2004 TUTORIAL GIMP he GIMP isn’t designed to do 3D work – such tasks are generally left to tools like the recently open-sourced Blender (Jono Bacon’s tutorials are in Linux Format issues 39-50), SoftImage’s Maya and SideFX Software’s Houdini. But not all 3D tasks require some complex tools. In this issue’s set of tutorials we’ll look at the processes for creating some basic 3D shapes using The GIMP and how such simple shapes are processes can be used for meaningful work. IMAGE CONSTRUCTION Perspective views can turn any image into 3D artwork. All it takes is a little organisation, a little crafty lighting and Michael J Hammel’s expert tutelage... 3D Design with The GIMP SIMPLE SHAPES: 3D CONE WITH TEXTURE Guides 1 Start with a new window with a single white background layer. Make the image square, 500x500 pixels for this example. Now add some guides to make it easy to outline the cone. Use Guides> Center Guide if you have it, or simply place a vertical guide offset 250 pixels from the left edge. Add two more guides offset 40 pixels from the top and bottom. Add two more guides 60 pixels offset from each side of the window. Finally, add another guide 350 pixels from the top. Your canvas should look like this example (the horizontally centered guide will be there if you used Guides> Center Guide, otherwise it won’t). Aside from a sphere, the cone is the most simplistic 3D shape we can make with The GIMP. It requires only a little optical illusion through the use of a merged selection and properly applied gradient. 1 On the CD and DVD LXF52.tut_gimp 27/2/04 10:01 am Page 78

3D Design With The GIMP

Embed Size (px)

DESCRIPTION

The GIMP isn’t designed to do 3D work. But not all 3D tasks require some complex tools. In this issue’s set of tutorials we’ll look at the processes for creating some basic 3D shapes using The GIMP and how such simple shapes are processes can be used for meaningful work.

Citation preview

Page 1: 3D Design With The GIMP

www.linuxformat.co.uk78 LXF52 APRIL 2004

TUTORIAL GIMP

he GIMP isn’t designed to do 3D work – such tasks are

generally left to tools like the recently open-sourced

Blender (Jono Bacon’s tutorials are in Linux Format issues

39-50), SoftImage’s Maya and SideFX Software’s Houdini.

But not all 3D tasks require some complex tools. In this issue’s

set of tutorials we’ll look at the processes for creating some basic

3D shapes using The GIMP and how such simple shapes are

processes can be used for meaningful work.

IMAGE CONSTRUCTION

Perspective views can turn any image into 3D artwork. All it takes is a littleorganisation, a little crafty lighting and Michael J Hammel’s expert tutelage...

3D Design with The GIMP

SIMPLE SHAPES: 3D CONE WITH TEXTURE

Guides1 Start with a new window with a single white background layer.Make the image square, 500x500 pixels for this example. Now addsome guides to make it easy to outline the cone. Use Guides>Center Guide if you have it, or simply place a vertical guide offset250 pixels from the left edge. Add two more guides offset 40pixels from the top and bottom. Add two more guides 60 pixelsoffset from each side of the window. Finally, add another guide350 pixels from the top. Your canvas should look like this example(the horizontally centered guide will be there if you used Guides>Center Guide, otherwise it won’t).

Aside from a sphere, the cone is the most

simplistic 3D shape we can make with The

GIMP. It requires only a little optical illusion

through the use of a merged selection and

properly applied gradient.

1

On the

CD and DVD

LXF52.tut_gimp 27/2/04 10:01 am Page 78

Page 2: 3D Design With The GIMP

www.linuxformat.co.uk LXF52 APRIL 2004 79

TUTORIAL GIMP

>>

Triangular Selection2 Choose the Bezier Selection Toolfrom the Toolbox. Click on the guideswhere they intersect at X/Y locations250/40, 60/400, and 440/400. Besure to close the triangle by clickingon 250/40 again, then click inside theoutline to create the selection.

2

Cone Selection3 Select the Elliptical Selection Toolfrom the Toolbox. Starting at the guideintersection at X/Y location 60/350,hold the Shift key down, and thenpress and hold the left mouse buttondown. While holding the mouse buttondown, release the Shift key and dragthe mouse to the guide intersection at440/450. When you release the mousebutton, the elliptical selection will bemerged with the triangular one.

3

4 Gradient4 Add a new, transparent layer to theimage. Set the foreground colour towhite and background to black (whichis opposite of the default setting).Select the Gradient Tool in the Toolbox.Click at the guide intersection at440/40 in the upper right of theimage, then drag to the guideintersection at 60/400 in the lowerleft. This causes a lighter shade of greyon the right side of the cone and blackon the lower left of the cone.

Noisify and Multiply5 Turn off the guide visibility (View>Toggle Guides). Turn on the KeepTransparency For This Layer option(see the Layers and Channels Dialog).Add noise to the image (Filters>Noise>Noisify) set to a low level: about 0.10for all channels. Duplicate this layerand set the new layer to Multiply.Reduce the new layers Opacity toabout 70%.

5

Colorize6 Duplicate this new layer. Set theforeground color to #cc4a00. Fill thisnew duplicate layer with this color.Remove the selection (Ctrl-Shift-A).Add a drop shadow (Script-FU >Shadows>Drop Shadow).

6

LXF52.tut_gimp 27/2/04 10:01 am Page 79

Page 3: 3D Design With The GIMP

www.linuxformat.co.uk80 LXF52 APRIL 2004

TUTORIAL GIMP

While the cone was simple, it wasn’t exactly perfect. The top of

the cone was a perfect point and made that part of the effect

appear a bit 2D. The drop shadow (which we angled at the

bottom to make the cone appear to be sitting on a table) helped,

but we can do better. In this tutorial, we’ll create a box using

multiple square pieces that we’ll align and shade with gradients to

get an even better effect. This effect is just as easy as the last, but

does require a steady hand to align the layers manually.

REAL WORLD: 3D PACKAGING

Box cover1 Start with a blank canvas at500x500 pixels. Open an existingimage to use as the front cover of abox. Make it about 375 pixels wide.Here we’ve created a separate imagefor out cover and pasted into ourblank canvas. Move the image to theright side a bit to leave room for theside of the box we’re about to create.

1

3

2

4

1

SIMPLE SHAPES: 3D BOX

Black square1 Start with a new canvas, preferably square – but itdoesn’t have to be for this tutorial. Add a transparentlayer. Select the Rectangular Selection tool from theToolbox. Create a square selection by holding downthe Shift key while you drag the mouse. The sizedoesn’t matter – we’ll be modifying this in a momentanyway. Fill the selection with black.

Side Perspective2 Copy and paste (Ctrl-C, Ctrl-V) the selection tocreate a new layer with the black square. Turn off theoriginal layers’ visibility for a moment while we workon the new layer. Double-click on the Transforms Toolfrom the Toolbox and select its Perspective Transform.Click inside the black square to show the drag boxeson the corner of the square. Drag the left side squarestoward each other and the left side. Leave the rightside boxes where they are. Click on the Transformbutton. This is the left side of the box.

Side Perspective3 Paste another black square into the image as anew layer. Open the Transform Tools>Tool Optionswindow again and click on the black square. Movethe right side drag boxes toward each other a smallamount, with top box moved down more thanbottom is moved up, and in toward the left side ofthe black square. Click on the Transform button.Reduce the opacity of this layer to 70%. Move thelayer so its left edge butts up against the right sideof the previous layer. You may have to move bothlayers a bit to make them both fit in the canvasproperly. This is the front of the box.

Side Perspective4 Make sure the Foreground color is set to black, and the Background is set to white. Make theleft side of the box layer active. Drag from the left of this layer to the right using the Gradienttool. Make the front size of the box layer active, and drag the gradient from outside the rightside of this layer to outside the left side of the layer. The left side will go from black to white,but the front will go from dark grey to light grey. This make the edge where the side and frontmeet stand out a bit more while still giving the appearance of directed lighting.

Our first design used shadows (via gradients) to simulate

the effect of three dimensions. Our second design used

the Transform Tool to change the perspective of an object

(a square) to give the appearance of depth. Lighting (via

gradients) enhanced the result. Transforms are powerful

tools in simulating depth in The GIMP, as these next two

real-world tutorials will show. This Packaging method

described here is sometimes used in Linux Format to

create images of books or boxed products for reviews.

LXF52.tut_gimp 27/2/04 10:01 am Page 80

Page 4: 3D Design With The GIMP

www.linuxformat.co.uk LXF52 APRIL 2004 81

TUTORIAL GIMP

2

1

3

2

4

REAL WORLD: 3D LAYERING

Box side2 Duplicate the cover layer andresize its width only to about 70pixels. Select the entire layer(Ctrl-A) and fill it with a solidcolour. Adding multiple sectionsof colour will add to the finaleffect. Add a text layer androtate it 270 degrees. Merge theside and text layers into a singlelayer. You should now have aside layer and a cover layeralong with the whitebackground layer. Make sure theside and front layers are alignedat their tops.

Perspective both3 Add two horizontal guides, one 30 pixels abovethe bottom of the side layer and one 15 pixels belowthe top. Add a vertical guide 20 pixels to the right ofthe left side of the side layer. Select the TransformTool from the Toolbox and choose the Perspectivetransform. With the side layer active, click on it onceto display drag boxes. Grab the upper left drag boxand move it down and in to where the upperhorizontal and vertical guides intersect. Grab thelower left drag box and move it to where the lowerhorizontal and vertical guides intersect. Click on theTransform button to perform the transformation.Add a vertical guide about 90 pixels in from theright side of the cover layer. With the cover layeractive, click on it once and drag the upper right andlower right drag boxes to the intersections of theupper and lower horizontal guides with the newvertical guide. Click the Transform button to performthe transformation.

Drop shadowed4 Now align the left edge of thecover layer with the right edgeof the side layer. Make sure thetops of both layers are alignedas well – if all went well, thesides you are aligning should bethe same size so the corners ofthe front and side will alignperfectly. Merge the side andtop layers. Make a rectangularselection of the bottom 1/5th ofthis merged layer, copy andpaste it back in. Make a dropshadow this is new layer, thendelete that layer (keeping theshadow). Move the shadow layerbelow the merged side/top layer.Adjust the position of theshadow layer as needed.

The last real world example uses the exact same methods as the

previous tutorial. In this case, a layered card design for an invitation is

shown in an exploded view so that the multiple layers become obvious.

Head-on view1 Starting with an imagewith multiple layers, weshow a head on view ofa layered card design.Viewers see only thetwo dimensions of thisimage and miss the 3Daspect the actual cardwill have. In order to fixthis, we show anexploded view that usesperspective transformson each layer. The keyhere is that each of themultiple layers of thecard have their ownlayers in The GIMP.

Exploded view2 Each layer istransformed manually.The trick here is one oftrial and error –experimenting with thetransformed edges sothey look real and inproportion to eachother. This is very muchan artists playground –while we could explainhow to do thismathematically and byusing the measure tooland lots of guides, itsmuch quicker toexperiment, undo, andexperiment again to findthe right transforms.Adding shadowsenhances the 3D view.

LXF52.tut_gimp 27/2/04 10:01 am Page 81