L3D 8x8 Cube Mapping?

Hi! new here. First time setting up a PB!

I’ve retrofitted my L3D 8x8 cube with a PB and it’s looking almost great, but it seems that the volumetric cube mapping seems a bit odd and I think it’s due to how this cube was designed and it not matching up with how the LEDs are wired

The beginning of the LED chain starts on the rear most pixels, so animations seem to play back to front and some seem to go a little funky. Here’s the circuit board layout https://github.com/enjrolas/L3D-Hardware/blob/master/8x8x8%20cube/circuit%20board/Base%20Board.pdf

The hope was to learn how to work with this cube/3d objects and eventually do some larger installations with some string lights and more

Looking at their library for processing, I think this might be the key line:

If I port that over to JavaScript, and simplify a bit to assume equal lengths on each side for an 8x8x8 cube:

function (pixelCount) {
  length = 8
  var map = []
  for (var z=0; z<length; z++) 
    for (var y=0; y<length; y++)
      for (var x=0; x<length; x++)
      {
        index=z*length*length+y*length+x;
        map[index]=[x,y,z]
      }
  return map
} 

Give that a try!

2 Likes

awesome! that was it! thanks!! looks great now!

it looks like your map is saying something to the effect of the coordinates of the pixel is calculated by the index equation for each axis, up to the length of 8 in each direction. (i’ll try not to think too hard about this poorly written definition :sweat_smile:)

I suppose this map works when a column of LEDs are daisy chained end to end, following the same zig zag throughout. However, if I made a string light version of this, it would most likely use the output expander boards, unless I decided to run a data wire back to the next set of LEDs, correct?

If I am reading the output expander documentation correctly, each channel gets assigned an index (basically a starting address), in which some similar map could potentially be used by PB to define the shape. Is that kind of the idea?

Totally doable.

Also, @Sunandmooncouture recently built one from those hanging curtain led things. In the background of this video

2 Likes

thats awesome!! almost exactly what I want to eventually build! thanks for the inspiration!

1 Like