java - Setting transparency makes textures translucent -


ok, problem have plane in java3d has texture painted on it. texture png alpha transparency. when scene rendered texture on plane partially translucent, if has transparency on entire image. have played around variety of texture , transparency settings trying work

appearance ap = new appearance(); textureloader tl = new textureloader(textimage); texture tex = tl.gettexture(); textureattributes ta = new textureattributes(); ta.settexturemode(textureattributes.modulate); transparencyattributes transat = new transparencyattributes(); transat.settransparencymode(transparencyattributes.blended); transat.settransparency(0f);  ap.settextureattributes(ta); ap.settexture(tex); ap.settransparencyattributes(transat);  shape.setappearance(ap); 

any appreciated

if don't want transparency @ of texture, try this:

transparencyattributes tattr = new transparencyattributes(); tattr.settransparencymode(none); ap.settransparencyattributes(tattr); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

gdi+ - WxWidgets draw a bitmap with opacity -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -