# L3D 8x8 Cube Mapping?

**URL:** <https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252>\
**Category:** Patterns and Code\
**Created:** [October 26, 2023, 9:55am UTC](https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252 "2023-10-26T09:55:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miztahsparklez](https://forum.electromage.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@miztahsparklez](https://forum.electromage.com/u/miztahsparklez)\
**Post date:** [October 26, 2023, 9:55am UTC](https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252/1 "2023-10-26T09:55:24Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [October 26, 2023, 6:22pm UTC](https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252/2 "2023-10-26T18:22:51Z")

</div>

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

> <https://github.com/enjrolas/L3D-Library/blob/master/L3D/src/L3D/Streaming.java#L68>

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

```auto
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!

---

<div class="post-metadata">

**Author:** ![miztahsparklez](https://forum.electromage.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@miztahsparklez](https://forum.electromage.com/u/miztahsparklez)\
**Post date:** [October 27, 2023, 5:30am UTC](https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252/3 "2023-10-27T05:30:14Z")

</div>

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 😅)

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?

---

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [October 27, 2023, 4:17pm UTC](https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252/4 "2023-10-27T16:17:29Z")

</div>

Totally doable.

> [@Pixelblaze Volumetric Cube](https://forum.electromage.com/t/pixelblaze-volumetric-cube/721):
>
> Pixelblaze Volumetric Cube Firework nova (now on the pattern site!) Thread on the build To music: This is a volumetric LED cube made up of 64 x 8 pixel strings, run from a Pixelblaze V3 with 8 x 8 channel output expanders (for 64 outputs total), 512 LEDs in all, measuring about 2ft per side. 3D printed clips hold the LEDs in position with the wire, and provide some diffusion. The LED strings hang from a panel which also houses the electronics. A Sensor Expansion board provides th…

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

> **[Sun and Moon Couture on Instagram: "Vendor booth setup at Knocturnal...](https://www.instagram.com/reel/Cx69N9rvNTJ/?igshid=MzRlODBiNWFlZA==)**
>
> 70 likes, 3 comments - sunandmooncouture on October 2, 2023: "Vendor booth setup at Knocturnal Playground by @kneticsart at @grottoclimbing 
> Remix by @plexusplay 
> Chain jewels by @missjiecouture 
> LEDs by @sunandmooncouture 
> .
> .
> .
> \#pixelblaze...

---

<div class="post-metadata">

**Author:** ![miztahsparklez](https://forum.electromage.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@miztahsparklez](https://forum.electromage.com/u/miztahsparklez)\
**Post date:** [October 28, 2023, 12:46am UTC](https://forum.electromage.com/t/l3d-8x8-cube-mapping/3252/5 "2023-10-28T00:46:07Z")

</div>

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