Halloween Costume ideas 2015

SVERCHOK / Sweep! Swipe! Swoop!

This looks like Instant Noodles.
The title of today post is certainly unusual. Are they the sounds made by movement of Tennis racquet hitting the Tennis Ball. Or could also be the sounds of Cricket jumping around on a Violin?

Maybe they are the sounds that are made when:

  • Points get connected to create Edges
  • Edges being Lofted to create a Surface Mesh
  • A sweeping that happens when we "extrude" a Shape along Path / Spine
Well, I just made that up, but they are our topic of the day. We can really be quite SMOOTH and FLEXIBLE with LIST of NUMBERS using Sverchok in Blender.

What normally we see as NUMBERS, can easily be transformed into a real 3D surface. This is not hard to create, to see, to swap, and to manipulate anymore. Watch out for these nodes, they are powerful.
  • LIST JOIN
  • LIST LEVEL
  • LIST REPEATER
  • LIST SHIFT
  • etc
I really wish that when I learned Math in high school, I had a tool like Sverchok. Kids today are so lucky. Every lengthy boring Math books should have accompanied visualization made using Blender and Sverchok.

In fact, I am currently re-reading some Math book, and converting them to Sverchok node tree. Just for exercise. It is fun.

NOT ONE SOLUTION, BUT MANY


Sometimes what interesting for me when working in Parametric or Procedural way is the MULTIPLE WAYS we can choose to achieve the same results. Some more efficient than others, but knowing many ways is what making us a bit wiser. Not just the one way shortcut. 

Let say, if normally we use 100 steps, it can be reduced into 10 steps, sometimes become 1 step. This is quite similar to PROGRAMMING concept.

We can think of this stuff like SIMPLIFIED and TRADITIONAL in writing Chinese characters. I know many people who learned the TRADITIONAL Chinese Characters, having difficulty with reading the SIMPLIFIED version. I cannot write Chinese myself, so I have no idea. But basically different way of writing for telling the same thing.

The LONG TRADITIONAL WAY is sometimes a lot clearer than the SHORT EASY WAY. However, in practice, when we need the SHORT EASY WAY, as long we already understand the idea, we can use it.

Sverchok is being developed daily and even though I only use it less than a month now, on every update I see some NEW NODES are appearing and making things a lot simpler and easier to do. Keep this in mind.

I will try to demonstrate all these with some examples that I put together. We are yet dealing with complexity of VECTOR yet, we just think about NUMBERS and SEQUENCES.

Later on, we will see some examples on how we can use DATA from Line, Circle, Plane, and Cylinder to help us connecting the dots, lofting edges, and sweeping a surface.

Thanks to LINUSY (at Blender Artist Forum) for teaching this. NIKITA also deserved credit for additional information. Check the Sverchok Thread at Blender Artist Forum.

THE HIDDEN "LIST JOIN WIKI"

Before I go further, I want to point out a secret document inside Sverchok. Well, it is kind of hidden. If you unzip "sverchok-master", inside it there is a file called "lists_join wiki".

If we look inside it, we can see this text:


I use Google Translate and convert it to this:


level 2:
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [ (1,2,3),
(4,5,6), (7,8,9), (10,11,12) ] ]

level 2 + mix
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [
(1,2,3),(7,8,9),(4,5,6),(10,11,12) ] ]

level 2 + wrap
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [ [
(1,2,3),(4,5,6) ], [ (7,8,9),(10,11,12) ] ] ]

level 2 + wrap + mix:
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [ [
(1,2,3),(7,8,9) ], [ (4,5,6),(10,11,12) ] ] ]

level 3:
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [
[1,2,3,4,5,6,7,8,9,10,11,12] ] ]

level 3 + mix
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [
[1,7,2,8,3,9,4,10,5,11,6,12] ] ]

level 3 + wrap
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [
[1,2,3,4,5,6],[7,8,9,10,11,12] ] ]

level 3 + wrap + mix:
[ [ (1,2,3), (4,5,6) ] ] + [ [ (7,8,9), (10,11,12) ] ] = [ [
[1,7],[2,8],[3,9],[4,10],[5,11],[6,12] ] ]


Above example is a very good explanation of LIST JOIN node.

This is what NIKITA tried to explain in regards to LIST and NESTING using the Matryoshka Doll:

The example above is very useful when we are combining Vector DATA which is usually nested data.

We can try it ourself using a simpler data like below we have 2 series of Float numbers: 

1.0
2.0
3.0

and 

4.0
5.0
6.0

They both can also be written as LIST like this [1.0, 2.0, 3.0] and [4.0, 5.0, 6.0]. Sometimes (1.0, 2.0, 3.0) and (4.0, 5.0, 6.0), which are TUPLE. LIST and TUPLE look similar and can be treated similarly, but they are really different.

Do not worry, for us, when working in Sverchok, we just need to pass the correct DATA nesting.

Joining them using LIST JOIN node, and trying the 8 options and combinations above, we get a different result of nested lists, that can be viewed using VIEWER TEXT node.



level 2:
=0=   (6)
1.0
2.0
3.0
4.0
5.0
6.0

level 2 + mix
=0=   (6)
1.0
4.0
2.0
5.0
3.0
6.0

level 2 + wrap
=0=   (2)
[1.0, 2.0, 3.0]
[4.0, 5.0, 6.0]

