# Fill a mesh with solid materials

**URL:** <https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488>\
**Category:** Questions\
**Tags:** stencil-buffer\
**Created:** [March 10, 2019, 9:06pm UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488 "2019-03-10T21:06:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonifds](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@tonifds](https://discourse.threejs.org/u/tonifds)\
**Post date:** [March 10, 2019, 9:06pm UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488/1 "2019-03-10T21:06:08Z")

</div>

how i can fill a mesh with solid materials, for example the inside of an STL file?

---

<div class="post-metadata">

**Author:** ![tonifds](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@tonifds](https://discourse.threejs.org/u/tonifds)\
**Post date:** [March 11, 2019, 11:59am UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488/3 "2019-03-11T11:59:07Z")

</div>

hello,  
i mean fill in the empty space with solid materials after using clipping planes.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 11, 2019, 12:13pm UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488/4 "2019-03-11T12:13:36Z")

</div>

Like so?

![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/9/966355957f124e10c7a8246dc213ae1fe6681393.png)

You can already do this now with the stencil test but it might be easier if the following PR gets merged. The screenshot is from the new example the PR adds.

[https://github.com/mrdoob/three.js/pull/15611](https://github.com/mrdoob/three.js/pull/15611)

---

<div class="post-metadata">

**Author:** ![tonifds](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@tonifds](https://discourse.threejs.org/u/tonifds)\
**Post date:** [March 11, 2019, 1:40pm UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488/5 "2019-03-11T13:40:02Z")

</div>

yes like this, what about PR get merged examples

---

<div class="post-metadata">

**Author:** ![tonifds](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@tonifds](https://discourse.threejs.org/u/tonifds)\
**Post date:** [March 15, 2019, 11:07pm UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488/6 "2019-03-15T23:07:20Z")

</div>

Caps are rendered with sharp pixels. Anti-aliasing does not seem to work. Specifying `antialias:true` on WebGLRenderer is not enough.

Is there any way of doing this?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 16, 2019, 10:49am UTC](https://discourse.threejs.org/t/fill-a-mesh-with-solid-materials/6488/7 "2019-03-16T10:49:37Z")

</div>

It seems the owner of the PR already posted an answer on your question: [https://github.com/mrdoob/three.js/pull/15611#issuecomment-473480550](https://github.com/mrdoob/three.js/pull/15611#issuecomment-473480550)
