Skip to content

Arena 3D Viewer: True fisheye shader for fly eye simulation #9

@mbreiser

Description

@mbreiser

Summary

Implement a true fisheye/barrel distortion shader to better simulate what a fly sees from the center of the arena.

Background

The current FOV slider adjusts the camera's perspective FOV up to 170°, but this doesn't produce the barrel distortion characteristic of wide-angle/fisheye lenses or compound eyes.

Proposed Implementation

  • Add a separate "True Fly Eye" toggle or control (distinct from FOV slider)
  • Implement post-processing shader with barrel distortion
  • Target FOV: ~270° horizontal, ~180° vertical (matching fly compound eye coverage)
  • Keep as experimental feature to evaluate usefulness

Technical Approach

Options to explore:

  1. Three.js post-processing with custom fisheye shader
  2. Cubemap rendering with equirectangular projection
  3. Existing fisheye shader libraries

Acceptance Criteria

  • Separate control for true fisheye mode
  • Barrel distortion visible at edges
  • Reasonable performance (may need to reduce LED count or use LOD)
  • Easy to toggle on/off for comparison

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions