Rounded corners on BoxGeometry where faces not touching

Hi community,

I’m trying to find a way to render adjacent cubes which have rounded corners in the style of Not simply a "rounded" cube, but only on the edges which do not have a touching neighbour cube.

I.e. the edges circled in red on the crude diagram below. I don’t want to create a model in Blender and use that as the shape can/will change depending on the blocks that I put together.

Screenshot 2023-11-02 at 23.09.16

Any code samples would be much appreciated!

That sounds really hard. :smiley:

Can you use a fat beveled cube and let them overlap?

Here you are some code sample to appreciate. Of course, it needs some work to polish the rounded corners, but I will let this up to you. Cube positions are set in line 66, so you can try with other configurations:



For evenly rounded corners on all sides, you can use the construction as in

Magic Box Example 19.

Addon to create special / extended geometries

GitHub - hofk/THREEg.js: three.js addon to create special or extended geometries. The addon generates indexed or non indexed BufferGeometries.

Simple construction of the corners see from the collection
Beginner example step 12, function eighthSphere( n )

1 Like

This was almost precisely what I was looking for, thank you so much for taking time out of your day to share this approach! It’s close enough to be able to solve my needs so I’ve marked it as the solution.

1 Like