r/FastLED • • Nov 21 '23

Discussion FastLED with native support for subpixel positioning

​Hi,

I have been experimenting a bit with subpixel positioning on my Teensy 4.1 with a 64x64 led matrix after being inspired by this code by sutaburosu.
https://www.reddit.com/r/FastLED/comments/h7s96r/subpixel_positioning_wu_pixels/

So far I have only used it for some effects in particular and it works realy well. It gives a very nice smooth transition effect.

It would have been nice if this was natively supported by the FastLED library where you for instance could set the size of the "virtual" resolution as a parameter in the library so that the resolution that you work with in the code is higher in general.

So if I have a 64x64 LED Matrix I can configure the virtual resolution to be 10 times larger so that the virtual drawing area is 640x640.

By doing that you get 10 fractions between each pixel.

Are there any similar solutions already existing? Is there anything that prevents this from being made, some difficulties that I haven't thought about?

10 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/obidavis Nov 22 '23

Everything I've done in my work is entirely user responsive. However, even in this context there's rarely ever any need to do things entirely on the chip. I typically route things via a proper computer to do actual interesting physics based visuals, and just use the microcontrollers to do 'smart' interpretation of whatever comes out of the computer (interpolation, upsampling, kinda a la fadecandy).

The only real use case I had for doing everything on chip was for an installation running on batteries, although I do find it more fun the more I can do on chip.

1

u/RubiCubix Nov 22 '23

In your case, do you still have the basic handling of the visuals on the chip but they depend on input from the PC in terms of results from the math operations?

As I understand you don't stream the complete "Frame-Buffer" so to speak?

2

u/obidavis Nov 22 '23

Yes that's correct, I avoid sending the whole framebuffer.

What I actually send has been different in all applications though! It might be that I send a 'base' colour and the chip is responsible for altering/augmenting this based on sensor data, or I send some struct with basic shape data and the chip is responsible for constructing the whole buffer out of that.