FLASH LABReturn to the simulator

Flash Lab

A browser photography workshop for the Sony A7R V, original FE 24-70mm F2.8 GM (SEL2470GM), Godox TT685 II-S, and optional ML-CD15 dome.

Open locally

Serve this entire folder using any static web server. For example, from this folder:

python -m http.server 8765 --bind 127.0.0.1

Then open http://127.0.0.1:8765/. On Windows, Start Flash Lab.cmd starts the included serve.py helper if Python is installed. A local static server only delivers files; all simulation and image capture run in the browser. Opening index.html directly with file:// does not work because browsers restrict loading 3D assets that way.

The compiled application, libraries, human model, textures, and lighting maps are included locally. No CDN, account, API key, image service, or backend is required. Manufacturer links open the web when selected.

Start learning

  1. Choose a scene. Read Why these settings? for the reason behind every preset.
  2. The default Through camera view shows the intended photograph from the front. It includes predicted flash illumination; a real camera's normal live view cannot preview an un-fired flash this way.
  3. Read Guided Practice, above the preview, and use Set up this step. It restores the scene baseline and all prerequisites through that step, so skipping ahead or revisiting a step gives the same setup. Read why, then press Shoot or Space while focus is outside a control, link, or dialog.
  4. Shoot renders a 1200 × 800 photograph with its settings and observation prompts. The first capture of a changed setup refines separately from the working preview; an unchanged, fully refined capture is reused. Close it to return to your controls.
  5. Change one variable and shoot again. Select two gallery photographs to compare them side by side, or use Compare with previous in the photo viewer.
  6. Use Explore scene to understand light placement. Walls facing the viewer and the ceiling are cut away automatically. Drag to orbit and scroll to zoom. Panning is disabled so the subject remains easy to find.
  7. Use Inspect gear for the camera and articulated flash. Click a device screen to select its controls. Tilt, swivel, dome, and distance controls are under Position & light.

Device controls

The current restrictions and sources are recorded in CAMERA-FLASH-RULES.md. The Why these limits? panel explains camera M versus flash TTL, why A/P can behave differently, and why electronic shutter is unavailable for flash on this camera.

Rendering and scope

Detailed light uses progressive GPU path tracing, six light bounces, soft source shadows, depth of field, and a spatial denoiser. Let it refine after changing settings. Fast preview uses raster rendering, approximate bounce, and no depth of field. This is useful on slower computers. WebGL 2 is required.

The portrait combines the detailed Lee Perry-Smith face scan with a MakeHuman-derived body: modeled hands, fitted shirt and jeans, and a relaxed fixed pose. The head is centered over the torso and reduced 7% from the earlier combined model. Lowered clavicles and a refitted collar relax the shoulder line. The head and neck form one visible skin surface, with the join hidden under the shirt and the rear neck tucked inside the collar. The scanned closed lids have been adapted into relaxed open eyes with curved eye surfaces, brown irises, and a slightly off-camera gaze. Their shading and reflections respond to the scene lighting; catchlights are not painted into the eye texture. This is an authored adaptation of a scan, not a new open-eye photographic scan.

The current v4 fitting preserves the scanned throat contours and limits the stronger reshaping to the lower chest and covered back of the neck. The collar is 8 mm higher than in v3; head size and shoulder pose are unchanged. Portrait focus and its on-screen guide now use the eye position from the model, instead of a point behind the face. Depth of field remains enabled in Detailed light.

The roughly 1.80 m subject is about 53,000 triangles, five materials, and 2.80 MiB including textures. It is loaded only for portrait, event, and daylight scenes. The body and eyes are authored geometry; the renderer does not reproduce measured skin or eye optics. Equipment and scenery remain modeled approximations. See CREDITS.md for source and license details.

Only changes that affect the effective photograph reset light refinement. Menu navigation, the control lock, and unused compensation settings preserve it. Sampling batches adapt up to 32 tiles per frame, with frame-time feedback to reduce the load when interaction slows. Covered previews pause while a dialog is open, except while a photograph is being recorded.

Photographs are stored as binary JPEGs in IndexedDB, with the latest 12 retained. Earlier saved photographs remain readable. If storage is blocked, full, or unavailable, the scene still starts and a captured photograph can still be viewed and downloaded during that session. Comparisons warn when an older photograph contains the previous portrait subject.

