3D render on Teensy?

Yesterday I watched someone else write some code. I love the effect and the technique which generates it. I wanted to see it on my LEDs. Here’s the source. It’s a fun piece of code to play with.

exoticorn

2 Likes

Way shorter sketch than I expected! Very cool

I couldn’t quickly find a thread for sharing animations, so I figured I’d drop my playpen here. It does this kind of thing.

This is great! Reminds me of the multiple patterns in Jason Coon’s Aurora sketch. I’ve been working on some improvements to WLED so it could become a platform for playing cool 2D patterns, GIF animations, and audioreactive patterns (controllable over WiFi), but I’ve been short on time lately and after initially making some good progress it’s slowed down recently.

There’s a fork of WLED also working on 2D - they started working on it before me but they’re taking a route that focuses on rectangular panels only - and they recently adopted some of your FastLED XY code: Adding XY() by Sutaburosu. · atuline/WLED@1ea0a27 · GitHub

You may notice a remarkable resemblance between Effect in my playpen and Drawable in Aurora. :wink: I spent a while trying to build Aurora, and discovering, understanding and borrowing that class was the nudge I needed to finally try using the ++ bits of C++. I really should read a tutorial one day…

I’ve never looked in depth at WLED. Do you know of any major blockers preventing a T4/SmartMatrix fork?

There are lots of major blockers, starting with the fact the project is designed around the ESP8266 and ESP32, and wouldn’t be easily portable to the Teensy. I’ve thought briefly about how to combine WLED (running on an ESP* device) and Teensy 4 for a project that needs more horsepower than the ESP32 can provide, but where I also want basic controls over WiFi and patterns to sync up with other WLED devices. My strategy would be to:

  • port WLED’s version of WS2812FX to run on the Teensy
  • Add a Usermod to WLED to output the current effect settings over serial (probably UART, maybe SPI) so the Teensy can listen for new settings and update its local WS2812FX loop to the current settings

That should allow a Teensy device to play a pattern/effect synced up with a WLED device.

2 Likes

The harder part is actually getting the patterns to run on the Teensy, the control part would actually be quite easy as the sync feature already exists, so writing that to serial as well as udp should be pretty straight forward. Can also see example of sending data from usermod in the sound reactive fork

Great idea!

As far as porting the patterns, I feel pretty meh about most of the patterns in WLED, and want to use it to play 2D (maybe someday 3D) patterns that I add to WLED, so porting patterns from WLED isn’t that important to me. That being said I want to make it easier to write patterns that can be played either with FastLED or WLED, and have a start on that here:

1 Like

I’ve asked them if they can add 2D support with my lib, so that all the stuff just works and they don’t have to re-invent the wheel