nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.23k stars 232 forks source link

Mesh growth & Reaction Diffusion in SV #3384

Open thebuza opened 4 years ago

thebuza commented 4 years ago

Intro:

Some time ago I was inspired by Zaha Hadid Architect's video about their Tallus design concept. The mesh is created using several reaction diffusion presets and mesh growth simulation.

I was thinking about recreating this design in Blender with SV but I realised that other plugins and programs will be needed for that - GrowthNodes, Tissue with RD and/or Ready for simulation process. As you can see the process requires using few components while Houdini has built in simulations of Reaction Diffusion and Mesh Growth. So my question is:

Can simulation nodes be implemented to Sverchok?

By simulation nodes I understand Reaction Diffusion presets (which are right now in Zeffi's script) and Differential Mesh Growth solution that are implemented in Houdini and Grasshopper. Those features are also implemented in Animation Nodes in Omar's video and it is exactly what I would like to see in Sverchok.

Why bringing simulation nodes to SV is a good idea?

Growth simulations are used in design where SV focuses most. Also animation field - where SV is very capable - would be a great place to show that Sverchok can be the best alternative for Houdini artists and motion designers. I think of Sverchok as a most intuitive add-on for generative design (even better than AN : - )

In short - I would love to see Zaha Hadid design being made only in Sverchok with animations of simulation process. Just like in Houdini and Grasshopper.

References:

Zaha's Tallus Design: https://www.youtube.com/watch?v=FnZiszi7aS4 Animation Nodes RD and Mesh Growth: https://twitter.com/omaremaradev/status/908746115880833024 Nike shoes ad: https://www.youtube.com/watch?v=Aiy3BMieOEI Jimmy mentioned also this amazing video: https://vimeo.com/145251635

zeffii commented 4 years ago

I think of Sverchok as a most intuitive add-on for generative design (even better than AN .)

it does increase my interest in your plight that you think that.

We are always expanding the possibilities in Sverchok. The main driver is what as devs feel we want / need / can accomplish. Beyond that it we do take on the occasional challenges to implement solutions that accommodate "pipedreams" of users :), especially if we think those dreams are cool and implementable too.

my RD script was super basic, and I don't think it had any real-world use case. Sverchok is a different beast now than when that script was made. I don't know anything about 3d/spatial RD, it adds extra complexity.

@portnov / @vicdoval are the maestros. At this point

  1. our surface creation possibilities are becoming serious stuff, and for that Zaha stuff that's the first step.
  2. The second step (unwrapping/flattening and..) works for surfaces that can indeed be flattened. If not then there is the need to develop some way to parametrically 'seam' the surface so that it does flatten. seams would act like mirrors.
  3. adding a surface simulation, is the fun part. but is also distinctly separated from how the surface was made.
zeffii commented 4 years ago

i think a lot of those visualization videos are using mesh displacement textures primarily, to generate topography of the mesh. (so highy subdivided meshes of which the vertices are pushed around based on a normal map. So when a client needs only a video, you can get away with something like microdisplacement maps and relatively lower mesh resolution, but if you need to fabricate you generate a resulting highpoly mesh based on the effect of the normal map.

outside of my wheelhouse :)

https://math.libretexts.org/Bookshelves/Applied_Mathematics/Book%3A_Introduction_to_the_Modeling_and_Analysis_of_Complex_Systems_(Sayama)/13%3A_Continuous_Field_Models_I_-_Modeling/13.06%3A_Reaction-Diffusion_Systems

zeffii commented 4 years ago

or as a fragment shader.. https://pmneila.github.io/jsexp/grayscott/

Durman commented 4 years ago

Those features are also implemented in Animation Nodes in Omar's video and it is exactly what I would like to see in Sverchok.

@DaveSledz Why just don't use Animation nodes addon then?

BY the way are you aware of reaction diffusion feature in Tissue addon? https://github.com/alessandro-zomparelli/tissue/wiki/Weight-Tools

zeffii commented 4 years ago

https://www.youtube.com/playlist?list=PL9_jI1bdZmz0hIrNCMQW1YmZysAiIYSSS Discrete Differential Geometry

thebuza commented 4 years ago

Guys thanks for your replies and propositions. The Tissue Addon with RD and Streamlines effect looks very promising for what I've been looking for.

