Author Topic: Single Strand but custom shapes  (Read 1292 times)

Offline ajirl

  • Newbie
  • *
  • Posts: 3
    • View Profile
Single Strand but custom shapes
« on: February 02, 2017, 04:04:02 AM »
Hi All,

I am new to this, so forgive me if I have run myself down a rabbit hole or doing things sub optimaly.

I've created a custom model within X-Lights that is comprised of a single strand of 100 pixels. My intention is to snip every 7 pixels and create a hexagon with a centred pixel. Like below


    * *      * *
   * * *   * * *
    * *      * *

The eventual aim is to cover a large roof with these (600 pixels extending out 30ft from the center where controller is.) which would make a nice snowflake/flower pattern physically.


However this is where I am running into issues. If I want every second hexagon to light along a strand, I've had to define all the even ones, put them in a group and do an on and off. Ditto for odd ones.

Also I would maybe like to have the centre pixel a different color, say for example I wanted them to look like a flower (yellow centre, pink outside pixels). Doing it the group way, while doable seems very tedious.

I am wondering if a) I am doing this the right and most efficent way, b) How hard would it be for me to create a toally custom effect (Do i need to code it? I am comfortable reading source and sure it might be nice to learn more code)

From a wiring perspective, take the pixel on the left hand side. Pixel 1 is the first one on the bottom and it then moves right to 2, up to 3, the centre, 4, left most centre is 5, top left is 6 and finally 7 is top right. 7 then leads to pixel 8 which is top left moving downwards. Thus you get a nice efficent wiring.

Any help, or more importantly advice on my errors here would be most welcome.

TIA
AJ

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Single Strand but custom shapes
« Reply #1 on: February 02, 2017, 07:03:08 AM »
Seems like it would be easier to create submodels and then create groups that contain which submodels you want.  You could even have a submodel that contained the center pixels for each one.

Offline ajirl

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Single Strand but custom shapes
« Reply #2 on: February 02, 2017, 07:10:23 AM »
@Gilrock, thanks for the reply.

Yup I've added a strand and created some sub modules (centres, edges, even, odd)  and copy pasted the model for each strand. From there I have created a snowflakes group, snowflakes centers, edge etc etc.

Its working out nice but its a lot of definitions.

Ideally I would like to define a strand of say 98 pixels, which should be 14 flakes/flowers, and be able to work out effects on that element. I've had a look at the src code to see if its viable. But its early early days for me there.

Thanks again
AJ

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Single Strand but custom shapes
« Reply #3 on: February 02, 2017, 07:15:02 AM »
Well when you do some custom specific thing there aren't shortcuts.  Also we don't really want new effects that only target some special model setup.  Most effects need to do something on all models of any size.

Offline ajirl

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Single Strand but custom shapes
« Reply #4 on: February 02, 2017, 08:38:54 AM »
Yup fair point alright. I will keep going the model way and dabble with the code, if nothing just for learning.

Again thanks
AJ