Sub topic 2
Two ways to make an image: rasterization and path tracing
This chapter assumes you can navigate Blender's Properties editor, assign a Principled BSDF material, place lights and a camera, and render a still with F12. It explains the core difference between EEVEE and Cycles. Later chapters cover each engine's settings in detail. Here the goal is a working model of how each engine decides what color a pixel gets, because that model predicts speed, noise, and the artifacts you will see.
The question every renderer answers
A render engine takes a 3D scene and produces a grid of pixels. For each pixel it must answer one question: how much light, and of what color, travels from the scene to the camera through this pixel?
EEVEE and Cycles answer it in opposite directions.
- Rasterization starts from the geometry. It asks which pixels each triangle covers, then shades those pixels. EEVEE works this way.
- Path tracing starts from the pixel. It follows a ray from the camera into the scene and follows the light backward along its bounces. Cycles works this way.
Rasterization: from triangles to pixels
A rasterizer treats the scene as a list of triangles. For each frame it does roughly this:
- Transform every triangle's vertices from world space into the camera's view, then onto the 2D screen.
- Work out which pixels each projected triangle covers.
- Use a depth buffer (also called a Z-buffer) to keep only the closest triangle at each pixel.
- Run the material's shading calculation for the surviving pixels, using the nearby lights.
The key property is that each pixel is shaded using local information: its surface position, normal, material, and a set of lights. The renderer never traces what the light did before it reached that surface. Anything that depends on the rest of the scene, such as shadows, reflections, and light bouncing off a red wall onto a white floor, has to be supplied some other way.
EEVEE supplies it with precomputed or approximate data:
- Shadow maps store the scene's depth from each light's point of view. Shading a pixel checks whether the light can "see" it.
- Light probes capture lighting at chosen locations and reuse that data for nearby surfaces.
- Screen-space techniques estimate reflections, ambient occlusion, and similar effects using only what is already in the rendered image.
These are approximations, and they are fast. Because the cost depends mostly on triangle count, pixel count, and the number of lights and effects, EEVEE can render in fractions of a second per frame on a capable GPU.
The price is that the approximations fail in predictable places. A screen-space reflection can only reflect what is visible on screen, so an object just outside the frame disappears from the reflection. A shadow map has limited resolution, so shadows can look blocky or leak at the edges.
Path tracing: from pixels to light
A path tracer works from the camera. For each pixel it does this:
- Shoot a ray from the camera through a random point inside the pixel.
- Find the first surface the ray hits.
- Pick a new direction according to the material, such as a mirror reflection, a diffuse scatter, or a refraction. Shoot a ray that way.
- Repeat until the ray reaches a light, escapes to the world background, or exceeds the maximum bounce count.
- Add up the light the path collected, weighted by the surface colors it met along the way.
One such path is a very noisy estimate. A single path through a pixel might hit a bright lamp or might hit nothing useful. So the engine traces many paths per pixel, each with different random choices, and averages them. This is a Monte Carlo method: it estimates an integral (here, all the light arriving at a point) by random sampling.
Shadows, reflections, refraction, and color bleeding all come out of the same process. A shadow is just a path whose bounce toward the light was blocked. A reflection is a path that bounced off a glossy surface. No special case exists for each effect, which is why Cycles results look physically consistent with little setup.
To make this affordable, Cycles stores the scene in an acceleration structure called a BVH (bounding volume hierarchy). It lets a ray skip large groups of triangles it cannot possibly hit. Without it, every ray would have to test every triangle.
A diagram of the two pipelines
Seeing the noise mechanism directly
Noise in a path tracer comes from the averaging. This short Python script uses no Blender at all. It models a pixel where 25 percent of random bounce directions end at a light, so the true brightness is 0.25. It then estimates the pixel with different sample counts and measures how much the estimate varies between runs.
import random
import statistics
random.seed(1)
def estimate_pixel(samples):
"""Average `samples` random light paths. Each path either hits the light or not."""
hits = sum(1 for _ in range(samples) if random.random() < 0.25)
return hits / samples
for samples in (16, 64, 256, 1024):
runs = [estimate_pixel(samples) for _ in range(200)]
print(
f"{samples:5d} samples: "
f"mean={statistics.mean(runs):.3f} "
f"spread={statistics.pstdev(runs):.3f}"
)The mean stays near 0.25 at every sample count, so the estimate is correct on average. The spread, which is what you see as grain, falls by about half each time the sample count quadruples. That square-root relationship is the central cost of path tracing. Halving the visible noise takes four times the samples, so the last bit of cleanliness is expensive. This is why the chapters on sampling and denoising matter.
What each approach costs
The two methods scale differently, and that explains most of the practical differences you will see.
| Aspect | Rasterization (EEVEE) | Path tracing (Cycles) |
|---|---|---|
| Loop order | For each triangle, find pixels | For each pixel, trace rays |
| Main cost drivers | Triangles, pixels, lights, enabled effects | Pixels, samples per pixel, bounce count, scene complexity |
| Global lighting | Approximated with probes and screen-space data | Emerges from tracing bounces |
| Failure mode | Artifacts: light leaks, missing off-screen reflections | Noise: grain and bright speckles called fireflies |
| Result of low quality settings | Visible approximation errors | Visible grain, which fades with more samples |
| Time per frame | Often well under a second to a few seconds | Seconds to many minutes |
The failure modes differ in kind. A rasterizer's error is systematic: more time does not fix a reflection of something that is off screen. A path tracer's error is statistical: more samples steadily reduce the grain, and given enough of them the image converges toward the correct result for the scene and settings you chose.
Edge cases and common misconceptions
Path tracing is not exact in practice. Cycles is called unbiased in principle, but its common settings add small, deliberate errors. Limiting the maximum bounce count discards light that would have arrived after more bounces. Clamping sample values removes fireflies but also dims highlights. Denoising smooths away detail. These are trade-offs you choose, covered in later chapters.
EEVEE is not a lower-quality Cycles. It uses a different algorithm and gives up some physical accuracy to gain speed. For stylized work, product shots with simple lighting, and animation, the result can be indistinguishable from a path-traced frame, or preferable because it renders in seconds.
Some light transport is hard for both. Caustics are the bright patterns formed when light focuses through glass or off water. Rasterization has no natural way to produce them. A camera-first path tracer finds them only by luck, because few random paths happen to land on the small light source, so they are noisy and slow to clean up.
What is visible to the camera is not the same as what matters. In a path tracer, an object behind the camera still affects the image if its light bounces into view. A rasterizer's screen-space effects ignore everything not on screen. Keep this in mind when an off-screen object changes the look of a Cycles render but has no effect in EEVEE.
Engine identifiers change between versions. EEVEE was reworked in Blender 4.2, and the string that names it in Python has differed across releases. Your scripts should look up the identifier in the running Blender rather than hard-coding it. That is covered in the final chapter.
You can check which engine a scene currently uses from Blender's Python console:
import bpy
print(bpy.context.scene.render.engine)What to take into the next chapters
Hold on to this model:
- EEVEE shades triangles using local data and approximations. Its settings control how good those approximations are.
- Cycles averages random light paths. Its settings control how many paths you trace, how far they travel, and how the leftover noise is cleaned up.
- Speed and artifacts follow from these two choices. You can predict where each engine will struggle by asking what information it has available at the moment it shades a pixel.
Exercise
A scene has a glossy floor that should reflect a tall statue standing just outside the camera frame. In EEVEE with only screen-space reflections, the statue is missing from the floor. In Cycles, it appears. Explain why in terms of how each engine computes the image, and say what changes in Cycles if you render the same frame with 16 samples instead of 1024.
Show answer
EEVEE's screen-space reflections can only use pixels that are already in the rendered image, so an object outside the frame has no data to reflect. Cycles traces a ray from the floor in the mirror direction in the 3D scene, so it can hit the statue even though the camera cannot see it. With 16 samples instead of 1024, the Cycles image gets visibly noisier, because each pixel averages far fewer random paths. The average is still centered on the right value. The noise is roughly eight times larger than at 1024 samples, since the noise falls with the square root of the sample count and 1024 is 64 times 16.
Exercise
In the Python script above, you want the spread to be half of what it is at 256 samples. How many samples should you use, and why?
Show answer
Use 1024 samples. The spread falls with the square root of the sample count, so halving it requires four times the samples. The output of the script confirms this: the spread at 1024 samples is about half the spread at 256.