Login or e-mail Password   

GIMP Tricks: Chocolate bar with GIMP

Some time ago I saw a chocolate bar made with Adobe Photoshop somewhere on the Internet . I thought that Gimp can’t do worse than and I got myself to work. It seemed to be...
Views: 9.334 Created 07/10/2007

Some time ago I saw a chocolate bar made with Adobe Photoshop somewhere on the Internet. I thought that Gimp can’t do worse than and I got myself to work. It seemed to be quite easy and here is the result in 28 steps.

Author: Kifer71

  1. Create a transparent (advanced options > fill with: transparency) picture 120×80 pixels in size.

    Pic.1 Creating new image

  2. Add two new layers and name them “projection” and “brick”.

    Pic.2 Adding new layer with a name

  3. Select the whole layer “projection” by choosing All from the Select menu.
  4. Reduce the selection by about 10 pixels by using Select > Shrink

    Pic.3 Shrinking selection

  5. Next, from the Select menu choose Rounded Rectangle and set the slider to 25%.

    Pic.4 Selecting a rectangular area with rounded corners

  6. Fill the selection with white, then select “None” and from the Filters menu choose Blur -> Gaussian blur. Set the blur radius to 10 pixels.

    Pic.5 Adding some blur

  7. Now fill the brick > layer with rgb(97,49,2).

    Pic.6 Setting a color

    Pic.7 Layers, as they should look

  8. From the Filters > Map menu choose Bump Map. In the mapping dialog set layer “projection” as bump map. Set the Depth slider to 5 and set X and Y offset to -1. Set Ambient to 100.

    Pic.8 Mapping layers to get a nice bar

  9. From the Script-Fu menu choose Decor -> Add bevel, uncheck Work on copy, set Thickness to 5.

    Pic.9 Using Script-Fu to make the bar look smoother

  10. Repeat Add bevel.
  11. A chocolate bar with some text engraved looks much better, so move on.

  12. Add your text, preferably in white. Rotate the text layer about an arbitrary angle if you feel like it.

    Pic.10 Rotating a layer

  13. Blur the text with Gauss with a radius of 1.
  14. To end up with two types of pieces with different labels, duplicate the layer “brick”. It’s understood that you should have a second label too.
  15. Apply Bump Map to the layer “brick”. Set your label as the mapped object. It’s easier when you have previously reset the filters’ settings. In the Mapping dialog set Map Type to Spherical, check Invert bumpmap, set Depth to 1, set Ambient to 100.

    Pic.11 Mapping layers to get text on the bar

  16. Render the second label onto the other copy of the layer “brick”, the same way as done before.
  17. Now set Text layers covering to 5%. Turning appropriates layers’ visibility on and off lets you see your bricks
  18. Create a new transparent picture 720×320 in size.
  19. Turn Snap to grid and Show grid on in the View menu.
  20. Create two new layers.
  21. Change your current view to that one with bricks.
  22. Copy one of the bricks with Edition menu -> Copy visible.
  23. Go to the new picture and paste into the one of new layers, Edit -> Paste into.
  24. You proceed simirarly with the second brick, except that you paste it on the second layer.
  25. Now crop both layers with bricks in them with Layer menu -> Autocrop layer.
  26. Subsequently duplicate layers to obtain 12 bricks.

  27. Pic.12 Brick with label “Kifer71″

  28. Place bricks with the help Layers’ movement and selection tool.
  29. If you want to, scale the bar down.
  30. Save once you’re done.

Pic.13 The chocolate bar is ready. Yummy!


Pic.14 Linux is sweet!

Here comes a handy shortcut.
Starting from point 16 of this tutorial do the following:

  • Before you create a new image, make a pattern from your bar of chocolate. Select the whole image, by selecting layer brick and by Selection -> All. Then from menu choose Script-Fu -> Selection -> To Pattern….
  • Name your pattern “bar” for example.

    Pic.15 Creating a pattern

  • Create a new image as it was in the 17th step of this tutorial. The size can be different but still the best effect is when it is a multiplication of bar’s size. For example 600 x 240px
  • Find the pattern and drag&drop it over the new image.

    Pic.16 Using drag&drop with the pattern

  • And that’s it!!

Creative Commons License
This work is licensed under a Creative Commons License.

This text is based on the article by Kifer71 published in Dragonia Magazine nr 8 [in Polish]. Dragonia Magazine, a Polish online magazine about Free and Open-Source Software. You can download the latest Dragonia issue (first one in English from our mirror). The article has been slightly modified compared with the original version by the PolishLinux team .

Similar articles

comments: 3 | views: 9128
comments: 0 | views: 9915
comments: 3 | views: 8925
comments: 0 | views: 2379
comments: 0 | views: 5507
comments: 0 | views: 4554
comments: 1 | views: 3667
comments: 1 | views: 44057
comments: 0 | views: 6984
comments: 2 | views: 5195

  lcklck16,  09/12/2018

...  show more

Add your opinion
You must be logged in to write a comment. If you're not a registered member, please register. It takes only few seconds, and you get an access to additional functions .

Users online: 118
Registered: 107.588
Comments: 1.525
Articles: 7.261
© 2005-2018 EIOBA group.