This short and simple instructable shows you how to use the gradient mesh tool in illustrator to create realistic 2D renders. The coffee jar on the left is a photograph taken from the web and the coffee jar on the right is a 2D render created using the gradient mesh tool.
Step 1: Tracing from photo
First, use the pen tool to outline the part of the photo that you want to replicate. Do note that the cap and body should be outlined separately because we are going to apply 2 different gradient meshes for each.
Step 2: Creating a gradient mesh
For the sake of simplicity, I am using a simple rectangle box to represent the bottle cap. Once you have your outline, select object > create gradient mesh. After which a dialog box will pop out and you are able to choose the number of rows and columns you want for your gradient mesh.
You are able to add rows and columns manually later on so it is fine to start off with a smaller number first.
More rows and columns will allow you to apply a more realistic render but require more control in terms of colour selection for each mesh point.
Step 3: Editing mesh point colours
Each mesh point can be individually selected and edited when you use the direct selection tool.
After selecting the point, use the eyedropper tool to transfer a colour from the corresponding point on the reference photograph to the mesh point that you want to edit.
click on the mesh point > click on the eyedropper tool > click on the corresponding point on the reference photo.
Step 4: Adding mesh lines
To add more mesh lines, click on the mesh tool and then click on the existing gradient mesh that you have. Clicking on an existing line will add either a new horizontal or vertical line. However, clicking on an empty space that is within the boundary of your overall outline will add both horizontal and vertical lines.
After adding the desired number of lines at the positions that you want, use the previous eyedropper tool method to transfer the colours over from the reference photo.
Step 5: Adding extra textures
Now to make the gradient mesh look even more realistic. To add some additional texture to the gradient mesh, select effect > texture > grain. You can choose the intensity of the grainy-ness in the dialog window that pops up.
Feel free to play around with the many other effects under the effect drop-down.
Step 6: Complete your render
Trying to perfect your render to make it as realistic as possible can be a tedious and frustrating task, but time and practice will make it better.
Note, mesh points work like ordinary anchor points and have handles that you can play around with as well. For example, the mesh lines can be edited to become curves at specific areas.
Also, it is always easier to start from a few mesh lines and then gradually build up and add them in manually. This way you have more control over the lines and it is less confusing.
Thanks for reading this short tutorial!