Author Topic: XLights 4 - add effect pdf?  (Read 5217 times)

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #15 on: July 19, 2016, 03:41:59 PM »
I think the question is are you really just wanting to learn to write effect code for xLights or do you just want to be able to create those effects.  If you just want those effects I think we can get that done by using or modifying existing effects.  If you want to learn to write effects maybe we find a different one for you to do like I've been wanting a Fractals effect.  Maybe have a drop-down that can select between various fractal algorithms.

Offline robs113

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #16 on: July 19, 2016, 03:56:28 PM »
Gilrock, I am just looking be add effects I require to my copy of xLights.

I am a programmer but total noob in xLights, so it seems easier to write the code than figure out the intricacies of existing effects. (that will come with time I hope ;-)


dkulp, I am always getting 0 for buffer.GetEffectTimeIntervalPosition() but buffer.curPeriod/buffer.curEffEndPer seems to be giving me what I need.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #17 on: July 19, 2016, 04:07:21 PM »
I'm not near the code but I believe  buffer.GetEffectTimeIntervalPosition() returns a float from 0.0 to 1.0 so we use it like a percentage with 0.5 meaning 50%.

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: XLights 4 - add effect pdf?
« Reply #18 on: July 19, 2016, 04:33:52 PM »
I will say it again. Post your rgb effects file with your models and we can show you how to get your effects with no coding. Much easier than writing new effects.

Offline robs113

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #19 on: July 19, 2016, 05:16:50 PM »
I appreciate the offer keith but those are done with an Arduino micro-controller and the FastLeds library so there is no effect file I can post.

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: XLights 4 - add effect pdf?
« Reply #20 on: July 19, 2016, 05:56:42 PM »
Not your arduino file. You xlights model file.

Offline robs113

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #21 on: July 19, 2016, 06:20:11 PM »
Ahhh.. and that would be which file?  (As I said total noob)

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #22 on: July 19, 2016, 06:36:33 PM »

dkulp, I am always getting 0 for buffer.GetEffectTimeIntervalPosition() but buffer.curPeriod/buffer.curEffEndPer seems to be giving me what I need.

That would only be true when the effect that is being rendered starts at the very beginning (frame 0) of your sequence.  :-)   Once you move that effect to other parts of the sequence, that won't work as well.
Daniel Kulp
Framingham, MA

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: XLights 4 - add effect pdf?
« Reply #23 on: July 19, 2016, 07:09:02 PM »
Xlights_rgbeffects.xml

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #24 on: July 19, 2016, 07:42:44 PM »
I've already got a couple nice additions to the Fill effect that will do at least 2 of these.  I'm sitting here having fun figuring out all the new cool stuff we will be able to do with it.  I just need to add an offset and wrap option now because originally there was no way to start that effect in the middle and have it wrap back around to itself.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #25 on: July 19, 2016, 09:14:25 PM »
I just checked in the new options for the Fill effect.  How's that for service?
In this GIF I'm linking you can see an example of your slide fill being done.  I created two Window models so each model has a Fill effect on it.  So it's done with 2 effects.
http://gph.is/29SBXlM

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #26 on: July 19, 2016, 09:57:34 PM »
Here's a 5 minute video showing how to use the new Fill effect options:

https://youtu.be/VvLcaN4XXX8

Offline robs113

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: XLights 4 - add effect pdf?
« Reply #27 on: July 20, 2016, 06:14:58 PM »
Wow, that's amazing  :)

Thanks Gil.