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?)

Gerrit Voss wrote:
Hi,

On Wed, 2004-05-19 at 01:44, Chad Austin wrote:

I have a GraphOp that goes through a subtree and applies transparency to the materials it finds. In the case of SimpleMaterial, it just sets the transparency value. Here is the code:

    SimpleMaterialPtr sm = SimpleMaterialPtr::dcast(m);
    if (sm != NullFC) {
        std::cout << "SimpleMaterial" << std::endl;
        beginEditCP(sm);
sm->setTransparency(1.0f - (1.0f - sm->getTransparency()) * amount);
        endEditCP(sm);
        return;
    }

Unfortunately, that seems to do very odd things, like make some of the polygons disappear, some of them draw out of order, and none of them become translucent. Any ideas what's wrong?


do the polygons belong to one or more objects ?. As we only sort objects
having transparent solid objects will most likely give interesting
results. The best indication is that the odd things change as you move
the object. Try to use a single simple transparent sphere for
comparison, if the same odd patterns occur it is most likely this
problem. Could you send and image around (either to the list if it is
small enough or offline)

regards,
  gerrit





-------------------------------------------------------
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

PNG image

Reply via email to