Hi, I had a strange problem with a transparent 24bit png with the following code with Away3DLite Plane and BitmapMaterial
planeBtmIcons = new Plane(); planeBtmIcons.width = 459; planeBtmIcons.height = 107; planeBtmIcons.x = 0; planeBtmIcons.y = 525; planeBtmIcons.z = 0; planeBtmIcons.rotationX = 90; planeBtmIcons.rotationY = 0; planeBtmIcons.rotationZ = 0; planeBtmIcons.material = new BitmapMaterial( Cast.bitmap( new planeBtmIconsAsset() ) ); this.addChild(planeBtmIcons); planeBtmIcons.addEventListener(MouseEvent3D.MOUSE_UP,changeDebugPositionTarget); //new DebugPosition3D(vars.stage,planeBtmIcons); //debugPosition3D.target = planeBtmIcons; The png has 4 icons on it and is 459 x 107 same size as the plane above and looks like this: Icon1 Icon2 Icon3 Icon4 However when applied to the plane it someone gets a line drawn only on the top of the areas where the icon is, if I zoom the plane and out it disappears and re-appears randomly... ____ _____ _____ _____ Icon1 Icon2 Icon3 Icon4 So I drew a red line width wise 5 pixels high in red and re-compiled the project, the black line now appears above the icons but above the red line which is outside of the png... So I then resized the icons to fit 50% width of the png and re-compiled the project, the black lines are still above the icon areas only. So I then added 10 pixels of nothing above the png, adjusted plane dimensions to match and re-compiled, still the lines were above the icons. Finally, I resized the canvas of the png so that it had 10px of nothing on every side of the original dimensions, adjusted the plane to match these dimensions and the line was gone..... hmmmmmm It appears that the PNG being applied the bottom pixel of the image was being wrapped to the top of the plane.... just 1 pixel and as this was anti aliased it was hard to see on the bottom but was clearly visible on the top. Anyone had this happen to them? Any ideas on why that happens? Bug? Either way.... A tip for anyone whom has this problem randomly occur to them. D
