Hi Chad,
On Wed, 2004-05-19 at 03:59, Chad Austin wrote:
> In my main model, there are tons of geometry nodes that overlap with each
> other.
> Maybe that's the problem. However, I created a Sphere in VRED, saved it to
> a
> file, then ran my GraphOp on it. Attached is what it looks like in
> osgSceneViewer. (It has a transparency value of 0.5.) It looks like it's
> not
> doing any sorting at all right now. Same with a cube. (Is this known to
> have
> broken recently?)
sorry to say, but that's the expected outcome. We only sort on an object
basis, so if you have objects that occlude themselves the sorting will
not work correctly. Doing that would require per-polygon sorting, and
that's pretty expensive.
Performer uses a trick to get around the sorting by using multisampling
and what essentially devolves to stippling. This doesn't work with
multiple transparent surfaces, but is good enough for many cases. OpenSG
doesn't support that yet (even though it wouldn't be hard to add). But
it only works for multisampling, so if you're not using MS, nothing
happens.
One trick to get around the sorting that might work for you is using a
different blending function that is order-independent. Essentially you
can use any source blending function but you have to leave the
destination blending function at GL_ONE. Depending on your background
color GL_SRC_ALPHA or GL_ONE_MINUS_SRC_ALPHA might work.
Alternatively you can try splitting your objects into multiple smaller
objects. Each of these will be sorted, and that might help already.
Additionally using backface culling will help.
Transparency and Z-buffers just don't mix well. You need to do
polygon-level sorting (and cutting, for intersecting polygons) to get it
right, or to use some pretty expensive depth-peeling algorithms. Either
way is not trivial to implement and not very efficient anyway.
Yours
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users