Halloween Costume ideas 2015

SVERCHOK / Vectorized Input and Cloning


VARIATION of clones (copies) in PROCEDURAL GEOMETRY creation is possible in Sverchok via something called "Vectorized Input".

The term "was coined" by Zeffii, and Linus also tried to explain this at Blender Artist "Sverchok" thread a few times, I recommend you to have a read at the thread.

UPDATE 20140520:

Zeffii corrected me:
"I'm afraid it was neither Linus nor I who coined this term. I started using it to describe how we interpret data coming into nodes. like:

is it one value, or a list of values... or a list of lists of values...etc. As soon as you get more than 1 value as input, you can speak of vectorization.

The term is probably in use since 1930s. More correctly, but less fancy way to call this is Array Programming
http://en.wikipedia.org/wiki/Array_programming. 

But even in big packages like Matlab and R it is often called Vectorization"

This is probably a little bit difficult to understand, however it is clear after shown with examples.

USE VIEWER TEXT NODE TO SEE DATA

What I use often, but I don't always mention in the writing is that I use VIEWER TEXT node really often to check the DATA being passed on from one node to another.

It is often clearer than using VIEWER DRAW. Sometimes the DATA become invalid or in the wrong form of LIST, and Sverchok does not understand what to do with it.


When we bring in 3 Objects:

When I first started using Sverchok, although I sort of getting in what Nikitron analogy about "nesting list in Sverchok" as "Matryoshka Doll", not until I am using it for a while that I started to get a grasp of it.

Dumping DATA into TEXT OUTPUT node as Sverchok also give you a different preview of the data:

For 3 Cubes above that I brought in, I can see the EDGE data in LIST like this:
[ [ [ ], [ ], [ ] ... ], [ [ ], [ ], [ ] ... ], [ [ ], [ ], [ ] ... ]  ]

LIST inside a LIST inside a LIST can be little difficult to grasp in our brain. However remember that most of time this, Sverchok will take care of them, as long we know what to do.

Anything to do with list you can modify using the LIST nodes. These below are the most useful:

  • LIST LEVELS
  • LIST JOIN
  • LIST FLIP
  • LIST ITEM
  • LIST MASK

But all of them are actually equally important and worth trying to understand list.

RANDOM LINES USING RANDOM VECTOR

Supposed we want to generate some random connected LINES. We can do that most easily using RANDOM VECTOR and LINE CONNECT.

Random Vector can generate random 3 values (vector) that act as points that we can easily connect using the Line Connect.


We know that we could use "Seed" parameter to quickly get variations. However, if we are cloning the data using Matrix, we are always end up with same exact clone for each copy. It could be a hassle to always need to random pick Seed, then Bake the mesh each time.

In another 3D package, we want to do variations using "copy stamping" method where each copy has variations, whether it is via Random Seed number or other DATA values supplied.

Now, the key here is to check whether:
- The Generator Node is supporting Vectorized Input port
- We have way to port the Vectorized Input data.

This all made trivial via one node: LIST INPUT.

INTRODUCING LIST INPUT (FOR VECTORIZED INPUT)

This is quite a new node for me. The way I see it is this is one node to manage the Vectorized Input data. I know that this list allows me to generate VARIATION in clones.

"Random Vector" node accept Vectorized Input data and this is key to remember. This makes everything work as expected and we get variations.

So, if we plug in LIST INPUT node into RANDOM VECTOR we get instant variations:


We could then "offset" the SEED Integer value like below just to get all kinds of variations.


This might not sound like a big deal, but think about it for a moment, THIS is actually VERY POWERFUL. This is the reason I like about procedurality.

Because when we are able to generate variations with every node and every parameter in Sverchok, we suddenly have an unlimited possibilities.

Below is CONNECT LINES FROM RANDOM VECTOR:


What if I make a KNOT (lines goes into loop like Circle)? CIRCLE node is special and just recently upgraded so it can take Vectorized Input. Again, this is important. We cannot actually do this not long ago.

Below is KNOTS FROM RANDOM VECTOR: (I called this "Linus Knots")


Before, we have an open LINES, now we have KNOTS.

Unpredictability is part of procedural creations.

Vectorized Input => (NEW) Noise


Not always very obvious, many nodes can take multiple data input (vectorized input). For doing something like above, I often use Viewer Text to check whether my LIST data is correct or matching, and whether it is really outputting the correct data needed for final bake.


Remember we are working with low level data.
- A cube has 8 vertices
- If we want 4 x List Input, we will multiply the data 4 x 8 = 32 vertices, each still contained within 4 x List Input
- Then perhaps we want to push each vertex using random vector value (each vector is 3 values), how many random vector do you think we need

Now, I think Sverchok data structure management is pretty smart (I think so), so often we don't need to think too much about this. Just watch how the data get passed from one node to the next, keeping the pattern needed (to create geometry) and make everything manageable and we should get predictable output.

