PDA

View Full Version : Animated/varying gradient keys: uses for? : Transition to Fall effect



jeric_synergy
06-13-2014, 11:11 AM
TMK only once have I seen anybody have a use for ANIMATING the key positions in a Gradient. (I think it was bryphii77 and I don't remember why. Something about deformation....)

So, 1) does anybody have a use for animating the position of Gradient keys?

And, 2) I think I just saw a use for that.

I was watching Deuce Bennett's (SIGGRAPH?) presentation on Instancing and he used INSTANCE ID to vary the color of a matrix of trees to a variety of "fall colors". That's nice, but static, and it occurred to me that if you could animate (which you can) the position of the Gradient keys, you could animate the entire grove of trees smoothly from vibrant Spring and Summer greens to a variety of Fall reds and oranges.

pinkmouse
06-13-2014, 11:19 AM
Animating keys is great for nodal motion, (just make sure you're in linear colourspace).

jeric_synergy
06-13-2014, 11:35 AM
Animating keys is great for nodal motion, (just make sure you're in linear colourspace).
1) How about some examples? Without a concrete principle I have trouble imagining it.

2) !?!?..... oh, because the Gradient is color based? I guess you'd use Alphas (???) if you just wanted a ....scalerish value. Wait, are alphas immune to the changes of colorspace?

Greenlaw
06-13-2014, 12:37 PM
2) !?!?..... oh, because the Gradient is color based? I guess you'd use Alphas (???) if you just wanted a ....scalerish value. Wait, are alphas immune to the changes of colorspace?

Not necessarily but good thought. Coincidentally, I just now put in a request for a CS switch for the Gradient node. I imagine there might be other nodes that could benefit from this switch but Gradient is the one that stands out for me.

Alternatively, I understand that you can use a third party Change CS node to fix this. (I think you can download it free from DB&W). Either way, I feel controlling CS in the nodes editor should be a native feature since some studios may prefer to run 'vanilla only' Lightwave.

G.

jeric_synergy
06-13-2014, 12:50 PM
It's possible that the... Gradient Curves?... node is immune to CS issues.... possible...

Still looking for examples of animating the keys' positions...

pinkmouse
06-13-2014, 01:42 PM
To do stuff like this:


https://www.youtube.com/watch?v=mvLnx0Iob70

All driven by nodal motion apart from the keyframed UFO.

Can't show you the nodes yet as I promised the reveal to the London user group first. ;)

pinkmouse
06-13-2014, 01:46 PM
Coincidentally, I just now put in a request for a CS switch for the Gradient node.

I did that about six months ago, haven't seen it yet. :)

jeric_synergy
06-13-2014, 01:54 PM
To do stuff like this:
All driven by nodal motion apart from the keyframed UFO.
Can't show you the nodes yet as I promised the reveal to the London user group first. ;)
Since you can't show me the network, perhaps you could describe situations/scenarios/principles wherein someone would animate the keys' positions.

Thanks.

Greenlaw
06-13-2014, 02:05 PM
Can't show you the nodes yet as I promised the reveal to the London user group first. ;)
That's pretty cool! I hope you will share the secret with the rest of the world after the presentation...very curious to see your setup. :)


I did that about six months ago, haven't seen it yet. :)
Yeah, I imagine a lot of users have asked for this.

G.

pinkmouse
06-13-2014, 02:08 PM
Since you can't show me the network, perhaps you could describe situations/scenarios/principles wherein someone would animate the keys' positions.

Thanks.

Okay, imagine the aim of the missile launcher. It has a fixed "standby" starting position, (one end of the gradient), and a variable "aim" position, (the other end), fed by frame number. Now add an animated key with the same settings as the standby position somewhere in the middle, and you can use something else, say the UFO speed, to trigger exactly when the launcher starts its aim routine. That way the tracking does nothing whilst the UFO dawdles around, but as soon as it starts moving quickly, it's located and tracked. Just like doppler radar.

jeric_synergy
06-13-2014, 04:28 PM
!? "Trigger"? 8~ Well, I guess I'll have to wait 'til after your presentation. ;) :thumbsup:

Greenlaw
06-13-2014, 04:39 PM
I was thinking the same. :)

G.

pinkmouse
06-13-2014, 04:48 PM
Okay, I'll simplify a little. Suppose you have an animation of a gun firing and recoiling. To do the recoil you might have the motions defined by three keyframes in an animation, 1)barrel forward, 2) barrel back, 3)barrel forward again. You set up the gradients to give you the required animation, say fast recoil then slower return to position. But you may not want to be constantly going in and changing keyframes every time the director wants the timing changed in the shot, so you set up a constant with the frame number you want the animation to start. Using this constant, you pump in the position of the first key to key one on the gradient, add say, five frames, and use this value to drive the position of the second keyframe, and ditto for the third. Thus the animation starts exactly when you want it, runs exactly the same each time, but can be changed by just altering one value.

Does that make any more sense? :)

Greenlaw
06-13-2014, 05:03 PM
Thanks for taking the time to explain. I think I understand--will have to play around with that tonight. :)

pinkmouse
06-13-2014, 05:06 PM
Just setting up a quick scene myself. It was that or playing with the jet engine/hypervoxels thing in another thread. :)

jeric_synergy
06-13-2014, 05:25 PM
{slowest guy in the class}
Soooooooooooooo..... this is in the Nodal Motion Modifier?

pinkmouse
06-13-2014, 05:31 PM
Yup, give me a couple of minutes and I'll package up a scene file for you to play with.

pinkmouse
06-13-2014, 05:40 PM
Right, here's something to play with, this should make it much more obvious.

Open it up, select gun_test:barrel, M for motion options, double click on nodal motion and there it is. Pretty simple, just change the Fire Cue constant to the frame when you want the animation to start and hit play- Robert is your father's brother. :)


edit: Yes, I know the first add node is redundant, I put it in for stylistic reasons. :D

jeric_synergy
06-13-2014, 05:46 PM
Thanks Pinkmouse!! Much appreciated!

pinkmouse
06-13-2014, 05:57 PM
No problem!

Your homework - add a nodally driven muzzle flash that tracks with the gun firing. Hint, you may want to replace the constant with the position of a null. ;)

Greenlaw
06-13-2014, 06:51 PM
Yes, thanks! Looking forward to playing with this. :)

G.

jeric_synergy
06-15-2014, 09:47 AM
Pinkmouse, I'm dissecting your scene, thanks muchly, it's quite clever. ---Storing the motion keyframes in Gradient keyframes --it woulda been a cold day in Hell before I thought of that on my own. :bowdown:

It's more clever than I, because I thought "What if I wanted this to repeat regularly?"

SO, I set the Gradient END value to 100 for easy calculation, and set it to repeat. I figured it would repeat the keyframed action every 100 frames.

WRONGO!!! 8~ Instead, after the trigger value frame is reached, the action continuously repeats itself. Obviously, this could be useful (free triggering!) but is not at all what I expected.

(I think one can put some dummy keys at 0 and 100 to prevent this, BUT!)

Can anyone explain why the keys just keep cycling, instead of including the 'blank areas' of the Gradient? Is the gradient not evaluated in a Modulo fashion??

XswampyX
06-15-2014, 11:28 AM
Put a new key at 100?

Edit : - Sorry, you've put that in your post.

The keys are the keys and the display range is the display range. They don't have anything to do with each other.

If you had a key a 0 and a key at 1 and you zoomed in to put a key a 0.00001 would you expect the gradient to loop at the display range or the last key you had put in?

jeric_synergy
06-15-2014, 12:05 PM
#awayFromLW
OK, "DISPLAY range" is the key here: I misunderstood that the START/END numbers were the range of the GRADIENT itself, not just the bit that got shown to the user.

I feel justified in my confusion: when one uses PRE/POST BEHAVIOUR in the GE, the ui draws the 'virtual curve' that the channel will describe according to how the Behaviours are set. Apparently this is not the case for gradient keys, iow no virtual keys are shown, although thinking of the Gradient CONSTANT/REPEAT options as analogous to the Behaviours is valuable. (Feature Request!!!)

Now I'm wondering if the....GRADIENT CURVE (??) node displays virtual keys similar to how the GE shows virtual keys? Since it more closely resembles the GE than the traditional Gradient.

pinkmouse
06-15-2014, 12:41 PM
Dunno.

This is how I'd set up a repeat fire network

122393

Fairly obvious, Fire Cue again is when you want the effect to start, Repeat After, the number of frames between shots, and the clamp just cleans up the maths a bit. High just needs to be bigger than the total frames in your animation.

jeric_synergy
06-15-2014, 02:52 PM
#awayFromLWI feel justified in my confusion: when one uses PRE/POST BEHAVIOUR in the GE, the ui draws the 'virtual curve' that the channel will describe according to how the Behaviours are set. Apparently this is not the case for gradient keys, iow no virtual keys are shown, although thinking of the Gradient CONSTANT/REPEAT options as analogous to the Behaviours is valuable. (Feature Request!!!)
Sheesh, WRONG, AGAIN! If I increase the ALPHA on key #1 (and give it a little color maybe) I can see that Gradient Node Virtual Keys are implemented.

