Skip to content

Feature #52: Increase MAX_SNAPSHOT_IMAGE_SIZE to 32768 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

williamweaver
Copy link
Member

This PR implements Feature Request #52, increasing the MAX_SNAPSHOT_IMAGE_SIZE constant in llviewerwindow.h from 8192 to 32768.

Purpose:
To allow users, particularly virtual photographers, to capture snapshots at extremely high resolutions (up to 32768x32768 pixels) for purposes such as large prints or detailed post-processing.

Commit Included:

  • The single commit on this branch increases MAX_SNAPSHOT_IMAGE_SIZE.

Important Considerations & Risks (as detailed in Issue #52):

  • Extreme Memory Consumption: Snapshots at maximum resolution will require significant VRAM and system RAM (approx. 4GB for the framebuffer at 32k RGBA, plus overhead).
  • High Stability Risk: Crashes, system slowdowns, and out-of-memory errors are highly probable when attempting to use resolutions near the new limit, especially on systems not equipped with top-tier GPUs and abundant RAM.
  • Performance: Snapshot generation will be slow at these sizes.
  • Hardware Limits: GPU hardware may have its own render target dimension limits.

USER DISCLAIMER:
This is an experimental feature intended for advanced users with very high-end hardware. Users attempting to render snapshots at extreme resolutions (approaching 32768x32768) do so ENTIRELY AT THEIR OWN RISK. Aperture Viewer development is not responsible for any viewer crashes, system instability, data loss that may occur or any other software or hardware consequence. It is strongly advised to save all work and test with incrementally larger resolutions.

Testing Performed by Committer (Locally on this branch):

  • Viewer compiled successfully with the new constant.
  • Snapshot UI ("Save to Disk" floater) allows input of dimensions up to 32768.
  • Basic snapshot functionality confirmed at moderately high resolutions (below the new maximum) on a capable system.

Further Testing Required (On this branch, before merging to dev):

  • Systematic testing of snapshot stability at various large dimensions (e.g., 12k, 16k, 24k, 32k) on high-end hardware (e.g., RTX 3090/4090).
  • Document the practical stable limits observed on test hardware.
  • Verify image integrity of successfully captured ultra-high-resolution snapshots.
  • Communicate the risks and experimental nature clearly to any testers.

Related Issue: Closes #52

This commit increases the MAX_SNAPSHOT_IMAGE_SIZE constant in llviewerwindow.h from 8192 to 32768 (2^15). This change addresses user requests for the ability to capture snapshots at extremely high resolutions, primarily for virtual photography and large-format printing, as outlined in Issue #52.

**Motivation:**
To provide advanced users and virtual photographers with the capability to generate ultra-high-resolution imagery within Aperture Viewer.

**Risks and Considerations:**
- **High Memory Usage:** Rendering at resolutions approaching 32768x32768 will consume substantial VRAM and system RAM (approx. 4GB for the framebuffer alone at 32k RGBA, plus viewer/OS overhead).
- **Stability Concerns:** There is a significant risk of viewer crashes, system slowdowns, or out-of-memory errors, especially on systems not equipped with high-end GPUs and ample RAM. The previous limit of 8192 (originally 8096) was set due to observed instability at higher values.
- **Performance Impact:** Snapshot generation at these sizes will be very time-consuming.
- **Hardware Limitations:** Individual GPU capabilities may impose lower practical or hard limits on render target dimensions.

**Disclaimer:**
This feature is considered experimental. Users attempting to utilize snapshot dimensions near the new maximum do so entirely at their own risk. Aperture Viewer development is not responsible for any resulting viewer crashes or system instability. It is highly recommended to save all work before attempting such snapshots and to test incrementally.

**Testing (Initial by Committer):**
- Snapshot UI (e.g., "Save to Disk" floater) correctly reflects the new maximum allowable dimension when custom size is selected.
- Basic snapshot functionality tested at moderate high resolutions (e.g., 10240x10240) on a capable system to ensure the mechanism isn't immediately broken by the constant change itself.

Further extensive testing regarding stability limits across different hardware and scenarios is required on this branch as outlined in Issue #52.

Related: #52
@williamweaver williamweaver requested a review from a team May 29, 2025 12:04
@williamweaver williamweaver self-assigned this May 29, 2025
@williamweaver williamweaver added the enhancement New feature or request label May 29, 2025
@J1234-321
Copy link
Collaborator

J1234-321 commented May 29, 2025

Test Case ID: REG-PR53-HIRES-SNAPSHOT-VERIFICATION
PR Reference: #53 (Increase MAX_SNAPSHOT_IMAGE_SIZE to 32768)
Feature Request: #52
Objective:
Verify that Aperture Viewer can attempt to capture snapshots at resolutions up to the new 32768-pixel limit, assess viewer stability during these attempts, and check the integrity of any successfully saved high-resolution images.

Test Category: Functional, Stress, Performance, Visual Fidelity

Preconditions:

  1. Aperture Viewer build from PR Feature #52: Increase MAX_SNAPSHOT_IMAGE_SIZE to 32768 #53 (or branch containing these changes) is installed.
  2. User is logged into a visually detailed scene.
  3. Increase FPS to maximum
    
  4. EXTREME CAUTION ADVISED: Tester acknowledges the high risk of viewer crashes, system slowdowns, or out-of-memory errors, especially at resolutions approaching 32K. This test is best performed on high-end hardware (e.g., RTX 3090/4090 or equivalent, with ample RAM/VRAM). Proceed at your own risk. Save all work before testing.
  5. Sufficient disk space for potentially very large image files.
  6. Hardware monitoring tools (VRAM, RAM, GPU load) are active.
    Steps:
  7. Open Snapshot UI: Access "Snapshot to Disk".
  8. Incremental Resolution Testing: Attempt to capture and save snapshots (e.g., PNG format, UI off) at the following target widths (maintaining a consistent aspect ratio, e.g., 16:9 for height calculation):
    o a) ~8192 (confirm old limit behavior or new stability)
    o b) 12288 (12K)
    o c) 16384 (16K)
    o d) 24576 (24K)
    o e) 30720 or 32768 (32K - attempt if system is very high-end and stable at lower resolutions)
  9. For each successful capture:
    o Note time taken.
    o Verify saved image dimensions match requested.
    o Briefly inspect image for content correctness and major artifacts (full pixel-peeping may be impractical for 32K).
  10. Monitor & Document:
    o Viewer stability (crashes, freezes, recovery).
    o Peak VRAM/RAM usage during capture.
    o Any error messages in UI or ApertureViewer.log.
    o The highest resolution successfully and stably captured on the test hardware.
    Expected Results:
  11. The snapshot UI accepts dimensions up to 32768.
  12. At each tested resolution (up to the practical limit of the test hardware):
    o The viewer attempts the capture. Temporary unresponsiveness is expected at very high resolutions.
    o If successful: An image file is saved with correct dimensions and content, free of major corruption.
    o If unsuccessful (crash/OOM/GPU error): The viewer may crash or fail to save. This outcome, especially at extreme resolutions, should be documented along with system state/logs. The viewer should not cause OS-level instability beyond its own process if possible.
  13. VRAM/RAM usage will be very high for large snapshots and should recover after capture.
  14. The practical stable resolution limit on the test hardware is identified.
    Notes for QA:
    • VOLUNTARY & AT YOUR OWN RISK for resolutions >12K. Prioritize system stability.
    • Start with lower "high" resolutions and incrementally increase.
    • If the viewer crashes, note the resolution attempted and provide logs/system specs.
    • The goal is to find the practical limits and ensure graceful failure or success, not necessarily to achieve 32K on all hardware.

@J1234-321
Copy link
Collaborator

Eira Juliesse Findings:
CPU: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (3600.01 MHz)
Memory: 16301 MB (Used: 7537 MB)
Concurrency: 16
OS Version: Microsoft Windows 11 64-bit (Build 26100.4061)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Graphics Card Memory: 11264 MB
Graphics Card Memory (Detected): 11264 MB
Graphics Card Memory (Budget): Unlimited
Windows Graphics Driver Version: 32.0.15.7602
OpenGL Version: 4.6.0 NVIDIA 576.02

Preset Used: Screen Space Reflections

8192 x 4367 snapshot resolution

  1. Timing: ~10 sec
  2. File Dimensions: 8192x4367
  3. Image Faults: no visible image faults

12287 x 6550 snapshot resolution

  1. Initial attempt, user was logged out of sl. Reviewing the logs the fps had dropped down to 0 while the viewer was attempting to generate the preview.
  2. Increased fps limit from the default of 30 to 360
  3. Increased snapshot width to 12287 w/ constrained proportions
  4. Viewer updated preview to 12287 x 6550
  5. Was able to save the snap
  6. File Dimensions: 12288x6550
  7. Image Faults: no visible image faults

16384 width snapshot resolution

  1. Increased snapshot width to 16384
  2. Viewer closes (x2)
  3. Lowered preset to Essentials
  4. Set the snapshot width to 16384 w/ constrained proportions
  5. Instead of crashing when it tries to set the height to 8734, the viewer is just locked up.
  6. The Aperture Viewer.log has this error repeating 2025-05-30T12:44:49Z WARNING # llimage/llimage.cpp(705) LLImageBase::allocateData : LLImageBase::allocateData: bad size: 429293568

