Skip to content

[1.20.1] Add optional frame stacking for long-exposure motion blur#259

Draft
GS11566 wants to merge 1 commit intomortuusars:1.20.1-1.9-backportfrom
GS11566:1.20.1-1.9-backport-stacked-frames
Draft

[1.20.1] Add optional frame stacking for long-exposure motion blur#259
GS11566 wants to merge 1 commit intomortuusars:1.20.1-1.9-backportfrom
GS11566:1.20.1-1.9-backport-stacked-frames

Conversation

@GS11566
Copy link
Copy Markdown

@GS11566 GS11566 commented Apr 4, 2026

Summary

Adds optional frame stacking to simulate real long-exposure photography. When enabled, the camera captures multiple frames across the shutter duration and accumulates them, creating motion blur for moving subjects and proper light accumulation.

Motivation

Currently, changing shutter speed only adjusts brightness via gamma correction. Real long-exposure photography collects light over time, creating motion blur when subjects move during the exposure. This PR adds that simulation.

Related to issue #86 (motion blur suggestion).

Implementation Details

Core Changes

  • New Task: StackedScreenshotCaptureTask.java - Captures N frames across shutter duration
  • Template Update: CameraCaptureTemplate.java - Uses stacked capture if enabled
  • 1 frame per tick - Accurate timing (1" shutter = 20 ticks = 1 second at 20 TPS)
  • Exposure weighting - Each frame weighted by shutter brightness, accumulated
  • Gamma adjustment - When stacking is active, modifyGamma is skipped to prevent double-brightening

Configuration (Client-side)

Added to Config.Client:

Config Key Default Description
USE_FRAME_STACKING false Master toggle for frame stacking

Screenshots

Before (Current Behavior)

GS11566_73472

1", moving while shooting - no blur

GS11566_73841

1", standing in place

After (With Frame Stacking)

GS11566_73599

1" shutter, same movement - visible motion blur

GS11566_73894

1", standing in place, almost the same image

 1. Added client config options for camera for frame stacking
 2. Created Stacked Screenshot Capture task, responsible for capturing screenshots and accumulating them
 3. Changed Camera Capture template to work with stacked screenshots.
@GS11566 GS11566 marked this pull request as draft April 4, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant