User Tag List

Results 1 to 8 of 8

Thread: How to calculate RGB coefficient?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question How to calculate RGB coefficient?

    Is there any way to calculate the rgp coefficient you need to change the color of a object to another or do you just have to guess?

    For example I have smoke in my game that is brown, but want to add an event to add the event: Set RGB coefficient, so the brown object gets more white to look like white smoke instead of brown. From what I understand I should put in numbers like 124,253,111 in the RGB coefficient window for the event? But how do I know what value to put in to make one color into another?

    The reason I want to use this method to change color is because I want it to be compitable with Flash. I dont know if there is any other effects or shaders that are supported by flash yet besides this?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Have you used the GetRGB() function (in the system object's expressions)?

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Francois View Post
    Have you used the GetRGB() function (in the system object's expressions)?
    Hmm I dont know if I tried that, but won´t that just give me the objects current RGB value? How do I use that after I know what it is to get the right color I want?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    You probably mean RGBAt. Just use GetRGB(r,g,b) like the documentation tells you. GetRGB(255, 0, 0) returns red.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    OK, I tried the GetRGB function, and it seems to works for all colors except the one I need which is White :/. Black works by giving the value 0,0,0. But when I tried 255,255,255 to get white nothing changes?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Huh? The default is white, and a color multiplied by white is the same color.

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Sep 2010
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    This is one reason *my* application cannot use RGB Coefficients

    Every element in my application starts out, by default, in one certain color (values range from 0 to 9, starting at 5 with each change adding 25 to, or subtracting 25 from, a color) and you must remove or add color in red, green, or blue to change to a desired color.

    Since the default coefficient, white (255, 255, 255) is the color you start out with, it is impossible to add anymore color (which elements must be able to do) using the RGB Coefficient method. If I use a mask over top of the default sprite it can use the coefficient method just right...but does not produce ANY of the correct colors I need...therefore I had to resort to using red-, green-, and blue-colored masks and individually change their color intensities separately...it's quite the tedious hassle, time consuming, and bogs down the runtime..

    I would actually give anything to be able to reduce the number of objects in my application if I could use one single mask instead of 15 masks stacked onto an individual sprite...but the colors I need are simply not produced by the use of coefficients.

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    A bit of another question. Its really strange, i noticed that when i try to change the rgb coefficient in the frame editor right in the properties bar i can no longer see any effect on the object. It do chage color as soon as I try to run the frame though. Is this a new bug in 254 maybe? I just updated and i could always see rgb coefficient effect directly on object i adjusted in frame editor before.

Similar Threads

  1. Any way to calculate objects new position after changing layer scrolling coefficient?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 7th November 2014, 11:08 AM
  2. how to calculate rotated hotspot?
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 8th July 2011, 08:45 PM
  3. How can I calculate/show percentage
    By Tuna in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 28th April 2011, 06:47 PM
  4. How to calculate the angle between 2 points.
    By QS in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th April 2010, 02:09 AM
  5. Calculate Calculations?
    By Looki in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th January 2007, 05:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •