Skip to main content

How to create realistic shadows and lighting in photo composites

9 Min read Published

Every shadow has a source, a direction, and a falloff rate. These are not aesthetic choices but physical facts determined by the light that casts them. A composite that gets these facts wrong does not look bad. It looks impossible.

The human eye is surprisingly good at detecting this. Not because most viewers can explain light physics or name a blend mode, but because we have spent our entire lives reading light. It is instinctive. Compositing sits in the same perceptual territory as the uncanny valley: the closer you get to realistic, the more harshly any remaining errors register. A rough composite gets a pass. A nearly convincing one, with one shadow in the wrong place, feels wrong in a way that is hard to ignore.

Realistic shadows are what close that gap. Here is how to build them.

Read the light before you touch a blend mode

The most common compositing mistake happens before any retouching begins. Photographers grab a subject shot and a background plate without checking whether their light sources are compatible. Spend two minutes analyzing both images before you open Affinity's Pixel Studio.

Identify the key light angle, the quality of the light (hard or soft), the color temperature, and whether there is any visible fill or ambient bounce. Note where the specular highlights land on your subject. If the background plate has a strong side light and your subject was shot in flat studio light, that is a fundamental mismatch no amount of shadow work will fully fix.

When you cannot reshoot, you can still salvage a lot. Soft, overcast backgrounds are the most forgiving because they imply diffuse light from everywhere. Hard directional light is unforgiving, and you will need to work harder on both shadow placement and edge lighting to sell the composite.

The geometry of realistic shadows

Shadows obey geometry. A contact shadow sits directly beneath an object where it touches or nearly touches a surface. A cast shadow extends away from the object in the direction opposite the light source. Both have to coexist in a believable composite, and they behave differently.

Cast shadows are sharper near the object and progressively softer as they extend. This happens because the light source has physical size. A large soft box produces shadows that lose definition almost immediately. A hard point source, like direct sunlight, keeps edge sharpness further into the shadow before it softens.

Contact shadows are some of the most time-intensive to implement. That small, concentrated darkness where a shoe meets a floor or a cup sits on a table is surprisingly powerful. Without it, objects look like they are hovering. Paint one manually using a soft, low-opacity brush on a Multiply-blended layer, keeping it densest at the point of contact and feathering to nothing within a few pixels.

Working with shadow layers in Affinity

Affinity's Pixel Studio gives you the non-destructive workflow that shadow work demands. Shadows are almost always wrong on the first pass. You need layers you can revisit.

The standard approach is to create a new Pixel layer above your subject and set it to Multiply in the Layers panel, and paint shadows using a dark neutral color sampled from the shadow areas of the background. Avoid pure black. Real shadows carry color from the ambient environment, so shadows cast in a warm golden-hour scene lean slightly orange. Shadows in open shade carry blue from the sky.

Keep different shadow types on separate layers and name them as you go. Contact shadows, cast shadows, and any environmental shadows like a wall catching a reflection all behave differently and will need independent opacity adjustments as you refine the composite. Merging them early locks you into decisions you will almost certainly want to change.

For cast shadows that fall across complex terrain, apply a Mesh Warp live filter to your shadow layer. Go to Pixel > New Live Filter Layer > Distort > Mesh Warp. This keeps the warp fully non-destructive, so you can pull the mesh points to follow a curved surface or uneven ground and revisit them later without losing pixel data. A shadow that falls across a staircase or a rounded object needs to follow those contours to read as real.

Edge lighting: the detail that does the heavy lifting

If you want realistic shadows and convincing integration, edge lighting is where you earn it. When a key light hits a subject, the edges facing the light will be bright. But the edges facing away will often pick up subtle fill from reflected surfaces in the scene. This is rim light, hair light, environmental bounce, whatever you call it in your workflow. It is critical.

In compositing, the most common failure is a subject that is too cleanly outlined against the background. Real light bleeds. It wraps. Create a new Pixel layer, set its blend mode to Screen or Add (Linear Dodge) in the Layers panel pop-up menu, and paint a subtle glow on the appropriate edges using a soft brush at low opacity. Alternatively, the Dodge Brush Tool lets you lighten specific edge areas directly on your subject layer, with Tonal Range set to Highlights to keep the effect targeted. Match the color to the nearest light source in the background. On a subject standing near a warm wall, that edge should carry a hint of warm bounce. This is a small detail that registers subconsciously and makes the composite feel lived-in.

