Blender Optics Simulator

io.github.emircbngl由 GitHub 帳號 emircbngl 發布v0.24.4更新於 Oct 24, 2026

Build, align & render a real optical bench in Blender; drivable by an AI agent over MCP.

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

讓助理透過本機橋接讀取並操作 Blender 光學平台:放置光學元件、追跡光束、對準支架並算圖。

可以做什麼
此外掛透過本機橋接把 Blender 場景的完整光學狀態以 JSON 形式暴露出來,MCP 伺服器讓代理讀取該狀態並對其操作。工具包括 get_state、set_param、place_relative、set_dof、align_element、ao_close_loop 與 render。引擎可追跡光線與高斯光束,涵蓋偏振、色散與干涉,把元件裝在真實光機件上,並以 Cycles 或 EEVEE 算圖。
適用情境
當你希望助理在 Blender 中搭建、檢查或對準光學裝置,而不是憑猜測處理幾何時使用,例如重現 Michelson 或 Mach-Zehnder 等範例平台、調整支架直到光束正確落點,或閉合自適應光學迴路。
執行需求
需要 Blender 4.2 LTS 或更新版本並安裝此外掛,並從 Optics 面板啟動 MCP 橋接。伺服器以本機程序執行,連接外掛的本機橋接,由環境變數 OPTICS_BRIDGE_HOST 與 OPTICS_BRIDGE_PORT 設定。僅限桌面端;未宣告身分驗證。
安裝前請注意
此橋接是本機 TCP 端點,會把整個場景狀態暴露為可讀可寫,因此任何能存取該埠的程序都能改動平台。set_param、set_dof、align_element 與 render 等工具會寫入場景並重新追跡。透過一鍵頁面安裝外掛會訂閱更新,並需要在 Blender 偏好設定中啟用線上存取。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Blender Optics Simulator,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Blender Optics Simulator

[CI] [Release] [License: GPL-3.0-or-later] [Blender 4.2+] [DOI]

An optical bench you lay out in Blender, trace with real optics, and can hand to an AI agent.

Place lasers, mirrors, lenses, waveplates, gratings, crystals and detectors in 3-D. A live engine traces the beam through them — rays, Gaussian beams, polarization, dispersion — mounts everything on real opto-mechanics, and renders it in Cycles. The whole optical state is readable and writable over a localhost MCP bridge, so an agent works from measured geometry instead of guesses.

