Problem with blend method: add and transparency

Hello,

I have attached a very simple synfig project. Two identical gradients rotated 90°, on top of each other, the top one with blend method: add, and the bottom one with amount: 0.5. What I see in the editing window, doesn’t match what I see when rendered.

This is clearly a bug with the alpha channel in the preview.

But I actually love the thing I can see in the application preview! I have created a quite cool explosion animation with it, and it was great, but I can’t get it to render! I know you’ll fix this bug, but is it possible to have this as a new blend method, or, do you know any other ways to achieve this same effect?

Thanks!

PS. Glad to have this app, I’ve been longing for something like this for years! Keep up the good work!
screenshot.png
Synfig Animation 2.sifz (544 Bytes)
Synfig Animation 2.png

I’m not absolutely sure that it is a bug. Remember that in Synfig, there is not limitation on the color range (as usual it is from 0 to 100%) you can have colors of something bigger than 100% or lower than 0%. It doesn’t mean that it i a bug in the preview. The problem is that when you export the image some information is lost (colors are clamped) so they finally look the same regardless if it is 100% or something >100%.
if you add a 100% alpha and 100% white to a 50% alpha and 100% white you will end with a 137% white and 50% alpha that finally is clamped to 100% white and 50% alpha. There are lots of artifacts in the render preview due to weird alpha or color channels values that doesn’t appear in the RGB world.
-G

I see where you’re coming from. Do you see a way to be able to export exactly what I see? To control the way Synfig clamps values?

Edit: So, in layman’s terms, and non-visually-linear figures, I get: (100% white + 100% white = 200% white) * .5 alpha = 100% white delivered onto the transparent background. And then at render time, I get 100% white + 100% white = 200% white clamped to 100% white delivered to the RGB channels, and 50% as alpha delivered to the alpha channel. Is this correct?

Could the first process be used to get an image that is then separated into RGBA? Or am I totally wrong here?

In the previous post I mentioned that when you add RGBA (100, 100, 100, 100) to RGBA (100, 100, 100, 50) you obtain RGBA (137, 137, 137, 50). That’s exact only if the (weird) Synfig option “Non linear color selection” is enabled. Synfig has a bizarre default way for the color selection that is not linear. 0% is mapped to 0% and 100% is mapped to 100% but not lineally. So when that option is enabled by default, the color representation out of the 0-100 boundaries is also affected. That’s why I mentioned 137% when it was really 200%.
According to the wiki documentation and the code for the Add blend method the resulting color when A is added to B is:
color result = B+AA.alphaA.amount
alpha result = B.alpha

For your example it gives for the four corners:
top right: 200, 200, 200, 50
top left & bottom right: 100, 100, 100, 50
bottom left: 0,0,0,50

The current visual representation of the Synfig Studio canvas gives more information and a more accurate representation of what’s happening in with the colors that the output render.

The output render is clamped only if the output doesn’t support RGBA out of the 0-100 space. IIRC Open EXR supports HDRI colors and Synfig too.

For your request, I think it can be possible to enable that the canvas representation were clamped to the 0-100 color space but apart of that it must be an option, I don’t think that I’m in conditions to make that change in a short term.

Please add that request to the sourceforge feature request tracker and maybe someone with more time decide to implement it.

-G