Because this particular application used such low Alpha values, the keys are never made visible, and their repeating nature is hidden. Once you give them some visibility the actual effects of the Pre/Post settings are readily apparent. (This makes debugging a lot easier too, at least for me).

So, that's good to know. :bangwall:

122394

Hail
06-16-2014, 08:57 AM
I give up!
I have been trying to understand nodes for while now without success
I have got all the best training resource there is out there but it just hurts my brain
Nodes are not for me
I guess my brain wasn't designed for this kind of stuff
I'm an artist not a rocket scientist but I fear the lw3dg is trying to turn us all into maths freaks :(
Good thing I have C4D in my arsenal which is more artist friendly, if lw ever becomes the next houdini.. that will surely be a bye bye from me.

Edit: Sorry for hijacking your thread Eric, but I hope you can understand my frustration

pinkmouse
06-16-2014, 09:28 AM
Hail, I'm really not a mathematician. I just about scraped through my "O" level maths, and it still confuses me. I got into nodes though surfacing as I really dislike the old layer based system, then just mucked around with stuff. It really is worth the effort as it makes some stuff really easy.

jeric_synergy
06-16-2014, 10:14 AM
LOL, Hail, I totally feel your pain. It's only recently that I've started to ANTICIPATE using nodes instead of dreading it, and I'm still extremely vague on what a lot of the PARTS are needed: like Pinkmouse here used the MODULO node, and I'd definitely need to read up on that to grok how it's being used.....

WHICH JUST UNDERLINES THE IMPORTANCE OF GOOD DOX, and a BETTER DOC SYSTEM.

Anyway, Hail, if you haven't I strongly suggest you go ahead and watch ALL of RebelHill's node tutorials, they were a real eye-opener. Just grit your teeth and do it.

That said, there will STILL be times where one is left scratching one's head and going "How the hell is that node appropriate?" when dissecting others' networks. For me, the best thing is to concentrate on learning just a few techniques, rather like CHORDS, then slowing adding to them.

For instance, Pinkmouse uses a CONSTANT node here to denote the trigger frame#, works fine but means the user has to open the node editor (after s/he's found it in the Motion Panel). Adding a null and nodally reading the X position as a trigger frame CONTROL KNOB is pretty trivial, and keeps all the controls in front of the user, inside the viewports. (Hmmm, can we read slider positions???....)

Hell, I was always gobsmacked by what Larry Shultz could do with a regular old Gradient in the Layer system. Nodes are just the same: you gotta put in the time. It's painful, that's fer sure.

I still think people are neglecting SAVING NETWORKS, swapping networks, and saving COMPOUND NODES as magical boxes. We should get on that.

++ Hail, for instance, this discussion shows you how to setup a TRIGGER, with my mistake showing a way to have LOOP_OUT capabilities in LW, similar to AE's Loop_ Expressions. This includes LOOP_IN expressions. It's a bit weird to have the keyframes in a Gradient, but that's the price, eh?

jeric_synergy
06-16-2014, 10:21 AM
Back on topic:

Pinkmouse, while this is an interesting technique, the keys are still rather static: the usage here doesn't really have the keys sliding around to address various values, during the animation.

That thing I vaguely remember is that somebody animated the KEY during the extent of the animation, which caused a gradient modulated deformation to "reveal" a change. :handwaves some more: It might have been rotating a pie chart open using a w.map and DPKit's ROTATION node. :slowly remembering: Like, the Gradient INPUT was the w.map, and the KEY moved around to cause the deformation to occur. --Or something. It made my brain hurt, because it all seemed 'backward'.

pinkmouse
06-17-2014, 05:44 AM
Not quite sure what you mean.

However I'm not a theoretician, I don't spend time thinking deeply about nodes in an abstract context. I'm more practical than that - I just have a problem and throw some nodes at it 'till it goes away, not the other way around, coming up with a clever nodal network then working out what use it might be.

jeric_synergy
06-17-2014, 07:56 AM
No worries, and thanks for the example: the thing about the moving key approach is, it's like learning "Reverse Polish Notation", super confusing and 'backwards', but allows you to do some wacky stuff.

Sort of like how I hear Houdini is.

(Or that programming thing where a routine calls itself....)