Note: Sverchok Using List Join When Building Faces

Published on

Original language: Chinese . AI translations: English , Japanese .


I wanted to learn procedural modeling. I first looked at Houdini. The official learning path recommends starting with Houdini Fundations, but progress was slow…
Then I suddenly remembered Sverchok. I checked the docs and it felt more interesting.

Note: this post assumes you already understand some basic concepts of procedural modeling
English: Sverchok: Introduction to geometry
Chinese: 菜鸟学bpy(一)新建网格物体

Sverchok docs first introduce the necessary concepts, then quickly move to examples, using step-by-step cases to deepen understanding.
(I think this is a good tutorial approach. Trying to make readers learn all the basic concepts upfront is too boring.)


Enough talk, here’s the point.

In lesson 2, creating a circle. Maybe due to code changes, some node behavior changed slightly. Most steps were fine, but the step get list length, auto-generate polygon broke.
Following the docs and connecting list range to viewer draw caused an error.

As shown below, creating 4 vertices is fine:

But generating the list and connecting it to faces caused an error:

Looking at the output with a viewer node: the hand-written list outputs [[[0,1,2,3]]], but the generated list outputs [[0,1,2,3]] (one pair of brackets missing):

With viewer text, it’s even clearer: the generated list is split into four:

The fix is to use the list join node and enable wrap. Then the list is merged into one, and connecting it to viewer draw works.

2019/11/09 update
Another fix is to set joinlevel lists of the list join node to 3. That also packages the four values into one.


One more lesson and I’ll finish the docs examples. After that I might write a note to organize what I learned.
(Kind of strange that Sverchok isn’t that well-known. Animation Nodes seems much more popular.)


2019/11/09 update

Found a crash bug in Blender caused by the Viewer text mk3 node.
If this node has inputs and auto-refresh enabled, trying to delete a Sverchok-generated model can crash Blender.

As shown below, deleting this cube will crash Blender:

Blender version v2.82.1 daily build(11/08)
Sverchok version 0.6.0.0

Issue filed on GitHub: Viewer text mk3 node bug


2019/11/13 update

Uploaded a 4k screen recording to YouTube: Sverchok docs case