# How to fill a 3d model from inside

**URL:** https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986
**Category:** Questions
**Tags:** geometry
**Created:** [March 19, 2024, 6:57am UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986 "2024-03-19T06:57:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![AshhadDevLab](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashhaddevlab/32/44111_2.png) [@AshhadDevLab](https://discourse.threejs.org/u/AshhadDevLab)
#### Post date: [March 19, 2024, 6:57am UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/1 "2024-03-19T06:57:58Z")

</div>

Hi there, my model when clipped is totally hollow from inside is there a way to make it completely filled from the inside?

@hofk

![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/e/d/ed991bf33fb95c6a7cd3bcf5e8721e654eb2d7eb.jpeg)

Note:  
Ignore the hovering text

---

<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: [March 19, 2024, 11:25am UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/2 "2024-03-19T11:25:42Z")

</div>

Maybe with [three-bvh-csg](https://github.com/gkjohnson/three-bvh-csg?tab=readme-ov-file). `ADDITION` or `INTERSECTION` operation.

> **[GitHub - gkjohnson/three-bvh-csg: A flexible, memory compact, fast and...](https://github.com/gkjohnson/three-bvh-csg?tab=readme-ov-file)**
>
> A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh - gkjohnson/three-bvh-csg

---

<div class="post-metadata">

### Author: ![AshhadDevLab](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashhaddevlab/32/44111_2.png) [@AshhadDevLab](https://discourse.threejs.org/u/AshhadDevLab)
#### Post date: [March 19, 2024, 12:38pm UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/3 "2024-03-19T12:38:22Z")

</div>

But I don’t need to add two stuff I just want the teeth model to be filled from the inside that’s all

If you are getting confused by the text inside the scene its totally a separate thing. I just want the main 3d model to be filled from inside

---

<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: [March 19, 2024, 1:02pm UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/4 "2024-03-19T13:02:14Z")

</div>

Maybe this approach will be helpful: [https://threejs.org/examples/#webgl\_clipping\_stencil](https://threejs.org/examples/#webgl_clipping_stencil)

---

<div class="post-metadata">

### Author: ![AshhadDevLab](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashhaddevlab/32/44111_2.png) [@AshhadDevLab](https://discourse.threejs.org/u/AshhadDevLab)
#### Post date: [March 19, 2024, 1:04pm UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/5 "2024-03-19T13:04:58Z")

</div>

Is it the stencil material creating the effect that the geometry is filled?

---

<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: [March 19, 2024, 4:12pm UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/6 "2024-03-19T16:12:50Z")

</div>

This is also alternative, which may work in some cases. It colors the inside in a flat color, so it appears visually as if it is filled in (but it is not).

[https://boytchev.github.io/etudes/threejs/capping-clipping.html](https://boytchev.github.io/etudes/threejs/capping-clipping.html)

---

<div class="post-metadata">

### Author: ![AshhadDevLab](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashhaddevlab/32/44111_2.png) [@AshhadDevLab](https://discourse.threejs.org/u/AshhadDevLab)
#### Post date: [March 20, 2024, 9:25am UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/7 "2024-03-20T09:25:11Z")

</div>

If i export the model will the flat color look as it is a part of geometry or a material?

---

<div class="post-metadata">

### Author: ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)
#### Post date: [March 21, 2024, 3:42am UTC](https://discourse.threejs.org/t/how-to-fill-a-3d-model-from-inside/62986/8 "2024-03-21T03:42:01Z")

</div>

No it won’t export a closed model. To get an actual exportable geometry, you’ll have to use mesh-bvh-csg or similar to perform the cutaway, perhaps by subtracting a large cube from the original model.
