Envato Tuts+ Community Challenge: Created By You, August 2016 Edition

Welcome to our monthly feature of fantastic tutorial results created by
you, the Envato Tuts+ community! Every day, visitors like you take the
time not only to read our tutorials but also to try them out. This is an
assortment of those comment submissions found throughout the Design
& Illustration section. Check out this set of results and join in
for the next roundup, published next month!

Vector Tutorial Results

Taken from the
comments section of your favorite tutorials, these first pieces are an
assortment of results created with vector drawing programs. Check out
these amazing results!

Design a Colorful USB Flash Stick with Tattoo Style Decals

Teodora created a cool Colorful USB Flash Stick of their own inspired by a tutorial from , adding simply:

Great tutorial, thanks!

USB Flash Stick by Teodora

How to Create a Cartoon Character with Expressive Lines

Rahul Agarwal created a fun Cartoon Character of his own inspired by . He said:

Here’s my simple try, thanks for the lovely tutorial!

Cartoon character by Rahul Agarwal

Creating a Dramatic Portrait with Chunky Line Art

Reader Dana created this Dramatic Vector Portrait from an incredible tutorial by . She said:

Thanks for another great tutorial Sharon!

Vector Dramatic Line Portrait Art by Dana

Create a Detailed Vector Chalkboard Icon

Mario Rocchi charmed us with his simple Vector Chalkboard Icon from a tutorial by instructor Andrei Marius.

Vector Chalkboard Icon Mario Rocchi

How to Create a Self-Portrait in a Geometric Style

Marcelle Brereton created this amazing Geometric Self-Portrait inspired by a tutorial from . He mentioned:

Great tutorial! Learned a few new tricks for the book there.

Geometric Portrait by Marcelle Brereton

How to Create a Cartoon Rocketship with Inkscape

User Chu Chun Onn created this awesome Cartoon Rocketship with the help of a tutorial by .

Cartoon Rocketship by Chu Chun Onn

How to Create a Set of Apple Product Icons Using Adobe Illustrator

Reader Ali Akkececi perfected this set of Apple Icons from a tutorial by . He said:

Thanks for the training! You have a good tutorial.

Apple Icons by Ali Akkececi

How to Create a Cute Gingerbread Man in Adobe Illustrator

Chanraksmey Oum created this adorable Gingerbread Man with the help of a tutorial by . She mentioned:

It was really helpful for my first beginner tutorial of Adobe Illustrator. Thanks for the tutorial.

Gingerbread Man Illustration by Chanraksmey Oum

How to Create a Cartoon Penguin Winter Illustration in Affinity Designer

Tien Chang charmed us with a simplified version of this Cartoon Penguin Tutorial from

I went without some details, but I still got a happy little penguin right here!

Cartoon Penguin Illustration by Tien Chang

Create an Inspirational Vector Political Poster

Keith wowed us with his awesome result from this Vector Political Poster Tutorial by .

Dr Who Political Vector Poster by Keith

Adobe Photoshop Tutorial Results

Let’s
take a look at this next set of results inspired by Adobe Photoshop
tutorials published here on Envato Tuts+. Contributions range from photo
effects to patterns and more! Check out these wicked results below!

Creating a Space-Helmeted Future Retro Illustration

Artist Roosa created an amazing interpretation of this Retro Space Illustration by James Davies.

Retro Space Illustration by Roosa

Create a Fantasy Miniature World in Photoshop

Eugen Dortmann soared high with his take on this Miniature World Effect by Mirko Santangelo.

Miniature World Photoshop Effect Eugen Dortmann

Using Light and Shade to Bring Text to Life

Zachary Lin put these great Light and Shade Text tips to use from Collis Ta’eed. He added:

Great Tutorial! Here’s how mine came out! I added some texture in. What do you think?

Light and Shade Text Effects Zachary Lin

How to Create a Misty Landscape Photo Manipulation With Adobe Photoshop

Liya Rybakova created her own wondrous Misty Landscape from instructor . She added:

Thanks for the tutorial, and the magical result!

Misty Landscape Photo Manipulation Liya Rybakova

Create a Powerful Human Disintegration Effect in Photoshop

User Handa3614 created his own Powerful Human Disintegration Effect from . He added:

I just made it. Tell me how it is. And thumbs up to the creator of this!

Photoshop Disintegration Effect by Handa3614

Create a Royal Gold Text Effect in Photoshop Using Layer Styles

Galina Cuznetova created magic with her Royal Gold Text Effect from . She exclaimed:

Thank you!

Gold Antique Text Effect Galina Cuznetova

How to Create a Monkey Caricature for Chinese New Year

Nik Love-Gittins created this amazing Monkey Caricature inspired by a tutorial from . He mentioned:

Here’s one I drew a few months ago, never got around to finishing it off.

Monkey Chinese  New Year Illustration by Nik Love-Gittins

Design Tutorial Results

These final
pieces are inspired by an assorted of design tutorials that don’t quite
fit the previous categories. They include everything from print design
to drawing and more! Enjoy these beautiful pieces created by the
community below!

How to Design a Classic Book Cover With a Modern Twist!

Matheus Abreu created this awesome result from this Classic Book Cover Tutorial from .

Moby Dick Book Cover by Matheus Abreu

Design a Fold-Out City Guide in Adobe InDesign

Narcisa Didoaca perfected this Fold-Out City Guide Tutorial from instructor . She said:

Mine! I drew my own city map. It took some time, but the result is here!

Fold out City Guid by Narcisa Didoaca

Design a Vintage ‘Wizard of Oz’ Movie Poster in Adobe InDesign

User Kat-and-Rina created a cool poster of their own inspired by this Wizard of Oz Poster from . They mentioned:

Thanks! Used only Illustrator.

Wizard of Oz Poster Design by Kat and Rina

How to Create a Blended Hexagonal Print Design in Adobe Illustrator

Nuraishah Rashid created this colorful result from this Hexagonal Print Design Tutorial by . She exclaimed:

Thank you for the tutorial!

Hexagonal Print Design by Nuraishah Rashid

How to Be Involved in the Next Showcase

Have
you created a piece based on one of our tutorials here in the Design
& Illustration section of Envato Tuts+? We’re keen for you to share
your results with us! Check out the general guidelines below to join in
with our community:

  • Your artwork should be similar in some
    way to the tutorial that you followed or that inspired it. The aim of
    these showcases is to share what readers have created after following
    the tutorial.
  • Comment on the tutorial you used, attaching an
    image of your result. We’re keen on all levels of ability: from beginner
    to advanced!
  • Include a comment about your result, yourself, or your process. We like knowing about you and what you’re sharing.
  • Share
    the tutorial when you share that artwork elsewhere on the web. If
    you’ve posted your piece on sites like Facebook, Tumblr or Behance, link
    back to the tutorial so that other users know your source and can join
    in on the fun.

Thanks to everyone who was highlighted above for sharing your results with the Envato Tuts+ community. We look forward
to checking out your brilliant versions of our tutorials in the near
future, and welcome users new and old to participate in upcoming
showcases.

View Tutorial: Envato Tuts+ Community Challenge: Created By You, August 2016 Edition

New Course: Essential WordPress Plugins

WordPress Plugin Directory

With the right plugins, your WordPress site will run more smoothly, get more visitors, and be less likely to face problems. Discover some of the most useful plugins and find out how to use them in our new course, Essential WordPress Plugins

What You’ll Learn

In this course, Envato Tuts+ instructor Rachel McCollin will teach you how to install and configure free plugins for backup, security, caching, and SEO.

Here are some free lessons from this course, as a preview of what you can expect:

Why Performance Matters

In this video, you’ll learn how website performance will affect your SEO and conversion rates. You’ll also get some tips for enhancing performance and see an overview of the plugins you might need.

Using the W3 Total Cache Plugin

In this lesson, you’ll learn how to install the W3 Total Cache plugin to enable caching on your site. You’ll find out how to configure it to ensure it works just how you need it to.

Overview of SEO

This video will give you an overview of SEO, its benefits, and some myths about it. Then you’ll see some of the top SEO plugins.

Start Learning With a Free Trial

You can take our new course straight away with a free 10-day trial of our monthly subscription. If you decide to continue, it costs just $15 a month, and you’ll get access to hundreds of courses, with new ones added every week.

This course covers some of the most useful free plugins, but you can also find thousands of premium WordPress plugins on Envato Market. And you can get personalized assistance with installing or customizing plugins from a WordPress expert on Envato Studio.

View Tutorial: New Course: Essential WordPress Plugins

New Course: Essential WordPress Plugins

WordPress Plugin Directory

With the right plugins, your WordPress site will run more smoothly, get more visitors, and be less likely to face problems. Discover some of the most useful plugins and find out how to use them in our new course, Essential WordPress Plugins

What You’ll Learn

In this course, Envato Tuts+ instructor Rachel McCollin will teach you how to install and configure free plugins for backup, security, caching, and SEO.

Here are some free lessons from this course, as a preview of what you can expect:

Why Performance Matters

In this video, you’ll learn how website performance will affect your SEO and conversion rates. You’ll also get some tips for enhancing performance and see an overview of the plugins you might need.

Using the W3 Total Cache Plugin

In this lesson, you’ll learn how to install the W3 Total Cache plugin to enable caching on your site. You’ll find out how to configure it to ensure it works just how you need it to.

Overview of SEO

This video will give you an overview of SEO, its benefits, and some myths about it. Then you’ll see some of the top SEO plugins.

Start Learning With a Free Trial

You can take our new course straight away with a free 10-day trial of our monthly subscription. If you decide to continue, it costs just $15 a month, and you’ll get access to hundreds of courses, with new ones added every week.

This course covers some of the most useful free plugins, but you can also find thousands of premium WordPress plugins on Envato Market. And you can get personalized assistance with installing or customizing plugins from a WordPress expert on Envato Studio.

View Tutorial: New Course: Essential WordPress Plugins

How to Create a Hand-Lettering Textured Poster in Adobe Illustrator

Final product image
What You’ll Be Creating

Are you a coffee
lover with a passion for beautiful fonts and hand-lettering? Follow this tutorial
to create a beautiful retro-style coffee-inspired poster that you can print
and hang on a wall in your kitchen! We’ll be using simple shapes, free fonts and some
drawing tools of Adobe Illustrator to create a balanced composition with a coffee
cup, whimsical text, and intricate hand-lettering. Then we’ll finish up by adding a
gentle textured touch to our poster. 

By the end of this
tutorial, you’ll have discovered some useful tips and tricks that will help you to
create digital hand-lettering from scratch, modify ready-made fonts, and create your own hand-drawn lettering. You’ll be able to use these
techniques for your future artworks, creating new interesting lettering posters, cards and compositions!

There are not so
many great free fonts on the web, so I highly recommend getting some great fonts from Envato Market. They can serve you either as a reference or as a
full-fledged element of your composition, which you can easily modify and
recolor. Also, don’t forget to check these hand-written scripts and hand-lettered illustrations for inspiration! And let’s get started!

1. Think About the
Composition and Make a Rough Sketch

Step 1

First of all, there should be a certain
idea of the lettering poster that we’ll be creating. One morning I was
drinking my coffee with cinnamon and thought of a great start of the day. A
picture of a coffee lettering poster appeared in my head immediately, so I grabbed a piece of paper and made a very rough and fast sketch. You can see it
below.

make a rough sketch

Sometimes we need some more time to get
inspired, to make up a concept and the overall idea of the poster, to think over the composition, and to try different options. We can even
put our sketch away for a couple of days and then return to it with a fresh
eye.

Your image doesn’t have to be perfect at
this step; it is just a guideline that will help you to keep the right
proportions of the objects. In fact, it will be much easier to create straight
lines and even geometric shapes, using the tools and functions of the program.

Step 2

Start by making a New Document of 600 x 800 px
size and create a shape of the same size, using the Rectangle Tool (M) and filling it with chocolate-brown color. You
can Lock it in the Layers panel in order not to move it
while drawing.

Start by making a New Document

2. Draw a Coffee Cup

Step 1

Create a New Layer and let’s start forming the cup from its top. Take the Ellipse Tool (L) and make a 160 x 20 px dark-beige oval. Switch to
the Rectangle Tool (M) and make a
light-beige shape of 160 x 100 px.

The shapes are of the same width, so we can
combine them together, as shown in the image below.

Switch to the Direct Selection Tool (A) and select the bottom anchor points of
the rectangle. Use the Live Corners
feature to make the bottom of the cup smooth and rounded by pulling the circle
corner markers up.

shape the cup from basic shapes

Step 2

We can use the Align panel to make the shapes perfectly aligned. Select both
shapes and click the ellipse once again to make it a Key Object. Use the Horizontal
Align Center
function to align the shapes.

use the Align panel to make the shapes aligned

Step 3

Select the top oval shape, Copy it and Paste in Front
(Control-C > Control-F).
Hold Alt-Shift
and shrink the top copy using the Selection
Tool (M)
to make it smaller. Fill the shape with dark-brown color for the
coffee.

Let’s add the bottom part to the cup. Make a 60 x 12 px dark-beige rectangle and use the Direct Selection Tool (A) to make its
corners fully rounded. You can also adjust the Corner Radius from the control panel on top, while the shape is
selected with the Direct Selection Tool
(A).

