Large poly mesh

Software: Away3D 4.x

smudgeface, Newbie
Posted: 06 September 2012 10:43 PM   Total Posts: 2

I am beginning a fairly large project based on stage3d and I am evaluating various 3d engines to determine if they will be applicable for my application. What we are intending on creating is a 3d visualizer for a high-density height-map. High-density meaning >1M vertices. I am aware of stage3d’s limitations of 65k vertices per vertexBuffer and I am wondering:
“Does away3d support multi-buffer meshes?”
The way I imagine this working is that when a mesh is created which can not be fully contained in a single vertex buffer, additional buffers are created. The renderer would also need to support this, passing each of the vertex buffers to the shader program sequentially. I am delving into the depths of the source for an answer but any opinions and info on this would be appreciated.

Thanks!

   

Avatar
Fabrice Closier, Administrator
Posted: 07 September 2012 08:24 AM   Total Posts: 1265   [ # 1 ]

“Does away3d support multi-buffer meshes?”
yes, this is pretty much the default behaviour all over the API.

   

smudgeface, Newbie
Posted: 07 September 2012 09:42 AM   Total Posts: 2   [ # 2 ]

Yea, I have looked around a bit and see that the raw vertices are actually contained in the SubGeometry class, but it doesn’t appear to support what I am talking about. The magic I am expecting to see would look something like

vertexBuffers.length 0;
var 
index:uint 0;
var 
tempBuff:VertexBuffer3D;
var 
numVerts:unit vertices.length DATA_PER;
while(
numVerts index 0){
    
if(numVerts index MAX_VERT_CNT){
        tempBuff 
context.createVertexBuffer(MAX_VERT_CNTDATA_PER);
        
tempBuff.uploadFromVector(verticesindexMAX_VERT_CNT);
        
vertexBuffers.push(tempBuff);
        
index += MAX_VERT_CNT;
    
}else{
        tempBuff 
context.createVertexBuffer(numVerts indexDATA_PER);
        
tempBuff.uploadFromVector(verticesindexnumVerts index);
        
vertexBuffers.push(tempBuff);
        
index += numVerts index;
    
}

All hope is not lost for me, however. Since the Geometry class contains many SubGeometries, I can segment my data and store each piece in it’s own SubGeometry - I will have to manage the vertex segmentation myself. Doable, but a bit of a PITA.

Is this what you meant by “this is pretty much the default behaviour all over the API”?

   

Avatar
Fabrice Closier, Administrator
Posted: 07 September 2012 11:28 AM   Total Posts: 1265   [ # 3 ]

Take a look at Merge class.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X