Observations:

  1. User might want to consider increasing their fps limits before taking high rez snapshots
  2. The lower the preset the larger the image can be taken
  3. Dev investigation into the bad size error message. 429293568=429.29mb?

@J1234-321
Copy link
Collaborator

Eira Juliesse Findings:
CPU: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (3600.01 MHz)
Memory: 16301 MB (Used: 7537 MB)
Concurrency: 16
OS Version: Microsoft Windows 11 64-bit (Build 26100.4061)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Graphics Card Memory: 11264 MB
Graphics Card Memory (Detected): 11264 MB
Graphics Card Memory (Budget): Unlimited
Windows Graphics Driver Version: 32.0.15.7602
OpenGL Version: 4.6.0 NVIDIA 576.02

Preconditions
Turned off fps limiting and limit by vsync

PR: Feature #52: Increase MAX_SNAPSHOT_IMAGE_SIZE to 32768 #53

10240x5404

  1. Preset Basic HDR & Effects
  • ~15 secs to update preview
  • Saved image and it had correct dimensions and no bad pixels
  • Image file size: 65 mb
  1. Preset Shadows
  • ~30 secs to update preview
  • Saved image and it was correct dimensions and no bad pixels
  • Image file size: 60 mb
    3.Preset Ambient Occlusion
  • ~ 20 secs to update preview
  • Saved image and it had correct dimensions and no bad pixels
  • Image file size: 66.4 mb
  1. Preset SSR
  • ~ 16 secs to update preview
  • Saved image and it had correct dimensions and no bad pixels
  • Image file size: 66.6 mb
  1. Preset Depth of Field
  • ~ 24 secs to update preview
  • Saved image and it had correct dimensions and no bad pixels
  • Image file size: 34.9 mb
  1. Preset Mirrors
  • ~ 18 secs to update preview
  • Saved image and it had correct dimensions and no bad pixels
  • Image file size: 31.7 mb
  1. Preset Eye Candy without mirrors
  • 1st attempt: User was logged out of the grid
  • 2nd attempt: 32 sec to update preview
  • 3rd attempt to save caused logout, forgotten to remove fps limits
  • 4th attempt: fps limits removed, viewer crashed when trying to refresh the preview.

Copy link
Collaborator

@J1234-321 J1234-321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Aperture Viewer.log has this error repeating 2025-05-30T12:44:49Z WARNING # llimage/llimage.cpp(705) LLImageBase::allocateData : LLImageBase::allocateData: bad size: 429293568

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Increase MAX_SNAPSHOT_IMAGE_SIZE to 32768 for Extreme Resolution Snapshots
2 participants