Kukan Kogei -空間工芸-

Notes about my 3d printing artcrafts

Differential Growth on mesh using Sverchok SNLite in Blender

f:id:asahidari:20210825183507p:plain

Overview

This entry shows how to process Differential Growth on mesh, using Sverchok SNLite node in Blender. This entry follows my blog's previous entry.

Description

In my previous entry, I wrote scripts to simulate Differential Growth on 2D space. Previously, the growth was on a 2d plane, but this time the growth on a mesh (or polygon). To get the growth on mesh, in addition to the previous algorithm, velocity vectors from each vertices have to stuck to the mesh, with the top point of the vectors ray-casted to the nearest point on the mesh.

To do this, I use mathutils.BVHTree.find_nearest API, no need to use ray_cast API. Calling this API for each vertices (or nodes of the growing line), the line can grow on mesh. f:id:asahidari:20210825183606p:plain

Usage

Script node image is here. f:id:asahidari:20210826002848p:plain

Input datas:
- verts_in: vertices of the source mesh
- faces_in: faces (polygons) of source the mesh
- selected_verts_in: selected vertices of source the mesh, starting points of the growth
- selected_edges_in: selected edges of source the mesh, starting edges of the growth
- steps: total steps of the growth
- seed: random seed to generate first velocity of the vertices
- framenum: frame number of the steps, which can change output verts/edges for each frames

Output datas:
- verts_out: vertices at the 'framenum' frame of the growth steps.
- edges_out: edges at the 'framenum' frame of the growth steps.

After all input datas are connected or 'Reload' button is clicked, calculation for all animation steps will run. Once the output datas are generated, you can select output datas by changing 'framenum' parameter.

If you can not get results you expected, you can also modify more detailed parameters in the script. f:id:asahidari:20210826002903p:plain

  • COHESION FORCE/DISTANCE
  • SEPARATION FORCE/DISTANCE
  • MIN/MAX_VELOCITY
  • MAX_LINE_LENGTH

Top image of this entry will show you how to connect this script node with other nodes.

Scripts

Scripts for Sverchok SNLite node is here. GitHub - asahidari/differential_growth_snlite_b3d: Differential Growth simulation with Sverchok SNLite node in Blender.

Example

Image below is the process of the growth on a torus surface. Node tree is described in the top image of this entry. f:id:asahidari:20210825184821p:plain

References