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

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -