We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
transparent UI (Read 734 times)
transparent UI
Oct 20th, 2007, 8:58am
 
any way to create a transparent UI like the following:

http://www.oniva.com/upload/1356/trans.png

I try to load the image on top of a motion scene but i want the image to transparent like above and see the background, how to do that?

can i just use photoshop to change the alpha? if yes how to do that in photoshop?

=============
PImage img;

void setup(){
img = loadImage("new.png");
}

void draw(){
   // draw some motion scene
   image(img, 50, 50); // image will cover scene on back
}

Re: transparent UI
Reply #1 - Oct 20th, 2007, 9:37am
 
http://processing.org/reference/PImage_mask_.html

F
Re: transparent UI
Reply #2 - Oct 20th, 2007, 5:38pm
 
the solution to your problem is pretty much covered here:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1192166420
if you want to draw the 3D background stuff within processing, i guess JonhG's suggestion is the way to go.

here's a photoshop transparency tutorial:
http://library.creativecow.net/articles/ahearn_luke/creating_clouds.php
basically, every pixel without color in photoshop is transparent (if you see photoshops chess-pattern, that regions are transparent). now you have to export your images in a format that processing can import and that do support alpha, like PNG24 or GIF. I normally use photoshop's "Export to web..." functionality.
or - you go the way with masks, as fjen suggests, but in my opinion the alpha image approach is more straight forward.
Re: transparent UI
Reply #3 - Oct 20th, 2007, 6:33pm
 
i extended my example from the other thread. Basically i just wondered if that z-buffer clearing thing works Wink

http://www.extrapixel.ch/processing/menu_3d_bg.zip
Page Index Toggle Pages: 1