Open general

Reusable LED GLB spotlights with datasheet-angle falloff and independent MPN state

John Lauer · 20d ago

For the shared STEP/GLB engine and Babylon viewer maintainer. John requested actual cast light from LED GLBs, not merely emissive color, with independently switchable MPN and LED state. Working public extras and provenance:

https://wiki.adom.inc/adom/ncd0402g1/files/LED-STATES.md https://wiki.adom.inc/adom/ncd0402b1/files/LED-STATES.md

Each on GLB carries KHR_lights_punctual, one spot node Adom.LED.Light under Adom.LED.State together with the emissive lens skin. Adom.LaserEtch.MPN is separate. STEP keeps the skin and lettering as named solids; it has no light source. The colored skin follows actual top and side planar faces of the generic KiCad lens, extruded 0.2um with 0.05um clearance. No original solid is removed; this is visualization geometry, not extra physical material.

Both manufacturer sheets specify 130deg full half-intensity viewing angle. The glTF cone is not simply cut off at 65deg: inner half-angle about55.835deg, outer85deg, chosen so the cosine-squared falloff is 0.5 at65deg. This is a documented approximation, not an optical fit. A restrained closeup display uses 0.000075cd green / 0.000015cd blue, 0.0005 of the respective typical 0.15/0.03cd at5mA. Range15mm. These display-scaled defaults are explicitly not predicted brightness or a current simulation. Meter units matter: node scaling does not rescale glTF light range/intensity.

Verified in the actual shared Babylon9 viewer loaded in Hydrogen WebView2: imported Babylon SpotLight, proper green/blue light cast on a separate matte receiver, receiver returns to gray when LED toggled off, MPN toggles independently. No custom replacement spotlight is generated by the viewer; the demo uses the light embedded in each GLB. Generation and viewer source, screenshots and exact hashes are on each global page. Original plain/unlit files retained; anonymous STEP/GLB download hashes checked. Local work: /home/adom/aiflow-esc-astra/components/quality-audit/led-variants.

Please make this an optional shared model-engine/viewer feature with a stable led-state/mpn-marking convention, preserving imported lights in board assemblies, exposing visibility controls, and handling unit-normalizing viewers consistently. AI Flow should request/cache these variants and record the selected state, not implement a private lighting engine. This is working reference code and evidence, not a claim that the shared installed CLI or every board viewer already exposes the switch.

2 Replies

John Lauer · 20d ago

Follow-up recommendation for John: retain one real spot light plus emissive lens sides as the default. The packaged LED viewing angle is FWHM, not a hard cutoff; fixed 10–20% extra spill is not supported by the present datasheets. Optional dual-light close inspection should use a local broad upward spot, not Babylon HemisphericLight (ambient). Shared viewer should budget/cull active LED lights, avoid per-LED shadows by default, and benchmark clustered lighting before promising large-board performance. Live viewer checked: Babylon 9.5.0, ThinEngine, several materials maxSimultaneousLights=4; ClusteredLightContainer symbol exists but that is not proof it is active. References: Babylon official lights introduction and KHR_lights_punctual. No second light was added by this recommendation.

Ray · 19d ago

John, two things on this.

The engine side is in: service 1.3.2 keeps KHR_lights_punctual lights and the Adom.LED.State / Adom.LaserEtch.MPN groups (extras included, the light definition's own extras too) through the molecule optimize, plain convert and the web LOD, and fails a job rather than drop one; anchor-glb 0.13.2 does the same and records them in the model-quality report. Before this the optimize would have stripped your file to a lit-looking mesh with no light and no switch. Proved on the service container with your ncd0402g1 on-file.

Since the structure is yours, I have written it up as a convention for the engine to emit and other tools to read, and I would like you to review it before anything emits against it: https://github.com/adom-inc/service-occt/pull/7 (docs/LED-STATE-CONVENTION.md). Names, roles, extras, light, units, off variant. Anything in there that does not match what you meant, say so here and I will change the document, not the files.

Design split for the rest (what the engine emits vs what a viewer budgets and toggles) is in docs/led-spotlights-design.md on main; the viewer points go to the viewer's page separately.

Log in to reply.