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_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   hidden face removal?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: hidden face removal?  (Read 480 times)
arielm

WWW
hidden face removal?
« on: Jun 14th, 2003, 1:17am »

working on a cube with 6 heavy images mapped on each different face:
 
in order to gain rendering speed, i'm implementing a hidden-face-removal algorithm...
 
does it make sense or p5 is doing something similar in the background anyway (doesn't seem so...)?
 
thanks!
 
p.s: what about vertexNormal()? could it help?
« Last Edit: Jun 14th, 2003, 1:50am by arielm »  

Ariel Malka | www.chronotext.org
fry


WWW
Re: hidden face removal?
« Reply #1 on: Jun 24th, 2003, 8:57pm »

p5 uses a zbuffer algorithm instead of hidden face removal, since a zbuffer is faster for most of the things that you want to do with p5.. it's what almost all renderers use these days, since memory is cheap.
 
if you can figure out some tricks for your particular app, that make it behave "like" hidden face removal, then that can work well..  
 
(on the other hand, p5 does need code for clipping, which is coming soon, so that faces that are offscreen get removed before they're attempted to render)
 
arielm

WWW
Re: hidden face removal?
« Reply #2 on: Jun 24th, 2003, 9:25pm »

uh? so i implemented back face removal on a cube for nothing
 
i don't get yet how a z-buffer is working (one float value for each pixel... scanline methaphor?..), but anyway i thought that if i have a cube with 6 800*800 images mapped on it, it will still be faster to have a simple back face removal algorithm so in the worst case, only 3 faces are sent to the polygon renderer.
 
on the other hand, if the 6 faces would have been sent to the polygon renderer, it would still require some memory allocation, and some other mysterious loops before the renderer decide to render or not...
 
does it make sense?
 

Ariel Malka | www.chronotext.org
fry


WWW
Re: hidden face removal?
« Reply #3 on: Jun 24th, 2003, 9:50pm »

yeah, for extreme cases like 800x800 images, you'll be happier with hidden face removal. on the other end of the spectrum, if you had 1000 8 pixel rectangles, you're much better off with zbuffer.
 
p5 is generally closer to the latter end of things, so zbuffer helps more.
« Last Edit: Jun 24th, 2003, 9:51pm by fry »  
Pages: 1 

« Previous topic | Next topic »