Deform displace geometry sphere question

Hi,

I am new on threejs, just wondering any good resource to look over on rendering this shape

its not a normal sphere and is deformed / sank in on some part

Vector (1)

You can reposition the vertices of a sphere accordingly. Examples of how this is done.

const position = geometryMouth.attributes.position;

for( let i = 0 ; i < position.count; i++ ) {
    
    v.fromBufferAttribute( position, i );
    position.setXYZ( i,  Math.cos( v.y ) * v.x,  Math.sin( v.y ) * v.x,  v.z );
    
}
...

for( let i = 0; i < posSphere.count; i++ ){ // change shape to hemisphere with hollowing

    v3.fromBufferAttribute( posSphere, i );
    
    posSphere.setY( i, v3.y < 0.0 ? v3.y : ( v3.y < 0.66 * radiusSph ? 0 : 0.4 * radiusSph - v3.y ) );
    
}

from
BumblebeeMara
see also
CurvedArrowHelper
SpiralFromCylinder

The arrangement of vertices and triangles. NumberingHelperExamples

Or you can build a custom geometry.
Example MorphBoxSphere

Somewhat simpler examples for custom geometries. Round-edged box flat


from the Collection of examples from discourse.threejs.org

2 Likes

SimplexNoise works well for me :thinking:

2 Likes

thanks,

i need to try play around with the code to generate the shape like you