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

  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!

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.


    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.

proof read by trashcat

Subscribe to RSS feed for this article!

21 Comments

fold this thread Peter Pan  Tuesday, 10 July 2007 o godz. 12:05 pm #  Add karma Subtract karma  +0

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!?

 
fold this thread titter  Tuesday, 10 July 2007 o godz. 3:31 pm #  Add karma Subtract karma  +0

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.

 
fold this thread Michael A. Hess  Tuesday, 10 July 2007 o godz. 4:04 pm #  Add karma Subtract karma  +0

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.

 
fold this thread Peter Pan  Tuesday, 10 July 2007 o godz. 4:58 pm #  Add karma Subtract karma  +0

MA. Hess’ point is exactly what I missed.
Thanks anyway for your wonderful how-to.
It looks pretty nice. We’d buy the choco. ;-)

 
fold this thread michuk  Tuesday, 10 July 2007 o godz. 5:20 pm #  Add karma Subtract karma  +0

@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.

 
fold this thread vi  Tuesday, 10 July 2007 o godz. 7:28 pm #  Add karma Subtract karma  +0

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.

 
fold this thread gwz  Tuesday, 10 July 2007 o godz. 7:38 pm #  Add karma Subtract karma  +0

“Script-fu?” Oh dear. This is one of the problems with Linux.

 
fold this thread Jenny  Tuesday, 10 July 2007 o godz. 7:54 pm #  Add karma Subtract karma  +0

This is awesome!! I love Gimp.. but even better to be trained on it.. Thanks!! :)

Jenny
http://www.allinablog.com
http://www.blogaboutit.net

 
fold this thread A  Tuesday, 10 July 2007 o godz. 9:22 pm #  Add karma Subtract karma  +0

@gwz: “Script-fu?” Oh dear. This is one of the problems with Linux.

You’re a moron. I just finished this tutorial… in Windows.

 
fold this thread AskTheAdmin  Tuesday, 10 July 2007 o godz. 10:35 pm #  Add karma Subtract karma  +0

Yes A you are right… Windows - no problem! I waited all day to see this the traffic was killer!

Great Tech Blog - AskTheAdmin

 
fold this thread Rick  Tuesday, 10 July 2007 o godz. 10:46 pm #  Add karma Subtract karma  +0

This is the PhotoShop alternative?

..RIGHT!

 
fold this thread Fanboi  Tuesday, 10 July 2007 o godz. 11:49 pm #  Add karma Subtract karma  --1

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!!”

 
fold this thread Rick  Wednesday, 11 July 2007 o godz. 1:26 am #  Add karma Subtract karma  +0

Then again, I am an idiot.

 
fold this thread Pimped by GIMP  Wednesday, 11 July 2007 o godz. 4:15 am #  Add karma Subtract karma  +0

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.

 
fold this thread GIMPNoob  Wednesday, 11 July 2007 o godz. 6:20 am #  Add karma Subtract karma  +0

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.

 
fold this thread Jordan Meeter  Wednesday, 11 July 2007 o godz. 6:45 am #  Add karma Subtract karma  +0

That… Doesn’t look like a very tasty chocolate bar!

 
fold this thread Watch TV  Wednesday, 11 July 2007 o godz. 7:42 am #  Add karma Subtract karma  +0

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.

 
fold this thread Zoowey  Sunday, 15 July 2007 o godz. 5:39 am #  Add karma Subtract karma  +0

Ok…fanboi and rick! photoshop=100’s of dollors….gimp is free!!!!!!

 
fold this thread Aweomse  Monday, 15 October 2007 o godz. 5:31 am #  Add karma Subtract karma  +0

What font is used here?

 
fold this thread Emi  Friday, 18 January 2008 o godz. 12:47 am #  Add karma Subtract karma  +0

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!

 
fold this thread Edgar "Fast Edi" Hoffmann  Monday, 7 July 2008 o godz. 2:01 pm #  Add karma Subtract karma  +0

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

 
Name (required)
E-mail (required - never shown publicly)
URI

Adjust field size: shrink | enlarge)

You can use simple HTML in your comments. Some examples are as follows:
  • 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>

About the Author

Dominik Sarnowski

Advertise on PolishLinux!

Partners

RSS: Comments

You can follow the comments to this article through a special channel RSS 2.0 .

Related articles: Graphics

 more »

PolishLinux Top Content

Select distros:

vs

Featured links

Share your love of chocolate with chocolate gift baskets. Do not send boring flowers this year; try our custom fruit gift baskets!! Show employees you care with corporate gift baskets.

Google Ads