# Question on convexhull and wireframe

**URL:** <https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697>\
**Category:** Questions\
**Tags:** materials, geometry\
**Created:** [August 23, 2026, 5:45am UTC](https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697 "2026-08-23T05:45:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![siamak](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@siamak](https://discourse.threejs.org/u/siamak)\
**Post date:** [August 23, 2026, 5:45am UTC](https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697/1 "2026-08-23T05:45:17Z")

</div>

Hello friends

I have a mesh that I put a convexhull around it with the material being transparent here is the material code:

`let materialcell = new THREE.MeshLambertMaterial( {`  
`color: 0xffffff ,`  
`opacity: 0.2,`  
`side: THREE.DoubleSide, ``//THREE.BackSide``, ``//THREE.DoubleSide``,`  
`wireframe: false,`  
`flatShading: true,`  
`transparent: true`  
`} );`

The result is a mesh which is transparent with convexhull halo around it per below svreenshot:

 ![Screenshot 2026-08-22 223314](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/b/0/b0a8bf8798e9e0eec6447c2a8e7b2cda2cc73498.jpeg)

So far so good. Now if I enable wireframe the halo will go aways per below screenshot:

 ![Screenshot 2026-08-22 223335](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/7/0/70b03484337b0febe6e14b85d5ea630e891ba565.jpeg)

I read somewhere that you can have both on and once you turn on wireframe option the halo will not show up. My quesiotn is: is there a worj around here so we can show both at the same time.

I alao tired edgeGeometry and THREE.WireframeGeometry but I did not see any difference. I am using the followinfg code currently to create this convexhull:

```javascript
          let geometrycell = new ConvexGeometry( [...cellConvexhullSet] );

```

```javascript
                  let materialcell = new THREE.MeshLambertMaterial( {
                    color: 0xffffff ,
                    opacity: 0.2,
                    side: THREE.DoubleSide, //THREE.BackSide, //THREE.DoubleSide,
                    wireframe: true,
                    flatShading: true,
                    transparent: true
                  } );

                   let meshcell = new THREE.Mesh( geometrycell, materialcell );

                    scene.add( meshcell );

```

Thank you in advance for any suggestions/help

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [August 23, 2026, 6:15am UTC](https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697/2 "2026-08-23T06:15:02Z")

</div>

When I need something like this, I usually go the simple way – two meshes with shared geometry. One mesh is the semitransparent “halo” and `wireframe:false`, the other is with `wireframe:true`. Thus both – filled faces and edges will be drawn. However, you might notice that sometimes some edges go below the “halo”, sometimes above the “halo”. This is resolved by pushing the halo slightly back via `polygonOffset`, `polygonOffsetFactor` and `polygonOffsetUnits`.

Here is a snapshot of a game I made some time ago. The convex hull is one geometry shared between two meshes with different materials.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/b/5/b5f1339db93d87be406bb81ba86dcde6454db1d4.jpeg)

---

<div class="post-metadata">

**Author:** ![siamak](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@siamak](https://discourse.threejs.org/u/siamak)\
**Post date:** [August 23, 2026, 9:37pm UTC](https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697/3 "2026-08-23T21:37:40Z")

</div>

Thank you very much @PavelBoytchev . That worked for me. I did use the following params to experiment with these values in the wireframe material mesh:

polygonOffset: true,  
polygonOffsetFactor: -1.0, // Pulls the polygon closer to the camera  
polygonOffsetUnits: -4.0,

But my wireframe lines did not look solid and rather looked dashed as I was zooming in and out. So, I took them out and it worked better. My question is what values do you use for the above three params.

Thanks again

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [August 24, 2026, 7:32am UTC](https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697/4 "2026-08-24T07:32:34Z")

</div>

The polygon offset works only for filled polygons. So you have to apply it to the other mesh – the one that is not wireframe.

Demo:

[https://codepen.io/boytchev/full/OPpJjQq](https://codepen.io/boytchev/full/OPpJjQq)

[![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/a/4/a46f3982571fa6f160c09d2a90305a762515b7b0.jpeg)](https://codepen.io/boytchev/full/OPpJjQq)

---

<div class="post-metadata">

**Author:** ![siamak](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@siamak](https://discourse.threejs.org/u/siamak)\
**Post date:** [August 27, 2026, 4:54am UTC](https://discourse.threejs.org/t/question-on-convexhull-and-wireframe/93697/5 "2026-08-27T04:54:26Z")

</div>

Thank you @PavelBoytchev
