Re: [info-performer] Inventor loader caches old transparency values

New Message Reply Date view Thread view Subject view Author view

From: Benedikt Kessler (bjk++at++munich.sgi.com)
Date: 06/12/2002 04:01:55


Hi!

When loaded into perfly it displays as expected (only the middle plane
is transparent). I'm using Performer 2.5.1.

You may be right with your hint to the Inventor loader. As we know that
the object should not be transparent, we should not rely on the
assumption that the global state is non-transparent which we inherit
when not setting the transparency.

These optimizations (building a global state and removing unnecessary
geostate setting which can be inherited) should be made later when all
models have been loaded and placed in the Performer scenegraph.

Let's see what the Performer engineers think about this. In the
meantime: as you have the Inventor loader sources you can simply remove
the comment you already found, recompile and place the loader in the
applopriate location ;-)

Bye! Benedikt

Bram Stolk wrote:
>
> Hello,
>
> I think there is a bug in the inventor loader that causes
> non-transparent geometry to be designated as transparent.
>
> This will result in a situation where a lot of opaque objects
> are put in the transparent sorting bin. This causes visual
> artefacts, as they are no longer rendered before all transparent
> objects are rendered.
>
> Both IRIX and Linux versions of performer are affected by this bug.
> However, somehow our Onyx IR2 manages to cope with the incorrectly
> 'binned' objects a lot better than our linux machines can.
>
> For an example .iv file, see below. It has 3 objects, with
> the 2nd object being transparent.
> After loading in performer, object 2+3 are designated as transparent:
>
> Found 3 gstates
> GeoState at 0x41ae8480, transp=0, textured=0
> GeoState at 0x41ae8c38, transp=1, textured=0
> GeoState at 0x41ae93e8, transp=1, textured=0
>
> If I put the transparent obj last in the file, only obj3 is designated
> as transparent (correct).
> If I put the transparent obj first in the file, all objects are
> designated as transparent (2 false positives).
>
> I tracked it down in the sources of the iv loader, and it seems
> that a line has been uncommented, which should not be uncommented.
>
> from /usr/share/Performer/src/lib/libpfdb/libpfiv/pfiv.C:
>
> // Set transparency mode
> if (transparency > 0.0f)
> cbd->dummyGState->setMode(PFSTATE_TRANSPARENCY, PFTR_ON);
> // else inherit from the global default which should be PFTR_OFF
> // cbd->dummyGState->setMode(PFSTATE_TRANSPARENCY, PFTR_OFF);
>
> I think this last line should be put back in the code.
> In my tst.iv, there are Seperator codes that should avoid the inheritance
> of cached transparencies.

-- 
+---------------------------------+----------------------------------+
|Benedikt J. Kessler              | Silicon Graphics GmbH            |
|Professional Services            | Am Hochacker 3 - Technopark      |
|SGI                              | 85630 Grasbrunn-Neukeferloh, FRG |
|    ---  __o       ,__o          |                                  |
| ------_ \<,_    _-\_<,          | Phone: (+49) 89 46108-366 or -0  |
|----- (*)/ (*)  (*)/'(*)         | Fax:   (+49) 89 46107-366        |
+---------------------------------+----------------------------------+
|E-Mail: bjk++at++sgi.com    Web (private): http://reality.exsgi.org/bjk  |
|   Web: http://www.sgi.de                                           |
+--------------------------------------------------------------------+


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jun 12 2002 - 04:03:00 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.