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
   Responsive Form, Games
(Moderator: REAS)
   postprocessing a 3d scene
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: postprocessing a 3d scene  (Read 1636 times)
toxi

WWW
postprocessing a 3d scene
« on: Feb 6th, 2004, 1:52am »

hello all, so i've been awake now for over 38 hours and instead of going to bed, i quickly had to try out this little idea. the first result of which is a nice little tech demo about the following 3 things:
 
- 3d mesh/vertex animation
- independent z-buffer control
- new imaging functions alpha() and blend()
 
all of which are explained in quite detail in the source. hope it'll help some of you...
 
http://www.toxi.co.uk/p5/superGlow/
 
this one uses a different condition for the vertex animation:
 
http://www.toxi.co.uk/p5/superGlow/index2.html
 
have fun & good night!
 

http://toxi.co.uk/
REAS


WWW
Re: postprocessing a 3d scene
« Reply #1 on: Feb 6th, 2004, 4:43am »

sometimes i wonder if you're using the same software as the rest of us  
 
+ casey
 
mKoser

WWW Email
Re: postprocessing a 3d scene
« Reply #2 on: Feb 6th, 2004, 11:06am »

nice, nice, nice... oh, and nice!
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
elout

12747371274737 WWW
Re: postprocessing a 3d scene
« Reply #3 on: Feb 6th, 2004, 3:13pm »

I found the z-buffer cleaning trick very usefull.
 
Before when I used the stroke() command, my lines would not disappear in my overal animation.  
Clearing the z-buffer fixes this problem.
 
example what I`m talking about;
Code:

//zbuffer check thx to toxi
// p5 v.057 alpha
float[]  clearZ;
 
void setup()
{  
  size(400, 400);
  rectMode(CENTER_DIAMETER);
  //set the zbuffer.
  clearZ=new float[width*height];
  System.arraycopy(g.zbuffer,0,clearZ,0,clearZ.length);
}
 
void loop()
{  
  stroke(0);
  fill(random(255),random(255),random(255),190);
  rect(mouseX-10, mouseY-10, 100, 100);    
}  
void keyPressed()  
{
  fill(0); // lines won`t disappear
  rect(width/2,height/2, width, height);  
}
void mousePressed()  
{
  fill(0);
  rect(width/2,height/2, width, height);  
  //clear zbuffer - lines disappear
  System.arraycopy(clearZ,0,g.zbuffer,0,clearZ.length);
}
 
toxi

WWW
Re: postprocessing a 3d scene
« Reply #4 on: Feb 6th, 2004, 8:10pm »

yeah uncle elout, i think there's big potential for more complex stuff. apart from the speed gain of just resetting the Z-buffer and leaving the pixel buffer intact, you could also set certain pixels in the Z-buffer to -1 and so basically protect them from any drawing operations...
 

http://toxi.co.uk/
mr.prufrock

WWW Email
Re: postprocessing a 3d scene
« Reply #5 on: Feb 6th, 2004, 8:24pm »

wow, that's very nice!
 
...but staying up for 38 hours is bad for health
 

I grow old...I grow old
I shall wear the bottoms of my trousers rolled.
toxi

WWW
Re: postprocessing a 3d scene
« Reply #6 on: Feb 6th, 2004, 10:27pm »

hey, if you're interested, i just posted some more info about this over on my blog...
 
ohh, and casey, of course am just cooking with water and "good clean logic".
hehe..
 

http://toxi.co.uk/
v3ga

WWW Email
Re: postprocessing a 3d scene
« Reply #7 on: Feb 7th, 2004, 1:20am »

Ah another supadupa animation from Toxi !  
I found out a paper on this subject a while ago  on nvidia's website. Basically, it's how the glow effect was rendered in the tron game and ho< it can be possible for 3D objects to have glow regions (thanks to a glow map).  
Here's the link :  
http://developer.nvidia.com/docs/IO/8230/D3DTutorial_EffectsNV.pdf
 

http://v3ga.net
toxi

WWW
Re: postprocessing a 3d scene
« Reply #8 on: Feb 7th, 2004, 7:29am »

okay, stage 2:
 
as you might know from reading this forum, there're currently 2 renderers implemented in Bagel, however the switch to new one is still outstanding as there are few issues left to sort out. however, whilst doing some work on the sources, i've also updated the 2nd version of my demo to use the overlay image as texture for the mesh too. it's all highly experimental, undocumented and probably not very flexible for general use, but the effect is quite dramatic (at least to my eyes) nonetheless!
 
http://www.toxi.co.uk/p5/superGlow/index2.html
 
exciting times to come, i think...
 

http://toxi.co.uk/
mflux

fluxhavoc WWW
Re: postprocessing a 3d scene
« Reply #9 on: Apr 28th, 2004, 11:59am »

:@
toxi... such mad hacks.
 
like everyone had said before.. very amazing. o_o
 
madmerv
Guest
Email
Re: postprocessing a 3d scene
« Reply #10 on: Jul 30th, 2004, 10:48pm »

I used this in StellarFlight --> see above post
 
Pages: 1 

« Previous topic | Next topic »