|
Author |
Topic: z-depth alpha, how? (Read 2096 times) |
|
Eilsoe
|
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
|
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
|
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...
|
|
|
|