View Full Version : Question Time: Nodes, Gradient, moving Key positions

08-22-2012, 12:35 PM
I'm trying to finesse something Larry illustrated over in the "Shatter without Fracture" thread. (http://forums.newtek.com/showthread.php?t=130148)

Since I'm lazy, all that moving the bits of the cut up plane looked mighty tiring to me. ::yawn:: No (native) Modeler tool looks to have the options that would make expanding the shattered plane's parts quick and easy.

One of the shortcomings of the native tools is they are not sensitive to "Parts" in the DPKit sense of the term. What I want is for the 'parts' to get moved away from each other, relative to each part's center (or centroid?).

While Modeler may lack that capability, Layout, courtesy Denis Pontonnier's DPKit (http://dpont.pagesperso-orange.fr/plugins/nodes/Additionnal_Nodes_2.html), does. So I figured if I could expand the parts in Layout, I could use SAVE TRANSFORMED to preserve it, import it back into Modeler, and use BACKGROUND TO MORPH to create the morph.

Unfortunately, I'm not good enough with DPKit to fashion the network that would do such a thing. See the attached JPEG to see my initial effort. I'm pretty sure I have all the necessary components, and I'm equally sure they are connected incorrectly.

AND, I have a question: what is the EFFECT of animating the POSITION of a gradient key? Where would one use it? I've seen it before, but it baffles me.

08-22-2012, 01:46 PM
OK, the technique works, but my network still sucks.

I accidentally stumbled over something which would half-assedly work, so I used that to prove the concept, but it's not what I want and frankly I'm not sure WHY this network displaces in the manner it does.

As you can see, a Gradient drives a DPKit PART MOVE node. Set to X-coordinate as an Input, any PART with a positive x value is moved according to the gradient (although I'm not sure why the Y coord is going in the negative direction). The Vector Multiply node just exaggerates the effect.

What I'd prefer is the expansion occur relative to a moveable null. (I'd settle for 'relative to the origin'.) Some of the displacement will happen in negative directions (-x, -z), so I imagine this would require the use of Curves rather than Gradients, since AFAICT gradients don't have a negative output at all.

08-22-2012, 02:32 PM
Ofc gradients have negative output... they have whatever range you set them to. And Im assuming that in your network you're taking colour straight into position, hence why its displacing (or graduating toward displacing) by 1m on all axis, cos you're feeding it rgb 1,1,1.

Take the colour to the X input (or XZ inputs) of a make vector node first, and set the gradient as however you have it, but with negative range extension and ull be done.

08-22-2012, 04:05 PM
I'll examine that, but I'm essentially trying to displace things radially in the XZ plane. I'd need two different Gradients for that, I suspect: 1 X, 1 Z.

08-22-2012, 07:20 PM
I'm starting over w/a different approach. Basically, the concept is:

Determine the vector between the Part and the Null.
Apply a scalar to that vector.
Move the Part along that vector.

Now, lessee, where is that manual?..... :D

I can also scale the offset by the original distance, so Parts far away will move more than Parts close by.

08-22-2012, 07:43 PM