Re: Filtering occluded polygons

Date : Thu, 5 Oct 2006 18:28:10 +0100 (BST)
To : XSI(at)Softimage.COM
From : "Andy Nicholas" <andy(at)andynicholas.com>
Subject : Re: Filtering occluded polygons
I did this for Lightwave a while ago. I just pulled all the triangles and
rendered it into an OpenGL viewport while moving the camera along the path
- essentially your Z buffer solution. Each triangle had a unique color so
I just scanned the frame buffer to figure out which polys were visible.

Jittering the camera several times at each position can make it less
sensitive to small triangles. It turned out that it was extremely fast to
compute, so I could have done it at an even higher resolution which would
have helped too. You can always tell it to not delete small triangles
unless ones around it are flagged for deletion too.

The obvious choice would be to get the Custom Display Host to display the
OGL window. That way it's integrated into XSI and you can also get it to
delete the unseen triangles from the model when it's finished.

Alternatively, you could get XSI to render the triangles realtime in a
viewport and you could try capturing and scanning the window - that'd at
least save you from having to write the OpenGL code. But you'd probably
spend more time trying to figure out the setup side of things, so in the
end it'd maybe be faster to just do it all yourself.

Andy


> Hi,
>
> I'm writing a C++ tool to select polygons based on their visibility from a
> camera. I need to flag the polygons that are partially hidden, and/or
> those
> that are completely hidden by the selected polymeshes.
>
> As of now, I am considering two possible solutions :
>
> 1. Get all polys and calculate a geometrically exact occlusion. It would
> be
> a lot of work to write something optimized.
>
> 2. Make a ZBuffer to flag the polygons. This would be fast and easy, but
> would lack precision, with erroneous flagging for very small polys, or it
> would require a lot of memory for accuracy.
>
> Both cases, I am basically getting the polymesh data and computing
> everything myself, so it feels like reinventing the wheel.
>
> Is there something in the SDK that could help for this task ?
>
> Any other suggestion ?
>
> Thanks,
>


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.