Send
the shape to
Back (Shift-Control-[)
, beneath the cup.

add a smaller ellipse for the copy

Step 4

Now let’s add a handle to the cup. Make a 35 x 50 px rectangle on the right side of
the cup. Create a smaller rectangle on top and Send both shapes to Back
(Shift-Control-[)
. Use the Minus
Front
function of Pathfinder
to cut the smaller rectangle out. Make the right side of the handle rounded with
the help of the Live Corners feature.

add a handle to the cup

Step 5

Now we’ll create a saucer. Start by making a
200 x 40 px ellipse and Send to Back (Shift-Control-[), beneath
the cup. Make a smaller oval on top of the saucer, set its Fill to none, and apply a dark-beige color to the Stroke. Head to the Stroke panel, set the Weight to 2 pt and change the Profile
to Width Profile 2 at the bottom of
the Stroke panel.

shape a saucer

Step 6

Let’s add a bright highlight on top of the
cup. Duplicate the base of the cup twice (Control-C > Control-F >
Control-F).
Move the top copy to the right a bit by holding Shift and pressing the Right Arrow key a few times.

Select the two copies and use the Minus Front function of the Pathfinder to cut the shapes, leaving
only a narrow stripe. Detach the stripe from the edge of the cup, making it a
bit smaller and moving it to the right. Use the Eraser Tool
(Shift-E)
to erase a part of the highlight.

 add a bright highlight on top of the cup

Step 7

Let’s finish up our cup by adding a
small oval on top of the dark-brown coffee shape. Set the Stroke color to lighter brown and set the Weight to 2 pt in the Stroke panel or from the control panel
on top.

add details to coffee

3. Create Whimsical Lettering

Step 1

Let’s start making the first word by
transforming the font. I’m using Bevan free font to type the word “Good”,
setting the Font Size to 75 pt in the Character panel (Control-T).

Go to
Object > Expand
, turning our text into curves. Select the word and go to
Object > Path > Offset Path,
setting the Offset value to -3 px to create a smaller object inside
each letter.

Apply Offset
Path
to the smaller shapes with -4
px Offset
value.

modify the text

Step 2

Let’s apply a texture to the inner shapes.
Select the shapes and head to the Swatches
panel. Open the Swatch Libraries Menu
and go to Patterns > Basic Graphics
> Basic Graphics_Lines.
Select and apply the 6 lpi 50% swatch.

Finally, double-click the Scale Tool (S) to open the Scale options
panel. Set the Uniform Scale to 30% and uncheck the Transform Object box in order to scale
only the pattern itself, making the stripes much thinner.

apply a texture to the inner shapes

Step 3

Apply a black 1 pt Stroke to the shapes, setting the Cap and Corner to middle
positions in the Stroke panel.

Apply a black 1 pt Stroke to the shapes

Step 4

Now we’ll work on the colors to make the
letters more three-dimensional. Select the bottom shapes of the letters and fill them with vertical
linear gradient from dark brown to light brown, forming a thick
outline.

Then select the middle shapes and apply a
vertical linear gradient from beige at the bottom to white on top.

Now let’s change the color of the line pattern as
well. In order to do that, first of all we need to Object > Expand Appearance of the textured shapes. You will see
a bunch of lines, hidden inside the Clipping Masks. Now we can select these
shapes and apply a dark-brown vertical gradient, making the lines shiny.

work on the colors to make the letters more dimensional

Step 5

Let’s transform the word to make
it slightly arched. Go to Effect > Warp >
Arc
and set the Horizontal Bend
value to 15%. Click OK and Object > Expand Appearance to apply the effect.

Effect  Warp  Arc to transform the word

Step 6

Now that our first word is ready, let’s
move on to the second one. This time, we’ll do some hand-lettering with the help of the Pencil Tool (N). You can adjust the settings by double-clicking the Pencil Tool (N) and setting the
Fidelity slider closer to the Smooth side in order to make the lines flowing.

adjust the settings of the Pencil Tool

Step 7

I’m using the Pencil Tool (N) with 3 pt
Stoke Weight
to trace the letters of my sketch. As you saw at the very
beginning, the sketch is very quirky, so I’m using it only as a rough guide
image. As you can see, the final letters are larger than those on the sketch.
They look clean and even.

If you don’t feel confident with your handwriting
yet, try finding any whimsical font of your liking and practice tracing the
letters, using the font as a reference, until you get the desired result.
Practice makes perfect.

use the Pencil Tool for hand-lettering

Step 8

When you’re happy with your letters, Object > Expand to turn our strokes
into objects. And now we can apply a gentle linear gradient from beige to
white, giving our text a shiny metallic effect.

apply a gentle linear gradient to the letters

Step 9

Let’s move on to the next word. For this
one, I’ll be using the Amatic free font. It already looks hand-inked and a
bit quirky, just what we need! The only detail we’re going to add here is an
intricate swirl on the left. Use the Pencil
Tool (N)
and attach the swirl to the letter “S”.

attach a swirl to the text

Step 10

Now we can Object > Expand our text and fill it with a vertical linear gradient.
This time I want to make a distinct line in the center of the gradient, adding
more contrast between the colors. As you can see in the image below, I add two
contrast colors right in the center of the gradient bar, placing the sliders
very close to each other.

fill the text with a vertical linear gradient

Step 11

Let’s move on and add the word “with…”, using
a typewriter style font, like Inconsolata or Courier New. It looks too
straight and geometric, so we’ll use the Blob
Brush Tool (B)
to give it a hand-drawn look. You can double-click the Blob Brush
Tool (B)
and adjust the settings to make the lines accurate or smooth. I’m
setting the Fidelity slider to the middle position and selecting the smallest Size of the brush.

Trace the letters, making them look a bit
more quirky.

trace the font with Blob Brush Tool

Step 12

Before we add the last word, let’s create
an additional element: a simple, elegant ribbon. Start with a 310 x 70 px rectangle, setting its Fill color to light-beige and its Stroke color to dark brown with 3 pt Stroke Weight.

Go to
Effect > Warp > Arc
and set the Horizontal
Bend
value to -20%.

Object > Expand Appearance to apply the effect.

make a ribbon from rectangle and apply arc effect

Step 13

Let's add folded tips to our ribbon.
Make a 55 x 55 px square with the Rectangle Tool (M). Grab the Add Anchor Point Tool (+) and place an
anchor point in the middle of the right edge. Use the Direct Selection Tool (A) to drag the point to the left.

Rotate the shape and attach it to the right
side of our ribbon, Sending it to Back (Shift-Control-[).

Double-click the Reflect Tool (O) and
flip the shape over the Vertical Axis. Click
Copy to create a mirrored copy for
the opposite side of the ribbon.

create a tip of the ribbon

Step 14

Let’s create the word “Coffee”, using the
Limelight free font, and place it over the ribbon. Go to Effect > Warp > Arc and set the Horizontal Bend value to -20%.

Adjust the Text Size and the Tracking of
the letters (the spacing between the letters) in the Character panel (Control-T) to make the text fit the ribbon.

add the word coffee and apply arc effect

Step 15

Now we can Object > Expand Appearance to apply the effect, turning the text
into curves. Let's apply a vertical linear gradient from dark brown to
lighter brown, making the letters more intricate.

expand the text and color it

Step 16

That’s how it looks all together.

lettering preview

4. Add Hand-Drawn Elements to the Poster

Step 1

Let’s make a stylized cloud around the
text. Use the Rectangle Tool (M) to
make a set of rectangles of different sizes to fit each word. 

Unite all the rectangles in the Pathfinder and select the shape with
the Direct Selection Tool (A). Head
to the control panel on top and set the Corner
Radius
to 7 px, making the shape
a bit smoother. Set the fill color to light coffee-brown.

make a stylized cloud around the text

Step 2

Now let’s arm ourselves with the Pencil Tool (N), setting the Stroke
color to light-brown, the Stroke
Weight
to 1 pt, and the Cap and Corner to middle positions.
Start making shorter and longer strokes around the objects, outlining and
underlining them. This way we start filling the blank spaces of our poster.

Move on by adding flowing swirls in the
bottom part of the composition.

add strokes and swirls with the pencil tool

Step 3

Let’s make a simple branch. Use the Arc Tool (you can find it in the same
drop-down menu as the Line Segment Tool
(\)
) to make an arched line for the stem. Use the Pencil Tool (N) to make a drop-like shape for the leaf and attach
it on top of the stem. Hold Alt-Shift
and drag to copy the leaf. Make several pairs of leaves on both sides of the
stem and arrange them as shown in the image below.

make a simple branch

Step 4

Copy the created branch and make a
variation by making the copy smaller, applying a lighter-brown color, and
switching the leaves from Fill
to Stroke.

Place the created branches on both sides of
the cup.

add a variation of the branch

Step 5

Now let’s create another element by
combining two arched lines and placing small circles on top of each tip. Fill the blank areas next to the cup and to
the ribbon by placing the created elements there. 

create another branch

Step 6

Continue filling up all the blank spaces of
the poster, moving from the bottom of our image up to its top. Use the simple
lines, swirls and branches that we created and add variety by adding some other
small objects: circles, leaves, drops, and tiny flower blossoms.

Continue filling up all the blank spaces of the poster

Here are some close-up fragments for you
to see those small generic elements. Nothing really complicated and yet it
helps us to create a proper look with a warm coffee atmosphere.

close-up fragments

5. Add Texture to Your Lettering Poster

This section is optional. Our poster is already completed, but we can still improve it a little. 

Now that
the poster is ready and you’re happy with it, you can proceed to export and
just leave it as it is. However, I’d recommend adding a touch of texture, which
will make our lettering more unique, giving it a certain retro look.
Let’s see how we can do it! 

Step 1

First of all, we need to create a large
rectangle and fill it with a vertical linear gradient from black to white.

Go to Effect
> Texture > Grain.
In the effect options window, select the Stippled Grain Type and adjust the Intensity and Contrast by moving the sliders and checking the preview. I’ve set
the Intensity to 50 and Contrast to 30.

Click OK
as soon as you’re satisfied with the result.

apply a grain texture effect

Step 2

Now we need to turn this effect into a
vector object! Object > Expand
Appearance
of the shape, turning it into a bitmap image, and head
straight to the control panel on top, to the Image Trace panel. Select the High
Fidelity Photo
preset from the drop-down menu to trace the image.

Right after that, you will see the Image Trace Panel button appear in the
control panel on top, which allows us to adjust the settings of the traced
image. You can see my settings in the screenshot below.

trace the image and adjust the settings

Step 3

Finish up by clicking the Expand button in
the control panel on top, to apply the tracing result and turn our image
into a vector. If there is a set of white shapes left after tracing, use the Magic Wand Tool (Y) to select and
delete them.

Select all the remaining black shapes, Unite them in the Pathfinder and go to Object
> Compound Path > Make (Control-8)
, turning all separate pieces into
a single object.

expand the traced shape

Step 4

Now that we have this textured grungy
shape, let’s apply it to the cup. Place the shape across the cup. Duplicate (Control-C > Control-F)
the base of the cup and Bring the
copy to Front (Shift-Control-]),
above the texture.

Select both the texture and the cup copy,
click the right mouse button and Make Clipping Mask. This way we hid the texture inside the cup.
Now let’s adjust the color!

apply texture to the cup using a clipping mask

Step 5

Now we can select our texture inside the Clipping Mask in the Layers panel and apply a gentle linear
gradient from white to beige. Switch the Blending
Mode
to Multiply in the Transparency panel, making the shape
semi-transparent.

Use the same technique to add a grungy
texture to other elements as well, such as the ribbon and the text cloud.

apply a gentle linear gradient to the texture

That’s All, Folks! Time for a Coffee Break!

Great job, my friends! Our coffee lettering
poster is finished. I hope you’ve enjoyed following this tutorial and
discovered some new tips and tricks that will inspire you to create more lettering
posters on different topics, for example a nautical poster or a card with a motivational quote.

If you like to try out a few more
techniques on creating digital lettering, go ahead and check out these
tutorials as well:

retro coffee hand-lettering poster
View Tutorial: How to Create a Hand-Lettering Textured Poster in Adobe Illustrator

Serialization and Deserialization of Python Objects: Part 1

Python object serialization and deserialization is an important aspect of any non-trivial program. If in Python you save something to a file, if you read a configuration file, or if you respond to an HTTP request, you do object serialization and deserialization. 

In one sense, serialization and deserialization are the most boring things in the world. Who cares about all the formats and protocols? You just want to persist or stream some Python objects and get them back later intact. 

This is a very healthy way to look at the world at the conceptual level. But, at the pragmatic level, which serialization scheme, format or protocol you choose may determine how fast your program runs, how secure it is, how much freedom you have to maintain your state, and how well you’re going to interoperate with other systems. 

The reason there are so many options is that different circumstances call for different solutions. There is no “one size fits all”. In this two-part tutorial I’ll go over the pros and cons of the most successful serialization and deserialization schemes, show how to use them, and provide guidelines for choosing between them when faced with a specific use case.

Running Example

In the following sections I’ll serialize and deserialize the same Python object graphs using different serializers. To avoid repetition, I’ll define these object graphs here.

Simple Object Graph

The simple object graph is a dictionary that contains a list of integers, a string, a float, a boolean, and a None.

simple = dict(int_list=[1, 2, 3],

              text='string',

              number=3.44,

              boolean=True,

              none=None) 

Complex Object Graph

The complex object graph is also a dictionary, but it contains a datetime object and user-defined class instance that has a self.simple attribute, which is set to the simple object graph.

from datetime import datetime



class A(object):

    def __init__(self, simple):

        self.simple = simple        

    def __eq__(self, other):

        if not hasattr(other, 'simple'):

            return False

        return self.simple == other.simple

    def __ne__(self, other):

        if not hasattr(other, 'simple'):

            return True

        return self.simple != other.simple



complex = dict(a=A(simple), when=datetime(2016, 3, 7))

Pickle

Pickle is a staple. It is a native Python object serialization format. The pickle interface provides four methods: dump, dumps, load, and loads. The dump() method serializes to an open file (file-like object). The dumps() method serializes to a string. The load() method deserializes from an open file-like object. The loads() method deserializes from a string.

Pickle supports by default a textual protocol, but has also a binary protocol, which is more efficient, but not human-readable (helpful when debugging).

Here is how you pickle a Python object graph to a string and to a file using both protocols.

import cPickle as pickle



pickle.dumps(simple)

"(dp1\nS'text'\np2\nS'string'\np3\nsS'none'\np4\nNsS'boolean'\np5\nI01\nsS'number'\np6\nF3.4399999999999999\nsS'int_list'\np7\n(lp8\nI1\naI2\naI3\nas."



pickle.dumps(simple, protocol=pickle.HIGHEST_PROTOCOL)

'\x80\x02}q\x01(U\x04textq\x02U\x06stringq\x03U\x04noneq\x04NU\x07boolean\x88U\x06numberq\x05G@\x0b\x85\x1e\xb8Q\xeb\x85U\x08int_list]q\x06(K\x01K\x02K\x03eu.'

The binary representation may seem larger, but this is an illusion due to its presentation. When dumping to a file, the textual protocol is 130 bytes, while the binary protocol is only 85 bytes.

pickle.dump(simple, open('simple1.pkl', 'w'))

pickle.dump(simple, open('simple2.pkl', 'wb'), protocol=pickle.HIGHEST_PROTOCOL)



ls -la sim*.*

-rw-r--r--  1 gigi  staff  130 Mar  9 02:42 simple1.pkl

-rw-r--r--  1 gigi  staff   85 Mar  9 02:43 simple2.pkl

Unpickling from a string is as simple as:

x = pickle.loads("(dp1\nS'text'\np2\nS'string'\np3\nsS'none'\np4\nNsS'boolean'\np5\nI01\nsS'number'\np6\nF3.4399999999999999\nsS'int_list'\np7\n(lp8\nI1\naI2\naI3\nas.")

assert x == simple



x = pickle.loads('\x80\x02}q\x01(U\x04textq\x02U\x06stringq\x03U\x04noneq\x04NU\x07boolean\x88U\x06numberq\x05G@\x0b\x85\x1e\xb8Q\xeb\x85U\x08int_list]q\x06(K\x01K\x02K\x03eu.')

assert x == simple

Note that pickle can figure out the protocol automatically. There is no need to specify a protocol even for the binary one.

Unpickling from a file is just as easy. You just need to provide an open file.

x = pickle.load(open('simple1.pkl'))

assert x == simple



x = pickle.load(open('simple2.pkl'))

assert x == simple



x = pickle.load(open('simple2.pkl', 'rb'))

assert x == simple

According to the documentation, you’re supposed to open binary pickles using the ‘rb’ mode, but as you can see it works either way.

Let’s see how pickle deals with the complex object graph.

pickle.dumps(complex)

"(dp1\nS'a'\nccopy_reg\n_reconstructor\np2\n(c__main__\nA\np3\nc__builtin__\nobject\np4\nNtRp5\n(dp6\nS'simple'\np7\n(dp8\nS'text'\np9\nS'string'\np10\nsS'none'\np11\nNsS'boolean'\np12\nI01\nsS'number'\np13\nF3.4399999999999999\nsS'int_list'\np14\n(lp15\nI1\naI2\naI3\nassbsS'when'\np16\ncdatetime\ndatetime\np17\n(S'\\x07\\xe0\\x03\\x07\\x00\\x00\\x00\\x00\\x00\\x00'\ntRp18\ns."



pickle.dumps(complex, protocol=pickle.HIGHEST_PROTOCOL)

'\x80\x02}q\x01(U\x01ac__main__\nA\nq\x02)\x81q\x03}q\x04U\x06simpleq\x05}q\x06(U\x04textq\x07U\x06stringq\x08U\x04noneq\tNU\x07boolean\x88U\x06numberq\nG@\x0b\x85\x1e\xb8Q\xeb\x85U\x08int_list]q\x0b(K\x01K\x02K\x03eusbU\x04whenq\x0ccdatetime\ndatetime\nq\rU\n\x07\xe0\x03\x07\x00\x00\x00\x00\x00\x00\x85Rq\x0eu.'



pickle.dump(complex, open('complex1.pkl', 'w'))

pickle.dump(complex, open('complex2.pkl', 'wb'), protocol=pickle.HIGHEST_PROTOCOL)



ls -la comp*.*

-rw-r--r--  1 gigi  staff  327 Mar  9 02:58 complex1.pkl

-rw-r--r--  1 gigi  staff  171 Mar  9 02:58 complex2.pkl

The efficiency of the binary protocol is even greater with complex object graphs.

JSON

JSON (JavaScript Object Notation) has been part of the Python standard library since Python 2.5. I’ll consider it a native format at this point. It is a text-based format and is the unofficial king of the web as far as object serialization goes. Its type system naturally models JavaScript, so it is pretty limited. 

Let’s serialize and deserialize the simple and complex objects graphs and see what happens. The interface is almost identical to the pickle interface. You have dump(), dumps(), load(), and loads() functions. But, there are no protocols to select, and there are many optional arguments to control the process. Let’s start simple by dumping the simple object graph without any special arguments:

import json

print json.dumps(simple)

{"text": "string", "none": null, "boolean": true, "number": 3.44, "int_list": [1, 2, 3]}

The output looks pretty readable, but there is no indentation. For a larger object graph, this can be a problem. Let’s indent the output:

print json.dumps(simple, indent=4)

{

    "text": "string",

    "none": null,

    "boolean": true,

    "number": 3.44,

    "int_list": [

        1,

        2,

        3

    ]

}

That looks much better. Let’s move on to the complex object graph.

json.dumps(complex)

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-19-1be2d89d5d0d> in <module>()

----> 1 json.dumps(complex)



/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.pyc in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, encoding, default, sort_keys, **kw)

    241         cls is None and indent is None and separators is None and

    242         encoding == 'utf-8' and default is None and not sort_keys and not kw):

--> 243         return _default_encoder.encode(obj)

    244     if cls is None:

    245         cls = JSONEncoder



/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.pyc in encode(self, o)

    205         # exceptions aren't as detailed.  The list call should be roughly

    206         # equivalent to the PySequence_Fast that ''.join() would do.

--> 207         chunks = self.iterencode(o, _one_shot=True)

    208         if not isinstance(chunks, (list, tuple)):

    209             chunks = list(chunks)



/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.pyc in iterencode(self, o, _one_shot)

    268                 self.key_separator, self.item_separator, self.sort_keys,

    269                 self.skipkeys, _one_shot)

--> 270         return _iterencode(o, 0)

    271

    272 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,



/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.pyc in default(self, o)

    182

    183         """

--> 184         raise TypeError(repr(o) + " is not JSON serializable")

    185

    186     def encode(self, o):



TypeError: <__main__.A object at 0x10f367cd0> is not JSON serializable

Whoa! That doesn’t look good at all. What happened? The error message is that the A object is not JSON serializable. Remember that JSON has a very limited type system and it can’t serialize user defined classes automatically. The way to address it is to subclass the JSONEncoder class used by the json module and implement the default() that is called whenever the JSON encoder runs into an object it can’t serialize. 

The job of the custom encoder is to convert it to a Python object graph that the JSON encoder is able to encode. In this case we have two objects that require special encoding: the datetime object and the A class. The following encoder does the job. Each special object is converted to a dict where the key is the name of the type surrounded by dunders (double underscores). This will be important for decoding. 

from datetime import datetime

import json





class CustomEncoder(json.JSONEncoder):

     def default(self, o):

         if isinstance(o, datetime):

             return {'__datetime__': o.replace(microsecond=0).isoformat()}

         return {'__{}__'.format(o.__class__.__name__): o.__dict__}

Let’s try again with our custom encoder:

serialized = json.dumps(complex, indent=4, cls=CustomEncoder)

print serialized



{

    "a": {

        "__A__": {

            "simple": {

                "text": "string",

                "none": null,

                "boolean": true,

                "number": 3.44,

                "int_list": [

                    1,

                    2,

                    3

                ]

            }

        }

    },

    "when": {

        "__datetime__": "2016-03-07T00:00:00"

    }

}

This is beautiful. The complex object graph was serialized properly, and the original type information of the components was retained via the keys: “__A__” and “__datetime__”. If you use dunders for your names, then you need to come up with a different convention to denote special types.

Let’s decode the complex object graph.

> deserialized = json.loads(serialized)

> deserialized == complex

False

Hmmm, the deserialization worked (no errors), but it is different than the original complex object graph we serialized. Something is wrong. Let’s take a look at the deserialized object graph. I’ll use the pprint function of the pprint module for pretty printing.

> from pprint import pprint

> pprint(deserialized)

{u'a': {u'__A__': {u'simple': {u'boolean': True,

                               u'int_list': [1, 2, 3],

                               u'none': None,

                               u'number': 3.44,

                               u'text': u'string'}}},

 u'when': {u'__datetime__': u'2016-03-07T00:00:00'}}

Ok. The problem is that the json module doesn’t know anything about the A class or even the standard datetime object. It just deserializes everything by default to the Python object that matches its type system. In order to get back to a rich Python object graph, you need custom decoding. 

There is no need for a custom decoder subclass. The load() and loads() functions provide the “object_hook” parameter that lets you provide a custom function that converts dicts to objects. 

def decode_object(o):

    if '__A__' in o:

        a = A()

        a.__dict__.update(o['__A__'])

        return a

    elif '__datetime__' in o:

        return datetime.strptime(o['__datetime__'], '%Y-%m-%dT%H:%M:%S')        

    return o

Let’s decode using the decode_object() function as a parameter to the loads() object_hook parameter.

> deserialized = json.loads(serialized, object_hook=decode_object)

> print deserialized

{u'a': <__main__.A object at 0x10d984790>, u'when': datetime.datetime(2016, 3, 7, 0, 0)}



> deserialized == complex

True

Conclusion

In part one of this tutorial, you’ve learned about the general concept of serialization and deserialization of Python objects and explored the ins and out of serializing Python objects using Pickle and JSON. 

In part two, you’ll learn about YAML, performance and security concerns, and a quick review of additional serialization schemes.

View Tutorial: Serialization and Deserialization of Python Objects: Part 1

Optimize Your Mobile Application for Google

Final product image
What You’ll Be Creating

Have you ever wondered how those mysterious links pointing to apps appear in your search results when you search the web with Google? How can app developers make sure their apps are displayed here?

In this tutorial, I will demonstrate how to achieve this effect for your apps.

1. What’s App Indexing?

Google App Indexing (now re-branded Firebase App Indexing), enables native apps to be listed in Google search results, as if they were normal webpages. The app entries, which would appear together with normal webpage entries, are displayed when a relevant search query is submitted from an appropriate device’s browser. The feature is currently supported on Android and iOS platforms.

Why Do Developers Need It?

App Indexing maximizes a developer’s chances of success, because it performs two important tasks simultaneously.

Firstly, it improves and enhances the mobile user experience. If an app relevant to a search query is found, the user is given the option to install the app or directly launch the app (if it is already installed on the device), without even having to leave the browser. Thus, the users will have a positive first impression about such an app, and they will subconsciously appreciate the fact that the app managed to appear within the right context, and that it provided them with several options to consider.

Secondly, it helps developers promote their apps directly via Google’s search engine. Developers can harness this mechanism to drive traffic directly to their apps and increase the download count dramatically.

How Is It Technically Possible?

App Indexing works its magic with a fairly simple but clever way of establishing a relationship between an app and its website, aptly named “site association”. The workflow consists of several steps:

  1. Adding an Intent Filter to support URLs and Google Search
  2. Associating a website with the app
  3. Adding App Indexing API code

2. Let’s Build It

Now that we have an idea of the workflow, we’ll proceed with each step, and finally, test our implementation on Android Studio. So, we’ll create a new Android Project on Android Studio IDE. You’ll need to have Android Studio 2.0 or a higher version installed on your machine. Create a new Android Project with an Empty Activity. I have used MyApp as the name of my new Android Project.

Create a new Project in Android Studio

Step 1

We’ll start by adding an Intent Filter to support URLs and Google Search. Intents are the communicating agents between Android app components, and using Intent Filters is the standard way of introducing an implicit intent into your app. 

An implicit intent in your app enables it to request that the OS evaluate all the matching registered components (possibly within other installed apps) and select one of them, thus making it possible to perform a certain task using some other app installed on the system. An explicit intent, by contrast, directly specifies a target app component, so that only the specified component will be called upon to perform the action. You can read more on Intents and Intent Filters on the Android Developers website. 

Now, we’ll get started creating an Intent Filter.

  • Open the AndroidManifest.xml file.
  • Select an <activity> element with the cursor.
  • Right-click while the selection is on, and then select Generate from the pop-up menu.
  • Further select URL from the secondary pop-up menu.
Select Generate from the pop-up menu

You’ll see that Android Studio has added some additional code to your AndroidManifest.xml file. You can change the attributes of the <data> element of the generated code to fit your requirements. In my case, I have provided values related to my demo website.

Be sure to provide the necessary values for both http and https schemes.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mycompany.myapp">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter><!-- ATTENTION: This intent was auto-generated. Follow instructions at
  https://g.co/AppIndexing/AndroidStudio to publish your URLs. -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- ATTENTION: This data URL was auto-generated. We recommend that you use the HTTP scheme.
                  TODO: Change the host or pathPrefix as necessary. -->
                
                <data
                    android:host="sites.google.com"
                    android:pathPrefix="/site/appindexingex/home/main"
                    android:scheme="http" />
                <data
                    android:host="sites.google.com"
                    android:pathPrefix="/site/appindexingex/home/main"
                    android:scheme="https" />
            </intent-filter>
        </activity><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
     App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information. -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

</manifest>

Step 2

Now we need to associate a website with our app.

You will need to have verified the web URL that you wish to associate with your app using the Google Search Console. Just log in to the Search Console
with your Google account and you’ll find easy-to-follow instructions for verifying the URL.

You can also find detailed instructions on how to define the structure of the associated website to match that of your app in the Firebase App Indexing Guide. However, since we are only testing the app using Android Studio, we won’t need to explore those details in this tutorial.

For our testing purposes, all we need is a live web URL verified by Google. The attributes you provide for the <data> element in Step 1 must correspond to this verified web URL, which must be fully functional.

Step 3

Finally we’ll add App Indexing API code. Android Studio provides an automated way of doing this:

  • Open the MainActivity.java file of your Android Project.
  • Select the word onCreate with the cursor.
  • Right-click while the selection is on, and select Generate from the pop-up menu.
  • Further select the App Indexing API Code from the secondary pop-up menu.
Select the App Indexing API Code from the secondary pop-up menu

You’ll see the auto-generated code added by Android Studio to your MainActivity.java file. Be sure to edit the links of the Uri.parse() function, so that they will correctly point to the URLs associated with your app.

package com.mycompany.myapp;

import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.google.android.gms.appindexing.Action;
import com.google.android.gms.appindexing.AppIndex;
import com.google.android.gms.common.api.GoogleApiClient;

public class MainActivity extends AppCompatActivity {

    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */
    private GoogleApiClient client;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
    }

    @Override
    public void onStart() {
        super.onStart();

        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        client.connect();
        Action viewAction = Action.newAction(
                Action.TYPE_VIEW, // TODO: choose an action type.
                "Main Page", // TODO: Define a title for the content shown.
                // TODO: If you have web page content that matches this app activity's content,
                // make sure this auto-generated web page URL is correct.
                // Otherwise, set the URL to null.

                

                Uri.parse("http://sites.google.com/site/appindexingex/home/main"),
                // TODO: Make sure this auto-generated app URL is correct.
                Uri.parse("android-app://com.mycompany.myapp/http/sites.google.com/site/appindexingex/home/main")
        );
        AppIndex.AppIndexApi.start(client, viewAction);
    }

    @Override
    public void onStop() {
        super.onStop();

        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        Action viewAction = Action.newAction(
                Action.TYPE_VIEW, // TODO: choose an action type.
                "Main Page", // TODO: Define a title for the content shown.
                // TODO: If you have web page content that matches this app activity's content,
                // make sure this auto-generated web page URL is correct.
                // Otherwise, set the URL to null.


                Uri.parse("http://sites.google.com/site/appindexingex/home/main"),
                // TODO: Make sure this auto-generated app URL is correct.
                Uri.parse("android-app://com.mycompany.myapp/http/sites.google.com/site/appindexingex/home/main")
        );
        AppIndex.AppIndexApi.end(client, viewAction);
        client.disconnect();
    }
}

3. Testing It

Now, we’ll test our work on Android Studio, to make sure that our App Indexing implementation works correctly. First, make sure that you are connected to the Internet. Then, on Android Studio, select Tools > Android > Google App Indexing Test.

On Android Studio select Tools  Android  Google App Indexing Test

After some time, a screen similar to the one below will appear. The passing test results assure you that App Indexing will work correctly in your app.

Test result screen showing test passed

Conclusion

App Indexing is a useful feature for your app to attract more downloads, and it will definitely help you target a wider user base as a developer. In this tutorial, we checked only whether our App Indexing implementation works correctly, but not how exactly the user perceives the functionality resulting from the implementation. You can proceed to that next level by finding more information in the Firebase, Google Webmasters, and Android Studio App Indexing Help websites.

View Tutorial: Optimize Your Mobile Application for Google

How to Create a Cute Baby Dragon Photo Manipulation in Adobe Photoshop

Final product image
What You’ll Be Creating

Do you wish dragons were real? They sadly aren’t, but we can pretend they are by using the power of Photoshop! In this tutorial I will show you how to create a mini dragon using a few stock photos. You will learn how to build a dragon out of real animals, how to place it in a hand, and then how to color and blend the elements to make them look like a whole.

Tutorial Assets

In order to complete this exercise, you’ll need the following resources: 

1. Prepare the Assets

Before you start, you need to find perfect stock photos for your vision. The elements must have a certain perspective, but it’s not the only thing you should pay attention to. The quality of all the elements will have to be adjusted to the one with the lowest quality. Make sure all your images are big and high quality to achieve the best results!

Step 1

We have a lot of images, but we only need certain parts of them. For example, I want to use the head of that lizard and nothing more. In order to do this we need to select the area we want separated. There’s no magic trick for this—if you want accurate results, use the Pen Tool (P) to draw a path around the area. It sounds scary, but you can learn it in a mere 60 seconds from our video Getting a Grip on the Pen Tool.

how to use the pen tool

Step 2

After you draw the path, right click it and select Make Selection.

how to turn path into selection photoshop

Step 3

Go to Select > Inverse (Control-Shift-I) and delete the background. Then you can crop (C) the image and save it as PSD or PNG to keep the transparent background.

how to save picture without background

Step 4

Repeat the process to isolate the other elements too. We need:

  • Left wing
  • Right wing
  • Body
  • Head
  • Horns
  • Eye
  • Tail

You don’t need to place them all together yet.

how to prepare assests for photomanipulation

2. Create a Basic Mock-Up

You may have your vision, but you can’t really see it until you put all the elements in place. This will be your job in this part.

Step 1

Take your background image and save it as a new file—this will be our main area of work. Make sure the image is big (mine’s 3840 x 7560).

how to create background for photonamipulation

Step 2

Drag all the isolated images into this file.

how to place files in one photoshop file

Step 3

Place the body of the lizard inside the hand, trying to see behind the fingers. Lowering the Opacity for a moment may help in this task. Use the Free Transform Tool (Control-T) to resize and rotate the body.

how to transform a layer in photoshop

Step 4

Ignore the position of the neck and place the head where you want it to be. Again, use the Free Transform Tool to achieve the best results.

how to add head to a body in photoshop

Step 5

Let’s adjust the neck to the head now. Select the layer with the body and go to Edit > Puppet Warp. Place pins along the body in this way:

how to use the puppet warp in photoshop

Step 6

Drag a pin to drag the area attached to it. This way you can reshape the body. Press Enter when you’ve finished.

how to manipulate shape with  puppet warp
how to change neck shape with warp tool

Step 7

Place and resize the tail to fit the body.

how to attach tail

Step 8

Use Puppet Warp again to wrap the tail around the fingers.

how to manipulate tail shape with puppet warp
how to change tail shape in photoshop

Step 9

Place both wings on the back of the body.

how to add wings to a lizard

Step 10

Let’s give the lizard bigger eyes to make it look cuter. Select the layer of the head and go to Filter > Liquify. Use the Forward Warp Tool and the Bloat Tool to reshape the eye. You can also keep the eye small, if you want the dragon to be a miniature rather than a baby.

how to change eye size in photoshop

Step 11

Place the isolated eye in the head.

how to place a new eye in photoshop

Step 12

Use all the tricks you have learned here to add the horns to the head.

how to add horns to a lizard in photoshop

3. Fit the Elements

We can roughly see the dragon in all these elements, but they don’t look like a whole yet. Let’s fix it!

Step 1

Lower the Opacity of all the elements for a moment to see the hand clearly.

How to make layer half transparent photoshop

Step 2

Take the Pen Tool (P) and select the part of the hand that covers the dragon.

how to use pen tool to select
how to make selection with pen tool
Feel free to ignore the shape of the lower part

Step 3

Make a selection (Control-Enter), and then go to Select > Modify > Feather. Make the radius very small, for example 3 pixels. This will make the selection smoother, so that it fits the level of blur in the picture.

how to make selection smoother
how to create a smooth selection in photoshop

Step 4

Go to Select > Inverse (Control-Shift-I). Create a New Layer and use the Paint Bucket Tool (G) to fill the selection with any color. Name the layer Mask and hide it.

how to create mask in photoshop

Step 5

The mask is very simple to use. Hold Control and click the thumbnail of the mask to create a selection. Then click the body layer and select Add Layer Mask.

how to use layer masks in photoshop

Let the magic happen!

how layer masks work

Step 6

Can you see a white thumbnail next to the other on your layer? Hold the Alt key and drag it to other layers to give them the same mask.

how to copy layer mask

Step 7

Most of the elements look much better now, but we need to fix the tail that’s behind and in front of the fingers at the same time.

how to use layer masks in photomanipulation

Click the white thumbnail to select it. Then take a Hard Round brush and paint with white to reveal the part of the tail that’s supposed to be in front. Use the [ and ] keys to adjust the size of the stroke when you need to be more precise.

Curious how it works? Check out Quick Tip: Layer Mask vs. the Eraser Tool in Adobe Photoshop

how to paint on layer mask

Step 8

Painting on a mask is a great way to blend the elements! This time take a soft brush and use it to blend the borders between the images wherever needed. Decrease the Flow to be more precise.

how to use layer maks for blending

Step 9

The picture is starting to take a clearer form, so it’s easier to see what it’s lacking. In my case, I decided to add a front leg to make the body more complete. You can use the same stock photos to find these elements.

how to complete photomanipulation
how to create photomanipulation in photoshop

Step 10

Once again, look at the image as a whole and decide what else could or should be reshaped or blended for a better effect. This is the last chance to do it without consequences!

how to modify elements of photomanipulation

4. Adjust the Colors

When we chose the stock photos, we didn’t look for matching colors, because they can be easily changed. And that’s what we’ll do now!

Step 1

Select the head layer and open Window > Adjustments. Select Hue/Saturation and clip it to the layer. Then play with the sliders to make it fit the body.

how to add hue saturation adjustment

Step 2

Do the same with the other elements. In some cases you’ll want to keep some areas unchanged; in this case, paint on the mask next to the adjustment (white thumbnail) to hide some parts of it.

how to paint on mask of adjustment

You can also use this adjustment to make the eyes more vibrant.

how to use saturation adjustment

Step 3

The head looks a little off, because it has a much finer texture than the rest of the body. You can fix it by selecting parts of the scales with the Lasso Tool (L) and copying them as a whole (Control-Shift-C). Place the scales on the head and modify them to fit their surroundings.

how to add scales to head

Step 4

Use the Layer Mask to blend them with the head.

how to blend scales

5. Blend the Elements With the Environment

The position and shape are correct, the colors are matching, but all the elements still look kind of separate. It’s because each of them has shadows coming from a different light source. We need to adjust them to a single light source—the one established by the background.

Step 1

We’ve got a lot of layers, masks, and adjustments, which makes it hard to see anything. Save your project as a new file to create a backup, and then select and merge (Control-E) some layers to make it look more like it did in the beginning.

how to clean up layers

Step 2

Add another Hue/Saturation adjustment to one of the wings. Clip it and give it a shade that it would have in the shadow.

how to clip adjustment layer

Step 3

Use a Layer Mask to reveal the parts that are actually in light. Make sure you’re basing the lighting on the background!

how to use adjustment layers for shading

Step 4

Do the same with the other parts.

how to shade dark wings
how to shade elements in photomanipulation
how to shade photomanipulation

Step 5

Some parts still contain shadows coming from their original background. Let’s fix it. Add another Hue/Saturation adjustment, check Colorize and make the wing brighter, with the color of the surroundings.

how to increase light in photoshop

Step 6

Use a Layer Mask to blend it.

how to blend lighting with layer mask

Step 7

In some cases this trick may fade the contrast in the illuminated places, like here:

how to make light more contrasting

In such a case, double click the adjustment and play with the lower Blend If slider. Hold Alt and click the marker to split it for a smoother transition. You can learn more about Blend If from my quick tip the Magic of Photoshop’s Blend If and from the 60-second video How to Use Blend If in Adobe Photoshop.

how to use blend if
how to increase contrast with blend if

Step 8

Use these tricks to fix the shading on all the elements.

how to adjust lighting in photomanipulation

Step 9

We need to blend the dragon with the hand as well. To achieve this effect, add the Hue/Saturation adjustment to the background layer. Make the hand dark, but highly saturated, fill the mask with black, and then reveal the parts that the dragon touches.

how to blend elements of photomanipulation

Step 10

Create one more adjustment layer like this and darken the parts that are closest to the dragon.

how to create blending in photoshop

Step 11

Once again, look at the picture as a whole and try to see its weak spots. Which parts kill the illusion? Find and fix them!

how to create realistic photomanipulation

Step 12

Use a mix of the tricks you have just learned to add reflected colors to certain areas. This will integrate the scene even more.

how to use reflected colors in photomanipulation

6. Add the Finishing Touches

The dragon looks real already! But if you want to make it even prettier, you need to use a few more tricks.

Step 1

Select the tail layer and go into Quick Mask mode (Q). Take a soft brush and paint over the edges of the tail.

how to use quick mask in photoshop

Step 2

Exit the mode (Q) and invert the selection (Control-Shift-I). Hide the selection for a moment (Control-H).

how to use quick mask for selection

Step 3

Go to Filter > Blur > Gaussian Blur and use it to blend the tail into the blurriness of the picture.

how to use gaussian blur

Step 4

Do the same with all the other elements to soften their sharp edges.

how to soften sharp edges in photoshop

Step 5

One wing goes deeper into the background, so we need to put it slightly out of focus. Select it and go to Filter > Blur > Tilt Shift. Experiment to achieve the effect you want.

how to use tilt shift blur

Step 6

Let’s make the other wing slightly translucent. Hide it for a moment, and then select the part of the background behind it and copy it to a new layer above the wing.

how to make wings translucent in photoshop

Step 7

Make that copied part blurry.

how to make translucency effect

Step 8

Use a Layer Mask to blend the part.

how to blend everything with layer mask

Step 9

Let’s make the eye more lively. Use the Elliptical Marquee Tool (M) to create an elliptical-shaped selection.

how to create realistic eye effect

Use a soft brush to paint a blue glow within the selection.

how to add glow to the eye

Use a harder brush to add a white shine within the selection.

how to create shiny eye in photoshop

Step 10

The dragon is finished, so you can now only add small fixes here and there, depending on what you missed during the process. One major thing you can add after merging all the layers is Filter > Noise > Add Noise. The dragon should fit the quality of the background.

how to add noise in photoshop
how to create realistic baby dragon in photoshop
Mirroring the image can help you see your work from a distance to see the mistakes better.

So Cute!

Now you have your own mini dragon! And, by the way, you have learned many useful Photoshop tricks you can use in your future projects. Do you want to learn more about photo manipulation? Try these:

realistic baby dragon in hand tutorial
View Tutorial: How to Create a Cute Baby Dragon Photo Manipulation in Adobe Photoshop

How to Create Easy Kawaii Animals in Adobe Illustrator

Final product image
What You’ll Be Creating

Drawing Kawaii animals is always fun. But this is much more fun—you can
let free your imagination and creativity. 
In this tutorial, you will
see how fun and easy it is to make different Kawaii animals from one
figure. By following all the steps, you will learn how to use the warp
effect, move anchor points and use the Pathfinder panel. You will also learn
how to use the Line Segment Tool and the Reflect Tool.

If you want to see more kawaii animals, you can find hundreds of great illustrations over at Envato Market.

1. Draw the Rabbit

Step 1

Open your Adobe Illustrator and
create a new document with 850 x 850 px Width and Height. First, we will
start to draw the head of the rabbit. Using the Ellipse Tool (L), draw
an oval. In the image below, you can see which fill and stroke colors
you need. Select two side anchor points with the Direct Selection Tool
(A)
, and move them down using the Down Arrow key on your keyboard.

If you see that the top of the head is very pointy, expand the top handles of the ellipse anchor point.

creating the bunny head

Step 2

To make the signature kawaii googly eyes, create an ellipse
using the Ellipse Tool (L). Add a tiny white circle to brighten up the
eye. Select this eye and while holding the Shift and Alt keys, move it
to the right. You will get another copy of it to complete the eyes.

creating the bunny eyes

Step 3

For the nose, create a dark brown ellipse (the same fill color
as eyes) and make a sharp base using the Convert Anchor Point Tool
(Shift-C)
.

creating the bunny nose

Step 4

Let’s add a cute mouth with the Arc Tool.

Delete the
fill color and make sure you have the same stroke color as for the head.
Check Round Cap on the Stroke panel. Let’s first draw one side of the
mouth. Choose the Direct Selection Tool (A), and then select the right or
left anchor point and move its handles to make a more pronounced curve
of the arc. Attach this shape to the sharp point of the nose. 

To create
the other side of the mouth, select this arc, right-click your mouse
> Transform > Reflect
, choose Vertical, Angle 90 degrees, and press
Copy. Move the created copy of the mouth to the left using the Left
Arrow
button on your keyboard.

creating the bunny mouth

Step 5

Now let’s draw the body of our kawaii rabbit. Using the
Ellipse Tool (L)
, draw an oval. Then go to Effect > Warp > Fish to
form the shape of a body. Use the Warp options shown below. Then expand
the warped shape: Object > Expand Appearance. (Don’t you agree that
the unwarped body shape makes the rabbit look like a seal? Take a copy
of the rabbit, add fins, and voila!  You will have a kawaii seal!)

creating the bunny body

Step 6

Let’s return to the rabbit. To draw the forelegs, start
with an oval again. Select the bottom anchor point with the Direct
Selection Tool (A)
, and move it to the right using the Right Arrow key
on the keyboard to create the shape, similar to the image below. 


Now
we will cut a piece of the shape. Select the Scissors Tool (C) and
click on the points shown with red circles in the image below.
After that, switch back to the Selection Tool (V) and move this piece
out from the shape and delete it.
 

Make another ellipse, expanded
horizontally. Move its right and left anchor points down, using the
Direct Selection Tool (A) to select and Down Arrow key for movement.
Make a copy of this shape in front (Control-C, Control-F) and make it
narrower (using the Selection Tool (V)).

creating the bunny foreleg

Step 7

To create another foreleg, select the one created from the
previous step, right-click your mouse > Transform > Reflect,
choose Vertical, Angle 90 degrees, and press Copy. Move the created copy of
the foreleg to the right using the Right Arrow button on your keyboard.

creating the bunny second foreleg

Step 8

Let’s draw the hind legs. Draw another ellipse. Using the
Direct Selection Tool (A), select the left and right anchor points and move
them down. Take the copy of the paw from the previous step, where you
created the forelegs. In the end, slightly rotate the big vertical
ellipse to the left.

creating the bunny hind leg

Step 9

Attach the created hind leg to the rabbit’s body. Place it in
front of the body but behind the forelegs. Let’s create the right hind
leg. Select the left hind leg, take the Reflect Tool (O), hold down the
Alt
key, and click in the middle of the body. In the new dialogue
window, select Vertical, Angle 90 degrees, and press Copy. Move the
created hind leg to the right side.

creating the bunny second hind leg

Step 10

For the ears, we will first start by building two ellipses
(white and coral). Move the top anchor point of the white ellipse down
by using the Direct Selection Tool (A) and Down Arrow key. Make a third
large white ellipse and deform it by using the Direct Selection Tool (A)
and by adjusting the handles of the anchor points to get the image,
similar to the one shown below. Rotate the first two ellipses to the right.

At
the end, cut a small part of this shape where it’s marked: Select the
Scissors Tool (C), click on the points that are marked red, and delete
the unnecessary parts of the stroke. This is the ear for our rabbit.

creating the bunny ear

Step 11

Attach the ear to the head. Make sure that the ear stays
behind the head. To place it behind, select it and press Control-X,
Control-B
. Make a reflected copy of the ear: select the ear, right-click
the mouse > Transform > Reflect. A dialogue window will pop up,
where you should enter Axis Vertical, Angle 90 degrees, and press Copy.
Move this copy to the other side.
 Now our cute rabbit is ready!


creating the bunny second ear

2. Draw the Fox

Step 1

In this step, we will simply take a copy
of our rabbit’s body and change its color to the one shown below. Let’s
also change the color of the paws.

transforming the bunny body into fox body

Step 2

For the head of the fox, we will start with an ellipse. Using
the Convert Anchor Point Tool (Shift-C), make sharp corners on the
ellipse; while keeping the ellipse selected, click on the left and right
anchor points—these two points should be sharp now. Keep the sharp
anchor points selected and press the Down Arrow button on your keyboard a
few times.

creating the fox head

Step 3

Make a new copy of the head in front (Control-C, Control-F).
Add another white ellipse which overlaps the head, with no stroke, just a light fill color. Keeping both shapes selected (ellipse with no stroke
and the copy of the head), press the Intersect button in Pathfinder.
On the Stroke panel, press Align Stroke to Outside.

creating the fox head 2

Step 4

Place the head on the body. For the face, we’re going to take
it from the rabbit. So copy the eyes, the nose and the mouth, which we
created for the rabbit, and place them on the head of the fox.

placing the fox head and taking the bunny face as the fox face

Step 5

To make a furry chest, draw an ellipse and place it behind the
head. For this ellipse, use the same fill color as we did for the
bunny. To do this, use the Eyedropper Tool (I). Keep the fox’s chest
shape selected and press the Eyedropper Tool (I). Then hit the cursor on
the bunny. 


Next, make the bottom anchor point on this ellipse pointy by clicking on it using the Convert Anchor Point Tool (Shift-C).

creating the fox furry chest

Step 6

For the ear, we will start by making an ellipse. Take the
Direct Selection Tool (A), shift the side anchor points down and move
the handles of the anchor points of the ellipse to create the shape
shown in the image below. Copy-paste this shape in the front and make it
smaller and darker.

creating the fox ear

Step 7

So that was the left ear. For the right one, hit the Reflect
Tool (O)
and make a reflection of the whole ear as you did for the
bunny. Place the right ear on the right side of the head. 


We can now
also align everything if you didn’t do this before. So, select the two
ears and group them together (right-click > Group), and then group
the two eyes, the nose and the mouth, the two forelegs, and the two hind legs.
Select all, and on the Align panel, press Horizontal Align Center.

creating the fox another ear

Step 8

And of course, the tail. We will also start with an ellipse.
Make the right and left anchor points on this ellipse pointy. Copy this
shape (Control-C, Control-F) to have two copies on top of each other. 

Next, using the Pencil Tool (N), draw the shape, as in the image below.
Remember to hold the Alt button before finishing this shape; it will
help you to close the path. Also, remove any stroke colors from this
hand-drawn shape. Keep it selected, and while holding the Shift button,
select the top copy of the tail. Hit the Intersect button on the
Pathfinder panel (Window > Pathfinder). On the Stroke panel, press
Align to Outside. Our tail is ready. 


creating the fox tail

Finally, place the tail behind the fox: press Control-X, Control-B. Our transformation of the bunny into the fox is finished!

placing the fox tail

3. Draw the Frog


Step 1

For this character, we will use the
bunny’s body and the head again. Since it’s a frog, let’s select a green
color and give it a flatter head.

transforming the bunny body into the frog body

Step 2

Draw two circles for the eyes. To create an even circle, hold
down the Shift key. Select the three shapes (the flattened ellipse and two
circles) and using the Unite button on the Pathfinder panel (Window >
Pathfinder
), unite them. Finally, add the eyes and the mouth, by taking
them from one of the previous animals. Here we go—our frog is already
finished.

creating the frog head and taking the bunny face as a frog face

4. Place All the Animals Together

Place all three characters together and see what you’ve created! Aren’t they cute?

placing all kawaii characters together

5. Create the Accessories

Step 1

Let’s give the bunny a carrot.
Take a part of the bunny’s body, for example, one finger from the paw.
Change the color of this shape, turn it upside down, and move the bottom
anchor point down. Behind the orange shape, add a thin green ellipse.
Make two more copies of this ellipse and slightly rotate them in
different directions to create leaves for our carrot. 
Finally, add a
few small brown lines using the Line Segment Tool (\) with no fill
color.

creating the carrot

Step 2

For the fox, let’s add some mushrooms. Take the carrot shape,
change its color, and turn it upside down. Make a copy and place it on
the top for the mushroom’s “hat”. Change the mushroom’s hat color to
brown (like the fox’s paws). Make a smaller copy of the whole mushroom and slightly rotate the
new mushroom.

creating the mushroom

Step 3

Let’s create a water lily for the frog. Make a copy of the
fox’s tail and delete its white part. Change the color from orange to
pink, make two more copies of this shape, and rotate them to the left
side. Add two more symmetrical copies on the right by selecting the two
rotated shapes, right-click > Transform > Reflect, Axis Vertical,
Angle 90 degrees
, and pressing Copy. Move the two new petals to the
right side to have a symmetrical lily.

creating the water lily

Step 4

Place all the created images together: carrots near the rabbit, mushrooms close to the fox, and the water lily near the frog.

placing carrots mushrooms and water lily

6. Make a Complete Image

Step 1

Draw a square behind all images with 850 px width and height, and set the fill color presented in the image below.

creating the background

Step 2

Using the Line Segment Tool (\), draw three lines below the
created characters with no fill. To make the lines straight, hold down
the Shift button as you are drawing the line.


creating the background 2

To hide the unnecessary parts, add rectangles under all three lines with
the same fill color as the background and no stroke color. (The green
stroke in the image is only to show you where the rectangles go.)

creating the background 3

Step 3

To finalize our image, add three darker circles behind each
character. Pay attention while placing these circles—place them behind
our characters, lines, and rectangles, but above the large square
background.

creating the background 4

Conclusion

Congratulations, your kawaii illustration is done! You
see—it’s not difficult to make a transformation from one object to
another. You just need a little imagination and creativity. I hope you
found some useful tricks and have enjoyed this tutorial!

View Tutorial: How to Create Easy Kawaii Animals in Adobe Illustrator

How to Build a Semi-Circle Donut Chart With CSS

Although HTML5 Canvas and SVG might be more elegant solutions for building charts, in this tutorial we’ll learn how to build our very own donut chart with nothing but plain CSS.

To get an idea of what we’ll be creating, have a look at the embedded CodePen demo below:

HTML Markup

We start with some very basic markup; a plain unordered list with a span element inside each of the list items: 

<ul class="chart-skills">
  <li>
    <span>CSS</span>
  </li>
  <li>
    <span>HTML</span>
  </li>
  <li>
    <span>PHP</span>
  </li>
  <li>
    <span>Python</span>
  </li>
</ul>

Adding Styles to the List

With the markup ready, first we apply some basic styles to the unordered list:

.chart-skills {
  position: relative;
  width: 350px;
  height: 175px;
}

Then, we’re going to give each one an ::after and a ::before pseudo-element, and style them:

.chart-skills::before,
.chart-skills::after {
  position: absolute;
}

.chart-skills::before {
  content: '';
  width: inherit;
  height: inherit;
  border: 45px solid rgba(211,211,211,.3);
  border-bottom: none;
  border-top-left-radius: 175px;
  border-top-right-radius: 175px;
}

.chart-skills::after {
  content: 'Top Skills';
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 1.1rem;
  font-weight: bold;
  color: cadetblue;
}

Pay attention to the styles for the ::before pseudo-element. This gives us our half circle.

pseudo elements
Pseudo elements

So far, the aforementioned rules give us this result:

Adding Styles to the List Items

Let’s now discuss the styling of the list items.

Positioning 

With regards to the list items’ position, we do the following:

  • Position them right underneath their parent and
  • give them appropriate styles so as to create a reverse half circle.

Furthermore, a couple of things are worth noting here:

  • The list items are absolutely positioned, thus we’re able to set their z-index property.
  • We modify the default transform-origin property value (i.e. transform-origin: 50% 50%) of the list items. Specifically, we set transform-origin: 50% 0. In this way, when we animate (rotate) the items, their center top corner will become the center of rotation.

Here are the associated CSS styles:

.chart-skills li {
  position: absolute;
  top: 100%;
  left: 0;
  width: inherit;
  height: inherit;
  border: 45px solid;
  border-top: none;
  border-bottom-left-radius: 175px;
  border-bottom-right-radius: 175px;
  transform-origin: 50% 0;
}

.chart-skills li:nth-child(1) {
  z-index: 4;
  border-color: green;
}

.chart-skills li:nth-child(2) {
  z-index: 3;
  border-color: firebrick;
}

.chart-skills li:nth-child(3) {
  z-index: 2;
  border-color: steelblue;
}

.chart-skills li:nth-child(4) {
  z-index: 1;
  border-color: orange;
}

Take a look at what we’ve built so far in the next visualization:


spans and list items

Currently, the only list item which is visible is the green one (which has z-index: 4;) the others are underneath it.

Animations

Before we cover the steps for animating our list items, let’s take note of the desired percentage for each item (ie: how much of the donut each will cover). Consider the following table:

Language Percentage
CSS 12
HTML 32
PHP 34
Python 22

Next, we calculate how many degrees we have to animate (rotate) each of the items. To find out the exact number of degrees for each item, we multiply its percentage by 180° (not 360° because we’re using a semi-circle donut chart):

Language Percentage Number of Degrees
CSS 12 12/100 * 180 = 21.6
HTML 32 32/100 * 180 = 57.6
PHP 34 34/100 * 180 = 61.2
Python 22 22/100 * 180 = 39.6

At this point we’re ready to set up the animations. First, we define some animation styles that are shared across all items, by adding some rules to .chart-skills li:

  animation-fill-mode: forwards;
  animation-duration: .4s;
  animation-timing-function: linear;

Then, we define the unique animation styles:

.chart-skills li:nth-child(1) {
  z-index: 4;
  border-color: green;
  animation-name: rotate-one;
}

.chart-skills li:nth-child(2) {
  z-index: 3;
  border-color: firebrick;
  animation-name: rotate-two;
  animation-delay: .4s;
}

.chart-skills li:nth-child(3) {
  z-index: 2;
  border-color: steelblue;
  animation-name: rotate-three;
  animation-delay: .8s;
}

.chart-skills li:nth-child(4) {
  z-index: 1;
  border-color: orange;
  animation-name: rotate-four;
  animation-delay: 1.2s;
}

Notice that we add a delay to all items except for the first one. In this way, we create nice sequential animations. For example, when the animation of the first element finishes, the second element appears, and so on. 

The next step is to specify the actual animations:

@keyframes rotate-one {
  100% {
    transform: rotate(21.6deg);
    /**
     * 12% => 21.6deg
     */
  }
}

@keyframes rotate-two {
  0% {
    transform: rotate(21.6deg);
  }
  100% {
    transform: rotate(79.2deg);
    /**
     * 32% => 57.6deg 
     * 57.6 + 21.6 => 79.2deg
     */
  }
}

@keyframes rotate-three {
  0% {
    transform: rotate(79.2deg);
  }
  100% {
    transform: rotate(140.4deg);
    /**
     * 34% => 61.2deg 
     * 61.2 + 79.2 => 140.4deg
     */
  }
}

@keyframes rotate-four {
  0% {
    transform: rotate(140.4deg);
  }
  100% {
    transform: rotate(180deg);
    /**
     * 22% => 39.6deg  
     * 140.4 + 39.6 => 180deg
     */
  }
}

Before going any further, we’ll briefly look at how the animations work:

The first element goes from transform: none to transform: rotate(21.6deg).

The second element goes from transform: rotate(21.6deg)  (starts from the final position of the first element) to transform: rotate(79.2deg) (57.6deg + 21.6deg). 

The third element goes from transform: rotate(79.2deg)  (starts from the final position of the second element) to transform: rotate(140.4deg) (61.2deg + 79.2deg).

The fourth element goes from transform: rotate(140.4deg)  (starts from the final position of the third element) to transform: rotate(180deg) (140.4deg + 39.6deg).

Hide!

Last but not least, to hide the bottom half of the chart, we have to add the following rules:

.chart-skills {
    /* existing rules....*/  
    
    overflow: hidden;
}

.chart-skills li {
    /* existing rules....*/
    
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

The overflow: hidden property value ensures that only the first semi-circle (the one created with the ::before pseudo-element) is visible. Feel free to remove that property if you want to test the initial position of the list items. 

The transform-style: preserve-3d and backface-visibility: hidden properties prevent flickering effects that may occur in different browsers due to animations. If this problem still exists in your browser, you may want to try these solutions as well.

The chart is almost ready! All that remains is to style the chart labels, which we’ll do in the next section.

Here’s the CodePen demo showing the current appearance of our chart:

Adding Styles to the Labels

In this section, we’ll style the chart labels.

Positioning

With regards to their position, we do the following:

  • Give them position: absolute and use the top and left properties to set their desired position.
  • Use negative values to rotate them. Of course, these aren’t random values. In fact, these are extracted from the last frame of their parent item. For instance, the last frame of the second list item includes transform: rotate(79.2deg), and thus its related label will have transform: rotate(-79.2deg).

Below are the corresponding CSS styles:

.chart-skills span {
  position: absolute;
  font-size: .85rem;
}

.chart-skills li:nth-child(1) span {
  top: 5px;
  left: 10px;
  transform: rotate(-21.6deg);
}

.chart-skills li:nth-child(2) span {
  top: 20px;
  left: 10px;
  transform: rotate(-79.2deg);
}

.chart-skills li:nth-child(3) span {
  top: 18px;
  left: 10px;
  transform: rotate(-140.4deg);
}

.chart-skills li:nth-child(4) span {
  top: 10px;
  left: 10px;
  transform: rotate(-180deg);
}

Animations

Now that we’ve positioned the labels, it’s time to animate them. Two things are worth mentioning here:

  • By default, all labels are hidden and become visible as their parent item is being animated. 
  • Similarly to the parent items, we use the animation-delay property to create sequential animations. In addition, we add the backface-visibility: hidden property value to ensure that there aren’t any flickering effects due to animations.

The CSS rules that deal with the animation of the chart labels are shown below:

.chart-skills span {
  backface-visibility: hidden;
  animation: fade-in .4s linear forwards;
}

.chart-skills li:nth-child(2) span {
  animation-delay: .4s;
}

.chart-skills li:nth-child(3) span {
  animation-delay: .8s;
}

.chart-skills li:nth-child(4) span {
  animation-delay: 1.2s;
}

@keyframes fade-in {
  0%,
  90% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

Here’s the final chart:

Browser Support & Issues

In general, the demo works well in all browsers. I just want to discuss two small issues that are related to the border-radius property.

First, if we were to give different colors to our items, the chart might look something like this: 

Notice
for example the top and bottom corners of the third item. There are two
red lines which come from the border color of the fourth item. We can
see those lines because the fourth item has a darker border color
compared to the third one. Although this is a small issue, it’s good to be aware of it in
order to choose appropriate colors for your own charts.

Secondly, in Safari the chart appears as follows:

Look at the small gaps appearing in the second and third items. If you know anything regarding this issue, let us know in the comments below!

Conclusion

In this tutorial, we went through the process of creating a semi-circle donut chart with pure CSS. Again, as mentioned in the introduction, there are potentially more powerful solutions (e.g. HTML5 Canvas and SVG) out there for creating these kind of things. However, if you want to build something simple and lightweight, and enjoy a challenge, CSS is the way to go!

View Tutorial: How to Build a Semi-Circle Donut Chart With CSS

How to Draw a Flower

Final product image
What You’ll Be Creating

Learning how to draw can be tedious sometimes—you need to practice a lot, rarely seeing any progress. In this tutorial I’ll try to make learning more fun for you. I will show you how to use three pencils to plan, sketch, shade, and finish three beautiful flowers: a daisy, and orchid, and a lily of the valley. This can be a great exercise, and you’ll actually end up with a fully rendered drawing when you finish!

Before you start, read the introduction of How to Draw Trees to learn which tools you need for this tutorial.

1. How to Draw a Daisy

We’ll start with the simplest type of flower: a daisy. This little, humble flower is easy to draw, but we’ll make it more challenging by using an interesting perspective. If you need a reference, you can check out photos on Envato Market, for example:

Step 1

Draw a short stem with a distorted cross on top. Draw very lightly, making the strokes almost invisible. The photo below is heavily darkened to help you see the lines, but you should barely see yours! Use this technique until I tell you to stop.

how to draw daisy stem

Step 2

Use the cross to draw an ellipse distorted by perspective. This will be the central part of the flower called the “disk”.

how to draw daisy disk ellipse
how to draw daisy disk whole

Step 3

Draw a bigger ellipse around, with its center slightly above the cross.

how to draw daisy guide lines

Step 4

Draw another ellipse; place it even higher. This will help us establish the perspective of the petals.

how to draw daisy construction ellipse

Step 5

Now, draw radial lines coming from the center. First make them straight…

how to draw daisy petals lines

… and then they can be gently curved.

how to draw daisy in perspective

Step 6

Treat these lines as the middle axes of the petals—you can press slightly harder now. Make the “vertical” ones quite wide…

how to draw daisy petals in perspective

… and the “horizontal” ones narrower.

how to draw daisy petals in perspective short

Step 7

Add gentle arcs on top of every petal to finish them following the previous style. Vertical—wide:

how to draw daisy finish petals vertical

Horizontal—narrow:

how to draw daisy finish petals horizontal

Step 8

Add shorter petals under and above the others to fill the gaps and make it more natural.

how to draw daisy small petals

Step 9

Draw the outline of the stem. First do it very lightly, and then adjust it with slightly darker strokes.

how to draw daisy stem

Step 10

Let’s work on the disk now. It has a special pattern, so let’s create it with a trick. First draw spiral rays coming from the center—do it very lightly.

how to draw diasy disk pattern

Then cross them with rays coming in the opposite direction.

how to draw daisy middle

Step 11

Stress the pattern by pressing harder.

how to draw patter in the middle of daisy

Step 12

Subtly shade the disk—it can be concave or convex.

how to shade flower center

Step 13

Take a softer brush and accentuate the shading.

how to shade daisy center

Step 14

Let’s go back to the petals now. Fill them with gentle rays following their perspective. Use a hard pencil.

how to shade diasy petals

Step 15

Use the same pencil to slightly shade the petals. Keep in mind they’re white, so try to leave as much whiteness as possible.

how to shade diasy petals with hard pencil

Step 16

Give the tips of the petals a gently serrated edge.

how to draw diasy petals serrated

Step 17

Take a softer pencil and make the shading more visible. Accentuate the edges of the petals with it as well.

how to shade flower petals

Step 18

Take a hard brush and shade the stem. It’s supposed to be darker than the petals, so don’t leave any whiteness.

how to shade daisy stem

Step 19

Take a softer brush and increase the darkness of shading on the stem.

how to shade flower stem

Step 20

Use the softest pencil to finish shading the stem. The darkness part of it will be our point of reference for the overall contrast.

how to shade flower proper contrast

Step 21

Use a soft brush to adjust the contrast of the disk to what we’ve just established. Don’t make it too dark—it’s bright, after all.

how to draw daisy flower shading

Step 22

Use the same pencil to adjust the contrast of the petals.

how to shade daisy petals dark

Step 23

Use the softest pencil to add a pinch of black in the darkest crevices. This will increase the overall contrast of the picture and will make the petals brighter.

how to draw and shade daisy simple flower

2. How to Draw an Orchid

Orchids are a large family of very beautiful flowers taking many interesting shapes. I will show you just one species, but feel free to modify my lessons to create something on your own. Here are a few handy references from Envato Market:

Step 1

Again, let’s start with the hard pencil. Draw the stem very, very lightly.

how to start drawing orchid

Step 2

Add little circles where you want the flowers to be.

how to plan drawing orchid

Step 3

Our flowers will look like birds. First, draw their “heads” with “eyes” and “beaks”.

how to draw orchid buds

Step 4

Add the wings and tail. These lines should establish the perspective of each flower.

how to draw orchid structurally

Step 5

Add three more lines between the previous ones.

how to draw orchid simple way

Step 6

This is the central part of the orchid flower. You can imagine it as the curled feet of a bird.

how to draw orchid step by step

Step 7

Give those feet… horns (yeah, we can’t use that bird metaphor anymore).

draw orchid step by step

Step 8

Add two curved “arms” to the tail part.

how to draw beautiful orchid

Step 9

Draw little butterflies using the “horns” as a support for the upper pair of wings…

how to draw orchid inner petals

… and the “tail arms” as a support for the lower pair.

draw orchid inner petals

Step 10

Connect the butterfly with the bird head with a long curved “neck”.

how to start drawing orchid flowers

Step 11

You can now draw the big petals behind the butterfly.

how to draw orchid petals

Step 12

The flowers are fully sketched now, so draw the buds now—the farther, the smaller.

how to draw orchid buds
draw orchid buds

Step 13

Draw the rest of the stem.

how to draw orchid stem

Step 14

Time for shading! Use a hard pencil first to set the values. Make the stem and the butterfly part darker. This shade difference between them and the bright petals is what we need to follow until the end of the shading.

how to start shading orchid

Step 15

Draw subtle rays on the big petals.

how to start shading orchid petals

Step 16

Give the big petals clear middle lines.

how to shade orchid petals

Step 17

Create a spray effect all around those middle lines. These part is going to be darker than the rest of the petals.

how to draw orchid pattern

Step 18

Take a softer brush and make the stem and dark butterflies darker.

how to darken orchid stem
how to color in grayscale orchid

Step 19

Take the softest brush and make those dark parts even darker, but don’t use black yet.

how to adjust contrast orchid
how to draw proper contrast

Step 20

Fleck the central part of the flower.

how to add orchid details

Step 21

Let’s finish establishing the contrast: press your softest pencil hard to achieve black in some places.

how to achieve good contrast in drawing
how to shade with good contrast

Step 22

We need to adjust the contrast of the rest of the picture. Go back to the medium soft pencil and darken the pattern on the big petals.

how to darken orchid pattern

Step 23

Take a hard pencil and darken the petals subtly, leaving a thick, white outline at the edges.

how to shade white petals

Step 24

Take the softest pencil once again and use it to add a touch of black to the flowers. Not too much, though!

how to add ambient occlusion in drawing

Step 25

I decided to increase the contrast of the flowers by making the butterfly parts even darker.

how to draw simple orchid

3. How to Draw a Lily of the Valley

Lily of the valley has a unique name and shape—its flowers form a row of tiny bells growing from a single stem. This construction makes it quite easy to draw, but feel free to check some references if you need help:

Step 1

Draw the stem first using the hard pencil, and then add gentle arcs all over it. They must follow gravity.

draw lily of the valley stem

Step 2

Attach a little “cup” to each branching stem.

draw lily of the valley flower cups

Step 3

Create guide lines for the petals…

draw petals of  lily of the valley

… and then use them to complete the shape.

 lily of the valley petals drawing

Step 4

Add some width to the stem and attach little “leaves” for every branching stem.

 lily of the valley stem details drawing

Step 5

Add a leaf or two to make the composition more interesting.

draw  lily of the valley leaves
draw leaf of lily of the valley
 lily of the valley leaves drawing

Step 6

Darken the steam and leaves using the hard pencil.

how to shade lily of the valley

Step 7

Take a softer pencil and subtly shade the same parts.

 lily of the valley shading

Step 8

Use the same pencil, but this time press harder to achieve a darker shade.

how to shade lily of the valley with pencils

Step 9

Take the softest pencil and add very dark accents here and there to adjust the contrast.

how to draw  lily of the valley with pencils

Step 10

Go back to the hard pencil to give a basic shading to the flowers.

 how to draw  lily of the valley flowers

Step 11

Take a softer pencil and darken the lower part of the flowers a little. The more white you leave, the whiter the flowers will seem in the end.

how to shade  lily of the valley flowers

Step 12

Press harder to add darker accents. Make sure your pencil is sharp before doing this, or you’ll darken the white flowers too much!

how to draw lily of the valley

Beautiful! You Did It!

You have drawn a daisy, an orchid, and a lily of the valley, but you’ve also done much more than that—you have learned the basics of sketching and shading that you can use now in other projects. The same tricks will work for drawing anything you can imagine: vehicles, buildings, animals, fantastic creatures…

But if you just want to keep drawing simple, fun things, check out How to Draw Trees. You can also try my previous flower-related tutorial: How to Draw a Rose.

If you want to see more tutorials like this, please let me know—I’ll be glad to hear your suggestions!

View Tutorial: How to Draw a Flower