I have two cylinders which intersect on one end. I can change the radius of the intersection separately but still they meet at one end as shown below. However, I want the intersection between these two be smooth or in other words, their normals in the intersection to be shared as mentioned here: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-9-vbo-indexing/. I have set the normal updates TRUE, and also change all the y components of the normals to zero in the intersection. It is still not showing a smooth intersection. These two cylinders are made with BufferGeometry.
so part of my code that is more important: 1- since the geometry is BufferGeometry, I use two commands below first for both geometries to create the normals:
comp.mesh.geometry.computeFaceNormals();
comp.mesh.geometry.computeVertexNormals();
2- then since both geometries has same number of vertices, I set y component of all vertices to 0:
for (i=0;i<comp.mesh.geometry.attributes.position.array.length;i++){
comp.mesh.geometry.attributes.normal.array[i*3 + 1] = 0;
comp1.mesh.geometry.attributes.normal.array[i*3 + 1] = 0;
}
When I let the program show the normals, their y component of normals is 0, but the geometry is not smooth yet.