Procedural mesh

Hi there, hope everyone is fine.

I would like to compute a procedural mesh that could look like the following :

I don’t know how to call it, it’s a kind of sphere, with kind of tentacles. It may look like a microbe.
What should be parametric:

  • The number of protuberances (tentacles)
  • The size of protuberances
  • Eventually the number of protuberance stage

I think i can achieve this from an Icosahedron, by taking some group of 6 faces (w Poisson Disc for regularity), extrude/scale them along the normal, and finally applying a kind of “HyperNurbs” modifier (the examples give a solution).

Does anyone have advice or thoughts to share on how do to it?

Thx,
Joseph

Maybe you could look at the marching cubes example? three.js webgl - marching cubes

AKA: Metaballs

For a constructive solution, in which different parameters can be set, a self-defined geometry is useful. I myself would take a sphere with holes as a base. (triangulation according to an algorithm by E. Hartmann)
Triangulation sphere with holes

The positions of the holes can be defined e.g. via quaternions. Quaternion - Axis, Angle Visualization

Then you can attach the tentacles. Inner Geometry (Triangulation)

Example
InnerGeometrySphereCylinder

I did it for cylinders. You can use a function of the outside line instead of the cylinder with the linear outside line. Then you have to calculate the normals a little more complicated. But it’s certainly not that hard.

However, you may be able to take a CylinderBufferGeometry and change the distance of the vertices to the centerline (radius) according to a function.

There are many variants. :slightly_smiling_face:

Inspirations:

sandbox

Addon to create special / extended geometries
Addon. Produces almost infinite many time-varying geometries with functions

hofk (Klaus Hoffmeister) · GitHub

@marquizzo You’re right Marching Cubes is a solution, i was thinking of “meta-ball”. I believed that “Marching” was referring to raymarching, (ie no meshes, compute shading only), but there’s a mesh here (marching is a general term for algorithm seeking for a solution step by step ex Marching cube wikipedia).

@hofk Your example are awesome. Dynamic triangulation should be considered, but I’m afraid of getting into complex math problems that I can’t solve on my own. I will take a look into your code.

After being able to produce the mesh, i would like to move some mobile on the surface of that mesh. In a way, in the same way that does Paper IO 3D.

To move from on face to another adjacent one, i think that the position of any mobile should a combination of:

  • face-index,
  • (x,y) coords in the “local face frame”

the “local face frame” could be defined by two axis which, in a triangle ABC, could be:

  • axe X = AB.normalized
  • axe Y = (AB.normalized × AC.normalized) × AB.normalized

image
https://jniac.github.io/three-point-text-helper/tests/examples-vanilla/triangle/

Is there a better way to define position on surface of a mesh?
How do you think Paper IO 3D has made its physics (local 2D velocity/direction)?

Marching Cubes

When I see what else you have planned, some mathematics will be necessary.

The mathematics for triangulation is not mine either. You just have to be able to adapt it to your needs.

Surface triangulation - Wikipedia

http://www2.mathematik.tu-darmstadt.de/~ehartmann/cdgen0104.pdf
page 81 (in english)

The other things I needed are not that complicated. These are the common things you need for 3D. Normals, binormals, tangents, circle equation in space etc.

2 Likes