thebuza commented 4 years ago

It looks like there is something interesting I've found about Differential Growth simulations - there is even a Grasshopper tutorial about Zaha's Thallus: https://www.youtube.com/watch?v=dVv6zLicE4s The simulation starts at 5:10.

So it is a bouncy solver in Grasshopper. The interesting part is that it is a part of a Kangaroo physics and there was an idea to bring kangaroo physics to SV Pulga physics:

@vicdoval wrote in Rigid Origami thread: https://github.com/nortikin/sverchok/pull/3416

Also very interesting of the grasshopper example you provide is the mix with the kangaroo plugin that could be extrapolated to the Pulga Physics node.

Hmm, guys any ideas to make that a real thing inside SV? : - )

thebuza commented 4 years ago

Here is also an interesting research about simulations of Differential Growth, Reaction Diffusion, Diffusion Limited Aggregation: http://uvnlab.com/differential-growth-research-en/ - it's really nice

zeffii commented 4 years ago

also some js code for 2d algorithms https://adrianton3.github.io/blog/art/differential-growth/differential-growth.html

zeffii commented 4 years ago

i'm still not getting my head around numba, to the point where it has enhanced computation speed of anything that i've written, and there are things we need to implement before any differential growth nodes or scripts for DG.

vicdoval commented 4 years ago

So it is a bouncy solver in Grasshopper. The interesting part is that it is a part of a Kangaroo physics and there was an idea to bring kangaroo physics to SV Pulga physics

Well.. not all the "goals" can be extrapolated to the Pulga Physics. The intersection with the lines (springs in Pulga Physics) is not implemented. Neither the "Lines Angle" and the "OnMesh" goal (although it would be pretty interesting to have it)

thebuza commented 4 years ago

Yeah, I get it. I only know that Alessandro Zomparelli uses Numba for his Tissue Add-on, not sure if it uses GPU for that - maybe with CUDA or OpenGL. I'm using Mac but I have to say that Tissue is working fine and quite nice here.

Guys you already shown that SV made a huge shift from the beginning. I remember the old presentation at Blender Conference and first tutorials from Jimmy - tremendous work really! Yeah, the next steps may be quite tough but I believe it is really worth the effort. Just to show how incredible is SV in areas of design, architecture, animation and in near future - simulations/VFX.

PS. I saw the Particle Nodes showcases. It is still in beta stage and it mostly focuses on animation. No simulations such as Differential growth, R/D. It's just another iteration of Animation Nodes but - in my opinion a more intuitive than AN. SV is still king here : - )

zeffii commented 4 years ago

https://www.cc.gatech.edu/~turk/my_papers/reaction_diffusion.pdf

vicdoval commented 3 years ago

Differential Line algorithm (by inconvergent) implemented in Sverchok https://inconvergent.net/generative/differential-line/
image

asahidari commented 3 years ago

A couple of changes to @vicdoval 's example. DifferentialGrowthOnMeshWithPulgaPhysics

asahidari commented 3 years ago

Allow me to post one more comment. But this can be a solution for one of the growth mentioned in the first comment. Differential Mesh Growth, implemented with Pulga Physics node (, Relax Mesh node and Subdivide node). differential_mesh_growth_soildified The source mesh is a triangulated small plane. Using appropriate parameters will generate better shape. As the mesh grows, however, the task will be heavier and need more time to compute the process. differential_mesh_growth_animation

enzyme69 commented 3 years ago

@asahidari Have you tried rendering this animation of Differential Growth, it seems like in my case, the SV SNL does not update before the render, so my animation become static.

UPDATE: So far somewhat the only way I could render was via 3D View, as Blender actually captures the 3D view ok and render it frame by frame correctly.

Cycles and Alembic ignores SV updates....

asahidari commented 3 years ago

@enzyme69 You might have already found the solution. But just in case, I found the link that offers a solution (This might be a known issue for Sverchok). When I change the Frame change handler (in Sverchok add-on preferences) from 'post' to 'pre' referring to the link, frames can be updated with Cycles renderer. https://blender.stackexchange.com/questions/202310/update-sverchok-tree-on-frame-change

Another solution (by @enzyme69 ): using SV mesh out -> Animation nodes Spline out .