Exposure changes, inverse-square falloff, beam direction, bounce surfaces, aperture depth of field, and ambient/flash separation are represented. TTL output, flash guide numbers at intermediate zooms, dome transmission, and HSS losses are teaching estimates. They are not calibrated measurements of a particular flash or camera firmware. Do not infer a real-world exposure solely from the simulated image.

Subjects are static. Sensor noise, subject movement, camera shake, skin subsurface scattering, flash recycle timing, and the complete Sony/Godox firmware are not reproduced. Rear sync changes timing metadata but cannot create a different motion trail for a still subject. Multi accumulates only the pulses that fit within the exposure. Menus outside the lesson controls explain their scope.

Sony specifies 1/250 s full-frame sync for Sony-manufactured flashes. This simulator uses that as its normal-sync teaching limit with the Godox. Confirm actual third-party behavior on your gear.

ML-CD15 learning approximation

The dome is represented fully expanded at 15 cm across. A shared size definition controls its visible shape and the emitting area. Twelve circular area lights approximate a curved, outward-emitting surface with a forward bias. The flash head's tilt and swivel move and orient this source.

At a fixed manual output and flash zoom, the patches redistribute 65% of the modeled bare beam's total energy. This transmission value and the directional brightness profile are explicit assumptions, not Godox measurements. The model does not add an extra point light to brighten the room. Detailed light obtains reflections from the actual modeled surfaces; its TTL estimate uses the same directional profile plus a simplified room-return estimate. Real TTL preflash metering is not reproduced.

Use Detailed light to compare shadow edges, highlights, and reflected fill. Fast preview approximates the area lights without their soft cast shadows or room reflections. In either mode, the images illustrate lighting choices rather than predict a measured exposure from this particular flash and diffuser.

The teaching caveat appears beside the dome control, in relevant guided lessons, on the flash panel while the dome is selected, and with dome photographs. For a useful exercise, keep manual output fixed for a bare/dome pair, then repeat with TTL and observe its estimated power demand. Moving closer increases the dome's apparent size. Outdoor spill is less likely to return from nearby surfaces. Folded dome configurations are not simulated.

See DOME-MODEL-REVIEW.md for the assumptions and the historical issue this revision addresses.

Photographs

Captures are 1200 x 800 JPEGs with a settings snapshot and rendered-image histogram. They remain local in IndexedDB on this browser origin. The latest 12 are kept. Download images you want to retain. A different browser, port, hostname, or Cloudflare URL has separate storage. Clearing browser site data removes the saved photographs.

New captures record the lighting model version. Existing photographs remain available and are identified as using the earlier model; retake them for comparisons with the revised lighting.

Cloudflare deployment

All graphics run in the visitor's browser. Cloudflare delivers the files; deployment flags do not move rendering onto a Cloudflare GPU. The application bundle is already minified.

Run these commands from the folder containing package.json:

npm ci
npm run build

The build creates dist/ automatically, containing only the website, active 3D assets, licenses, and readable HTML help pages. It checks every file against the 25 MiB static-asset limit. JavaScript, CSS, models, textures, and HDR filenames include content hashes and a one-year immutable cache policy. HTML is revalidated so new deployments can reference new versions. Unused vendor PDFs and original standalone face files stay in the repository and are omitted from deployment; official manual links remain in the help pages. Do not upload node_modules/, development tools, or the whole working directory. The optional portrait-authoring script is not run by Cloudflare.

Existing Workers deployment

For the existing flashlab.mcrowlegroves.workers.dev deployment, use:

This is Cloudflare Workers static hosting. The earlier copy command selected the necessary runtime files correctly, but omitted the Markdown documents linked from the simulator. The new build includes them. No extra server script or paid rendering service is needed.

Cloudflare Pages alternative

For a Pages project connected to Git, use build command npm run build and build output directory dist. Pages performs the deployment; it does not need the Workers deploy command above. For direct upload, upload the contents of the generated dist/ folder.

Shared links

The homepage includes Open Graph and Twitter Card metadata directly in its HTML, so Slack and other link-preview services can read the title, description and image without executing the simulator. The 1200 × 630 PNG is assets/flashlab-social.png; its editable artwork is tools/social-preview.svg. It is only referenced in sharing metadata, not loaded into the 3D scene. The build fingerprints the image and updates both absolute preview URLs to match.

