Cylinder Geometry - Material Alpha Issue

Software: Away3D 4.x

Munty, Newbie
Posted: 02 March 2014 12:22 PM   Total Posts: 3

I have simulated a sort of pipe where I keep re-creating cylinder geometries after each other in a loop, this can be viewed here.

http://www.fastswf.com/6kAGPPA

When I create a plane within this ‘pipe’, you can see the texture of the pipe appear through the plane which should not be happening. The weird thing is that it happens only when the plane is near the end of one of cylinder meshes used to simulate the pipe. You can see the issue here.

http://www.fastswf.com/TUfmVbg

When you let it play a little you’ll notice it starts working normally (because the plane is not close to the end of the pipe) and then it starts appearing again…

Code to create the Plane and Pipe Meshes:

var testMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new octagon_Bitmap().bitmapData), truetruetrue);
testMaterial.alpha 0.99;

var 
newMesh:Mesh = new Mesh(new PlaneGeometry(_pipeRadius*2_pipeRadius*2,1,1,false,false),testMaterial);
   

 
pipeMat = new TextureMaterial(new BitmapTexture(new pipeMate().bitmapData), truetruetrue);

pipeMat.alpha 0.4pipeMat.bothSides true;
   
var 
pipeMesh:Mesh = new Mesh(new CylinderGeometry(_pipeRadius_pipeRadius,recurringPipeFactor,8,1,true,true,true,false), pipeMat);
pipeMesh.rotationZ += 45


I have tried playing around with the different alpha properties of the materials with no luck. Any ideas?

Thanks for your help.

   

Munty, Newbie
Posted: 03 March 2014 02:21 PM   Total Posts: 3   [ # 1 ]

Fixed!  thanks to this thread,

http://away3d.com/forum/viewthread/3495/

I had to modify the zOffset property of the cylinder meshes to a negative value and It fixed the problem.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X