Home Examples Screenshots User manual Bluesky logo
OghmaNano Simulate organic/Perovskite Solar Cells, OFETs, and OLEDs DOWNLOAD

200 mm Prime Lens Tutorial (Part B): Ray Anatomy and Vignetting Checks

1. Introduction

Synthetic photorealistic rendering of a vintage photographic lens aperture showing blade geometry at different openings.
In a photographic lens, the aperture is formed by a set of overlapping metal blades that open and close to control how much light enters the optical system. This diagram shows the same aperture at several different settings, from fully open to nearly closed, illustrating how the blade geometry changes as the lens is stopped down.

A camera lens controls how much light enters the optical system using an aperture (also called the aperture stop), a variable opening formed by overlapping metal blades. Figure (??) shows a photographic-style aperture at several settings, from fully open to nearly closed. As the aperture closes, the opening becomes smaller and its shape is increasingly defined by the blade geometry. This directly affects which rays are allowed to pass through the lens and reach the detector.

Opening the aperture wide allows more light to enter the optical system, producing a brighter image. However, in this configuration many rays pass through the outer regions of the lens, where aberrations are typically strongest, leading to increased distortion and reduced sharpness. Stopping down the aperture restricts rays to the central part of the lens, which generally produces a sharper image, but at the cost of reduced brightness. In practice, this creates a trade-off between a bright image with lower sharpness and a darker image with improved clarity.

In this part we build a practical pre-metric workflow, using only the 3D ray paths and the detector image, to answer three questions by eye: (i) where the stop is and which rays it admits, (ii) how paraxial (chief) rays differ from marginal rays, and (iii) whether clipping or vignetting is present that will compromise off-axis performance.


2. Find the stop and confirm it is open

In the 3D view, locate the stop/aperture object (typically a plate with a circular opening). Rotate the scene so you can see rays approaching and passing through the stop (??). This stop is the quickest place to understand how much light the lens can actually deliver to the image. Although all optical elements before the stop are illuminated, only rays that pass through the aperture stop are allowed to propagate through the rest of the system and reach the detector. In optical terms, the stop defines the system’s entrance pupil and therefore its numerical aperture.

3D view showing the aperture stop: reducing its diameter rejects marginal rays so less light reaches the image plane.
The stop/aperture limits the accepted cone of rays. If you change its diameter, the first visible effect is that less light reaches the detector — and the rejected rays are usually the most distorted marginal rays.
Aperture mesh editor where d0 is reduced to begin clipping the beam.
Editing the aperture: reduce d0 until you can see the stop start to clip the beam (a good “by eye” setting is where you reject roughly half the rays for an edge-of-pupil test).

If the stop is currently closed so that no light can pass through, right-click on the stop object and select Mesh editor (??). This opens the aperture mesh editor shown in the figure. In this editor, the parameter d0 controls the diameter of the clear opening. Increasing d0 enlarges the hole and allows more rays to pass; decreasing it stops the system down. As a practical starting point, set d0 to a value of about 0.035, or just below the value of d1, which defines the outer radius of the square aperture.

Checkpoint


2. Compare paraxial, chief, and marginal ray bundles

The fastest way to "read" a lens is to compare how light behaves when going through the centre of the lens (a near-axis bundle) to how light behaves when it enters the system near the edge of the lens. In optics language we are comparing the paraxial (or chief-ray behaviour) against an edge-of-pupil bundle (or marginal-ray behaviour). Generally, rays that pass close to the centre of the lens (close to the optical axis) are less distorted than rays that enter through the edge of the lens. This is because rays that enter near the edge of the lens have to be bent more to bring them onto the optical axis. You will do two runs that differ only in where the beam enters the front of the lens. Start with the baseline on-axis case: place the beam in the centre of the simulation window and click run. The light should pass cleanly through the system and form a compact footprint on the detector (??). In classical optics language, this near-axis bundle represents chief-ray (paraxial) behaviour.

Beam placed centrally: rays go straight through the system to the image plane.
Central (paraxial) bundle: the clean reference case.
Beam moved to the bottom edge of the lens stack: rays are refracted through the system to the image plane.
Edge-of-pupil bundle (side view): rays now sample the outer zones of the optics.
Top view with beam moved to the side: the beam propagates through the lens stack and reaches the image plane.
Edge-of-pupil bundle (top view): same test viewed from above.

Next, translate the source so the beam enters near the edge of the first element, without changing the beam direction. This is called the marginal case, where the rays enter near the edge of the pupil. In this tutorial, you use two views of the same idea: a side view (??) and a top view (??).

These marginal rays pass near the edge of the pupil (far from the center of the optical axis) and therefore sample the most strongly aberrated regions of the optics. You are not trying to be textbook perfect here - you are simply forcing the model to show you how different ray families behave. After each run, open detector0/RAY_image.csv and compare the footprints. The central (chief-ray) bundle should typically appear compact and symmetric, while marginal rays are where asymmetry, smear, and clipping usually appear first.


3. Diagnose clipping and vignetting by eye

Example of optical vignetting: brightness falls off toward the edges of the image.
Example of vignetting: light intensity falls off toward the edges of the image.

When the aperture is closed to obtain a sharper, more point-like image, a common by-product can be reduced light around the edges of the image, this is called Vignetting an example can be seen in. (??). Clipping refers to the case when rays are physically blocked by an aperture or lens edge and fail to reach the detector. Both effects are easiest to reveal when you give the rays a small field angle. In OghmaNano this is typically done using a rotation parameter such as Rotate Phi in the light source editor. To edit the light source, right-click the light source and select Edit object (??). This opens the light source editor where you can set Rotate Phi (for example to 8°) (??).

With Rotate Phi set, place the angled beam in the centre of the lens stack and run again (??). You should now see the beam propagate through the system with a controlled tilt, which makes it much easier to spot where rays are being rejected.

Right click on the light source and choose Edit object.
Right-click the source and choose Edit object.
Light source editor: Rotate Phi set to 8 degrees to angle the beam down.
Set Rotate Phi (e.g. 8°) to introduce a small field angle.
Angled beam placed in the centre of the lens stack: the beam propagates through the optics and reaches the image plane.
Field-angle case (beam tilted down): keep the beam centred for this first angled run so you can interpret what you see.

For the next run, turn off the solid rendering of the lenses so you can see ray paths inside the glass. Right-click a lens, go to View, and unselect Show solid (??). Then rerun (or just inspect the existing rays) and study how the bundle is steered surface-by-surface (??).

Right click on a lens and disable Show solid to see through the lens stack.
Disable Show solid so you can see ray paths through the interior of the optics.
Angled beam with solids hidden: the ray bundle can be followed through the lens stack to the detector.
With solids hidden, you can “read” the design: where bending is gentle, where it is strong, and where clipping begins.

Now repeat the same inspection for an edge-of-pupil placement (as in Section 2), but keep the same field angle. This combination (field angle + marginal rays) is where vignetting shows up first. If rays disappear, your task is to identify where they are rejected: the stop itself, a mechanical barrel, or a clear-aperture limit of a lens element.

What you can now do (Part B)

Rule of thumb — where problems show up first
  • Marginal rays reveal aberrations and clipping before near-axis rays.
  • Small field angles reveal vignetting before the on-axis case does.
  • Hard edges in the footprint usually indicate clipping; smooth falloff usually indicates vignetting.
  • If you change more than one thing at once, you lose the ability to attribute the cause.
  • Do not optimise a lens until these basic checks behave in a way you can explain.

👉 Next step: Continue to Part C, where we will compare the Cooke Triplet and the modern 200 mm prime.