<p>If you have this data in a 3d array where a block is a 1 and no block is a 0 you can apply a 3d blur and then set all voxels that are left with a value higher than 0.5 to 1 and those that arent to 0. this will smooth out sharp details and leave flats mostly uneffected </p>

CC BY-SA 3.0
2018-01-12T19:01:43.050Z
I don't thing you understood what I was trying to do, I am basically trying to make the cubes themselves smooth, i.e instead of sharp cubes I should have a smooth cube like "sphere"
Makogan
CC BY-SA 3.0
2018-01-12T19:46:14.750Z
ahh i see, i misunderstood
Sebastián Mestre
CC BY-SA 3.0
2018-01-12T19:50:01.847Z
you have finite and relatively small amount of ways that cubes can be arranged around a vertex. you could pregenerate meshes for all different configurations an replace each visible vertex with a mesh with the corresponding smooth shape... keep in mind that you will need C1 continuity so having those meshes align with the grid at their "endpoint" would be an easy way of doing it
Sebastián Mestre
CC BY-SA 3.0
2018-01-12T18:17:42.530Z
2018-01-12T18:17:42.530Z
Sebastián Mestre
<p>So I am facing the following issue. Say I have a minecraft like mesh (i.e I have a bunch of cubes on top of one another).</p>

<p>I wish to smooth out this mesh in such a way that only the regions where there are edges are smoothed out and such that the smoothing concentrates around the edges (e.g if I have a staircase the overall shape of the cubes that make the staircase should still be close to the staircase but instead of having straight edges I should have something much smoother). </p>

<p>I should be able to smooth things out locally, so that if a block is removed from this mesh, I can run the subdivision algorithm only on the newly generated coarse region that is created after the block is removed.</p>

<p>Does anybody have any ideas as to which algorithm I could use?</p>

<algorithm><computational-geometry><voxelization><subdivision>
How to smooth out a voxel grid?
Makogan
# How to smooth out a voxel grid?

(Asked by: username_0 on 2018-01-12)

So I am facing the following issue. Say I have a minecraft like mesh (i.e I have a bunch of cubes on top of one another).

I wish to smooth out this mesh in such a way that only the regions where there are edges are smoothed out and such that the smoothing concentrates around the edges (e.g if I have a staircase the overall shape of the cubes that make the staircase should still be close to the staircase but instead of having straight edges I should have something much smoother).

I should be able to smooth things out locally, so that if a block is removed from this mesh, I can run the subdivision algorithm only on the newly generated coarse region that is created after the block is removed.

Does anybody have any ideas as to which algorithm I could use?

**Tags:** algorithm, computational-geometry, voxelization, subdivision


---

## 1 answers

### Answer by username_1 on 2018-01-12. Score: 1 | Accepted answer

If you have this data in a 3d array where a block is a 1 and no block is a 0 you can apply a 3d blur and then set all voxels that are left with a value higher than 0.5 to 1 and those that arent to 0. this will smooth out sharp details and leave flats mostly uneffected

> **Comments:**
> **username_0**: I don't thing you understood what I was trying to do, I am basically trying to make the cubes themselves smooth, i.e instead of sharp cubes I should have a smooth cube like "sphere"  
> **username_1**: ahh i see, i misunderstood  
> **username_1**: you have finite and relatively small amount of ways that cubes can be arranged around a vertex. you could pregenerate meshes for all different configurations an replace each visible vertex with a mesh with the corresponding smooth shape... keep in mind that you will need C1 continuity so having those meshes align with the grid at their "endpoint" would be an easy way of doing it  

---

