Question about color smoothing

  • Hi, i'd like to understand better how color smoothing works.
    I know, given a start color and an end color, it interpolates between them over a specified amount of time at a specified refresh rate, fine.
    What i've not understood is the timing, an example with just one led should be clear:


    [INDENT]Imagine i've set a slooow smoothing over 1000ms.


    a) time 0ms : tell hyperiond to display 0,0,0
    b) time 500ms: tell hyperiond to display 255,255,255
    c) time 1000ms: tell hyperiond to display 0,255,0


    What will happen?
    a) To simplify things, suppose that at time 0 there is no smoothing triggered.
    b) At time 500ms, hyperion will start to fade from black to white; and given the high smoothing time of 1000ms, the fade is expected to stop at time 1500ms.
    c) "BUT" at time 1000ms, i tell hyperiond i want green instead, and by that time, the previous fade (b2w) is still going on, it is in the middle, and probably the led is a perfect gray (128,128,128).


    So i'd like to know what would the happen at time 1000ms.
    Does the fading stop and another fade starts just from 128,128,128 to 0,255,0 or will hyperiond wait for the first fade (b2w) to finish, before starting the new one from 255,255,255 to 0,255,0?[/INDENT]



    I hope i've been clear enough, thanks.

  • Ok, after several testing, i understood that unfortunately the smooth routine "queues" fades.
    I modified my sketch to fade itself and disabled the smoothing in hyperion, here it is, works well for me.



    It provides smooth and slow (play with the speed value) color fades; it differs by the hyperion implementation because it reacts immediately to the requested changes instead of waiting for the previous fade to complete.
    Think at it as a sort of real time temporal smoothing.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!