If the public hostname changes, update the canonical URL, og:url, and both image URLs in index.html. Slack documents a roughly 30-minute preview cache, so a previously shared URL may retain its old appearance for a while.

Performance

Detailed light progressively refines the photograph on the local GPU. Fast preview is useful for rough framing, while Detailed light is needed to assess dome shadows and reflected fill. An unchanged, fully refined capture is reused by Shoot. The first capture of a changed setup renders separately at 1200 × 800, regardless of the preview size. Inactive lights are excluded from light sampling, and returning from Explore reuses the scene geometry. The exposure model, dome energy assumptions, and six reflection bounces are unchanged.

The opening portrait loads five scene assets in parallel (about 6.3 MiB). This is larger than the earlier face-only model and procedural body (4.18 MiB), because the complete subject includes clothing, body, and eye textures. Outdoor textures load when their scene is selected, and studio lighting loads when inspecting the gear. Loaded resources are reused during this visit; switching scenes rapidly cannot apply a stale load result.

Rendering adaptively batches up to 32 tiles and backs off when either the batch or frame interval takes too long. Sampling continues each animation frame, while the expensive display filter and composite run at up to 30 updates per second, plus the final sample target. Capture frames are always composited before recording. The first 16 samples use a fast approximate image while detailed lighting begins, avoiding the sparsest initial tracing noise. That unchanged fallback image is drawn once per setup instead of repeatedly rendering its shadows.

Device canvases repaint only when their displayed values change; hidden panels and texture uploads are deferred until needed. Slider UI updates are combined per animation frame. In an already prepared scene, detailed-renderer updates wait for a 120 ms pause in photographic adjustments, with an Applying settings label and the previous image retained. Shoot immediately applies the latest settings. Changes that do not affect the photograph, such as control lock, preserve refinement.

The displayed image uses an edge-aware HDR noise filter with an isolated-outlier guide adjusted for dark exposures. Its smoothing radius and color tolerance decrease as samples accumulate, retaining more fine detail. Indirect-light setups keep stronger filtering. These changes leave sample budgets, image resolution, flash energy and bounce depth unchanged. They reduce repeated work by inspection; a new Firefox timing comparison has not been performed.

Detailed previews start with 768 samples, or 1536 for dome, bounce, and indoor available-light setups. Refine more doubles the target, up to 6144 samples, and continues the existing accumulation without changing camera settings or restarting the image. New photographic settings reset the extra refinement. Shoot uses the selected target for its full-size capture. These are sample budgets, not measured noise or convergence guarantees: extra cleanup takes longer, and some rendering grain can remain. It does not simulate Sony sensor noise. Refinement pauses when the preview is scrolled offscreen, except while recording a photograph.

Shoot refines its own full-size image to the sample target. If rendering exceeds 30 seconds after reaching at least 128 samples, it records the available image and labels the incomplete refinement in the photograph notes. There is also a 60-second absolute deadline independent of sample count, covering encoding as well as rendering. Cancel or Escape releases the controls. Hiding the tab cancels the pending capture with an explanation. Context loss also releases the controls and asks for a reload. The display filter can soften very fine highlights; it does not change the modeled flash power or spread.

If Firefox is unusually slow, inspect about:support → Graphics → WebGL 2 Driver Renderer. A named hardware GPU indicates hardware WebGL; software renderers require a different diagnosis. Initial loading, shader preparation, navigation, and photograph refinement are separate stages. Compare browsers on the same device before attributing a difference to hosting. Optional ?diagnostics=1 logs asset preparation, scene builds, participating light counts, sampling milestones, completed refinement, and capture timings to the browser console without uploading data. These timings include pauses if the preview is scrolled offscreen or the tab is hidden.

Official references: Workers static deployment, Pages build configuration, and Firefox graphics troubleshooting.

Source and rebuild

Readable source is in src/. A compiled bundle is included, so Node is unnecessary for normal use. To modify and rebuild:

npm ci
npm run build

Node 20 or newer is required to rebuild. npm run format formats source files; deployment bundles remain minified. package-lock.json pins the installed dependency tree, including the explicitly declared xatlas-web peer. The existing rendering versions are retained for this release; upgrading Three.js and the path tracer together remains a separate compatibility task. Marked and Prettier are build/development tools and are not sent to the browser.

Manufacturer references

Asset and software attribution is in CREDITS.md.