nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.22k stars 233 forks source link

Multiple Lofting, the Hard Way #227

Closed enzyme69 closed 10 years ago

enzyme69 commented 10 years ago

I think Multiple Lofting without Loft Node is very, very difficult. Spending 2 hours and still cannot get it :[

Let say, I started with a Line, Line have few divisions. I clone the lines into grid 2 x 4 = 8 clones.

Apply Matrix and separate loose.

I have now 8 lines.

For those lines, I want to do lofting. First, I prepare the Circle to Loft along Edges. This is when thing become tricky.

How do I clone the circle into 8 x edges, and then somewhat maintain the relationship between the cloned circles for 8 edges, and then proceed with lofting for multiple items?

Kind of needed for my spider legs. If I were to do the legs 1 by 1, then maybe it is a lot simpler.

But I like to do it 8 lofting at the same time.

BLEND so far: https://www.dropbox.com/s/bx6umnmgnwediga/multiple_lofting7.blend

enzyme69 commented 10 years ago

prtscr capture_10

zeffii commented 10 years ago

It can be a good experience to spend a lot of time trying to do one thing - along the way you stumble upon interesting results and information that you might not otherwise encounter. Perhaps in some sense when you ask us how to do something (ie, the problem is not 'is it broken') and we respond relatively fast, we might be doing you a dis-service by not letting you 'stew in the question' yourself for a bit longer. -- you know yourself, eventually you'll get there.

nortikin commented 10 years ago

the issue as i see it - you make lines, that differ each from another. than ~individually~ make several circles and UV connect them for exact line... than i can propose to play with level of list there. for circles group in each line to create sublist with join node or split list node w/o unwrap flag. if it will not work (i think UV connection can just ignore) than we should consider and solve. the only way - to play with sublists as with subobjects...

enzyme69 commented 10 years ago

Just like facing a big boss in a game level :)

I have a feeling that List Level is the answer.

If I success, I will make like Octopus Tentacles or make like Star Fish. Centipede/milipede in my mind = if I figure out how to multi-loft

I will try the long and winding way first of lofting the edge one by one. Usually that is when I got the aha moment.

nortikin commented 10 years ago

if my proposal not works, tell me, because i feel that it should be that way. obe object can handle several subobjects

enzyme69 commented 10 years ago

Let met try to do your way Nikitron.

Maybe I was too spoilt by UV Connections or Separate Loose.

I have a feeling I got wrong or stuck when I am duplicating each Circle into lines using Matrix. Because I cannot "group" the Matrix.

enzyme69 commented 10 years ago

I have a feeling that I have encounter something like this before. But the situation back then was multiple points want to be connected to multiple lines.

This is not yet with Vectorized Input stuff.

zeffii commented 10 years ago

https://www.dropbox.com/s/zkxefjt50zvjq1b/spidar_meshjoin.blend : ) my quick attempt

enzyme69 commented 10 years ago

@zeffii great example Zef! you tackle it in a totally different way than me. I never thought of Line can be used that way, all the way till the end.

You have a nice Leg Spreads and Leg Up Down control. You use lots of List Inputs and I believe you Mirror the legs. Very interesting. I have to study this...

enzyme69 commented 10 years ago

Rephrasing my problem with Multiple-Lofting:

In term of difficulty level: Level 1 = Clone Lines for each point - SOLVED Level 2 = Lines with different length but same points - Cheated with Scale and Randomize Level 3 = Vectorized Input => Lines with different points - ??? Level 4 = Lines each with Lofting along the lines --- if line length the same this is SOLVED Level 5 = Curved Lines, each points of Lines has Circle to Loft and Orient to Lines Direction - ??? Level 6 = Single Lines - Duplicate Object and Orient along Points - Domino - SOLVED Level 7 = Octopus problem, each legs have equal length segmentation, equal length, need orient circle and lofting - kinda solved ??? Level 8 = Spider problem, each leg has ratio segment, need lofting Level 9 = Some hairy creature like with random hair length, random hair points, random hair ... etc Level 10 = ???

Actually, I just remembered I did a work with 2 objects, connected by lines, this was the "Lighting" example. I have to checked it again. I think at the time, I do not worry about:

enzyme69 commented 10 years ago

@nortikin With your Octopus parametric design, you have an interesting Circular Cloning for Leg of Octopus using Circle. The leg Count and the additional animation movement of the Octopus Spider Robot is brilliant. That would take me a week or more to figure out. I really like the motion there. You tackle the Rigging at the same time as Modeling!

"tachikoma" https://www.youtube.com/watch?v=Tkb8_eMs8Jg

However, you are not doing "Lofting" the way I was thinking it :)

There are 2 possibilities:

  1. Maybe what I am trying to do is not yet possible without some serious complicated node tree (which means possible, but too long and winding as solution)
  2. Maybe for such situation, it can be solved differently => to avoid the same situation
  3. Maybe we seriously need Loft Node => this will probably simplify everything => or more complicate things further, if we want Vectorized Input, etc.

prtscr capture_5

enzyme69 commented 10 years ago

In the past, my solution was to actually "ignore and mask list edges", which means, I actually Join all the edges and then using some masking to "disconnect" each segment. http://blendersushi.blogspot.com.au/2014/05/sverchok-in-between-strands-of-threads.html

Imagine when drawing legs using Grease Pencil, and the segments are annoyingly connected as a single line.

If I use List Join and Masking , indeed I can probably use UV Connection and the leg will sort of working, but not the way I want it in this case. Because I want a proper control over each Lofting of Leg Segment.

enzyme69 commented 10 years ago

prtscr capture_6

I am doing each Leg one by one :) In programming, we can loop it.

zeffii commented 10 years ago

image https://www.dropbox.com/s/ay64uqfnot1ej66/spidar_meshjoin4.blend the shape of the leg is lathed, and turned into the leg profile , then adaptive edges takes the segments and wraps the lathed leg onto each :)

enzyme69 commented 10 years ago

Nikitron idea x Zeffii Idea x my basic spider == uber spider :)

Where is Linus, maybe he wants to create the Spider Eyes, antennae and the tail. and maybe some hair on the legs.

enzyme69 commented 10 years ago

Having control over the Head + Abdomen is also good.

I like how you did the segmented legs there.

This should be useful to create the procedural Sverchok/Cricket!

zeffii commented 10 years ago

you see here I only use one lathe-shape for all segments, but using a separate lathe shape for each leg segment would give better results.

enzyme69 commented 10 years ago

Indeed that is the idea to eventually add variations for each legs. Interesting how to study each approach from you all.

zeffii commented 10 years ago

image https://www.dropbox.com/s/cojzpz86l5ajr4j/spidar_meshjoin5.blend

enzyme69 commented 10 years ago

Looking at this. You remind me to use List Input node more often, seems handy to keep many values. Especially in this case, we have 4 legs.

zeffii commented 10 years ago

and a final one, before this gets off topic :) because I don't do lofting image https://www.dropbox.com/s/p0rl25gjo41sdox/spidar_meshjoin6.blend this is making me consider doing a Bezier node, which draws the spline inside the node view with bgl

enzyme69 commented 10 years ago

Nice usage of Lathe.

I learned a lot more than the question. We "shelved" the Lofting for future :] Have to wait for Ly, I supposed.

enzyme69 commented 10 years ago

Zeffi, turning of the Verts == faster 3D view.

zeffii commented 10 years ago

image Slow 3dview draw is more related to having like 8 viewer_draw nodes. A single viewer_draw node can display thousands of vertices quite fast.

enzyme69 commented 10 years ago

I realized also when the node-tree is growing over 50+ the slow down is notice-able.

zeffii commented 10 years ago

it's not the number, it's what the nodes are doing

enzyme69 commented 10 years ago

prtscr capture_4

Correction:

Not 3D View, the node-tree Panel I mean, starting to become slow after 100+ nodes. So probably Blender has "limit" on how many nodes it can display, until it got grouped. I previously never really work inside the node-tree this complex before. Not in compositing Wonder if Blender and Sverchok node-tree works nicely with multiple nodes.

zeffii commented 10 years ago

yikes, This means you need to rethink your node tree - refactor. think of vectorization, and if something should be possible to vectorize but doesn't work - let us know. Whenever you see repeated node groups like that --something is wrong.

enzyme69 commented 10 years ago

Yes you are right. Refactor, is that the word? Encapsulate more?

Idea, after working with massive node, I want to propose:

Maybe added inside "Update" tool if possible.

zeffii commented 10 years ago

Refactor in the sense of the node tree. Without opening the .blend (i can't atm) I'm guessing that only one or two of the nodes in each repeated group has different values, and that their values drive the rest of the output of that group. When this happens it means that (probably) you should be driving those values much earlier , and funnelling into one Viewer Draw at the end instead of 1 to many

zeffii commented 10 years ago

It looks like you are sending each leg to its own viewer, that's fine - but it's more efficient to join_lists and display them with one viewer. You might have a good reason to want to bake each object seperately, that's a different issue.

nortikin commented 10 years ago

baking all could be for each layout, as vizibility is now. to reduce calculations devide all this to separate layouts. and yes, simple solution is correct solution as well. We can build prototipes in many nodes, but will need reduce. Propose to make UV connection able to work in exact level, as it now, but for many objects it should be able to work in 2 level, mechanism will be the next: 1.iterate objects, and for object: 2.make UV connection for every object

this is easy to do indeed

zeffii commented 10 years ago

@nortikin, like a mesh broadcaster and receiver that works across layouts?

nortikin commented 10 years ago

no, not need is we have object in node, can manipulate several layouts with object in scene.

zeffii commented 10 years ago

i don't know @nortikin I think it could be useful to let wifi do crosslayout stuff image

nortikin commented 10 years ago

aha. i made Line vectorized input for vertex count https://gist.github.com/nortikin/c967b8f73886c1aef30b use this for legs or something

nortikin commented 10 years ago

lines

nortikin commented 10 years ago

i have to make vectorized matrix and vectorized UV for twice level mode and vectorized matrix apply for matrixes subgrouped in objects

nortikin commented 10 years ago

than we could make legs, that connected one by one, but only with structure:

container[ objects[ groups[ vertices[ ] ] ] ] and not container[ objects[ vertices[ ] ] ]

more - i could automate UV connection levels.

ly29 commented 10 years ago

I've been doing summer stuff this weekend, but nice to see the layouts and things here!

For more complex layout we really should separate ui and processing, it would make it possible to turn of the processing while editing, which really isn't possible today... Wifi nodes across layouts is interesting and problematic since introduces inter layout dependencies, I would like that to work well which would require reworking the wifi node, which we should do anyway, there is much potential for simplifying it a lot by using the socket caches directly instead of creating it's own socket cache etc... Also the update system needs to made aware of it and we should have a way of notifying the user of circular dependencies etc. Also layout ordering should be made explicit in the sverchok tools panel... Cross layout can be done today with text in/out. But doesn't auto update yet (I think should turn on that option, just one or two issues to resolve...)

@enzyme69 if possible could your share that complex layout with me? I would like to use it for some performance testing of the update system.

Adaptive edges has bigger potential than I realized when I wrote it, needs to redone to account for these scenarios. Scale control along axis, rotation control etc.

enzyme69 commented 10 years ago

Linus, I have sent the Blend to you via email, did you receive it?

I often think in term of edges and lines, maybe because my brain was wired like that. But working with lines is good for fast preview.


enzyme69 commented 10 years ago

prtscr capture_11

Hehe.. Mr Shigeto Maeda printed this for me in Japan. I am very happy.

I need my own 3D printer.

nortikin commented 10 years ago

OMG!

enzyme69 commented 10 years ago

From conception to realization = less than a day. We can make 1000+ different shapes of "simple spiders". Sorry the spider is too simple, but I think combining Zeffi way and Nikitron way to make spider, with mine, we can have some spider family.

enzyme69 commented 10 years ago

Zeffii => thinking in matrix and Points. Nikitron => your way is more like "Modular" style, where you think every elements as parts. Me => I am thinking in Edges and Outline

nortikin commented 10 years ago

the amazing thing of visual programming and programming at all is that we have many-many ways to solve issues. do one way or another with limitations - is creativity indeed.

enzyme69 commented 10 years ago

Yes, that is the concept I keep reminding myself: there is not one way to solve a problem.

enzyme69 commented 10 years ago

Will explore parametric Creature more when we have easier way for lofting. https://www.youtube.com/watch?v=x3dvs6C8c7g

I think the hard way is the way to go for now.