3dxml at the bottom
I want the sphere to grow, following the same logic as for the curve and half sphere curve boundary.
This time, instead of a repulsive curve, it is a repulsive surface, with all the issue you can imagine on performance.
the surface is a mesh and I control the vertices of the mesh like before, remeshing the resulting mesh to harmonize the vertices and loop, to simulate the growth.
here is my logic.
start from an icosphere because of the symmetries of the mesh. it is as regular as I want. and loop on the mesh
2. few iterations including brownian moves to initiate the coral effect. If no brownian, the sphere will grow into a sphere. There is no interest
this is after 3 iteration of the loop explained below
- set the replusing points: for every points that will be moved, take all the vertices that are within a ball of 120mm radius, and remove few neighbouring vertices on the mesh (to control the tension of the membrane...)
- set the brownian move
- add the brownian and the repulsing force to move the vertices
- remesh to reharmonize the mesh and keep the same membrane behavior for next loop (move)
3. loop to grow the sphere, excluding the brownian move (no need anymore)
it is the same logic as loop 2, but I wanted to check if I could optimize the performance by filtering the moving points. I keep the vertices that have moved "a lot" and I freeze the ones that have moved a little only. SPOILER: my result is not really good, still too many points are moving...
the new loop entry is now the mesh and a set of vertices (the moving ones).
here you can see the repulsion is only on the loopvar2 vertices. they are the "growing zone" of the mesh. the rest of vertices will not move.
here is how I filter the growing zone vertices
- I select the vicinity of the moving vertices
- I create list of the distance moved of all the vertices of the mesh
- then I can analyse if the moving vertices have moved a lot or not, and also its vicinity has moved a lot or not. its a laplacian, I think...
- I keep only the vertices whose vicinity has moved more than 8mm
- Why 8mm? in my results, 7mm, is like I keep everything... and 9mm 10mm almost nothing moves anymore...
- after the remesh, I take the closest vertices from the kept ones and I take the new vertices vicinity => I get a growing zone of vertices for my next loop
results after 20 iterations
it terms of performance, I know that time to loop is exponential.. not good, but I hoped by filtering the vertices on the growing zone it would be not so bad.
-> very fast until 7 iterations
-> few minutes between 7 and 15 iterations
-> then it took more than 1h30mn to reach 21 iterations
I wanted to go to 30 iterations... maybe in future.
I am happy because, the growing zone was working: I could see check that I have roughly 2/3 of the vertices moving and the rest is frozen.... but I need to relaunch the calculus to chekc exactly the ratio
3dxml is for 1 iteration-> just set the number of iteration of the 2nd loop to 10 or 15 to feel the growth
