Hi Akos,
On Wed, 2003-10-29 at 16:58, Akos Balazs wrote:
>
> You're right, I just need an alpha key, that's why I was kinda surprised
> it just didn't work. :) Of course I haven't done this kind of stuff with
> VRML and OpenSG before so I didn't know if it's the fault of the loader,
> OpenSG or something completely different. :)
if in doubt: it's the loader. ;)
> Both of these sound good. Can you comment on the performance hit of these
> methods?
I would expect any decent gfx crad to be faster when using the alpha
key, as in that case it doesn't have to read the fb. But it all stringly
depends on the system, so no guarantees.
> I guess the first one shouldn't be a big hit since it's just a
> few additional OpenGL calls when constructing the display-lists for the
> transparent geometries. Actually since I write to the zbuffer anyway I
> could get rid of the whole sorting-mess associated with the transparent
> polygons, since I don't really need transparency, but alpha-keying. Is
> there a method to do that?
It you have a BlendChunk that doesn't read the fb (i.e. DestFactor ==
GL_ZERO) it will not be sorted. The alpha key is set as described in my
other mail.
> I think the BlendChunk method presupposes that the loader creates
> appropriate BlendChunks for the transparent materials, and as far as I
> understood the discussion it's not the case currently, am I wrong here?
Nope, you're correct here.
> Of course I could still parse the graph myself via osg::traverse() and
> find materials that are transparent, suppose they just want alpha keys and
> setup an appropriate BlendChunk. This might be more efficient, depending
> on how expensive an additional BlendChunk is. Hmmmmm.
It would be more efficient to just create a single BlendChunk and add
that to all Materials. That would allow the delta optimization to kick
in and not change the OpenGL state at all when switching from the
BlendChunk to itself.
Dirk
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users