# Subdivide not working

**URL:** <https://forum.babylonjs.com/t/subdivide-not-working/39180>\
**Category:** Questions\
**Tags:** mesh\
**Created:** [March 19, 2023, 11:49am UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180 "2023-03-19T11:49:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![matan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matan/32/30525_2.png) [@matan](https://forum.babylonjs.com/u/matan)\
**Post date:** [March 19, 2023, 11:49am UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/1 "2023-03-19T11:49:36Z")

</div>

hi…

so I tried almost everything and also used the ‘increaseFacets()’ and ‘subdivide()’  
but no matter what I do I do not succeed to subdivide the mesh to make him smoother.

please HELP thanks!

I have attached a PG =\>

> **[Babylon.js Playground](https://playground.babylonjs.com/#YIU90M%23971)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [March 19, 2023, 3:39pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/2 "2023-03-19T15:39:23Z")

</div>

Hope you’ll find increasing facets usefull

[BabylonJS Guide](http://babylonjsguide.github.io/snippets/Increasing_Facets)

[Procedural Subdivision - Questions - Babylon.js (babylonjs.com)](https://forum.babylonjs.com/t/procedural-subdivision/1411/2)

---

<div class="post-metadata">

**Author:** ![matan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matan/32/30525_2.png) [@matan](https://forum.babylonjs.com/u/matan)\
**Post date:** [March 20, 2023, 9:46am UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/3 "2023-03-20T09:46:18Z")

</div>

Hi, thanks.  
I already tried increasing the facets and also the sub-divide function and also I have tried to override ride it and copy it just in case and in the end, nothing was working as accepted.  
I really don’t know what to do.  
it’s supposed to be a basic thing to divide the polygon/mesh but I don’t know what to do.  
you can also check in the PG that even a simple object with use subdivide function does not affect him.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [March 20, 2023, 4:02pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/4 "2023-03-20T16:02:26Z")

</div>

subdivide splits the mesh in several submeshes, this does not change the geometry. It is convenient to use several material with multi mat for instance. It actually seems to work properly as you can see here: [https://playground.babylonjs.com/#YIU90M#972](https://playground.babylonjs.com/#YIU90M#972)

What are you trying to do exactly ?

---

<div class="post-metadata">

**Author:** ![matan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matan/32/30525_2.png) [@matan](https://forum.babylonjs.com/u/matan)\
**Post date:** [March 21, 2023, 10:06am UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/5 "2023-03-21T10:06:45Z")

</div>

Let me start over and try to clarify what I am trying to achieve  
I do not know what the actions are called in Babylon so I will use the names I know from 3D Studio Max…

I want to be able to take an object and add subdivisions to it.  
In 3D studio max it is called “turbosmooth”.

Just to be clear, the resulting model needs to have more polygons but also be smoother.  
Just adding polygons without smoothing is called “tessellate” in max, it is NOT what I am trying to achieve.

this is an image that will try and clarify what i am trying to achieve.

 ![Turbosmooth](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/6/c617cd8e8e377586b213ec65e0c5ac1930eb5ed8.jpeg)

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [March 21, 2023, 12:02pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/6 "2023-03-21T12:02:09Z")

</div>

I think you are looking for the method of subdivision by Catmull Clark.

SubdivisionCatmullClark is a technique used in 3D computer graphics to create curved surfaces by modeling subdivision surfaces. It was developed in 1978 by Edwin Catmull and Jim Clark as a generalization of bicubic uniform B-spline surfaces for arbitrary topologies. The algorithm splits each face of a polygon mesh into four smaller faces and generates new points on the edges and inside the face. The result is a smoother and rounder looking surface.

There are a lot of js libs on this topic on [github](https://github.com/topics/catmull-clark-algorithm) e.g. this one: [Erkaman/gl-catmull-clark: A javascript implementation of the Catmull-Clark subdivision surface algorithm (github.com)](https://github.com/Erkaman/gl-catmull-clark)

---

<div class="post-metadata">

**Author:** ![matan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matan/32/30525_2.png) [@matan](https://forum.babylonjs.com/u/matan)\
**Post date:** [March 21, 2023, 12:33pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/8 "2023-03-21T12:33:21Z")

</div>

THANKS!!!  
that’s exactly what I am looking for but how I implement it in BABYLON???

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [March 21, 2023, 12:43pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/9 "2023-03-21T12:43:11Z")

</div>

Babylon only handles the rendering, so you’d have to implement the algorithm yourself.

---

<div class="post-metadata">

**Author:** ![matan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matan/32/30525_2.png) [@matan](https://forum.babylonjs.com/u/matan)\
**Post date:** [March 21, 2023, 12:48pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/10 "2023-03-21T12:48:35Z")

</div>

yes i know…did you ever see an example that makes the subdivision like the example above?

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [March 21, 2023, 3:49pm UTC](https://forum.babylonjs.com/t/subdivide-not-working/39180/11 "2023-03-21T15:49:22Z")

</div>

If you would pass the geometric points of your mesh layer by layer to the function CreateCatmullRomSpline and unite the smoothed paths with the ribbon function you should get a fast desireable result.

> **[Babylon.js Playground](https://playground.babylonjs.com/#82UWMI%238)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

> **[Creating Ribbons | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/ribbon)**
>
> Learn how to create ribbons in Babylon.js.
