# How to show the outline for a cylinder without any post processing?

**URL:** <https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202>\
**Category:** Questions\
**Tags:** outline, geometry\
**Created:** [November 15, 2023, 10:15pm UTC](https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202 "2023-11-15T22:15:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiffytaff0898](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/tiffytaff0898/32/41983_2.png) [@tiffytaff0898](https://discourse.threejs.org/u/tiffytaff0898)\
**Post date:** [November 15, 2023, 10:15pm UTC](https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202/1 "2023-11-15T22:15:36Z")

</div>

I wish to render a cylinder and only show it’s outline. I have tried using EdgeGeometry for this, but I’d like to not be able to see all the multiple lines that run across the lengths of the cylinder (I just need the outermost ends). I also do not want to apply any post processing for this due to certain constraints.

What I would like to see is the edges of the two caps of the cylinder and the two outermost edges running along its length, similar to the image shown below.

 ![4123693](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/9/5/95fc31d48d06e1436581ff726edd24ced7a112bf.png)

Is it possible to achieve this using LineSegments?

---

<div class="post-metadata">

**Author:** ![dubois](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dubois](https://discourse.threejs.org/u/dubois)\
**Post date:** [November 15, 2023, 10:20pm UTC](https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202/2 "2023-11-15T22:20:11Z")

</div>

> **[three-line-outline](https://www.npmjs.com/package/three-line-outline)**
>
> Three.js outlines rendered with lines. Latest version: 0.0.7, last published: 3 years ago. Start using three-line-outline in your project by running \`npm i three-line-outline\`. There are no other projects in the npm registry using three-line-outline.

---

<div class="post-metadata">

**Author:** ![Fennec](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fennec/32/59265_2.png) [@Fennec](https://discourse.threejs.org/u/Fennec)\
**Post date:** [November 16, 2023, 12:26am UTC](https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202/3 "2023-11-16T00:26:26Z")

</div>

You superpose two meshes with the same geometry, the first is the original mesh, the second is the outline, same position slightly scaled up with a material set to `{ side: THREE.BackSide, color: outlineColor } `

You get something like this [Outline effect](https://stemkoski.github.io/Three.js/Outline.html) (Check the source code `CTRL/CMD + U`)

---

<div class="post-metadata">

**Author:** ![tiffytaff0898](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/tiffytaff0898/32/41983_2.png) [@tiffytaff0898](https://discourse.threejs.org/u/tiffytaff0898)\
**Post date:** [November 16, 2023, 1:00am UTC](https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202/4 "2023-11-16T01:00:10Z")

</div>

Thank you for your suggestions I can make it work now. However, is there no way to simply remove the additional line segments from EdgesGeometry?

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [November 16, 2023, 6:57am UTC](https://discourse.threejs.org/t/how-to-show-the-outline-for-a-cylinder-without-any-post-processing/58202/5 "2023-11-16T06:57:38Z")

</div>

> [@tiffytaff0898](#):
>
> is there no way to simply remove the additional line segments from EdgesGeometry?

Have a look at this topic: [LDraw-like edges](https://discourse.threejs.org/t/ldraw-like-edges/17100)  
And this one, just in case: [Tetrahedra (fat lines, batching, texelFetch)](https://discourse.threejs.org/t/tetrahedra-fat-lines-batching-texelfetch/43702)
