Step 3 - Making the holes
To add the holes we will add a texture map to the bin which tells it to be totally transparent where the holes are and non-transparent on the rest of the object. We must create this map in a separate paint program, I have used Photoshop but you will be able to use your own software instead. If you do not have a paint program then I recommend Paint Shop Pro for the PC as you can evaluate it for 30 days and not pay anything.
Add a new image: File, New sized 100 by 80 pixels and click OK. Press D to make the 2 colours black and white (Photoshop only feature, you'll have to do this manually for other software). Imagine uses white to mean fully transparent and black to mean non-transparent and anything in between to mean different amounts and shades of transparency. All we need is full transparent and non-transparent. Fill the image (click the button with a picture of a bucket on) with black to make it non-transparent. Switch the colours to make white the top colour. The shape of the holes in my bin is like a line with rounded ends. Select the Pencil Tool (click the Pencil button). This gives a solid colouring tool with sharp edges. Select a size 45 round brush and holding shift to make the line vertical, click in the image with a white circle. Move the pen up and down a bit to make the line longer like below.
Make sure there are no gaps. In my bin the holes are at an angle so rotate the whole image by clicking Image, Rotate Canvas, Arbitrary type 30 in the Angle box and click CCW to rotate the image 30 degrees counterclockwise. Now select the hole with the Magic Wand Tool (click the Magic Wand button and change tolerance to 99 and click anti-aliasing). Copy this selection (Edit, Copy) and create a new Image (File, New and change Contents to Background Colour). Photoshop automatically sets the dimensions of the new image to that of the copied selection so just hit OK. Now paste the hole into the new image (Edit, Paste).
We want to create a long strip of holes to go around the bin but we don't want to copy and paste each individual hole onto a long image so instead we create a pattern which is then tiled (repeated over and over) onto the long image. On my bin the holes are very close together. We can't use the current image as the pattern as there will be large gaps between the holes. Instead we create an image where the hole is cut in half, it will be clearer once you have created the pattern. At the moment the image should be looking like this:
To cut the pattern in half. We don't really cut it in half, we just move it along so half of the hole falls off one side of the image and comes back on the other side. Click Filter, Other, Offset and type in a number close to 50 in the Horizontal box and type 0 in the Vertical box. Click on Wrap Around to make the pattern appear on the other side of the image when it falls off one side. If the hole doesn't look roughly cut in half then play with the number in the Horizontal box until it does. Click OK when you're satisfied. Note: You can replicate this using the seamless pattern feature in Paint Shop Pro. Right, now we've got our pattern which should be looking like the one below.
As you can see there is a large gap between the two halves. This is the size of gap we would of had if we had used the previous image as the pattern. To make the gap smaller we just select the right half with the Magic Wand (Magic Wand button) and move it nearer the left half by holding down shift (to keep the movement horizontal) and moving the selection with the Move Tool (button with an arrow on it). Move it so that the gap between the two halves is how you want it. We now have a lot of unwanted blank space in our pattern so we need to crop the image. The crop tool is located in the top left corner of the toolbox. At the moment it will probably look like a broken square outline. Click this button but hold down your mouse button and a row of five new buttons will appear. Click the last button in this row which has a thick black overlapping square with a thin black diagonal line through it as the picture. This is the Crop Tool. Start in the top left corner of the pattern and click, hold and drag the mouse over the two halves of the hole (or whole :o). Let go of your mouse button and a box will appear. Don't worry if you haven't got all of the halves in the box as you can resize the box by pulling the little squares positioned on the box. You should have the box over the areas shown below on the left.
When you have got all of the halves in the box (and none of the blank space which we didn't want) hit the Enter button on your keyboard. This tells Photoshop to perform the crop command. The image will now look like the one on the right. We can now define this as the pattern.
Click Select, All and then Edit, Define Patter. To make a long image full of the holes we first need to know the dimensions of the pattern. Hold down Alt on your keyboard and click and hold down your mouse button on the gray bar at the bottom of the Photoshop window, next to the white box. A menu should pop up with the dimensions of the image. Note these down and release your mouse button. Note: Paint Shop Pro users can find the image dimensions in the bottom right of the window when they put their mouse over the image. My image is 73 pixels wide by 122 pixels high. If I want 40 holes around one strip on my bin (as in the display image of my bin) then I need an image 73 times 40 (2920) pixels wide and 122 pixels high. Create this image by clicking File, New and fill in these dimensions in the appropriate boxes (making sure that pixels are the units selected). To fill the image with the pattern so that we get 40 holes click Edit, Fill. In the Contents Use box select Pattern and make sure Opacity is set to 100% and the Mode is Normal then click OK. Note: Paint Shop Pro users can fill the strip by using the Fill Tool with the Pattern Fill Style selected, click on Options and choose the name of the image with the pattern in as the New Pattern Source, then click in the strip to fill it with the pattern. Now use the Zoom Tool (Magnifying Glass button) to zoom the image to 100%. If you want to add many strips of the holes you will need a gap between the strips. To add the gap click Image, Canvas Size change the Height units to Pixels and increase the number. The size of the gap is up to you, in the top picture I choose a gap of 5 pixels but I think more would have been better so this time I going to have a gap of 10 pixels. I add 10 to the number in the Height box and type it in. In the Anchor section click the box in the middle of the boxes so the gap is added half to the top of the image and half to the bottom. When zoomed up close the image should look like this:
You've made the transparency map!! That's the hardest part of the tutorial finished! Well done. Save the image in the same directory as your bin (File, Save a Copy)