Apply thickness to THREE.TubeGeometry for border

I am trying to apply border to extruded text geometry but does not get expected result using
THREE.TubeGeometry.

globalOffsetPathPoints.forEach(points => {
      points = points.map(point => new THREE.Vector3(point[0], point[1], 0));
      const curve = new THREE.CatmullRomCurve3(points);
      const radius = 0.8;
      const radialSegments = 2;
      const tubularSegments = 10000;
      const closed = false;
      const geometry = new THREE.TubeGeometry(curve, tubularSegments, radius, radialSegments, closed);
      globalState.styleColor = color
      const material = new THREE.MeshPhysicalMaterial({
        color: color,
        side: THREE.DoubleSide,
        envMap: textureForMaterial,
        envMapIntensity: 1.5,
        metalness: 1,
        roughness: 1
      });
      const tubeMesh = new THREE.Mesh(geometry, material);
      tubeMesh.rotateX(Math.PI)
      })
    })

using above code i got result flat surface in xz plane
Screenshot_38

but i want border to look like this in xy plane
Screenshot_39

Try change radial segments to 3 or more?

1 Like

does not work for show border on the text

Can you share a live setup of your use case as a publicly editable sandbox or codepen?

Works well for me, when I set radialSegments parameter of TubeGeometry to 16 :thinking:

2 Likes

thanks for your efforts but not like that that I also have same result but I want make border look flat not rounded

Try ExtrudeGeometry :thinking:

1 Like