Mapping LED Bikini

Hi all,
I’m trying to do the pixel mapping for my chain jewel LED bikini outfit. You may have seen this video posted on my instragram (https://www.instagram.com/tv/CHUAsSDA9uN/) or youtube (2020 Miss Jie Couture Collaboration - YouTube).
This original version had a single PixelBlaze V3 driving both the top and bottom so wiring was a mess and it was not mapped.

I’ve made a new version with proper routing in simple zig zag form, and I’m now driving the top and bottom with two separate PBV3’s.

In my first mapping attempt, I used the online pixel mapping tool to create separate maps for the top and bottom. That worked perfectly but as expected, the top and bottom are completely independent. Even with firestorm they’re synced on the same pattern and timing, but it’s two separate copies of the same pattern.

SO here’s my question, what’s the best way to combine these two maps and two separate PBs to show one single pattern, half on top and half on bottom?

(for simplicity, let’s say the top and bottoms each have 50 pixels so 100 total)

I again went to the online mapping tool, this time with a single picture of both top and bottom. I loaded my new single map of 100px into both PBs and set the pixel count to 100, and was thinking I might do something like if(index<50) on the top (works fine) and if(index > 50) on the bottoms but of course the bottoms are just dark because they only have 50 pixels so I tried if(index > 50) index -= 50 but index doesn’t seem to have any effect on x/y obviously so not sure how to tell it to get the coords from map[index+50] and use those xy instead if that even makes sense.

I of course could split the single 100px map coords into two maps, and have 1-50 on top and 50-100 on bottom still mapping the xy of 50+ to index 0-50 on bottom, but I run into the problem where if I’m lighting a simple single pixel from 0 to 100, the top and bottom will both start at 0 where I want the bottoms to wait until index is 50 then start at their 0.

I hope this makes sense and any help is appreciated, thanks in advance.

1 Like

TopAndBottomMapFromPB
Example map from PB of both top and bottom

So I gave this some thought a while back, and basically you need to use “fake reference pixels” in each pattern to help set the context/size of the entire “world”

Your problem is 0 on each isn’t really zero because it normalizes each individually. You need to normalize it so each maps as if they were within the entire value range.

Add 2 pixels in the map (and The Settings) (doesn’t have to be real pixels, in fact, likely shouldn’t be… just declare your pixels string is 52 long instead of 50 (or whatever number is correct), just placeholders) to the top and bottom as follows:

in EACH item, map the fake pixels at the end with the extreme values of the total space. (One pixel as top left and the other as bottom right, if that’s clear. Imagine both items laid out and you are drawing a bounding box. 3D will also work the same way, but you’d need to use cubic values)

Mapping 2 pixels at the end that don’t exist means PB will know about them but of course nothing will answer those data points. I know this is counterintutive but PB won’t care, and this uses the “two more than I actually have” so it won’t light anything, but it will consider them part of each piece, and “hold the space open”

If this isn’t clear enough, let me know, and we can make an example.

And just like the other post that asked about 2D KITT, you’d need to be sure your patterns were all Render2D compliant and used XY and NOT index, since each will still have an index starting at zero. [You could work around this by hacking a pattern to add 50 to the bottoms index for example, but that’s so hacky and I suspect it would be awkward and buggy and require all sorts of one off versions, the mapping will just work if the pattern is 2d compliant. Or even 3D]

1 Like

Yes, fake pixels can work to trick the mapper code from normalizing the pixels to world units.

In the not too distant future the mapper tab will support transforming the pixel map coordinates (scale, translation, rotation), but in the meantime it is possible to do in the pattern itself.

Assuming you do not use fake pixels, the coordinates can be transformed slightly in the pattern in render2D. For example, to move the lower half down, and perhaps scale it slightly. Most patterns will work just fine with X and Y coordinates that are larger than 1, so it might be as easy as adding 1 to Y to get close.

export function render2D(index, x, y) {
  y += 1 //shift this pattern down a bit
  //...
}

Okay so I think I have mapping figured out, but now it’s more a question of timing. Say I’m running something like KITT, when they start both indexes are 0. Now I want the top to start immediately, but I want the bottom to wait until 50 and then start at it’s 0. Now the top should stay dark while the bottom runs from 0 to 50 then back to 0. only then would the top start again at it’s 50 index.
Does that make sense?

Hey Anthony!

I think your easiest route might be to rewrite KITT in render2D() form instead of trying to have an index offset or do the delay timing right. See this recent thread where someone else was just recently doing the same thing.

When I sync’d patterns across 6 PBs for Christmas, I used Wizzard’s method above - locally translating all 0…1 maps into one big x,y,z space. Here’s what I got out of it, which I think is similar to what you want to do.

2 Likes

Okay got it mapped and synced properly now, thanks everyone for the help!
I did have to add the fake pixels at the end of each map, but only adding 2 didn’t work timing-wise. For proper timing sync they both need the same number of total pixels.
Basically the same image and same map coords but reordered.
So the map for the top is A, and the map for the bottom is B.
Now the top PB map has the A map then the B map, but the bottoms start at B then go to A.

It’s comically simple the solution was now that I have it working, but my brain was not understanding before. The main thing that helped me was the other thread Jeff posted for Kitt where he mentioned stop thinking in index and only think in X/Y. I’m hoping to have videos posted soon! Thanks again

3 Likes

Now that you say it, it makes total sense that you’d need the same number of pixels in each, to ensure the timing loops lined up the same.

Looking forward to video of it working!

1 Like

@Sunandmooncouture ,
Are you by chance running one in AP mode, and one in client mode (no Firestorm)? Give v3.16 a try, there was a bug preventing animation sync from a PB in AP mode. It should sync patterns that use time() for animation (but not delta based patterns like KITT).

Video for @jeff

@wizard I haven’t tried AP Mode without firestorm but def want that option so just updated to 3.16 and will report back soonish (life permitting)

6 Likes

Nice!!! Amazing! I still can’t get over thinking about how much work goes into wiring something like this up.

1 Like

Yeah while showing how it’s made I said something like I trust you wont steal my design and their response was no one in their right mind would put that much work into one piece. Boom built in patent protection

7 Likes

Hey @sunandmooncoture, I just watched your you tube post and your piece is SPECTACULAR. Really beautiful and interesting patterns, not to mention fine craftsmanship. I’m still marveling at how hidden the lights and wiring are. You must have some rad soldering skills…and patience. Bravo.

1 Like

This is definitely what this sort of technology is meant to be used for. 10/10

3 Likes

Actually the only solder points are to the PB itself, everything else is plug and play.

So I’m joining this party late and try and summarize things as a test of my understanding…

Lets say a universe of 2100 pixels across 3 PBs, 700 each… And one firestorm synchronizing things. Assume network and connectivity aspects are ok.

  1. Make a map which covers the entire universe of pixels. For each PB, put it’s respective pixels first in the map. They will all have 2100 pixels, but PB-A will have the first 700 as it’s first pixels (the rest being ignored), PB-B will have it’s first 700 as the actual 701-1400 pixels, and so on… By each one having all pixels though, the scaling will be consistent so they’re all drawing the same 2/3D picture.

  2. Settings - each one is set to have 700 pixels, output expander or direct. This will be the limit for how many times render2D/3D is called. The rest of the pixels will be skipped, thus each PB renders 700. Though they all call beforeRender.

  3. Patterns should use time() and x/y/z coordinates, not index. Firestorm will keep the time value in sync within a few milliseconds. Trying to use index will subject the user to all sorts of troubles.

If my understanding is correct, I’ve got about 2 weeks to figure out Firestorm :man_facepalming: but with optimistic levels of hope!

1 Like

Sounds right. 2 weeks is plenty time to learn firestorm if you already know linux and raspberry pi.
If not you can just post questions here in a new thread and we can get you sorted.

@peterd, it sounds like you’ve got things well under control for a multiple Pixelblaze setup. Just wanted to add an option, if you’ve got time too look at it.

If you:

  • have access to grid power, or some other high capacity power source
  • don’t require wireless connectivity between LED sections (you can run physical wires from your computer to all your LEDs).
  • are going to be using an RPi or other full-on computer anyway (a 4 would be ideal, but 3B+ could do the job as well)
  • are familiar with the Processing environment, or can deal with a little Java.

Take a look at:

1 Like

Thanks, will definitely take a look at that in the fall. I’m definitely power and time limited for this event in July…

This is so amazing! A few questions:

For the leds, do they get diffused by the acrylic gems? I love playing with diffusion, but haven’t messed with acrylic mirrors yet. I do however have a piece that I’d love to add lighting to. Did you have to embed the leds in the acrylic with small dimples, or just attach and let it do it’s thing?

It would be fun to make a vest/shirt similar to this, but my etsy searching only finds bikini tops with these kinds of mirrored acrylic. Do I such at searching, or does that just not exist :frowning: