User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: RGB Coefficient and Lighting

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Dec 2012
    Location
    Copenhagen, Denmark
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RGB Coefficient and Lighting

    Hello,

    I'm trying to create a lighting around a player.

    While I've found some examples on how to do this, I have hit a barrier which will seem obvious to pass by many of you, but I'm just stuck.
    The backdrop's RGB Coefficient is not selectable... how do I do this?

    I even tried to just copy from an example and use the layers appropriately, but it doesn't work.

    Thanks in advance.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to enable Direct3D 9 as the display mode in the project properties to use the RGB coefficients, as it utilizes Hardware Acceleration.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Dec 2012
    Location
    Copenhagen, Denmark
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks that worked. I still can't get the lighting to work though, so there's darkness everywhere except for in a circle of my choice. Can someone please guide me in the right direction (I've tried some examples, but they weren't well documented)?

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The easiest way is to simply create a large black active with a circle cut out and center it on your character. An alternative way would be to use something like surface and draw an ellipse with transparent colour around the player, but I'm not sure if this would be faster at all.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Well, if he has multiple light sources, the Surface Object is the way to go. Otherwise, the first method should work perfectly.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Dec 2012
    Location
    Copenhagen, Denmark
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems I don't have the Surface Object, where is it and how do I use it (unless it's really easy)?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It's really easy to use. It comes with several examples and a help file. Download it here.

    By "really easy", I mean you can make a simple paint program with one event ("simple" being a paint program that only uses one color).

    It also supports alpha channels, or transparent colors (with transparent colors being the default). Just draw with 0,0,0, and it will act as an eraser (unless you are using an alpha channel). Really handy for stuff like destructible terrain (I've actually made a simple destructible terrain engine with falling dirt using the surface object before, though it is a little bit more complex than just erasing (drawing with 0,0,0)).

    My point is, it shouldn't be too hard to catch on. The best part: It also has more features than you can shake a stick at, so it can also be used for some of the most advanced things evar (E.G Rendering solid-color 3D polygons (yes, you read this right)).

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When doing lighting i allways use a Screen Filter ( Active ) with the Subtract effect ( this created darkness over the entire screen ).
    And i do Light by creating gradient shapes ( Actives, usually circles ) with the Add effect.
    This way the Light Actives will tear through the darkness with a nice effect.
    ( can make example if desired )

    I never realy did the Surface method, but i would like to know how it compairs.

  9. #9
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Hi King_Cool. This sounds interesting and something I know I would enjoy, and maybe other forum members also. A example the way you do this would be great.

    Thanks,
    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK
    I will explain this as requested by Nivram.

    ...
    CREATE DARKNESS

    Create Darkness by making an Object ( Active or Backdrop ) have the 'Subtract Effect'.
    The darkness should have a single color, and should range from color Black to color White ( this determines the strength of the Darkness ).
    White color = Complete Darkness
    Black color = No Darkness at all
    A bit counter-intuitive, but just roll with it.

    CREATE LIGHT
    Create Light by making an Object ( Active or Backdrop ) have the 'Add Effect'.
    The Light can be of any color you wish, however the Lightness of the color determines the strength of the Light.
    Light color = Very strong Light
    Dark color = Very weak Light ( or no light at all )

    Though there is nothing wrong with using a single color for your Light, gradient Lights look better and interact nicer with the Background, Darkness and even other Lights:

    FIG A, Illustration of a Solid and a Gradient 'Add' Light
    ...
    INTERACTION
    And thats it actually, you now have your Darkness and you have your Light.

    It is VERY importaint to remember that for Lights to be able to interact with or penetrate Darkness, they MUST to be located behind the Darkness.
    So if your Darkness is a Backdrop Object and your Light is an Active Object, you probably have to move the Backdrop Object to a higher Layer ( since Backdrop Objects cant nomaly be Ordered infront of Active Objects ).

    ...
    DARKNESS DARKENING THE BACKGROUND
    However there seems to be some sort of system to which colors become darkened/ invissible behind the Darkness ( see FIG B ).
    In general it seems that darker color-shades disapear first, while Lighter colors-shades persist even behind strong Darkness ( see FIG B ).
    Its also apparent however that different colors have different 'resistance' to the Darkness ( see FIG B ).


    FIG B, Image from interactive example in AddSubtractLighting.mfa illustrating the disappearance of darker color-shades, and the different colors different resistance to Darkness.

    This Voodoo is very importaint to keep in mind, because it may impact your Game/ Application greatly in tearms of graphical quality or functionality.
    In the 2 following screen shots ( see FIG C and D ), the only difference is the Background graphics.
    However as you can see, the hight quality background looks much nicer but also have parts that seem to penetrate the darkness.


    FIG B, Image from interactive example in AddSubtractLighting.mfa illustrating Light and Darkness interacting against a high quality background.


    FIG C, Image from interactive example in AddSubtractLighting.mfa illustrating Light and Darkness interacting against a simple background.

    ...
    OVERLAPPING LIGHTS
    You may also notice that Lights get amplyfied and stronger when overlapping eachother, which is a nice little effect.

    ...
    Note that i have no deep technical understanding of what goes on behind the sceenes of the Add and Subtract effects, ive just been usning them for quite a while.
    If someone else feels the need to shed some light on this, they are welcome to as far as i am conserned.

    https://dl.dropboxusercontent.com/u/...ctLighting.mfa

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Lighting for IOS app
    By Shadeve in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th May 2013, 05:32 PM
  2. RGB coefficient?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th June 2012, 01:43 PM
  3. RGB coefficient
    By alxmrg in forum Hardware Accelerated Runtime
    Replies: 11
    Last Post: 7th June 2009, 09:41 AM
  4. RGB Coefficient
    By MechatheSlag in forum Hardware Accelerated Runtime
    Replies: 5
    Last Post: 21st January 2008, 06:02 PM
  5. RTS "Lighting" possible?
    By Doc4 in forum Multimedia Fusion 2 - Technical Support
    Replies: 19
    Last Post: 2nd March 2007, 08:21 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
  •