ource (GitHub): https://github.com/intellar/evm2000-moon-projectionSource (GitHub): https://github.com/intellar/evm2000-moon-projectionDemo Video (YouTube): https://youtube.com/shorts/vpU2nXBhBhIStore: https://intellar.square.site/Related post / Article connexe: Raspberry Pi + EVM2000Source (GitHub): https://github.com/intellar/evm2000-moon-projectionDemo Video (YouTube): https://youtube.com/shorts/vpU2nXBhBhIStore: https://intellar.square.site/Related post / Article connexe: Raspberry Pi + EVM2000 (https://www.intellar.ca/blog/raspberry-pi-evm2000) (https://www.intellar.ca/blog/raspberry-pi-evm2000)Demo Video (YouTube): https://youtube.com/shorts/vpU2nXBhBhIStore: https://intellar.square.site/Related post / Article connexe: Raspberry Pi + EVM2000 (https://www.intellar.ca/blog/raspberry-pi-evm2000)
e point de départFaire du projection mapping sur un objet 3D demande habituellement une caméra, une calibration projecteur-caméra (lumière structurée ou mires), et pas mal de temps de mise en place avant même de voir une première image alignée. C'est utile quand l'objet bouge ou a une géométrie complexe, mais c'est souvent trop lourd quand on veut simplement projeter sur une sphère fixe.Dans ce projet, on prend l'approche inverse : aucune caméra et aucune calibration automatique. L'objectif est de pouvoir poser une simple sphère blanche devant un Raspberry Pi équipé d'un projecteur TI DLPDLCR2000EVM, aligner le faisceau manuellement en quelques secondes depuis une interface web, et projeter en temps réel une Lune 3D basée sur les données NASA LRO/LOLA — avec éclairage solaire dynamique, relief, éclipse, topographie et animations.MatérielLe montage reprend la pile matérielle déjà documentée sur le blog pour connecter le projecteur DLP2000 au Raspberry Pi :• Raspberry Pi 5 (sortie DPI parallèle)• Intellar Pi HAT (carte adaptatrice reliant la sortie RGB parallèle du Pi au connecteur de l'EVM2000, avec bus I2C logiciel sur GPIO 23/24)• TI DLPDLCR2000EVM (contrôleur DLPC2607, résolution native nHD 640×360)• Une sphère blanche mate (par exemple une sphère de 7 po / 177,8 mm de diamètre)• Alimentation 5 V avec suffisamment de marge (~18 W recommandé lorsque le HAT alimente le projecteur)Côté système (/boot/firmware/config.txt), le projecteur est piloté en DPI générique à 25 MHz (640×360), ce qui l'expose directement via le framebuffer /dev/fb0 au format XRGB8888 (32 bpp) :dtparam=i2c_arm=offdtoverlay=vc4-kms-dpi-generic,clock-frequency=25000000dtparam=hactive=640,hfp=14,hsync=4,hbp=12dtparam=vactive=360,vfp=2,vsync=3,vbp=9dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2,bus=1Un détail important en mode headless (sans bureau graphique) : tant qu'aucune trame n'est écrite dans /dev/fb0, le bus DPI n'émet pas de signal vidéo et le DLPC2607 reste en veille — les commandes I2C à l'adresse 0x1b tombent alors en timeout (Errno 110). Le pilote gère automatiquement la séquence de réveil (écriture d'une trame sur /dev/fb0, attente de stabilisation du signal, initialisation I2C avec reprises automatiques, contrôle de la puissance LED par PWM inversé, et masquage du curseur console fbcon).Alignement manuel sans caméra ni calibrationPlutôt que d'estimer la pose par vision par ordinateur, l'interface web place une caméra virtuelle exactement au point de vue du projecteur (avec visualisation 3D du frustum du faisceau) et projette une mire sphère à fort contraste (contour lumineux + méridien et équateur).Il suffit ensuite d'ajuster quelques curseurs en temps réel tout en regardant la sphère physique :• Mire focus (640×360) en un clic pour régler la mise au point optique de l'EVM2000• Rayon de la sphère et Distance Z• Décalage X / Y (Gauche / Droite et Haut / Bas)• Throw ratio et décalage vertical de la lentille (vertical lens offset)Une fois le contour et la croix alignés sur la sphère, on désactive la mire et on sauvegarde les paramètres. Le panneau d'alignement reste replié par défaut pour garder l'interface propre pendant la démonstration.Rendu 3D de la Lune et données NASALe rendu tourne dans le navigateur avec WebGL / Three.js à partir des données publiques du NASA CGI Moon Kit (SVS 4720) (LROC 4K couleur et carte d'élévation LOLA 16 bits). Le script scripts/build_moon_blender.py télécharge ces sources, génère des textures PBR 2K optimisées pour la projection (albédo, carte de normales en espace tangent calculée depuis le DEM 16 bits, carte topographique hypsométrique) et assemble le modèle assets/moon/moon.glb via Blender.Le studio propose 5 modes visuels :• Realistic (NASA LRO) — rendu lunaire réaliste avec ombres rasantes sur les cratères• High Visibility — contraste renforcé pour les environnements plus éclairés• Blood Moon Eclipse — teinte rougeâtre d'éclipse lunaire totale• LOLA Topography — carte altimétrique colorée issue du laser LOLA• Neon Wireframe — maillage lumineux style fil de ferEt 9 scènes animées prêtes à l'emploi : Giant Lunar Car, Crimson Singularity, Showcase Reveal, UFO & Tractor Beam, Meteor Bombardment, Apollo Landing Beacons, 360° Spin, Lunar Phases et Total Eclipse.Architecture logicielle et modes de lectureLe code est divisé en deux services légers :• moon_projector.pi_server (sur le Raspberry Pi) : contrôle le DLPC2607 via I2C, écrit directement dans /dev/fb0 via np.memmap, et reçoit les trames ou séquences depuis le réseau.• moon_projector.pc_server (sur le PC) : sert l'interface WebGL Studio où s'effectue le rendu 3D temps réel.Deux modes de fonctionnement sont disponibles :• Projection live (streaming interactif) : chaque modification d'angle, de soleil, de mode visuel ou d'animation est projetée immédiatement sur la sphère.• Lecture RAM Pi + Boucle : une séquence d'images est mise en mémoire RAM directement sur le Raspberry Pi pour tourner en boucle fluide à 20–30+ fps, sans dépendre en continu du lien réseau.Démarrage rapide1. Sur le Raspberry Pi — configurer la sortie DPI et l'I2C logiciel selon docs/hardware-setup.md, puis lancer le serveur :pip install -e ".[pi]"python -m moon_projector.pi_server --host 0.0.0.0 --port 80802. Sur le PC (interface WebGL Studio) :pip install -e .python -m moon_projector.pc_server --pi-url http://raspberrypi.local:80803. Aligner et projeter — ouvrir http://127.0.0.1:5000 dans le navigateur, cliquer sur Connecter (et Mire focus pour la netteté), ouvrir Alignement manuel (sphère), activer Projection live (Pi) et Mire sphère (alignement), ajuster Rayon, Distance Z et Gauche / Droite / Haut / Bas, puis décocher Mire sphère, cliquer sur Sauvegarder, et lancer le mode direct ou Lecture RAM Pi + Boucle.État actuel et compromisLe projet est fonctionnel et reproductible tel quel sous licence MIT. Le choix d'un alignement manuel suppose évidemment que le projecteur et la sphère restent fixes pendant la projection : si l'un des deux bouge, il suffit de rouvrir le panneau d'alignement pour recalibrer en quelques secondes. En contrepartie, cela élimine totalement la complexité d'une caméra de capture et d'une calibration structurée.Le code source complet (serveur Pi, studio WebGL, pilote DLPC2607 et documentation) est disponible sur GitHub : https://github.com/intellar/evm2000-moon-projection
he starting pointDoing projection mapping on a 3D object usually requires a camera, projector-camera calibration (structured light or fiducial markers), and a fair bit of setup time before seeing a single aligned image. That is useful when the object moves or has complex geometry, but it is often overkill when you just want to project onto a stationary sphere.In this project, we take the opposite approach: no camera and no automatic calibration. The goal is to place a simple white sphere in front of a Raspberry Pi paired with a TI DLPDLCR2000EVM projector, align the beam manually in seconds from a web interface, and project a real-time 3D Moon based on NASA LRO/LOLA data — with dynamic sunlight, relief normal mapping, eclipse, topography, and animated presets.HardwareThe setup reuses the hardware stack documented earlier on the blog to connect the DLP2000 projector to the Raspberry Pi:• Raspberry Pi 5 (parallel DPI output)• Intellar Pi HAT (adapter board connecting the Pi's parallel RGB output to the EVM2000 connector, with software I2C bus on GPIO 23/24)• TI DLPDLCR2000EVM (DLPC2607 controller, native nHD 640×360 resolution)• A matte white sphere (e.g., a 7 in / 177.8 mm diameter sphere)• 5 V power supply with enough headroom (~18 W recommended when the HAT powers the projector)On the system side (/boot/firmware/config.txt), the projector is driven in generic DPI mode at 25 MHz (640×360), which exposes it directly through the /dev/fb0 framebuffer in XRGB8888 (32 bpp) format:dtparam=i2c_arm=offdtoverlay=vc4-kms-dpi-generic,clock-frequency=25000000dtparam=hactive=640,hfp=14,hsync=4,hbp=12dtparam=vactive=360,vfp=2,vsync=3,vbp=9dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2,bus=1An important detail in headless mode (without a graphical desktop): as long as no frame is written to /dev/fb0, the DPI bus does not output a video signal and the DLPC2607 stays asleep — I2C commands at address 0x1b then time out (Errno 110). The driver automatically handles the wake-up sequence (writing a frame to /dev/fb0, waiting for signal stabilization, I2C initialization with automatic retries, LED power control via inverted PWM, and hiding the fbcon console cursor).Manual alignment without a camera or calibrationRather than estimating pose via computer vision, the web interface places a virtual camera exactly at the projector's point of view (with a 3D visualization of the beam frustum) and projects a high-contrast sphere test pattern (bright outline + meridian and equator).You then simply adjust a few sliders in real time while watching the physical sphere:• One-click focus test pattern (640×360) to adjust the EVM2000 optical focus• Sphere radius and Z distance• X / Y offset (Left / Right and Up / Down)• Throw ratio and vertical lens offsetOnce the outline and crosshairs are aligned on the sphere, you disable the test pattern and save the parameters. The alignment panel stays collapsed by default to keep the interface clean during demonstrations.3D Moon rendering and NASA dataRendering runs in the browser with WebGL / Three.js using public data from the NASA CGI Moon Kit (SVS 4720) (LROC 4K color and 16-bit LOLA elevation map). The scripts/build_moon_blender.py script downloads these sources, generates 2K PBR textures optimized for projection (albedo, tangent-space normal map computed from the 16-bit DEM, hypsometric topography map), and assembles the assets/moon/moon.glb model via Blender.The studio offers 5 visual modes:• Realistic (NASA LRO) — realistic lunar rendering with grazing shadows across craters• High Visibility — boosted contrast for brighter environments• Blood Moon Eclipse — reddish total lunar eclipse tint• LOLA Topography — colorized altimetry map from the LOLA laser altimeter• Neon Wireframe — glowing wireframe mesh styleAnd 9 ready-to-use animated scenes: Giant Lunar Car, Crimson Singularity, Showcase Reveal, UFO & Tractor Beam, Meteor Bombardment, Apollo Landing Beacons, 360° Spin, Lunar Phases, and Total Eclipse.Software architecture and playback modesThe code is split into two lightweight services:• moon_projector.pi_server (on the Raspberry Pi): controls the DLPC2607 over I2C, writes directly to /dev/fb0 via np.memmap, and receives frames or sequences over the network.• moon_projector.pc_server (on the PC): serves the WebGL Studio interface where real-time 3D rendering takes place.Two operating modes are available:• Live projection (interactive streaming): every change in angle, sun position, visual mode, or animation is immediately projected onto the sphere.• Pi RAM Playback + Loop: an image sequence is loaded into RAM directly on the Raspberry Pi for smooth looping at 20–30+ fps, without continuously relying on the network link.Quick start1. On the Raspberry Pi — configure DPI output and software I2C per docs/hardware-setup.md, then launch the server:pip install -e ".[pi]"python -m moon_projector.pi_server --host 0.0.0.0 --port 80802. On the PC (WebGL Studio interface):pip install -e .python -m moon_projector.pc_server --pi-url http://raspberrypi.local:80803. Align and project — open http://127.0.0.1:5000 in your browser, click Connect (and Focus test pattern for sharpness), open Manual alignment (sphere), enable Live projection (Pi) and Sphere alignment pattern, adjust Radius, Z Distance, and Left / Right / Up / Down, then uncheck Sphere alignment pattern, click Save, and start either live mode or Pi RAM Playback + Loop.Current status and trade-offsThe project is functional and reproducible as-is under the MIT license. Choosing manual alignment obviously assumes that the projector and sphere stay stationary during projection: if either moves, you simply reopen the alignment panel to recalibrate in a few seconds. In return, this completely eliminates the complexity of a capture camera and structured-light calibration.The full source code (Pi server, WebGL studio, DLPC2607 driver, and documentation) is available on GitHub: https://github.com/intellar/evm2000-moon-projection