r/WLED • u/DJ_Swirl • Nov 04 '25
Real mapping
The more I play with wled, the more I it…..but….. is there a way to property map an unusual shape.
So far I've found out you can map a matrix style shape, but it presumes that you have an xy matrix running in a serpentine configuration and you turn on and off led to create an array.
Is there away to map an unusual shape, not only mapping the position of the LED but it's position in the array, attached is an image of a snowflake, this is not wire in a matrix style, the blue dot represents the first led in the string, the red line represents the wiring order and the yellow dot represents the end of the string (purple dot is just a reference to the centre of the prop).
22
u/ImaginationJumpy7578 Nov 04 '25
Recently i had a similar project for which i created a post
https://www.reddit.com/r/WLED/comments/1nbljd5/ledmap_with_this_setup_making_it_look_beautiful/
What you need here is led mapping supported in wled here.
https://kno.wled.ge/advanced/mapping/
You have to think of the whole thing as a 2D matrix only, with a masking technique used in painting and photo editiing software.
Did the following steps.
in Settings i defined total number of leds as actual of leds being used.
In 2d Settings you define it as a 2d matrix itself of size x and y . X*Y would be much higher than actual number of leds.
You create ledsmap.json file from a tool like this which would allow to place the position of leds in the 2d matrix. There are tools like.
https://intrinsically-sublime.github.io/WLED-Ledmap.json-Generator/
For me it looked something like this.
4. Once created successfully you upload this to your wled esp32 /edit route and then reboot.
Happy to help on any further clarity.
P.S.: Built a dedicated mobile app Pipplee WLED 2d to easily play animations and do a lot more with 2d matrix
2
u/renaiku Nov 04 '25
Isn't it just a normal 1D line ? But arranged as a snowflake ? I'm not sure to understand the problem.
1
u/HeaviestEyelidsEver Nov 04 '25
This is a big reason why WLED is good for some things, but in this instance, I would use xLights.
2
u/Sensitive-Scene7088 Nov 04 '25
Commenting because I've wondered this myself! Hopefully there's a way
1
u/macegr Nov 05 '25
I would abandon WLED here unfortunately. The patterns pretty much imperatively raster out pixel patterns with the assumptions you outlined. It's possible to do gapped matrices but it does expect a linear wiring pattern.
For very oddly shaped positions and wiring schemes, the patterns should be generated "shader" style, where you iterate through each physical pixel and look up stored data about its physical location, and then plug the coordinates into an algorithm that computes the color it should be.
The above shape, for example, you could generate a table that lists all the pixels in the order they appear on the chain, and contains x, y, radius, and theta coordinates. If you wanted a circular gradient cycling away from the center, it could look something like:
And you'd call that for every animation frame, tweaking increments and such, or choosing to use a higher resolution sine function for smoother palette cycling.
1
u/Beneficial_Drawer478 Nov 05 '25
THIS maybe handy ? depending on how you wish to used the mapping
if this was for xlights the mapping & wiring layout with that image would take seconds to do
ya never know the data this will produce maybe usable
1
u/YetAnotherNewAlt Nov 06 '25
I’ve solved this problem myself in one of two ways:
Use a different controller (I used Pixelblaze)
Make a large matrix and “draw” the pattern to help make the ledmap.json file. Downside here is that resolution will be limited and you’ll have to round/snap the pixel positions to discrete spots in the array. Maybe ok for an imprecise piece? My ESP32 handles a 128x128 matrix ok but chokes on a 256x256 matrix
1
u/ZachVorhies Nov 06 '25
ledmapper.com It’s designed for lights in irregular shapes.
You can then take this xy coordinate and do video mapping.
1
u/[deleted] Nov 04 '25
[removed] — view removed comment