JustPaste.it

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

    5956a2c29a15352692217192bb50c29d.png
    Pic.1 Creating new image

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

    31b876521f76dc2b1d4246f32f6d7046.png
    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

    5d818f7041708828c5f111162e534967.png
    Pic.3 Shrinking selection

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

    7a6eb168f5191d46b887de856cc5fc35.png
    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.

    a100776e8f7b23a21de19bd5d88e3d49.png
    Pic.5 Adding some blur

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

    4842b52ce17f4c1d6944b087985b386a.png
    Pic.6 Setting a color

    4fe2f3262e0b158a5c425131c04dad0f.png
    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.

    66d04c629782ac02f10ea1cdc2ab0709.png
    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.

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

  10. Repeat Add bevel.

A chocolate bar with some text engraved looks much better, so move on.

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

48885f821451d18cf9a6592246d524c7.png
Pic.10 Rotating a layer

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.

d63c4594179ac1c2f6f8306d6c6c3cce.png
Pic.11 Mapping layers to get text on the bar

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

4d62d702e275fe0350ec8261446b3d68.png
Pic.12 Brick with label “Kifer71″

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

2807a0cf704679f6d543e4b946bef6a1.png
Pic.13 The chocolate bar is ready. Yummy!

Modifications

247c654189ad8d27e5e5072fdb69e7b8.png
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.

    3c647b2ebeb99fc3d1aec39be75a3099.png
    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.

    5b065727b3f844476203b4557e8fbcb3.png
    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 .

 

Author: Kifer71

License: Creative Commons