Hello,

I've been getting mad on transparency attributes setting.

I want to change the transparency of an imported VRML object at run-time.
I implemented a Scenegraph parser that seeks for all Shape3D, their
Appearance and relative Transparency Attributes.
Then I invoke the .setTransparency(<float>) on them.

The setting is done on non-live and non-compiled graphs.

The problem is that the setting works for some objects while for others
doesn't work.

I scanned also the VRML source to understand a bit more. If the objects
was already transparent in VRML -> it works
If the object was not transparent in VRML -> it doesn't work.
Notice that, even if the object was NOT transparent in VRML, the loader
already allocate the TransparencyAttributes, but setting them doesn't work.
In order to make it work I had to replace the code:

  TransparencyAttributes transp_attr = app.getTransparencyAttributes() ;
  transp_attr.setTransparency(transp_level) ;

to this:

  TransparencyAttributes transp_attr = new TransparencyAttributes(
      TransparencyAttributes.NICEST, transp_level) ;
  app.setTransparencyAttributes(transp_attr) ;


The question is: Does anybody know if the are already known bugs in setting a new transparency value to existing TransparencyAttributes?


My system: Linux 2.4.22 nVidia gForce 4 4200 Go (driver v4496 for ia32) jdk 1.4.2 (but tested also in 1.4.1) Java3D 1.3.1 - beta


thanks, Fabrizio NUNNARI

P.S.: BTW, maybe the problem is the "beta". Any news about latest
release? Thanks.




-- Fabrizio NUNNARI (nunnarif at di.unito.it) PhD Student - Computer Science Department - University of Torino - Italy http://www.di.unito.it/~nunnarif

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to