I am currently working with a file that contains sparse elevation data derived from GPS information. I have been utilizing this data to fill a PlaneBuffer array with elevations.
var vertices = new Float32Array( (grid.NCOL*grid.NROW) * 4 );
for (var i = 0, q = vertices.length; i < q; i++){
vertices[ i*3 + 0 ] = parseInt(i % (grid.NCOL+1)*4);
vertices[ i*3 + 1 ] = parseInt(i / (grid.NCOL+1)*4);
// vertices[ i*3 + 2 ] = null; // makes no difference
}
for (var i = 0, l = grid.NODES.length; i < l; i++) {
var nodeNumber = grid.NODES[i][0];
var elevation= grid.NODES[i][1];
vertices[ nodeNumber*3 + 2 ] = elevation;
}
The issue I am facing is that there are nodes in the elevation data where values are unknown, resulting in holes or cutouts in the plane. However, the null elevations are currently being treated as 0 instead of representing holes. I have started exploring the use of a rawshader, but I'm uncertain if making null values transparent is the correct approach.
The image below illustrates my problem. The circled area shows a high wall that should not be present as it's triangulating to the "null/0" floor. The red-lined area indicates where a hole should be present. https://i.sstatic.net/cPliH.png
EDIT: Perhaps this image can provide additional clarity. It depicts the bottom view where null elevations set to zero obstruct the plane view and cause the edges to be triangulated at 0 elevation:https://i.sstatic.net/UREyF.png
Here is how our desktop application renders the result. Take note of the sharp edges on the plane rather than being triangulated down to zero? https://i.sstatic.net/MEGSU.png