Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: Oomek on April 20, 2017, 06:07:03 AM

Title: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: Oomek on April 20, 2017, 06:07:03 AM
I'm planning to add belnding modes to Attract Mode (overlay, multiply, add, subtract)
Are you happy?
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: jedione on April 20, 2017, 06:07:20 PM
yes....i am
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: Oomek on April 21, 2017, 06:07:10 AM
(https://preview.ibb.co/b5Ubkk/AM_Blending_Modes.png) (https://ibb.co/khS7rQ)
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: mahuti on April 21, 2017, 07:52:56 AM
I can think of a lot of uses for this.
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: Oomek on April 22, 2017, 03:40:28 AM
It appears that for overlay mode I won't be able to make the alpha blending working. It's due to how glsl's output merger belnding states work. I can work around this by making blending modes as a shader, but I wanted to make them native and accessible by setting for example image.blending("overlay"). To make it as a shader it would require to render all the theme objects on the master surface and then pass that surface to the shader to be used as a back buffer.

The good side of this is that I'm not limited to just 4 blending modes. I could do all the ones that Photoshop provides and many more.

Tell me what do you think.
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: Oomek on April 29, 2017, 10:00:12 AM
I chose the shade route

usage is as simple as:

Code: [Select]
local bl = Blender( fe.layout.width, fe.layout.height )

local image1 = bl.add_image( "image1.png", 100, 100, BlendMode.Add )
local image2 = bl.add_image( "image2.png", 200, 200, BlendMode.Overlay )

All the image properties and functions are inherited, so you only substitute fe. with bl. and specify the blending mode and that's it

WIP video
https://youtu.be/JrvfiUfZ_Hw
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: liquid8d on May 23, 2017, 07:26:57 PM
this is awesome, thank you!
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: mahuti on June 06, 2017, 11:51:46 AM
If this were available for download I'd be testing it on a new layout I have. There are some shadowing and highlights that might be nice to use these on instead of cut PNGs.
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: jedione on November 04, 2017, 08:02:57 AM
im guessing he has left the building?

 :'(
Title: Re: [ANNOUNCEMENT] Blending modes will come to Attract Mode
Post by: liquid8d on November 04, 2017, 10:55:30 PM
I'm dying for this one as well... :P