Flickering texture

Software: Away3D 4.x

Tom74, Newbie
Posted: 06 May 2015 01:52 PM   Total Posts: 5

Why is it flickering on the sides? It’s simple CylinderGeometry with TextureMaterial:

var coinMaterial:TextureMaterial = new TextureMaterial(Cast.bitmapTexture(DIFFUSE_TEXTURE));
 
coinMaterial.specularMap Cast.bitmapTexture(SPECULAR_TEXTURE);
 
coinMaterial.normalMap Cast.bitmapTexture(NORMAL_TEXTURE);
 
coinMaterial.lightPicker lightPicker;
 
coinMaterial.specular 3;
 
coinMaterial.ambient 1;
 
coinMaterial.smooth true;
 
coinMaterial.repeat false;
 
coinMaterial.mipmap false;
 
coinMaterial.animateUVs true;
 
var 
coin:Mesh = new Mesh(new CylinderGeometry(30030020501truetruetruetrue), coinMaterial);
 
coin.rotationX 90
 coin
.subMeshes[0].scaleU 0.5
 coin
.subMeshes[0].offsetU = -0.005
 scene
.addChild(coin); 

 

File Attachments
bandicam_2015-05-06_16-45-00-456_1_1_1_1.mp4  (File Size: 1365KB - Downloads: 174)
   

Avatar
Fabrice Closier, Administrator
Posted: 06 May 2015 02:06 PM   Total Posts: 1265   [ # 1 ]

What is this -0.005 offset for? as repeat is set to false, the rescaled uvs 0-1 that you rescaled to 0-0.5 are now in fact for some faces under 0.
Also you should not need to set animateUVs to true unless you animate with one of the uv animators.

   

Tom74, Newbie
Posted: 06 May 2015 03:03 PM   Total Posts: 5   [ # 2 ]

-0.005 is for placing texture right in the middle of the sides, I realise that it’s dumb tricky method… and yup, animateUVs was set to true only to make that works.

   
   
‹‹ Coin texture

X

Away3D Forum

Member Login

Username

Password

Remember_me



X