Closed ly29 closed 7 years ago
@enzyme69 I assigned you since I would like your feedback on this.
The options does need to a better name, @zeffii any idea?
It works like map
basically apply the monad to the input...
An enumerate
version would be nice, but would requires some more changes in the monad code or an special node a bit like frame info. Hmm
straight up call it vectorize
.
Good call.
Monad Info Node Gives two outputs with the total number of loops the monad will do and the current one it is in.
Only appears in menu while editing a monad.
I suspect there will be scenarios where there's a big speed difference between a node that was vectorized internally by hand (when it was possible to reuse calculations) vs a vectorized monad.
The sooner nodes becomes merely symbolic representations of modular code structures the better.. but that's the fundamental rewrite.
that's the fundamental rewrite
Exactly. With 180 nodes it is a monumental task, even though a number of nodes probably should/could be dropped. That is without doing the structure for making it possible. Also is more complicated because the nodes are sometime more clever than is good for them.
well, i won't lie, the thought of that gives me a headache. Even if it's the obvious way forward.
me too.
But this is a good kind of compromise step, small overhead extending possibilities.
btw, which node will return a list without consecutive repeats? :)
in a way this makes things work as they should, the nodes don't know they are being called many times and manipulated into doing things.
That could kind of be transitional step of doing the deep vectorization without rewriting all the nodes, writing a function calling the node for each input separately at the old standard levels... Okay so this could actually work out with rewriting all nodes... Mind slowly blown...
btw, which node will return a list without consecutive repeats? :)
No sure I understand this @zeffii
i'm getting that sense that the more granular a node is, the more appropriate it is to do no vectorization internally at all.
No sure I understand this @zeffii
its offtopic. was wondering if there's a list node i'm forgetting about, one that returns a list with no consecutive repeats ( preferably also without any dupes) . am writing a scriptnode anyway..
Like below? No I was thinking about that earlier today as well :)
a = [1, 3, 4, 5, 6, 1, 2, 4, 5, 6]
seen = set()
b = []
for x in a:
if not x in seen:
b.append(x)
seen.add(x)
print(b)
Or like?
a = [1, 1, 2, 3, 1, 2, 2, 2,2 , 3, 3]
prev = a[0]
b = [prev]
for x in a[1:]:
if not x == prev:
b.append(x)
prev = x
print(b)
A brief example of what was is possible now that didn't work.
yeah, that's completely nuts :) :+1:
Watching Ly doing his magic with awe... I like the spikes adaptive poly, complex underneath, simple to use.
So, previously Monad cannot take multiple inputs? confused
All I want to do is to make Array of Array of Circles.
Earlier, I made video live noding and failed to do a simple Seed vectorizing on Circle or on Randomize Vertices...
But then again, I was silly:
It works this way...
Circle > List of Integer > Seed > not vectorizing! List of Integer > Circle > Seed push > vectorizing!
The monad could take multiple inputs, it was like an ordinary node. But some nodes cannot be properly vectorized, now you can get around that using the monad new vectorize option.
Ok once there is update with this enhanced Monad I will test.
There is right now. And as bonus bmesh viewer has object out like in #853
Still not sure if what I am trying to do is possible now or not.
I tried your Monad example with multiple objects, it works like magic. Almost like LOOP.
When I check, it does not work right away, I need to update by playing the timeline.
However, still investigating why my array of array does not work. Such simple circle duplications.
Well it is new some bugs a probably lurking around, the vectorize property needs a small thing.
Wait the minute, I have a feeling I asked this few times before. http://blendersushi.blogspot.com.au/2014/01/sverchok-revisiting-procedural-stacking.html
Kind of like to make array of tower of tower. And Nikitron tried to explain few times....
Maybe I'll find the answer tomorrow morning.
Towers with different seeds and different height, new version. For 0.5.6.1 tower.zip
If you use matrix it is good idea to apply inside of monad since that is one the things where vectorization fails to behave totally. The list split is needed for now, trying to think about ways around that...
for all it's potential faults, this does address the simpler needs. Reckon we write a suite of nodes specifically for inside the monad, which are at their core non-vectorized?
I rather spend my efforts writing total vectorization using these techniques wrapping the nodes and then converting the nodes to the simpler system gradually removing the need for the wrapper. Combined with SN3 and similar syntax for nodes redux would have arrived. Some spring cleaning would be needed of course.
It is fairly clear to me that the split should be an option in node interface next to vectorize.
Wait the minute, I have a feeling I asked this few times before. http://blendersushi.blogspot.com.au/2014/01/sverchok-revisiting-procedural-stacking.html
Kind of like to make array of tower of tower. And Nikitron tried to explain few times....
Maybe I'll find the answer tomorrow morning.
There is tower example a bit up in the thread
Thanks Ly, I will check soon.
I remember: [] > [] > Line can make Lines with different point numbers.
My understanding: Monad in the past is only for organizational, however, it now can do "vectorized", so, if we provide 3 items, it will do "stuff" into that 3 items, kind of like special sverchok looping / unpacking.
The advantage of Sverchok should be more clear, whilst in AN, Object Instancing needs to be provided before the LOOP, in Sverchok we can have loop happening forward?
An more advanced adaptive polygons example.
In Sverchok every node is a loop so to speak, but sometimes – for various reasons, something loop slightly differently, mostly noted with nodes that build complexity, like generators like line, circle etc. This provides a way to force objects to accumulate.
Also now you could make line vectorize the way you would like to...
Split option now present. Working example of "Towers" tower.zip
I am struggling a bit with explaining how this actually works...
that's the money shot @ly29 :) really cool.
@enzyme69 essentially the vectorization / split inputs allows you to consider the nodes inside the monad as a single operation, that can handle lists as inputs and perform as if the whole is vectorized.
another term, and possibly better in hindsight, that would have been appropriate is multiplex
from the wikipedia page. this almost describes it..
https://en.wikipedia.org/wiki/Multiplexing (ofcourse the technical details are completely different)
Think of it as if you take the heaviest layout that produces a mesh and wraps up into one node than can be used as any of the standard generators.
I wanted to take advantage of "vectorize" and "split", but got quite confused...
For example, I want to Monad this:
Below, I group stuff, but does not make the result more elegant.
Any idea? I will ask the same question at AN Github.
Actually with Sverchok, I think this "vectorization" deals is much more complex but possibly more robust than AN.
With AN, I cannot get my head around this problem:
With Sverchok, I think that's (should be) simpler.
I probably wrote something about it on my blog, but I have to refresh my memory.
Now, with Monad, things should be even simpler, I think.
Without looking into the specifics put try to a range int as input into the monad with vectorize and split ticked. Also review the tower example.
Still in the process of breaking your tower example. I can see you are using List Split. Pulling my hair, maybe tomorrow I can see more clearly.
Press upgrade also, some fixes to make things simpler there
So list split doesn't have to be used.
My guess is vectorization and list split option inside Monad will reduce a bunch of nodes. But still trying to understand those 2 concepts. Will focus on that...
Ok apparently, it's possible using AN, because it has this Line Mesh inside: https://github.com/JacquesLucke/animation_nodes/issues/604
For using the monad to vectorize think like this,
Other ideas are also possible, but as a start I think it is a good algorithm
Since we have many nodes that needs be vectorized and some that can't be easily done without redoing a lot (like 80-90% of nodes). I now introduce a simple option for apply a node group/monad to the input.
This calls the monad on the level 1 input wrapped as separate objects, and the output is extended on the same level not appended and preserving structure.
Note that this layout would work if we didn't split the lists as well, but more complex scenarios wouldn't