FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Automated Systems
(Moderator: REAS)
   z-depth alpha, how?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: z-depth alpha, how?  (Read 2096 times)
Eilsoe

WWW Email
z-depth alpha, how?
« on: Mar 9th, 2005, 9:40pm »

I have this:
 
www.avalon-rev.dk/p5/3D1/
 
 
how on earth do I make the particles change alpha when they move to the back?
 

Kirupaforum moderator...
bsr

WWW Email
Re: z-depth alpha, how?
« Reply #1 on: Mar 9th, 2005, 11:11pm »

you should just be able to add a line before you draw your point here:
 
void draw(){
    point(xpos, ypos, zpos);
  }
 
to something like:
 
void draw(){
stroke(255,255,255,(zpos/10));
    point(xpos, ypos, zpos);
  }
 
or some such, can't remember if you have to do the division outside of stroke() and i've not got p5 installed on this here machine.
 
edit: sorry, looking again at your code that might not work.
« Last Edit: Mar 9th, 2005, 11:12pm by bsr »  

http://hippocamp.net
Eilsoe

WWW Email
Re: z-depth alpha, how?
« Reply #2 on: Mar 9th, 2005, 11:26pm »

if it wasn't for my rickety way of rotating the field, it would work, but with my code, negative z-depth could also occur closest to the viewer
 

Kirupaforum moderator...
Pages: 1 

« Previous topic | Next topic »