AdvanceColour
  • User avatar
    sigmasix
    master
    Posts: 1224
    Joined: Thu Dec 02, 2004 2:12 pm
    Location: gva | switzerland
    Contact:

    AdvanceColour

    by sigmasix » Wed Feb 23, 2005 3:22 am

    So, my first module is in the online library. Please read the description for more information.
  • User avatar
    boris
    garageCube team
    Posts: 910
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    by boris » Thu Feb 24, 2005 2:27 am

    Ok cool,
    Just a clarifications about the keyword ctrl_layer_pixelFX_saturationOn

    Put the value 0 - > saturation is off
    Put the value 1 - > saturation is on

    And it's the same for all the keywords which finish by "On"
    We will make a documentation soon ...
    Boris * garageCube team
  • User avatar
    sigmasix
    master
    Posts: 1224
    Joined: Thu Dec 02, 2004 2:12 pm
    Location: gva | switzerland
    Contact:

    by sigmasix » Thu Feb 24, 2005 3:14 am

    ok cool, thanks. For the fading option I'm completely lost... It's more triky than I thought... I have to get the actual color and fade to the new color... I don't kno if it's possible with a math function...
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    by yves@garagecube » Thu Feb 24, 2005 9:27 am

    sigma6 wrote:ok cool, thanks. For the fading option I'm completely lost... It's more triky than I thought... I have to get the actual color and fade to the new color... I don't kno if it's possible with a math function...


    Try with a simple linear interpolation like that :

    For each color component (red, green and blue):

    current = dest + (dest-source)*position

    Where:
    current is the fading color
    dest is the target color
    source is the initial color
    position is the time position in your fade (it should go from 0.0 to 1.0)

    Yves.
  • User avatar
    sigmasix
    master
    Posts: 1224
    Joined: Thu Dec 02, 2004 2:12 pm
    Location: gva | switzerland
    Contact:

    by sigmasix » Thu Feb 24, 2005 12:43 pm

    that's the solution I thought but the syntax's not correct... for each is not in the documentation... And I don't really understand the explanation for the "for" statement... :oops:
    http://www.python.org/dev/doc/devel/ref/for.html

    thanx for the support ;) python seems easy like that but there are so many possisbilities... harder than it seems :?
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    by yves@garagecube » Thu Feb 24, 2005 1:01 pm

    Check this section of the documentation (tutorial), it is easier :

    http://www.python.org/dev/doc/devel/tut ... 0000000000

    Typically a "for" is used this way:

    for i in range(0,10):
    print i

    By the way to animate the fade you need the "periodical" script. It is called every Modul8 internal cycle. You can use the "elapsed" passed value to know the amount of elapsed time since the last cycle. We'll try to put together more examples when we'll have more time.

    Yves.
  • User avatar
    sigmasix
    master
    Posts: 1224
    Joined: Thu Dec 02, 2004 2:12 pm
    Location: gva | switzerland
    Contact:

    by sigmasix » Fri Feb 25, 2005 2:37 pm

    Ok, I tried but the problem is that it works for entire number (1,2,3,4,5,6,7,8,9,0) and not fot the numbers between 0.0 and 1.0...
    I think I'll leave the module like thant and I'll try again later, when my skills in python will be... hum... better :P

Who is online

Users browsing this forum: No registered users and 5 guests