{"id":47667826,"url":"https://github.com/sidp/physical-camera","last_synced_at":"2026-04-02T12:03:38.660Z","repository":{"id":339171338,"uuid":"1160768092","full_name":"sidp/physical-camera","owner":"sidp","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-26T16:21:29.000Z","size":1050,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-26T20:31:44.949Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sidp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T10:52:36.000Z","updated_at":"2026-02-26T15:23:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sidp/physical-camera","commit_stats":null,"previous_names":["sidp/physical-camera"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sidp/physical-camera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidp%2Fphysical-camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidp%2Fphysical-camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidp%2Fphysical-camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidp%2Fphysical-camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidp","download_url":"https://codeload.github.com/sidp/physical-camera/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidp%2Fphysical-camera/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-02T12:03:37.940Z","updated_at":"2026-04-02T12:03:38.647Z","avatar_url":"https://github.com/sidp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Physical Camera\n\nA Blender extension that replaces Blender's built-in camera with a physically-based lens simulation. Rays are traced through real lens prescriptions to produce realistic depth of field, bokeh shapes, chromatic aberration, and vignetting.\n\n## Features\n\n- Sequential ray tracing through multi-element lens designs\n- Spherical, aspheric, and cylindrical surface types\n- Anamorphic lens support with dual-axis ABCD optics and elliptical bokeh\n- Fresnel transmission loss with single/multi coating models and natural vignetting\n- Spectral chromatic aberration (400-700nm continuous sampling)\n- Variable element spacing for internal focusing (when patent data is available)\n- Polygonal aperture blades with adjustable rotation\n- Focus distance driven by Blender's camera settings\n- Debug visualization modes for diagnosing ray behavior\n\n## Requirements\n\n- Blender 4.5 or later\n- Cycles render engine with OSL enabled\n- CPU or OptiX rendering (OSL cameras are not supported on CUDA, HIP, or Metal)\n\n## Installation\n\n1. Download or clone this repository\n2. In Blender, go to Edit \u003e Preferences \u003e Add-ons \u003e Install from Disk\n3. Select the `addon` directory\n\n## Usage\n\n1. Select a camera in your scene\n2. Open the Camera Properties panel\n3. In the \"Physical Lens\" panel, click \"Enable Physical Lens\"\n4. Choose a lens and adjust settings:\n   - **Lens** — select from available lens prescriptions\n   - **f-stop** — aperture size (clamped to the lens's maximum)\n   - **Aperture Blades** — 0 for circular, 3+ for polygonal bokeh\n   - **Blade Rotation** — rotate the aperture shape\n   - **Chromatic Aberration** — toggle spectral dispersion\n   - **Debug Mode** — Normal, Pinhole, Diagnostic (failure visualization), or Exit Direction\n\nFocus distance is controlled through Blender's standard camera Depth of Field settings.\n\n## Included Lenses\n\n- Canon RF 85mm f/1.2L USM (aspheric, internal focusing)\n- Cooke Triplet 50mm f/4.5\n- Double Gauss 50mm f/2\n- Double Gauss 100mm f/1.7\n- Mamiya 55mm f/2.8 N (medium format)\n- Mamiya 150mm f/4 Soft (medium format, soft focus)\n- Navarro Anamorphic 2x Cinema (anamorphic, aspheric)\n- Neil Front Anamorphic 2x Cinema (anamorphic, internal focusing)\n- Nikkor AI AF Fisheye 16mm f/2.8D (internal focusing)\n- Petzval 85mm f/2.4\n- Sonnar 50mm f/1.5\n- Tessar 50mm f/2.8\n- Zeiss Distagon 35mm f/4\n- Zeiss Planar 80mm f/2.8 (medium format)\n- Zuiko 18mm f/3.5 (internal focusing)\n\n## Adding a Lens\n\nCreate a `.toml` file in `addon/lenses/` with the following format:\n\n```toml\n[lens]\nname = \"Lens Name\"\nfocal_length = 50.0\nmax_fstop = 2.0\ncoating = \"multi\"  # \"none\", \"single\", or \"multi\"\n\n[[surface]]\nradius = 29.475\nthickness = 3.76\nior = 1.67\naperture = 25.2\nabbe_v = 57.0\n\n[[surface]]\ntype = \"stop\"\nradius = 0\nthickness = 2.5\nior = 1.0\naperture = 20.0\nabbe_v = 0.0\n\n# ... more surfaces\n```\n\nSurfaces are listed front-to-back (scene-side to sensor-side). All dimensions are in millimeters. The aperture stop must have `type = \"stop\"` with `radius = 0` and `ior = 1.0`. Aspheric surfaces use `type = \"aspheric\"` with `conic` and `aspheric_coeffs` fields. Cylindrical surfaces for anamorphic lenses use `type = \"cylindrical_x\"` or `type = \"cylindrical_y\"`.\n\nAfter adding a lens, regenerate diagram previews: `uv run scripts/build_diagrams.py`\n\nSee `CLAUDE.md` for details on variable element spacing, aspheric coefficients, and cylindrical surface conventions.\n\n## License\n\nGPL-3.0-or-later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidp%2Fphysical-camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidp%2Fphysical-camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidp%2Fphysical-camera/lists"}