Issue connecting nodes
So, I am currently working on something that I can't figure out for the life of me.
I have two spheres, one slightly bigger than the other and being animated on via the Display Tag. (This way I can have a material change without changing the materials themselves)
The two spheres are in a Null which was then put into a Cloner displaced by a Random Effector with another Random Effector also offsetting the time.
- Ultimately what I have is a collection of nodes that have a glass material that animates into nodes that have a glow material. (Nodes are switching on)
What I am struggling with is having to connect them.
I want a node, as soon as it lights up, to connect to a random node (a spline that travels between) and then that node lights up as well, and then this process repeats. I need multiple nodes connecting to other nodes and each other happening simultaneously.
Is there an easy way to do this?
I've tried connecting all the individual nodes (using expresso) to other nodes in close approximation and then animating all connections manually but if one small change is needed, it's a pain to redo all of this.
Would really appreciate any help on this.
Are we talking neurons firing? That kind of thing?
You could use the link list in expresso, populate the list with all sender nodes and randomly select which node fires a connection and which node (a second link list of receiver nodes) receives the connection. You could fire a particle along the vector between the two and use the trace effect to make a spline out of that particle's travel. From there you can sweep that trace path to get real geometry that can be textured.
You can use the collision test to determine when the particle reaches the receiver node and that can trigger a specific texture.
Does that help? Do you have a file to share so we have visual aids?
Thanks for the reply.
The project file is currently back on my other PC.
But, yes. Not exactly neurons 'firing' but the links between them being created.
Having them randomize is a really good idea, thanks, but how could I set it up in the following way:
- Node 76 randomly creates a link between itself and Node 30 and generates (or repositions) a spline. This spline is within a sweep nurb which has its end growth being animated from 0% to 100% and as soon as it reaches 100% (growing from Node 76 to Node 30), Node 30 now randomly generates a new connection with another random node in this Cloner. Preferably, they would connect to multiple different nodes simultaneously but the order should be completely random.
Is this possible?
I started learning Python so maybe the solution would reveal itself, but until then, I am very stuck.
I think it would be easier to generate trace splines from a particle emitted from node 76 (or at least node 76's null).
The traces can be associated with sweeps or lofts so that they in turn generate geometry. You can also use plugins to render just the splines themselves. (white lights is one of my favorites). The traces grow (as would the sweep) as the particles move about.
I'm not sure about the simultaneity. The issue (as I see it) is going to be distance. Each node will be a different distance away from the others so the distance will have to be traversed at different speeds for them all to arrive at receivers all over the place. You could measure the distance between the pair of nodes that are picked in the random sort and then do the math for how much velocity should be imparted so each particle arrives at the given time, the farther away the more initial oomph needed to send the trace on its way. I think you can achieve all of this with expresso.
Or you could use a really big velocity everywhere and then have the sweeps grow over time along all the traces (the traces would span the distances almost instantly).
But there's a problem here. You want randomness, but only the first volly is random. After that its always the receiver that sends out a new beam to a new random node, but can it be one of the ones that has either already received or already fired?
Instead of using the random function in the link list, you might have to make an array the number of objects available and when picking a new "random" value make sure its not one that's been used before. So the array would get bigger or smaller each iteration either adding to the list of ones not to use or removing ones that have been used. Then use that array to pick choose the index of the node in the link list to fire next.
Keep in mind there is no "memory" in expresso for whats come before so either have to calculate the whole thing for every frame right back to the beginning of time, or make a change for each node that is tested on each frame. So if node 1 has been used, it gets slightly bigger lets say. When you choose a new value to fire you check to see if its already gotten bigger, and if so pick the next index in the array and test that one (and so one). Coffee would work well for this as would python. Having the array grow or shrink might look after this.