Home › Forums › Syphon › Syphon Implementations – User › syphon max alpha
Tagged: alpha max processing
- This topic has 10 replies, 2 voices, and was last updated 9 years, 3 months ago by
vade.
-
AuthorPosts
-
November 19, 2011 at 10:27 am #4949
hcgilje
ParticipantI am wondering if maxmsp is interpreting the alpha values from syphon differently than other syphon environments?
If I use the standard simple server as source, it looks the same in simple client, but in the jit.gl.syphonclient it looks much darker. Only by turning blendmode to 0 makes it look the same, but that just turns off the alpha channel so that is not ideal.
This does not occur with syphon sources made in max, so sending syphon from max to vpt for instance works as expected with the alpha information intact.I had a user report the same alpha issue with sending syphon from his processing sketch to vpt. However for me, the included syphontest example works fine.
November 19, 2011 at 1:50 pm #4950vade
KeymasterLooks about the same here. One thing Simple Client is doing is using color sync automatically to match to the output device (thanks to Quartz Composer). Jitter is not. However, I don’t see it darker.
Post a pic? I’ve never heard of this complaint before. Perhaps its specific to certain hardware?
November 21, 2011 at 2:57 pm #4951hcgilje
ParticipantI´m on a 2010 macbook pro with nvidia graphics card.
Here is a link to a pic:
http://nervousvision.com/down/syphon_hc.pngNovember 21, 2011 at 3:25 pm #4952vade
KeymasterHrm. I cannot re-create:
I am on a 2010 MBP (MacBookPro6,2), NVidia GT 330M (512MB) running 10.7.2
I am running in Max 6. Are you on 10.6.x, under Max 5 ? Mind giving us a little more to go on ? 😉
Could be a color space issue with 10.6.x, Quartz Composer (which is what Simple Client and Server are using behind the scenes) does color management. Jitter, etc, does not. So there may be a slight difference, but it should not be as drastic as in your shot.
November 21, 2011 at 3:28 pm #4953vade
KeymasterAh, I can re-create it if I disable another layer in Simple Servers QC comp. I see the issue. It has to do with how jitter clears the back-buffer.
Jitter defaults to a erase color of 0, 0, 0, 1. If you clear with 0, 0, 0, 0, it looks correct. This has to do with the blend mode math, default being over, aka 6, 7.
Since the erase color alpha component is 1, not 0, it looks different from every other app. Most applications do not do a clear the same way jitter does, as far as I can tell. (Erasing to 0, 0, 0, 0 does not leave artifacts like it does in Jitter in any other app).
November 21, 2011 at 3:42 pm #4954hcgilje
ParticipantI am still stuck in 10.6 and max 5, yes, I pride myself in not being an early adopter 🙂
And it looks the same with either the geforce 9400 or 9600 graphic cards.If I clear it with 0,0,0,0 I get the typical jitter trail effect, so that wouldn´t work very well on a moving source.
So why does the syphon processing example look correct, is it because it has a white background?
November 21, 2011 at 3:48 pm #4955vade
KeymasterThis is totally a Jitter specific issue. I’ve opened a Q/A on their forum. Stay tuned for a reply from Cycling. From now, this is near as I can tell, a Jitter specific issue. They are not clearing the same way as most other GL apps. Its not a “wrong” thing to do, but a choice (how the trails happen). Now, you could probably fiddle with the blend mode to get something appropriate, but not having GL_COLOR_BUFFER_BIT cleared when erase color is transparent black is going to cause compositing issues regardless.
http://cycling74.com/forums/topic.php?id=36463&replies=2#post-176982
November 21, 2011 at 4:34 pm #4956vade
KeymasterChange your blend mode to 1 7. That should do it. Most apps use an “over” blend mode as default (the 1 7), but Jitter uses Mix, which is also fine. Its just a choice. Now because they don’t clear the color buffer when erase is 0, 0, 0, 0, you see issues you may not normally see.
Blending to 1 7 should fix that.
November 22, 2011 at 3:17 am #4957hcgilje
Participantblendmode 1 7 solves the issue when working with a single layer, but it breaks everything else when working with multiple layers, transparency and alpha masks, so I guess there is a slight incompatibility when combining syphon sources with alpha masks and jitter alpha.
To illustrate, I made two layers. Bottom layer is just a solid red, top layer is set to 50% opacity with a circular alpha mask.
November 22, 2011 at 8:52 am #4958vade
KeymasterOver blend mode (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) should be able to composite that fine. If you are having jitter issues, its really nothing we can do about it. This problem has nothing to do with Syphon, but is an issue specific to Jitter. Post in the thread I linked to on the C74 forums.
November 22, 2011 at 1:17 pm #4959vade
KeymasterIt totally works. You just have to account for alpha pre-multiplication. Lower the colors brightness as you drop opacity (multiply the rgb values by the a value). Works fine here in Jitter. Two video planes on top of one another, one offset with low alpha, from Syphon:
-
AuthorPosts
- You must be logged in to reply to this topic.