I have a scene in Blender that renders smoothly but when brought into a three.js scene the curved faces are flat. Is there a way to make these curved sides smooth as shown below?
I have calculated vertex normals and set the smoothShaded flag, neither changes the appearance. I've tried lambert, phong, and standard materials.
Desired look:
In threejs. scene:
Edit: I've tried the following:
this.traverse(function(child) {
if(child instanceof THREE.Mesh)
{
child.material.smoothShading = true;
}
});
this.geometry.computeVertexNormals();
this.geometry.verticesNeedUpdate = true;
glTF
? It's the recommended 3D format ofthree.js
. You can find all relevant information in this guide. Use this example as a code template. You should actually not useOBJ
anymore since it's in many ways worse thanglTF
(bigger file sizes, longer parsing times, no animation support etc.). – Mugen87