PDA

View Full Version : Texturing into blocks and animating individually



raw-m
03-16-2019, 11:39 AM
Hi all. Thought this would be simple, now banging my head!!

I have a stretched box on the Y that I want to split into evenly spaced "blocks". Then, ideally based on the distance from a null travelling up the Y, I want each block to animate between 0 (black) and 1 (white). I don't want the blocks to move, they need to stay in their defined position, just animate 0-1 with control of the overlapping of the timing - ie, each block to light up one at a time or have a little overlap between each block's timing. A bit like lights turning on/off down a hallway, one at a time. On a Mac LW2019 so no DP Kit, unfortunately.

A less mental version of this, doesn't need to cycle - just bands mapped to a single piece if geometry: https://motionarray.com/stock-motion-graphics/vj-neon-lights-background-33642

Any help would be much appreciated!

Sensei
03-16-2019, 11:56 AM
Process in which smooth gradient of shades or colors is converted to visible steps is called quantization.
You can do quantization by hand doing
floor( x * value ) / value

https://forums.newtek.com/attachment.php?attachmentid=144451&d=1552758754

144451

Instead of manually setting up keys in Gradient, set just black and white, with Show Key Inputs option toggled on, and plug Const > Scalar with envelope to Key Position.

raw-m
03-16-2019, 12:01 PM
Thanks so much Sensei. Will try tomorrow as I’ve had enough for today! Will report back :D

raw-m
03-17-2019, 02:57 AM
The Quantise is working well. I can't hookup and animate scalars into the gradient though, as the values effect the quantising - I need the quantised boxes to stay the same width and just their colours to change. Do you know how this could be done?

144481144482

gar26lw
03-17-2019, 06:35 AM
why don’t you split the box into sections and have a uv on each section. then cycle the uv.
image in uv is the quantised greys. just step the animation of the uv’s. or do you want to move the position in the y axis also?
Yeah, looking at the example mov, animated uvs would work.

raw-m
03-17-2019, 07:02 AM
Ah, I forgot to mention that the top of the box animates up/down and want to keep the stripes evenly spaced throughout, possibly changing from black to white as the height changes. If I can also keep the heights of each stripe editable then even better.

gar26lw
03-17-2019, 08:31 AM
hmm, i’m wondering if you have a layered node, have value procedural for colours and add gradients with step for alphas.
alternative to single quantised gradient. each gradient could be based off position to a null, those nulls are parented to the object, scale the object and nulls spread apart, gradients move. i can’t remember settings in nodes as afk.

Sensei
03-17-2019, 08:32 AM
There is always Logic node with Greater Than or Less Than options.
i.e. Logic (based on distance) is driving Mixer or Material Switch,
if distance greater than use this branch of nodes,
if distance less than or equal use this branch of nodes.
Distance changes -> different nodal branch is selected.

gar26lw
03-17-2019, 08:33 AM
you know, can you just put one gradient in y on there, then morph the object and gradient would scale?

raw-m
03-17-2019, 09:23 AM
Thanks all! I got to get this done so I’ve been manually wiring in scalars and offsetting in the GE. I’d really like a more automated approach for future reference as it’s quite a handy effect for lighting, mattes etc - i’ll post when done to show a better explanation of what I needed.

MonroePoteet
03-17-2019, 10:28 AM
I'm not exactly sure about how much control you want / need over the stripes, but here's a sample scene which uses a control Null's Scale to control them:

Null X Scale = Y Scale of object
Null Y Scale = Percentage of object's Y space occupied by stripes
Null Z Scale = Percentage of object's Y space occupied by a single stripe

144484 144485
144486 144487
144488 144489
144490

MOV File: 144491

Basically, it's a node setup which calculates the width of the stripes based upon a percentage of the Object's Y height, using a UVMap to keep the Y axis ranged between 0.0 and 1.0 regardless of how the object is scaled. First, in Modeler, I set up a default UVMap, so the U and V outputs of the Input node in the Surface Editor provide the object's "normalized" Y axis:

144492

Then, the node network uses the V value of the UV map to scale the stripes using the StripeControlNull's YScale value to shorten / widen them:

144493

To make vertical scaling of the Object more directly controllable, I made a Nodal Motion which uses the StripeControlNull's XScale to control the object's Y scale (yes, these are arbitrary channel assignments, pick what you prefer!):

144494

The StripeControlNull's scale envelopes then show an overall picture of what the object is doing as well as what the stripes are doing:

144495

I chose to use the Null's ZScale to set the default percentage of the stripe's width. Since I have seven (7) stripes in the Gradient, I used 0.14 (*7 = 0.98) for the initial stripe width.

Hope it helps!
mTp

raw-m
03-18-2019, 02:57 AM
Hey mtp, beautiful as always! Will need to pick it apart to see if it’s what I’m after. Ended up doing it AE and mapping it as a planar image seq in the end. Not very efficient so will update later when I get a mo as I’m sure there’s a better way directly in LW. Big thanks again!

Sensei
03-19-2019, 08:05 PM
mTp's the second... hmm... the first job is to help people here on the forum.. astonishing... :)

MonroePoteet
03-20-2019, 08:43 AM
Well, thanks, Mark and Sensei! I'm always happy when I have the time to mess around with a challenge posted on the forums. Glad to help if it works for you!

mTp