How to configure a megatree which has 'spacer' pixels in xlights

kenmc

New member
Hi, I made a megatree which has a single strand of 240 lights (the small pebble type ones 'inline' the cable rather than bullets, like this https://img.kwcdn.com/product/Fancy...0273051b09c4955a3.jpg?imageView2/2/w/800/q/70)

I have it in 12 strings of 20 leds, starting at the bottom and running up-down-up-down..... But since the pixels are 10cm apart, in order to get the spacing working i need to have a 'useless' pixel between the end of the 'down' run and the start of the next 'up' run.

I can model it as a custom model but it appears on the layout as a matrix like in the attachment

Is there anyway to make it be a 'tree', so conical in shape and appearance on the layout but taking into account the spare pixel every second run?
thanks
Ken
 

Attachments

  • flat tree.png
    flat tree.png
    8.1 KB · Views: 15
The way to do that is to make the custom model look like a tree. Likely you will need to add many additional columns. Say your top is 1 foot wide and your base is 6 feet wide. You would have need 6x the number of columns. To get "straight lines" you might need to increase the rows as well. Not sure what the number is that would let you do straight lines but maybe start at 6x and see what it looks like in preview. If you have a picture of your prop, you can use that in the custom model editor.

Another way is to use the Generate custom model tool (Tools menu). This requires you to have a video camera (phone works so long as you hold it still) and the model defined for start and channels. xLights then sends a pattern to the prop and you import the video on the "process" tab. xLights recognizes the light flashes and builds the model for you.
 
I found another way which might work - I'm using wled and in version 14 (maybe before - never checked) there's a way to map the led layout - so i can set the layout as [0,1,2,3..19 | 20,21,22...39 | 41,42,43...] to skip over the 'spacer' led in wled, and can just tell xlights that it's a tree of 12x20 strands. Almost have that working now, missing the last 4 leds still but should be doable
 
A thought here...

What you're trying to do, as I understand it, is not light those spacing nodes, treating them as if they were just a length of wire.
Based on the picture you originally included, the string config length has 245 nodes not 240.
I'm understanding based on your message...the light string you're using only has 240 nodes.

An option might be to create a tree model with 1 string of 240 nodes with 12 strands/strings.
Then create a submodel selecting the top 19 rows when you use 'Draw Model'
That then gives you that bottom row to use for the spacing wire you need.
Use the submodel in your sequence.

Obviously the negative is you now get a tree that's only 19 lighted nodes high instead of 20.
 

Attachments

  • Tree1.jpg
    Tree1.jpg
    297.1 KB · Views: 9
Yes, my string has 245 pixels, 5 of which are to be considered dead. Issue arises with the tree model (at least inbuilt tree model rather than custom, and from what I can see) is that it expects the tree to have X 'strands' or 'runs', all with the same number Y pixels - whereas mine sort of has alternating runs of (20,21,20,21,20,21,20,21,20,21,20,20), or (20,20,1,20,20,1,20,20,1,20,20,1,20,20,1,20,20) depending on how you consider it - so in either case the standard tree doesn't seem to provide an obvious way to handle it.


The mapping feature of wled (https://kno.wled.ge/advanced/mapping/) has me sorted perfectly though - so I have set wled up with 245 pixels in the string, and defined ledmap.json as

{"map":
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 40, 81, 122, 163, 204]}

Then in xLights have a standard tree of 12 strands of 20 pixels and it functions perfectly, the 5 'spare' pixels in the spacing after every second 'down' are skipped and the rest are all sequenced correctly.
 
Last edited:
As you are researching the "best way" to do this, a term that has been used for many years is "null pixel". Perhaps using that as a search item will get you results.
Note that "null pixels" used to be at the beginning or end of a string (depending on implementation), but there is nothing to say they couldn't be in the middle of a string.
 
Glad you got that working, it does seem like an easy way get that done, using WLED.

It's possible to do a similar remapping in xlights, although a little more tedious work.
you would use the standard xlights tree model and config it as a flat tree with the 1 string , 240 nodes, 12 strands
then export that as an xlights model to create a custom model, say Tree2.
Then import that Tree2 custom model on to the model layout screen.
then edit the model data to match the string node #'s you want in each row/column of the model
that will let you skip those lights that you won't use, and keeps the model layout looking like a tree

You could instead of editing the model data...edit the new model xml file directly with the new node mapping you need before you import it back

Either method isn't the most elegant/easy way to do the remapping, compared to the map file you did.

It looks like it's more work, but entirely in xlights
 
As you are researching the "best way" to do this, a term that has been used for many years is "null pixel". Perhaps using that as a search item will get you results.
Note that "null pixels" used to be at the beginning or end of a string (depending on implementation), but there is nothing to say they couldn't be in the middle of a string.

There is a concept of null pixel in wled also, but that similarly didn't help me. Essentially i have 5 string pairs of (20, 21) with the last pixel of each pair to be skipped, and then one pair of (20,20). I searched null pixel before, but they typically tend to be at the start or end as you mentioned, and then after (or before) them things are 'regular' from there on in - I think the 'every 41st pixel to be ignored' being a less than typical use case :)
 
Glad you got that working, it does seem like an easy way get that done, using WLED.

It's possible to do a similar remapping in xlights, although a little more tedious work.
you would use the standard xlights tree model and config it as a flat tree with the 1 string , 240 nodes, 12 strands
then export that as an xlights model to create a custom model, say Tree2.
Then import that Tree2 custom model on to the model layout screen.
then edit the model data to match the string node #'s you want in each row/column of the model
that will let you skip those lights that you won't use, and keeps the model layout looking like a tree

You could instead of editing the model data...edit the new model xml file directly with the new node mapping you need before you import it back

Either method isn't the most elegant/easy way to do the remapping, compared to the map file you did.

It looks like it's more work, but entirely in xlights

Yes - it seems like a lot more work, and since i'm using wled on diguno to drive the strings anyway, there is little to be gained - and likely will forget how to make it work next year also. This way with WLED, it stays with the tree and it is trivial to set up in next years sequences also.
 
Off topic sorta...but how did you like using the "pebble" or "fairypixels" ? I bought a small set from Amazon to just get a better look at them, and I really like them for certain applications, such as using them where strips might have been used. Obviously next years projects, but I did just by a roll of 10K pebbles, making them about .04 per pixel.
 
Back
Top