level 2 + wrap + mix:
=0=   (2)
[1.0, 4.0, 2.0]
[5.0, 3.0, 6.0]

level 3:
=0=   (1)
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]

level 3 + mix
=0=   (1)
[1.0, 4.0, 2.0, 5.0, 3.0, 6.0]

level 3 + wrap
=0=   (1)
=0=   (6)
[1.0]
[2.0]
[3.0]
[4.0]
[5.0]
[6.0]

level 3 + wrap + mix:
=0=   (1)
=0=   (6)
[1.0]
[4.0]
[2.0]
[5.0]
[3.0]
[6.0]


Just understand all these DATA nesting can give a different result and they are all useful depending on our needs. I will keep that information above handy.

VISUALIZING THE SEQUENCE OF VERTICES/POINTS


We have become more aware that that the SEQUENCE of NUMBERS is really important.

A different pattern of number sequence will give you a different results, especially when those NUMBERS are converted into a VECTORS (3 numbers) => which normally be visualized as POINTS or VERTICES.

I have mentioned this so many times:
If you type below inside Python Console. The next time you select a mesh in Edit Mode, you can see the Vertices numbers:

bpy.app.debug = true

Vertices Indices always started from 0, 1, 2, 3 and so on.

Inside Sverchok, currently we cannot see the Vertices indices yet.

If we duplicate some instances and bake the objects, we can see the name of baked objects are in order. That is the sequence we want to know.

A simple trick by LINUSY allowing you to cleverly see the ORDER of VERTICES using "growing edges" 

For this example, I use default CUBE Mesh as Objects_In.



Above, we can see 2 interesting things:
1. Increasing Number of Verts of LINE, we can see the direction of edge connecting the points and by doing so, we can see the ORDER of VERTICES.
2. We can use LINE Edges Data to "Connect the Dots"!



CONNECT THE DOTS/POINTS => EDGES

Using this very simple Sverchok node-tree, we can have "Connect the Dots" effect. Because after all the Edges DATA from LINE is really pair of numbers:


If we supply the right DATA (pattern) and MIX them together, we will get the result. SAME RESULT, different way!

Let's try that on the default Suzanne:


WARNING: What to be aware is to make sure the Vertices Total Number you specify on the LINE node never goes beyond the total number of the vertices from OBJECTS_IN node. It may crash Blender.

Suzanne mesh has 507 vertices. I know it when we go to Edit Mode and check the value. We can also check "total vertices number" using Sverchok:

We need to do it this way, because of the nesting of data.
Connecting dots to create edges becoming very simple, below are more examples.

CONNECTING SINE WAVE



CONNECTING BOUNCING BALL WAVE (the ABSOLUTE of SINE WAVE)



CONNECTING RANDOM WAVE



CONNECTING RANDOM VECTOR EDGES

There is a new node RANDOM VECTOR added to Sverchok recently. It generates a nice list of random points, great to randomly scatter points between -1 and 1 floating values.


Connect those points and we get something like below:


This reminded me of Ramen Burger.

NOTE: Yes, there is LINE CONNECTION node, but I heard it is still kind of buggy, so we can use this method for now.

CONNECTING FLOWER



Ok, with this one, I am basically generating list of (0,0,0) and interchangably connecting it with the Random Vector (X, Y, Z). The lines overlapping. You might want this or do not want it.




Currently our Edges DATA PAIR from LINE node is like this (0,1), (1,2). (2,3), (3,4)... etc.

You might actually prefer DATA PAIR that is more like this (0,1), (2,3), (4, 5), (6,7) ... etc where each line is broken (skipping every other line) and separate like flowers. You know how to do that right?

THE TRADITIONAL WAY:
Using 2 x SERIES node and ZIP. 

THE SIMPLIFIED WAY:
Just use LINE EDGE DATA and SKIP EVERY OTHER.




You can make a more correct "FLOWER" explosion:



POLY MESH LOFT

If we are using the above example, and instead of plugging in LINE node, we use PLANE node poly data instead, so we can get something like below.



LIKE A PALM TREE

Another example I could think is a pattern that is like a big palm tree leaves: (or Chinese new year firecracker, if upside down):


You can do it like this (THE LONG WAY):



Or "SIMPLIFIED":

Same result, just slightly different approach.

ZIG ZAG LINES




Now, knowing that we can RE-USE data from LINE, we can also RE-USE data from CIRCLE, PLANE, and CYLINDER.

We just need to mind their TOPOLOGY DATA and match our SEQUENCE of LIST NUMBERS. Together they will create a mesh.

ZIG ZAG + CIRCLES



You can also create PROCEDURAL STAR using this method. It can be even be simpler.

Let see if I make Star quickly:



I still need to fix the STAR Orientation and Angle there so it is align with one of the Axis. Can you fix it? Please let me know.

LOFTING CIRCLES AND  A SPINE

Below is an example where we can LOFT from bunch of Circles. 



I think this 3D object is printable. Maybe to put some pots.
So, today we have learned ways we can RE-USE DATA that is generated from LINE, CIRCLE, PLANE, CYLINDER to help us procedurally drawing our mesh.

I think at the end of day, what really matters is how we can MANAGE those DATA STRUCTURE, to make sure they are the way you want it.

Post a Comment

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget