I get thousands of errors (google chrome):
[.CommandBufferContext]RENDER WARNING: Render count or primcount is 0.
OBJ and MTL files exported from Bledner, using OBJMTLLoader.js as loader After moving to R73.
Any experience?
This happens when the low level render call was told to draw zero vertices/faces. It is because you have one or more meshes with a polygon that has zero faces/vertices, so on each draw call this error piles up.
The problem could be your model or it could be the export/import process. If it's the model, then below is a loose idea about how to find the problematic areas. I don't recommend using OBJMTLLoader with ThreeJS and Blender, because ThreeJS ships with a Blender plugin for exporting, and it works.
checkMesh = function(mesh, child_index) {
if (
mesh.geometry.faces.length > 0 &&
mesh.geometry.vertices.length > 0
) {
// do stuff here with the good mesh
for (var i = 0; i < mesh.children.length; i++)
if (!checkMesh(mesh.children[i], i))
i--; // child was removed, so step back
return true;
} else // empty mesh! this causes WebGL errors
{
if (mesh.parent != null)
mesh.parent.children.splice(child_index, 1);
console.log(mesh.name + " has zero faces and/or vertices so it is removed.");
mesh = null;
return false;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With