Polygon disappear at precise coordinate

Software: Away3D 4.x

César, Newbie
Posted: 16 February 2013 09:43 PM   Total Posts: 11

Hello,

I am sorry to report an other thing, but the problem is very weird, some polygons are not displayed at some coordinates.

Here is a simple example :

At the coordinate (72 ; 251 ; -117), of the first point, the polygon display well, but at (72 ; 252 ; -117), I didn’t see the polygon… which have almost identical coordinate.

var points:Vector.<Number> = new Vector.<Number>();
   
//points.push(72,252,-117, 105,251,-110, 72,180,-172); // Don't work !
   
points.push(72,251,-117105,251,-11072,180,-172); // Work
   
   
var indices:Vector.<uint> = Vector.<uint>([0,1,2]);
   
   var 
sousGeometrie:SubGeometry = new SubGeometry();
   
sousGeometrie.updateVertexData(points);
   
sousGeometrie.updateIndexData(indices);
   
   var 
geometrie:Geometry = new Geometry();
   
geometrie.addSubGeometry(sousGeometrie);
   
   var 
materiau:ColorMaterial = new ColorMaterial(0xFFA500);
   
materiau.bothSides true;
   var 
modele:Mesh = new Mesh(geometriemateriau); 

Is there something I use wrong ?

Here is the sources files : http://vonc.fr/temp/away3d/Essai.zip

   

César, Newbie
Posted: 17 February 2013 08:58 PM   Total Posts: 11   [ # 1 ]

Erf, I am making a mesh viewer and have to add one mesh per polygon to have the possibility to change their material.

But the polygons with some coordinates don’t appear and it make big holes everywhere.

It seems to be in function of their orientation, I don’t find the logical who make them appear disappear for the moment.

 

   

César, Newbie
Posted: 18 February 2013 09:10 PM   Total Posts: 11   [ # 2 ]

I found a solution : just add a fake vertex with the same coordinates of the first one and the polygon will appear, event if this vertex is not used in the indice array.
I don’t have explanation, but it works with…

points.push(72,252,-117105,251,-11072,180,-172);
points.push(72,252,-117); // Fake vertex 


I hope this bug will be fixed soon, I had luck to find this trick. : /

To resume :

var points:Vector.<Number> = new Vector.<Number>();
points.push(0,0,0100,0,00,100,-100); // Work
// points.push(0,0,1, 100,0,0, 0,100,-100); // Don't work
// points.push(0,0,1, 100,0,0, 0,100,-100, 0,0,1); // Work

var indices:Vector.<uint> = Vector.<uint>([0,1,2]); 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X