Playing with Claude to do lighting animations

I have be playing with light animations, see this thread:

However I wanted to be able to have AI generate animations factoring in:

  • The 3D positions of the lights.
  • The differences in color mappings between manufactures.
  • The difference in brightness between Kevin Temps and XY colors.

So I threw together a 3D model of the room in Godot and then placed the light bulbs in 3D space.

My Godot “Bulb” class supports:

  • Kelvin Temps.
  • XY color space
  • Transitioning between colors and/or modes (XY vs Kelvin)
  • The two types of bulb I am using Aqara and Philips Hue.
    • Aqara bulbs brightness in XY mode is only about 60% of Kelvin mode.
    • Philips bulbs do not have that issue.
  • I have separate lookup table to map between Kevin and XY for each bulb type.

I had Claude create three “whole room” animations.
When I look at these locally (in Godot) they are hi-res running at > 60 FPS, but I have shrunk them down into slow animated gifs to upload them (about 15MB each).

Finally I told Claude to translate the Godot animations into the script format I used in the linked thread so that I could see the animations for real.

The translation into HA script has worked pretty well, but the real world brightness is not 1-to-1 with the animation - I am going to need to do some additional work to figure out how to map the brightness correctly so that:

  • The color is still vibrant (when needed).
  • That there are good transitions between light and dark.

A few other technical details:

  • My bulbs are all Zigbee so both the simulations and real world make use of transitions - a max of 1 update per second is sent to each bulb to avoid overloading Zigbee.
  • The prompt I gave to the AI was to: Favor Kelvin Colors at the end of the animation on Aqara bulbs - this leaves them in a significantly brighter state.

UPDATE: Applying a gamma (of 1.8) to the brightness has boosted the middle of the brightness range which has more or less resolved the issues - the simulation is still more vibrant than reality but there is only so much you can do …