Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more than 300 pixels #34

Open
bogdanr opened this issue Mar 30, 2020 · 4 comments
Open

Support more than 300 pixels #34

bogdanr opened this issue Mar 30, 2020 · 4 comments

Comments

@bogdanr
Copy link

bogdanr commented Mar 30, 2020

It would be nice if we could support up to 2000 pixels. Where does this limitation come from?

@readmodifywrite
Copy link
Member

Short answer: it's a limitation between the memory for the fader engine and the cycles available to the scripting engine.

Longer answer:
Chromatron doesn't render pixels the same way FastLED/Adafruit do. The native graphics are 16 bit HSV (so that's 6 bytes per pixel right there) with two fader engines per-pixel (one for hue/saturation, another for brightness), then we do an RGB/RGBW conversion. It's more memory intensive, but it ensures high color/brightness resolution and makes it trivial to do timed fades in the scripting engine.

More forward looking answer:
I am planning to port this to the ESP32 over the summer. 2000+ pixels is probably doable on that.

@bogdanr
Copy link
Author

bogdanr commented Apr 13, 2020

The native graphics are 16 bit HSV (so that's 6 bytes per pixel right there) with two fader engines per-pixel (one for hue/saturation, another for brightness), then we do an RGB/RGBW conversion. It's more memory intensive, but it ensures high color/brightness resolution and makes it trivial to do timed fades in the scripting engine.

Would it be noticeable in practice if we only had 8 bit HSV?

@readmodifywrite
Copy link
Member

It's noticeable - but it depends on what kinds of look you're going for. There were already a lot of 8 bit solutions out there, I wanted to start with a higher-res solution.

Personally - I think 8 bit hue is entirely insufficient - you can see visible stepping on larger arrays doing a rainbow pattern, and if you run a constrained palette (say, just sweep blues across 15 feet of strip) it's even more noticeable since now you have more pixels than you do distinct color points.

The other thing 16 bits does is it makes it easier to do longer programmed fades. The fader engine runs at 50 Hz and the minimum is obviously 1 step per tick, so that's 50 ticks per second. With 8 bits, you are limited to a 5 second fade time.

It also helps with mapping to curves. Brightness runs on a curve before mapping to the actual RGB values. 16 bits give us a lot more resolution in that curve - the effective post-curve resolution is less than 16 bits but still more than 8.

Basically - the idea is that the ultimate limiting factor is never in the HSV space, it's in the 8 bit RGB space that the LEDs themselves are limited to.

@readmodifywrite
Copy link
Member

This is all good feedback though. I have part of my ESP8266 port running, but it's slow going at the moment. Realistically t'll probably only be 128 or so - the original Chromatron hardware has a second microcontroller to help get to 300. So the path to 1000+ will be the ESP32. It's still a couple months out though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants