An oil painting can be painted to appear three-dimensional, but since oil paintings exist on a flat surface, this is only an illusion. The process of making an oil painting appear three-dimensional takes artistic skill and painting expertise. Even with painting experience, trying to make paintings look three-dimensional takes time, patience and above all, practice. There are many different ways to make a painting look three-dimensional, not one single technique.
Work from a photograph rather than from imagination or even real life. The painting will essentially recreate the three-dimensional image you see in the photograph. If you work from a photograph, you can study the way that your subject appears in real life, but the quality of light will never change and the subject will never move. If you work from real life, you'll have to paint more quickly, and this may detract from the quality of your final product.
Draw studies of the photograph before beginning the painting. Be careful to include elements into the studies (and the eventual painting) that indicate three-dimensionality, such as overlapping figures and linear perspective. Figures in the foreground will appear in front of figures in the background by covering up the background figures wherever they overlap. Linear perspective is the method by which you will show architectural figures in the foreground gradually receding into the background. Additionally, note that figures in the foreground will appear to be larger than figures in the background, and if you are painting a single figure, note how aspects of the figure that are toward the back tend to recede. Be sure to capture all these elements in your studies.
Draw the structure of the painting on the canvas before you begin to paint. Integrate all the three-dimensional illusions mentioned in Step 2 (linear perspective, overlapping figures and the difference in size from foreground and background figures). Your placement of the subjects in the photograph must be exactly correct in order for the painting to look right.
Mix the colors for the painting so they look exactly as they do in the photograph. Oil paints will stay wet for a long time, so feel free to mix a lot of each needed color; you can use later what you don't use now. As you mix paints, hold them up to the photograph and compare the two. Note that colors closer to the foreground will appear to be brighter, while colors in the far background (especially in landscapes and paintings that show great distances) will appear to be duller and lighter. Try painting mixed colors on a scrap of canvas before applying them to the actual canvas, so you can see the difference between the colors in the photograph and the color of the paint.
Lay down the base colors on the painting first; that is, paint the colors on the canvas as they would appear if there were no shadows or highlights, and eliminate details. These things will all be added later. Thin the paint with turpentine (or a less-toxic substitute) so that the first layers are thin. Thicker layers will be added as you add shadows, highlights and details. Use larger paintbrushes for these larger areas of color, and switch to smaller and smaller paintbrushes as your work becomes more detailed.
Mix the colors for the shadows and highlights, if you have not done so already. Avoid using black for shadows, because black will just make your painting look murky and muddy. Shadows and highlights will enhance the three-dimensional nature of your painting by indicating the rounded nature of objects. Study the colors of the shadows as you see them on the photograph and try to match them by mixing colors like brown and blue into the paints you used for the base color.
Step back away from the painting periodically and compare the painting to the photograph. The photograph should be attached to the canvas so that you can see the two side by side. Flick your eyes back and forth between the painting and the photograph. Look for differences and make changes as necessary.
Paint on details, shadows and highlights after the base coat of paint has been applied to the piece. Oil paintings dry very slowly, so you may hit a point when the painting becomes too wet to proceed. You'll know when this happens because you'll find you can no longer apply paint without smearing some critical part of your painting. When this happens, set the painting to the side and give it a day or two to dry. As you build layers on the painting, you'll apply paint in increasingly thicker applications.
Set your painting aside and come back in a few days. The painting should appear to be as close to the photograph as you can get; ideally, it will look like a larger version of the photograph. If it does not, flick your eyes back and forth between the photograph and the painting, and ask yourself how you can make changes. Try turning the painting upside down; sometimes this will help you see necessary changes.