Round-edged box

I use SphereBufferGeometry but the planets dont get well defined on the edge.

As you can see the planets (spheres) dont get well defined on the edges and get worst when I zoom in.

try to load the background with these stars : https://i.ibb.co/D7B8ChD/eso-dark.jpg you will see the spheres rounded are not well defined.

I dont know how to fix it. pls

Do you set the default anialiasing to true?
This way: var renderer = new THREE.WebGLRenderer( { antialias: true } );

yep. I did. I have this code on https://jsfiddle.net/al3xpisani/percg73n/6/

@alexandre_pisani
No, you didn’t.
I see this in your code:

    renderer = new THREE.WebGLRenderer({
      antialias: false, // try to set it to `true`, the result will be much smoother
      logarithmicDepthBuffer: false,
      alpha: true,
    });

RESOLVED yep. you are right. I was trying changing a lot of settings and may be forgot this one. thanks a lot for helping me @prisoner849

@alexandre_pisani
You’re welcome :beers: Glad, that it helped.

Hi !

I’m trying to make a “low poly” round edged box version.

i’m trying to reduce the number of triangles resulting of the extrusion of a shape using shape.quadraticCurveTo().

Dreaming of a fifth parameter in shape.quadraticCurveTo(cpx, cpy, x, y, numberOfsegments).

Any help appreciated, including math google keywords.

Possibly you can use that?

From the Collection of examples from discourse.threejs.org :
RoundEdgedBoxFlat

const w = 16; // width
const h = 9; // height
const t = 0.2; // thick
const r = 2; // radius corner
const s = 36; // smoothness

const geometry = RoundEdgedBoxFlat( w, h, t, r, s );

(see also RoundedRectangle)


Or Addon to create special / extended geometries - #3 by hofk

2022-04-05 08.46.03

Solved, it was in the doc, but not Shape side.
i.e curveSegments in extrude config settings. Sorry for noise.

1 Like