I would like to close the bottom cap of CylinderGeometry. I asked this question before and I was recommended to use a transparent mesh for the top (see code below). However, this solution doesn’t work well for my use case because I change the structure of the cylinder (making it look like a vase) and this creates a weird bump in the bottom when I use this solution (see image). This bump does not appear if I set openEnded to true, but then both caps are obviously open.
Is there a way to draw the bottom cap separately while keeping the cylinder openEnded?
Thanks!
var radialSegments = 100;
var heightSegments = 90;
var openEnded = false;
cylinderGeom5 = new THREE.CylinderGeometry(radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded);
var materials = [
new THREE.MeshPhysicalMaterial( {color: color, side: THREE.DoubleSide } ),
new THREE.MeshPhysicalMaterial( {color: 0xffffff, side: THREE.DoubleSide, transparent: true, opacity: 0 } ),
new THREE.MeshPhysicalMaterial( {color: color, side: THREE.DoubleSide } ),
];
cylinder5 = new THREE.Mesh(cylinderGeom5, materials);
scene.add(cylinder5);
From the picture and the code snippet one cannot see the cause, but perhaps you have only changed the mantle of the cylinder. And not also the bottom in the dimensions adapted?
Update:
It could also be that the mantel values themselves have not been changed correctly?
Thanks!
I manually change the value of each vertex in the Geometry to allow maximum customizations of the shape. Note that when I set openEnded to true there is no issue so I’m not sure my manipulations are the problem.
Attached examples for both states:
openEnded = false