[Sixteen-second tour: a green beam through the add-on's optomechanics, ending on the project title]

Sixteen seconds, rendered from a scene the add-on built. Full-quality MP4.

[A Michelson interferometer on a tapped breadboard, built and traced in Blender: kinematic mounts, posts and bases, both arms' beams glowing, rendered in Cycles]


Install

Requires Blender 4.2 LTS or newer (4.2+ / 5.x).

One-click, keeps itself updated. Open the install page and drag the “⤓ Drag this into Blender to install” button onto an open Blender window. That installs the add-on and subscribes you to updates in one gesture. Turn on Edit ▸ Preferences ▸ System ▸ Network ▸ Allow Online Access first.

From a zip. Download optical_alignment_sim-<version>.zip from Releases and use Edit ▸ Preferences ▸ Add-ons ▸ Install from Disk…. Updates then come from the add-on's own Updates panel.

Open the Optics tab in the 3-D viewport sidebar (press N).

Quick start

  1. Setup ▸ Browse Examples… — pick Michelson to get a complete bench.
  2. Simulate ▸ Trace — press Live. Move any part and the beam follows.
  3. Setup ▸ Element — select an optic and change what it is: focal length, glass, coating, wavelength. Expand More for the rest.
  4. Place ▸ Mount & Adjustment — put it on a real mount and turn the knobs, with − / + steps.
  5. Inspect ▸ Optical Report — read power, polarization, path length and alignment error per detector; Align All walks the mounts until the beam lands where it should.

Headless, the same thing from Python:

python
import optics_api                                  # inside Blender: blender -b --python your.pyoptics_api.build_example("michelson")              # a full bench in one calloptics_api.set_mount("MI_M_fixed", "KM100")        # put a mirror on a kinematic mountoptics_api.set_dof("MI_M_fixed", "TIP", steps=40)  # turn a knob: the beam walks offoptics_api.align_element("MI_M_fixed")             # and back: 2.51 -> 0.0012 mradprint(optics_api.inspect_beam("MI_D"))             # power, w(z), polarization, coherence

examples/ holds runnable scripts: michelson.py, mach_zehnder.py, agent_align.py, bell_entanglement.py, hong_ou_mandel.py.

What it does

  • Traces a real beam. Ray paths plus Gaussian-beam propagation, Jones/Stokes polarization, Fresnel losses, dispersion, nonlinear conversion, interference and wavefront error. → what is modelled, and what is not
  • 35 element types, 26 one-click benches. Mirrors through OPAs, prisms, gratings, crystals, spectrometers, adaptive optics. → element reference · full feature list
  • Mounts on real hardware. Kinematic mounts, posts, cage systems, lens tubes and rails, with mechanical limits and collision checks. → hardware
  • Measures like a bench. Detector power and polarization, beam profiles, path length, group delay and GDD, spectra, wavefront sensors. → dispersion, cylinders and spectra
  • Aligns itself. Influence-matrix solvers walk the mounts: re-centre a beam, null a tilt, close an adaptive-optics loop.
  • Renders what you built. Cycles/EEVEE with detailed optomechanics, animation renders, and SVG schematics. → how beams are drawn

[A beam steered by a kinematic mirror lands off the detector centre, then auto-alignment walks the mount until it is re-centred]

A mirror knocked 2° out of alignment, then one align_element() call: pointing residual 7.02 → 0.0008 mrad. examples/agent_align.py reproduces it headlessly.

Drive it with an AI agent

The add-on exposes its full state as JSON over a localhost bridge and ships an MCP server, so an agent can read the bench and act on it:

text
get_state()   → every element's pose, ports, mount limits, beam path, detector readings    ↓ decideset_param() · place_relative() · set_dof() · align_element() · ao_close_loop() · render()    ↓ the beam re-tracesget_state()   → read the result, not a guess

Start it from Present ▸ Tools & Integration ▸ Start MCP Bridge. → agent guide · MCP server · tool list

Physics, honestly

Every push runs the physics: 341 textbook checks (Malus, Fresnel, Snell, the grating equation, Gaussian ABCD, Zernike orthonormality, energy conservation) plus a 618-check regression suite on both Blender 4.2 and 5.x. The core formulas were also verified against an external symbolic and numerical oracle; where that has not been done, the code and the docs say so. Every run builds the same benches in millimetre and metre scenes and requires the readouts to agree.

What is not claimed matters as much: this is a chief-ray engine with wave-optics overlays, not a full-wave solver. Thin elements carry no thickness, a grating has no blaze-efficiency model, and anything phenomenological says so where you read it. Model limits are written next to each feature.

→ scope and limits · element-by-element provenance · where the data comes from

Documentation

Features, examples, release historyThe long version of this page
CapabilitiesEvery panel, API call and MCP tool
Optical elementsPer-element model, parameters and provenance
ScopeWhat the engine does and does not simulate
Dispersion, cylindrical lenses, spectraGratings, white light, group delay, spectrometers
Realistic hardwareMounts, cages, rails and render detail
Beam renderingHow baked beams are drawn, and what that is not
Data sourcesCatalog and material provenance
Agent guide · MCP serverDriving the bench from outside
CHANGELOGWhat changed in each release

How to cite

A machine-readable CITATION.cff is included, so GitHub shows a Cite this repository button with ready-to-paste APA / BibTeX.

bibtex
@software{cobanoglu_blender_optics_simulator,  author  = {Çobanoğlu, Muhammet Emir},  title   = {Blender Optics Simulator},  year    = {2026},  version = {0.31.0},  doi     = {10.5281/zenodo.20778997},  license = {GPL-3.0-or-later},  url     = {https://github.com/emircbngl/blender-optics-simulator}}

The DOI above is the concept DOI and always resolves to the latest version; each release also mints its own version DOI (listed in CITATION.cff).

License & credits

GPL-3.0-or-later — see LICENSE. Vendor CAD and meshes are not included and remain the property of their owners; this project ships original metadata, procedural geometry and tooling.

Contributors

  • Tengfei Ma — ShanghaiTech University · ORCID 0009-0008-4556-4682 · @Harca-Yita. Reports from a working optical bench in #1 drove wavelength-true beam colours and the shutter, the unit-scale work, shaped apertures, reflection at the coated mirror face, the Porro prism and polished mirror substrates, the OPA and group-delay work, and the groove-oriented grating, cylindrical lens and spectrum detector.

Built in the spirit of Bigweld's maxim from Robots (2005) — "See a need, fill a need."

來源:README.md,提交 2b488e2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.24.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分