User Tag List

Results 1 to 5 of 5

Thread: [Request] 2 mask controlled shaders to do "GIMP Curves - Channel Value" manipulations

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    675
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    [Request] 2 mask controlled shaders to do "GIMP Curves - Channel Value" manipulations

    Mask controlled manipulation shaders with smooth effect transitions for
    DX9 + GL_ES compatible platforms for the moment when specific sampling types are supported here which might be relevant.

    GIMP 2 - Channel output: Value Addition + Value LCh Chroma effects
    (these effects should be controlled with smooth masks showing black/white color transitions)

    follow these rules
    Click image for larger version. 

Name:	gimp_shader_color_rules.jpg 
Views:	68 
Size:	74.1 KB 
ID:	31844

    Shader 1
    For this effect I want to achieve this specific behaviour known from GIMP 2 (Colors - Curves: adjust Value Channel with Addition type Blending mode).
    Adjust colors with the same rules when doing this in GIMP and adjust Channel settings like this: Input value is 100, only adjust Output 0-100 (0 means no change, 100 means max. brightness).
    Perhaps add an extra Intensity parameter for the shader to further increase Output value result and strengthen this effect equally
    (further increasement of the Curves - Channel Value output value).
    The Effect should work with masks objects to control with them automatically how much this effect applies in general
    (black #000000: effect does not apply, brighter: effect applies more).

    Shader 2
    GIMP 2 behaviour (Colors - Curves: adjust Value Channel with LCh Chroma type Blending mode).
    Adjust colors with the same rules when doing this in GIMP and adjust Channel settings like this: Input value is 100, only adjust Output 100-0 (100 means no change, 0 means max. desaturated).
    Should be compatible with the same type of smooth masks to control how much this effect is existant in general
    (black #000000 = effect doesn't apply, brighter = effect applies more).

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,578
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Sounds cool, but not sure how to make it accurately...

  3. #3
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,578
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Wodjanoi I really want to give it a try, but you need to be a bit more specific...
    Can you send me a gimp file with the effect and the original textures?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    The first one is just a straight-up "lighten" mask. I'd be very surprised if that didn't already exist.
    The second one just looks like a "saturation mask" filter, which definitely already exists.

    The only difference is that the second one uses the Hue-Chroma-Luminance color model (instead of Hue-Saturation-Lightness), which I can tell you makes everything much more difficult, for a couple of reasons:

    Firstly, LCh colors don't reliably map to Red-Green-Blue - some LCh colors are outside the RGB gamut, which means that you have to either clamp one or more components (which defeats the purpose - it would be better to just use HSL) or you have to find the closest RGB color, which is extremely difficult and computationally expensive.

    Secondly, to convert from RGB to LCh, you need to convert them from RGB to XYZ, then from XYZ to Lab (or Luv), and then from Lab (or Luv) to LCh. And then after manipulating the color, you need to reverse that whole process to get back to an RGB color to show on screen. Unless you're making a graphics app (not a game) it's not going to be worth the trouble, when HSL is already good enough, even if it's not perceptually uniform.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    675
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    It's cool to see that a few ambitioned shader hobbyists posted their thoughts here.

    Personally I need something like this to solve the general problem to synchronize a player character's appearance dynamically with my lighting designs for 2D side-scrolling environments.
    I openend this request topic for creating a special shader solution, because I thought this would be definitely not only useful for me at the first place and the community might benefit from something like this as well.
    Any questions or news/updates in this thread from any person are welcome.

    @NaitorStudios - A folder with assets and files to make things more convenient will be soon delivered to you per PM.
    It seems it is not super easy to put these ideas into functional shader(s) for DX9 support - especially with any plans in the future to support OpenGL_ES compatible platforms.
    I don't want you to be alone with this task. Perhaps some of the other shader wizards are willing to brainstorm solutions.
    Gigatron at least told me I could collect some Shadertoy examples - I'm not sure if these are a big help, but I included a few Shadertoy website links.

Similar Threads

  1. Replies: 4
    Last Post: 2nd July 2016, 11:39 PM
  2. Replies: 4
    Last Post: 7th April 2016, 01:43 AM
  3. Replies: 4
    Last Post: 17th February 2016, 11:46 AM
  4. Pos of the stick and buttons of shooting when you choose "controlled by an extension"
    By Koji_Kabuto in forum Android Export Module Version 2.0
    Replies: 19
    Last Post: 10th March 2014, 03:14 PM
  5. "Rendertarget ping/pong" and "Pixel shaders" Can TGF2 do this?
    By CloudExSolider in forum The Games Factory 2 - Technical Support
    Replies: 13
    Last Post: 7th April 2013, 09: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
  •