I am currently working on a script that involves splitting overly long edges of faces into two separate faces instead of one large face.
The final result is exported to a .obj file.
Although the geometry reduction works fine, I have noticed some issues after rendering. The reduced faces exhibit incorrect light reflection and some faces are not displayed properly in WebGl events. Link to Example
For the new (child) faces, I am saving the normals and all properties from the parent big face.
Below is the code snippet:
var loader = new global.THREE.OBJMTLLoader();
var geometry = loader.load("source.obj").children[0].geometry;
var uvs = [];
var limiter = function () {
// Code for edge splitting and face creation
};
limiter();
geometry.computeFaceNormals();
geometry.computeVertexNormals();
geometry.computeMorphNormals();
var exp = new THREE.OBJExporter();
console.log(exp.parse(geometry));
P.S. If anyone is aware of an existing solution for this issue, please let me know.