Closed enzyme69 closed 7 years ago
So if we have 2 points and bunch of points, what can distance do? How to mix the value from both to have more useful effect?
Rhino Grasshopper artist always loves to use this "influence" by distance. I like it too, but I rather use Dynamic Paint.
I am especially feel challenged to do what Commotion AddOn can do. https://github.com/mrachinskiy/commotion https://www.youtube.com/watch?v=gLj4PvHbm4s&feature=youtu.be
I think AN is trying to get to that point.
Wonder SV Object ID and Action can do offset, I think it's not that simple. Not so familiar with Blender Action BPY that can offset slide animation fcurve...
....
studying.
Maybe can do something with these attributes: action.fcurves[0].keyframe_points[0].co
Old blog post, I did try to use BPY. http://blendersushi.blogspot.com.au/2013/06/procedural-domino-array-animation-using.html?view=classic
This actually does something to the keyframe points....
Hmm... offsetting f-curve animation means dealing with many numbers apparently. Above should work, but probably not quite right.
I am pretty happy if we can control blocks of animation in and out. like sequence.
NLA seems simpler to work with, but no access to this yet via Sverchok.
Using a distance to influence design is like getting a simple factor. It is more productive to think like functions.
Say height = dist(p0, loc)
, so if you have two points, you need a function that maps this in a sane way.
Could be height = min(dist(p0, loc), dist(p1, loc))
for example, letting the minimum influence it. You could even weigh the influence of the points this way.
Anything you can think in functional form should work well with sverchok.
For animation a certain other system has more helpful functions,.. I don't have clue about animation so I havn't tried to implent such functionality. I am not against it however
@enzyme69 you want to turn Sverchok into an animation goldmine, but you have to realize that we've stayed mostly focused on geometry/topology. (almost like a mission statement).
There's an old saying
if all you have is a hammer, everything looks like a nail.
Sverchok isn't intended / equipped to do everything with the least amount of effort, this means there will be some horribly convoluted setups for things that seem trivial. But this will be because there aren't dedicated Sverchok nodes for a feature, or you haven't taken the time to try to make a node-script and get your head around the bpy
involved. yet.
Ok back to topic. Thanks @ly29 I'll try a simple setup first with this Distance. "Cross Over", Niki said was wrongly named. I don't get it.
I will try with 2 points.
With animation stuff... I realized something:
@zeffii Yes, you are right. I go back to Distance stuff.
I take no pleasure in repeatedly saying Sverchok isn't for all needs. believe me :)
but just to stand with what @ly29 said, i also have no objections to add more animation stuff. but with the caveat that i also don't do animation, so not only do i not need these features, I think it's better implemented by someone who does know that side of bpy and all its pitfalls/shortcomings/pros/cons/conveniences..
Cross over gives the distance between all points,
[v0, v1, v2]
[u0, u1]
# crossover
v0u0, v0u1, v1u0, ...
@zeffii Totally agree
Ok this part I understand now that I use brain.
Trying to mix 2 or more points....
I think Distance is not what I think it is.
It would be more clear to reformulate the problem with list cross match and distance using the vector math node and staying away from the distance node.
what you're looking for sounds like an attractor / proportional editing kind of interaction between 1 or more points and a mesh. If so I do plan to implement something like that https://github.com/nortikin/sverchok/issues/914#issue-182487380 but no eta.
This is what crossover does if you want to dig into it...
def calcM(self, list1, list2):
ll1, ll2 = len(list1[0]), len(list2[0])
if ll1 > ll2:
short = list2
long = list1
else:
short = list1
long = list2
dists = []
for obsh in short:
obshdis = []
for vers in obsh:
for obln in long:
oblndis = []
for verl in obln:
oblndis.append(self.distance(vers, verl))
obshdis.append(oblndis)
dists.append(obshdis)
return dists[0]
So for each point in the shorter list you compare to each point in the longer list. Then you return the first result.
Looks simple and elegant.
I will make few Live Noding Videos using Distance, but I think Ly makes a good point: It would be more clear to reformulate the problem with list cross match and distance using the vector math node and staying away from the distance node.
And Zeffii, you read my mind clearly.
I guess I can play a bit with this.
who dealing now with "everything in nodes" stuff of blender?
Maybe only Lukas Tonne? He and his "Particle Nodes".
lukas went out of BI as i know
Everything nodes is not an immediate goal any more, but they try to lay the foundation for it.
I feel the itch to explain this Distance node "Cross Over" at some point @nortikin is showing a way to use this as Influence. I still don't quite get it.