Color-matching shadows to the environment

Shadow color is one of the most overlooked variables in compositing. In natural light, shadow areas are lit by the sky, so they pick up the blue-violet tones of the sky's color temperature. In a scene lit by tungsten sources, shadows cool toward blue as they move away from the warm key. In mixed lighting, shadows get complex fast.

To tune shadow color independently, add an HSL adjustment layer via the Layers panel by clicking Adjustments and selecting HSL, or go to Pixel > New Adjustment Layer > HSL. Do the same for a Curves adjustment layer. Clip both to your shadow layer so they affect only that layer and not the full composite. Pushing slight complementary color into shadows is a technique borrowed from film color grading, and it works just as well in still digital compositing. Warm highlights and cooler shadows read as more cinematic and, paradoxically, more real.

Before you commit, use the Color Picker Tool (shortcut I) to sample from the shadow areas of both your subject and the background plate. Set the Source to Global in the context toolbar so you are reading from the full composite, not just the active layer. If the two shadow hues are far apart, that gap will read as wrong before a viewer can explain why.

Transparency, translucency, and secondary light effects

Hard composites, where everything is opaque, are the easiest to handle. Real scenes are more complicated. Glass, fabric, foliage, and hair all interact with light by transmitting and scattering it, not just blocking it.

When compositing a subject near a light source, consider whether secondary light effects would appear: caustic patterns from glass, color spill from a bright object nearby, or the warm glow cast by a lamp just outside the frame. Add a Gradient Overlay layer effect to your subject layer. Set the blend mode to Screen for a light spill effect, dial the opacity down low, and use the Angle setting to point the gradient toward the implied light source. Keep the gradient color matched to the nearest light in the scene. This kind of secondary lighting takes two minutes and makes a composite feel like it exists in a consistent physical space.

Using Affinity's blend modes strategically

All blend modes are accessible from the blend mode pop-up in the Layers panel.

Most compositors default to Multiply for shadows and Screen for highlights. Both are correct starting points. But the full blend mode palette in Affinity's Pixel Studio gives you far more precision when the standard modes are not quite landing.

Soft Light works well for subtle tonal adjustments to shadow areas without the density shift that Multiply introduces. Overlay gives you more contrast punch when your shadows need to deepen without losing the texture of the surface beneath. Linear Burn is useful for very dark, saturated shadow areas, like deep cast shadows on a bright surface.

Try stacking two shadow layers, one on Multiply at moderate opacity and a second on Soft Light at low opacity. This combination creates shadows with more natural tonal gradation than a single layer can achieve. The Soft Light layer preserves surface texture in the shadow, while the Multiply layer provides the density.

Final pass: compare against reference

Before you call a composite finished, find a real reference photograph with a similar lighting setup and put it beside your work. Not to copy it, but to pressure-test your instincts. Reference photos expose the things you have normalized during hours of staring at the same file. Inconsistent shadow direction, slightly wrong shadow color, contact shadows that are missing, edge light that is too bright or too blue.

The goal with realistic shadows is not technical perfection. It is perceptual conviction. Viewers are not analyzing blend modes. They are asking, at a subconscious level, whether this could be a real photograph. Shadow work is what answers that question.

Putting it together in Affinity

Build your composite in a logical layer order in the Layers panel: background plate at the bottom, subject layer above it, then contact shadow layers, cast shadow layers, edge lighting layers, and finally your HSL and Curves adjustment layers at the top. Select related layers and click Group in the Layers panel to keep shadow types contained and independently adjustable.

Double-click any layer entry in the Layers panel to rename it. Shadow work generates layers fast, and a named, grouped stack means you can revisit any decision without having to reverse-engineer your own file.

The techniques here apply whether you are compositing a product shot, a portrait, or a complex scene with multiple subjects. The fundamentals do not change: understand the light, model the shadow geometry correctly, match the shadow color to the environment, and add the secondary effects that make a scene feel inhabited. Get those right, and realistic shadows stop being a finishing touch and become the invisible architecture of the whole image.

About the author

Mike is a working photographer, passionate and highly motivated content creator, and educator who uses photography to document, teach, and inspire others. He loves technology and editing with modern tools that allow him to conceive and create truly mind-blowing results.

Photographer and Product Expert
Photographer and Product Expert

Share article

Free your files

Start creating with Affinity today.

This browser is no longer supported. Please upgrade your browser to improve your experience. Find out more.