Hey Martin,
your problem is render-order not transparency. transparency only works in one direction, so you have to tell Gem the stacking order from back to front for things to look properly transparent.
Gemheads with smaller numbers get rendered first (0-1-2-3-4 etc..) and the same goes for separators, just specify the render order (back to front) as an argument to the sepatators.
I've attached a demo example to make things more clear
Ben
----- Original Message ----- From: Martin Dupras martin.dupras@uwe.ac.uk Date: Thursday, July 17, 2003 7:30 pm Subject: [PD] GEM and transparency
I have a peculiar problem.
I'm taking a video feed with pix_video then applying it as a texture to three squares, each connected to [alpha] and [colorRGB v1 v2 v3], wherethe first square is red only, the second green, and the third blue. Now I want to superimpose the three squares so that I can translate them independently.
One approach that I tried was using one gemhead, the pix_video and textures2 objects, then using separator to feed to the three squares. It works but if I set the transparency of any square to anything other than 0, the black obscures the squares behind.
I tried another approach, where I used three different chains, but thenonly one of the chains can access the video feed.
Questions:
- is there a way to make transparency work such that "black"
pixels are transparent?
- is there a way to make several [pix_video] objects access the same
video feed?
Many thanks!
- martin
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Zitiere bbogart@ryerson.ca:
Hey Martin,
your problem is render-order not transparency. transparency only works
true
Gemheads with smaller numbers get rendered first (0-1-2-3-4 etc..) and the same goes for separators,
hey, this is news to me. i cannot think of any way how to achieve this (from the programmer's side, of course), without getting a *lot* of timing problems. if you really need a specific rendering order with several separators, you'll have to do what you have to do in pd to acchieve a certain order of message- execution (basically Gem is message based): use "trigger"
sketch:
[gemlist( | [t a a] | | [gemlist2( [gemlist1(
I've attached a demo example to make things more clear
i'll have a look at this. however, i will *strongly* recommend to not rely on a feature like the ordering of several gem-sublists by giving an argument to [separator]. it will be really confusing to ignore pd's way of handling such problem.
mfg.as.r IOhannes