r/FastLED • u/DJ_Swirl • Aug 29 '25
Support Mapping a Christmas Prop
hello clever people let's talk mapping
so I'm creating some Christmas lighting and the image you can see is a snowflake it has 120 pixels on it, I've never really played around with mapping so I'm a little bit out on the league here and I keep going round in circles following one link after another and not really getting any answers
So far I found two very different ways of doing things form Jason coon, But he's online tool doesn't seem to work not at least with 120 LEDs, and Macetech, Which is really difficult to try and map because it's such a huge array because obviously the shape is uniformed
So my question is how do I go about mapping this in a way where I can then run matrix style effects across it? Any help to point me in the direction of how to do this would be much appreciated
Using Seed style pixels on a ESP32
3
u/dougalcampbell Aug 30 '25
I think if it was me, I’d take advantage of the 6-way symmetry. I’d make some functions to map one 20-pixel branch of the snowflake — one for XY mapping and one for polar. Then a couple of utility functions to handle the branches as rotations at 60°, 120°, 180°, etc.
I’m just blue-skying this in my brain here on my 2am bladder break, so I’m not going to attempt any actual code. But that’s how I’d approach it.
3
u/xenomorph3000 Sep 01 '25
Let's assume we're talking about the perfect snowflake. It's rotationally symmetrical. So you can just map 20 LEDs, which any tool can do without any problems, and then multiply that by 6? That would also be easier to test...
In principle, you have a branch with points (x,y).
New coordinates:
Result: 6 or however many copies of your branch are distributed in a circle.🙃
2
u/DJ_Swirl Aug 30 '25
So after many hours are going round in circles I gave up, well when I say I gave up I mean I got Skynet, I mean AI, to write me a very cool HTML page that you load an imaging in a specific format using green dots for the LEDs, it locates them all and then you can click them to number them except the different being it actually centers where you click on the green dot so it's kind of helper.
Once I've finished getting everything done I'm going to publish it on github because I think it will be a useful tool for other people.
1
u/4wheeljive Jeff Holman Aug 29 '25
I've only played around briefly with Jason's online LED mapper , but I believe it should work with 120 LEDs. In his description here https://github.com/jasoncoon/led-mapper/blob/main/README.md he describes a matrix with 128 LEDs.
In terms of generating the tab-delimited text format input, you could try using something like the image shown here to create your map. I overlaid an Excel sheet with a transparent copy of your image and manually placed a few pixel numbers in the approximate cells.
Would love to see what you end up creating!
3
u/chemdoc77 Aug 30 '25
Hi u/DJ_Swirl – The following video and code by Mike Katchmar should be of help to you:
https://www.youtube.com/watch?v=kHvcf89McvU
With code here:
https://pastebin.com/52659JEQ
1
u/ZachVorhies Zach Vorhies Aug 29 '25
I have an unannounced feature that addresses this precisely.
ledmapper.com
It will handle irregular surfaces like this. You can use it to record video then load it to an SD card.
It looks absolutely jaw dropping.
Look at example FxSdCard, or something like this. I’m at burning man so i can’t check the exact example name.
2
u/Marmilicious [Marc Miller] Aug 29 '25
Similar to what Jeff suggested with using a grid, here's another example you can explore.
https://github.com/marmilicious/FastLED_examples/blob/master/xymap_irregular_layout.ino
https://wokwi.com/projects/357297885896056833
Also, you could trying making custom pixel arrays for each complete "arm", or maybe for the lower section, middle section, and tips of each arm to do some fun stuff.
https://github.com/marmilicious/FastLED_examples/blob/master/custom_pixel_array.ino
2
u/devicer2 Aug 29 '25
I made a webcam mapper a zillion years ago so if you make it first then you can map it easily. https://github.com/devicerCode/LEDmap [edit] actually this might be a bit TOO old and not easy to get going with newer versions, it'll be quicker to do it as spreadsheet even if it is a bit of a slog.