Skip to content

tplive/projectionmapping

Repository files navigation

Projection mapping with Godot

Godot projection mapping. This is an attempt at creating a realistic sunlight cycle, with externally configurable cycle speed and time/date synchronization from a "fast clock" API.

The original idea comes from a model railroad project, where we're attempting to simulate realistic lighting/shadow casting day/night cycle from a projector mounted over and projecting down on a diorama.

We aim to expand the configuration, by projecting an animation of water down on the diorama's lake, to create the illusion that the water is liquid. The Godot landscape will mimic the actual diorama landscape, so the light projected down will create realistic light and shadow effect.

To further augment this digital "semi-twin", the external time API will be used by other control systems, running colored RGB light strips and the railway schedule.

Fast clock API

The external API is hosted elsewhere for now. It consists of two REST endpoints, one is /time, which returns the current "fast clock" time and date in ISO 8601 format, like: {"time":"2025-06-27T12:32:12"}. This is simulated time, usually faster than real time, so that a full 24 hour cycle can be set to an arbitrary amount of time. This cycle speed is set by the /cycle endpoint, in seconds; {"cycle":3600}. If set to 3600, a full day/night cycle will pass in 1 hour.

We have built a client as well, for demonstration purposes. It returns the real time, the fast time and the colortint for the time of day; pinkish for sunrise and red for sunset. Also for season; light green tint for springtime, warm yellow for summer, red/orage for autumn and cold crisp blue for winter. The client also allows setting the fast time and cycle time.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published