PROCEDURAL KAMASUTRA (2014)



EXAMPLE: Procedural Stars

Looks like with STAR, we can do it differently, I think below is kind of the right way to approach it. I am using LIST MASK to select "every other" points and then just scale it out.


One key different here is that we can use Vectorized Input with Circle node. Which means, we can output instant variations to our stars generator.




NOTE:
Funny thing I found here is that is I use VARIATION COUNT over 30 counts, I am starting to get some glitches. Maybe 30 Vectorized Input data is maxed out at the moment?


UPDATE:
Linus gave explanations:



Something like below would work:

TRIANGLES INA BOX



What can Triangles in a Box do? Instant Zaha Hadid? For that we only need Cross Section and Random Vector nodes.


GLITCH IN OPENGL SVERHOK VIEWER

Sometimes you might notice there is a little glitch on the Viewer like this:



Linus and Zeffii's explanation:
- For now, convex draws fine, concave doesn't.
- Don't expect ngons with concave elements to render properly

Keep that in mind, the preview is just a preview. Anyway, the resulting bake is completely fine.

It is probably fixed already.

EXAMPLE: Procedural Stones Generator



Interesting how we have all kinds of method to generate "random shaped" rocks or stones or pebles. This is probably the ultimate way.

Combined this with PROCEDURAL SHADER creation in Blender:


Random glowing Stones.

EXAMPLE: Liero's Rings


At Sverchok Thread #880, Liero gave this example creation you can do using the updated CIRCLE node and Vectorized Input.


All credits goes to LIERO on this one.


This is something that might become a Procedural City Map

THE ZEN OF PROCEDURALITY IN SVERCHOK

I can be madly philosophical about this.

Think about the BEGINNING and ENDING of a MESH geometry, before it become a truly useful entity (rendered out or used in game engine).

Your geometry may BEGIN its LIFE as 3D polygon mesh that you already have in the scene. It may also start inside the Sverchok, made using Generator node, out of nothing, just collection of NUMBERS.

Either way, the geometry eventually escapes and falls into Sverchok world. There, this geometry is TRANSFORMING.

Inside Sverchok, it become the Matrix, Vector, and List of Array of Numbers, Simply A GHOST mesh object. We can observe, manipulate, reduce, replicate, clone, filter, ... basically anything. This GHOST is FORMLESS, as Sverchok GHOST object is not yet REAL.

Suzanne is now a Delta.
To be REBORNED as a new object in Blender, we need to hit BAKE. Or turn it into temporary mesh using the BAKERY node. Or the (NEW) BMESH Viewer.

However, for us, the CREATORS, between the BEGIN and END of PROCEDURAL MESH, what truly matter is the JOURNEY.

"Procedural Unfold Script" by LIERO:


I accidentally stumbled into this awesome script.

Actually this is also kind of effect I always wanted to create in Blender. This is really brilliant!

I was questioning about CODE vs NODE and how algorithm can be used and setup advanced complex things. I realized I am just a newbie after all.

This Unfolding Flipping effect is brilliant because it makes use of Blender Rig (Bones) system and the effect is "procedural". I am sure that eventually this kind of iterative procedural animated effect can be done inside Sverchok.

Definitely something for you to play with:
http://blenderartists.org/forum/showthread.php?307784-unfold-transition

NOTE:
If you want similar "philosopy" about "Particle's Life and Death", you can read it inside this old book:
http://books.google.com.au/books/about/The_Magic_of_Houdini.html?id=PKN8AAAACAAJ

BMESH VIEWER NODE (!)

This BMesh Viewer node is very new, still in Beta. This node allows a different kind of "Baking". We can apply Material while Sverchok is still cooking. And more. Sverchok object is now LIVE.

What interesting is how we could manipulate geometry in this way:
MESH => SVERCHOK => BMESH => MODIFIER => SVERCHOK => and so on ....

BMesh Viewer makes Sverchok Viewer more real.

This is starting to get really serious and making me a little bit nervous.

We could start inside Sverchok and then combo with normal Blender environment.

SVERCHOK => BMESH VIEWER => Blender MODIFIER
=> Back into SVERCHOK => OUTPUT



This BMesh Viewer node is still in beta and of course there are some limitations, but this is quite exciting.

I have touched many of the basics and the most trivials. Hopefully this information helps you to build some more interesting procedural works.

LINKS

http://www.gamasutra.com/blogs/JayelindaSuridge/20130903/199457/Modelling_by_numbers_Part_One_A.php
http://www.complexification.net/gallery/
https://www.youtube.com/watch?v=AnAqB7LZUb8
https://vimeo.com/94720637
http://cliptic.wordpress.com/

Post a Comment

MKRdezign

Contact Form

Name

Email *

Message *

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