QUOTE(pete1973 @ 02/11/08, 06:14 PM) [snapback]280917[/snapback]
i thought it wouldn't be easy. what would you suggest to tackle that problem?
i know scanline does that in fact. is it possible to use a d-map for it?
Well in actuality the scanline doesnt know this (its a bit surprising but true), it knows that any given pixel isnt visible after its darwn ALL traingles, but it cannot know if its just the inaccuracy of the system. What it does it just paints each and every face and looks if each raster is behind or not. Truly when it ends up it doesnt know one way or other.
But yes you can do it with scanline, what you do is tag a color for each face and sum up wich tags yu saw the ones you didnt must be hidden. Sample sufficently much and thats it. However i wouldn do this with mel and render way too slow.
What you CAN do however is bake occlusion into per vertex colors. The ones that are black are on the inside rest are on the out. Then expand the shell and delete ones that are predominately black if your interested in whole shells.
(the occlusion works its a bit fo a sledgehammer in speed but does the job)
PS: still neither method knows for sure, what they know is that the samples they've taken are in or out. (analyzing this is a bit of a pain to do and much slower than raytracing)