GIMP Tricks: Chocolate bar with GIMP
[ Monday, 9 July 2007, titter ]
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
- Create a transparent (advanced options > fill with: transparency) picture 120×80 pixels in size.

Pic.1 Creating new image - Add two new layers and name them “projection” and “brick”.

Pic.2 Adding new layer with a name - Select the whole layer “projection” by choosing All from the Select menu.
- Reduce the selection by about 10 pixels by using Select > Shrink
- Next, from the Select menu choose Rounded Rectangle and set the slider to 25%.
- Fill the selection with white, then select “None” and from the Filters menu choose Blur -> Gaussian blur. Set the blur radius to 10 pixels.
- Now fill the brick > layer with rgb(97,49,2).

Pic.7 Layers, as they should look - 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.
- From the Script-Fu menu choose Decor -> Add bevel, uncheck Work on copy, set Thickness to 5.
- Repeat Add bevel.
- Add your text, preferably in white. Rotate the text layer about an arbitrary angle if you feel like it.
- Blur the text with Gauss with a radius of 1.
- 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.
- 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.
- Render the second label onto the other copy of the layer “brick”, the same way as done before.
- Now set Text layers covering to 5%. Turning appropriates layers’ visibility on and off lets you see your bricks
- Create a new transparent picture 720×320 in size.
- Turn Snap to grid and Show grid on in the View menu.
- Create two new layers.
- Change your current view to that one with bricks.
- Copy one of the bricks with Edition menu -> Copy visible.
- Go to the new picture and paste into the one of new layers, Edit -> Paste into.
- You proceed simirarly with the second brick, except that you paste it on the second layer.
- Now crop both layers with bricks in them with Layer menu -> Autocrop layer.
- Subsequently duplicate layers to obtain 12 bricks.
- Place bricks with the help Layers’ movement and selection tool.
- If you want to, scale the bar down.
- Save once you’re done.
A chocolate bar with some text engraved looks much better, so move on.

Pic.12 Brick with label “Kifer71″
![]()
Pic.13 The chocolate bar is ready. Yummy!
Modifications

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.
- 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.
- And that’s it!!

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.
proof read by trashcat
Subscribe to RSS feed for this article!
21 Comments
- A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
- Strong text: <strong>Strong text</strong>,
- Italic text: <em>italic text</em>,
- Strike: <strike>
strike</strike>, - Code: <code>
printf("hello world");</code>, - Block quote: <blockquote>Block quote</blockquote>
















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.
Somehow myy image doesn’t look like yours on this step (8.). Why?
Something I missed!?
Hi, if you could show your image it would be very helpful. My suggestion is that you do carefully everything from the begining and don’t forget about shrinking (3).
But I can’t say anything until I see your image.
I had the same problem. You need to make an additional note in step 6. After you fill the rounded rectangle with white you need to Select None. The Blur will not work correctly if the rounded rectangle is still selected.
MA. Hess’ point is exactly what I missed.
Thanks anyway for your wonderful how-to.
It looks pretty nice. We’d buy the choco.
@Michael A. Hess: Thanks a lot for your fix. I corrected it in the article.
@Peter: I’m happy you liked it. Stay tuned since this is not the last text in the series.
This is fantastic. Thanks for doing this series of articles on how to use GIMP. It would really help to spread GIMP if a collection of articles like this one could be (easily) found on GIMP.org. Like half of their home page could stay as it is and the other half should be dedicated to catchy, specific task oriented articles about using GIMP.
“Script-fu?” Oh dear. This is one of the problems with Linux.
This is awesome!! I love Gimp.. but even better to be trained on it.. Thanks!!
Jenny
http://www.allinablog.com
http://www.blogaboutit.net
You’re a moron. I just finished this tutorial… in Windows.
Yes A you are right… Windows - no problem! I waited all day to see this the traffic was killer!
Great Tech Blog - AskTheAdmin
This is the PhotoShop alternative?
..RIGHT!
I love adobe products. Photoshope is awesome, and I’m sure the developers of it are cute.
I don’t get paid to push adobe’s stuff, I just love it sooo much that I have to tell everyone.
When someone posts a tutorial using any type of so-called alternative application, I just tell them in my giddy school-girl voice “This is so freaking lame!!”
Then again, I am an idiot.
GIMP is underrated. Tutorials help people realize some of its possibilities and potential.
Unfortunately are people often willing to obtain and use an unlicensed copy of Photoshop rather than e.g. downloading The GIMP for free (as in no cost), which extensively would cover all their ever need for photo/image manipulation. The result is that people think that Adobe’s Photoshop is the only think that’ll do for them.
Thanks for the article. Don’t really need to make a chocolate bar, but this example does show serveral GIMP features used together. Things like this do help my understanding and help me use GIMP for my own creatives.
Of course, this article did make me a little hungry.
That… Doesn’t look like a very tasty chocolate bar!
Gimp is a photoshop alternative, don’t think that what you see means that it sucks. Firstly this tutorial is for beginners and it does a good job at that, the chocolate does look quite good.
Next GIMP can do more sophisticated things but much like PS it requires more time and skill and this was a beginners tutorial, so obviously it’s not going to go crazy with details and shading.
Ok…fanboi and rick! photoshop=100’s of dollors….gimp is free!!!!!!
What font is used here?
Got a problem, when I fill the brick layer with brown, it only fills the outside… the inside is still white and I can’t find a fix for it. Help!
Hello.
Very nice and handy tutorial.
Unfortunately I’m stuck with step 16, for I can’t figure out, what “Text layers covering” means…
Maybe an additional screenshot of that dialog may be useful.
By the way: I haven’t got a menu called “Script Fu” (GIMP version 2.4.6).
All mentioned Scripts reside in “Filters”.
Greetings from Germany