Cube mapping suggestions

I’m trying to get some ideas of the best way to map a cube with six 8x8 matrix panels (512 LED’s total). The default matrix mapping seems work fine, although something tells me I could be doing more with it.

Basically I’m looking to get a flow across all the panels as if it’s one continuous panel just folded up onto a cube. I’m almost done building the frame that will house everything, so before I put it all together I’m hoping the mapping and orientation of the matrix panels is worked out.

Since I’'m doing a self-contained design (no external power supply) the thing that’s been a challenge is how to fit a battery pack inside the cube. I did order one that is 2.6 x 2.6 x 1, but it barely fits and I’m wondering if there’s anything smaller? I looked for quite and this was the best I could find.

Thanks in advance :slight_smile:

Your best bet to get the “smooth flow” is to map it with one panel on top, the next four as sides, and the last as bottom OR to map it with one corner as top, 3 panels as northern hemisphere, and the other 3 as southern hemisphere. Treat it as a sphere, and you’ll see the flow you want to see. But… Most of that is in the pattern… Depends on how the math is done in the pattern

Mapping that isn’t hard, mostly it’s an orientation thing. There are multiple ways to map it, most do it as a hollow cube. It’s as simple as this:

Define one corner as 0,0,0. Define the opposite corner as 8,8,8. Now all of your pixels are either 0 or 8 in one dimension, and 1,2,3 etc in the others. (Depends on number of pixels, 8 in this case) With the way PB normalizes values, it’s the easiest to map. PB will convert them all to 0…1 values. (So 8,8,8 will become 1,1,1)

You’ll want 3D though, 2D won’t ever give you the look you want: too many edges.

1 Like

I’ll come back to this, when I have more time. I realized I didn’t explain how to remap most effectively to make it align for most patterns.

Do you want it as a 2D surface, pre folding?

Screen Shot 2021-03-22 at 10.05.04 AM

This code may help - it lets you arrange a number of 2D matrices and rotate as needed.

The problem with this of course is that the edges don’t always have adjacent 2D coordinates, as @Scruffynerf mentions.

Or as a 6 walls in 3D space, like the built in example?

You could run that 3D cube through some transformations and get polar coordinates - treating it as a sphere, and get a 2D output (like lat + long on a globe).

4 Likes

Yeah, I was trying to avoid mentioning polar coordinates :wink:

1 Like

Thanks guys, this is all very helpful information. My cube is a “walled cube”, although while messing around with the “volumetric cube” mapping I find some patterns actually look better in some ways (eg. honeycomb, spiral twirls, etc.).

Maybe there’s a way to do this, although I’m not sure, is it possible to specify a different mapping for a particular pattern on the fly? So let’s say I wanted to use a walled cube mapping for one pattern and volumetric for another I could do that without manually loading the mapping.

The other main thing I’m wondering is how I should be arranging/orienting my LED panels in the frame. If I follow the wizard’s model this is how I’ve got all them oriented now (if using the walled cube mapping):

matrix_orient

I’m not sure which one should technically be the start and the end?

If I switch to volumetric though I need to rotate two panels 180 degrees it seems to look correct. One other thing I couldn’t get to work with the walled cube mapping is the scrolling text pattern. I can make some simple adjusts to the 2D matrix and volumetric mappings and it works, but still not sure why I can’t get it for the walled cube mapping.

Other Thoughts:

It’s a shame they don’t make these LED matrix panels with a transparent plane instead of the solid black, that would be awesome. Or make pre-fab volumetric LED’s arranged in a way so that one doesn’t have to solder each of them one by one. My soldering skills are meh, but maybe that’s what I need to get better. :smiley:

I need to find some time to go through the tutorials and threads here as there’s a wealth of information that I’ve barely scratched the surface on obviously. Anyway, thanks once again :slight_smile:

Yes, you can adjust the code in the cube example to handle the reversed panels, so you don’t have to adjust the real panels. Once the map matches your panels, it’ll just work for all cases. You don’t need two different maps.

There are reasons to use different maps (cough cough polar), but then there is no easy way to switch maps. (Yet)

1 Like

The code example you provided helped immensely! much appreciated :slight_smile:

1 Like