PDA

View Full Version : LW instances and scaling using a reference null / gradient



mummyman
11-29-2016, 08:32 AM
Hello.. I'm trying to scale down LW instances after a certain time and stay scaled down using a reference null and a black and white gradient. That way, the instances stay sized to nothing when the gradient passes. But they blink and don't stay true to what is supposed to happen.

If I use distance to null using nodes, they scale back up again after the null goes past a certain point. Is there a simple / linear way to move a null along a straight path and have the instances scale down and stay scaled down when the reference null passes by? Too many ways to do something simple.

Thanks in advance. Seems like I've needed this type of thing before. If I was able to emit particles, then I perhaps could fade them over time, but linking, etc would get to be a pain with all the MDD's I have driving the main poly shape.

Any ideas?

raw-m
11-29-2016, 01:42 PM
I'd like a a solution to this, too! Don't think it's a s easy as it sounds. The best technique I've found is to use DP Kits Marker Pen and have it trace a null. I've yet to try it but apparently it doesn't work with LWSN. works well otherwise.

mummyman
11-29-2016, 02:10 PM
Well, if this works with local rendering, then I'll suffer and do that. I'll have to try that later/tomorrow. Thanks for (I think) understanding what I was getting at. Should be pretty straightforward.. To me... it's not!!!

mummyman
11-29-2016, 02:22 PM
I'd like a a solution to this, too! Don't think it's a s easy as it sounds. The best technique I've found is to use DP Kits Marker Pen and have it trace a null. I've yet to try it but apparently it doesn't work with LWSN. works well otherwise.

If you have a simple setup... please share! Crashes instantly for me

raw-m
11-29-2016, 02:57 PM
Ah, crap - that rings a bell! That happened to me at first, then tried it the following day at it worked without me seemingly changing anything. Sorry, no help at all.

On an aside, this does something similar but using instances on a motion path. Instead of using the texture on transparency you could plug it into scale. Not sure it's what you're after here though....
https://youtu.be/vHY1sFciSXk

mummyman
11-29-2016, 03:13 PM
interesting! I remember this one. But sadly, no.. I have my instances applied to each poly of a cylinder shape. So there are hundreds linked to that shape. Which has MDD to get it to move the way I need it to.

m.d.
11-29-2016, 03:33 PM
this may give you some ideas.....not directly addressing what you are asking....

swampy had a few good tips here

http://forums.newtek.com/showthread.php?144961-Animating-instances-end-to-end-along-a-capsule&highlight=instance

MonroePoteet
11-29-2016, 03:45 PM
I'm probably missing some critical information about the setup, but could you use Nodes to subtract the location of the Null controlling the Scale, and then use Min and Max nodes to limit it to between 1.0 and 0.0? Sample scene (very simplistic) attached using the X position of the ScaleNull to scale the Instances as it passes. The Vector2Scalar nodes extract the X component of the Instance Base Position and the position of the Scale Null. The Max node ensures that the calculated distance never goes below 0.0, and the Min node ensures that it never goes above 1.0. Maybe?

mTp

135205

mummyman
11-29-2016, 06:35 PM
This looks similar to what I'm trying at a quick glance. I will have to test this tomorrow (or later) Thanks so much! I'm a moron with nodes. But I know in theory it can be done... has to be able to be. Thank you. Not exactly sure with this setup how you are getting distance... other than just in the x channel. Like a radius. But I'll set it up on my bigger scene and see what happens from there tomorrow

jeric_synergy
11-29-2016, 08:32 PM
Hello.. I'm trying to scale down LW instances after a certain time and stay scaled down using a reference null and a black and white gradient. That way, the instances stay sized to nothing when the gradient passes. But they blink and don't stay true to what is supposed to happen.
The 'blink' makes me think that there's an extra key in the gradient, right on top of the 'real one'. Rebuild the gradient to make sure (one of the weaknesses of gradients is no good way to zoom in on the gradient continuum and check such things). Also, check past the END of your current gradient to make sure there's not one just out where you don't expect it.

raw-m
11-30-2016, 05:39 AM
I'm probably missing some critical information about the setup, but could you use Nodes to subtract the location of the Null controlling the Scale, and then use Min and Max nodes to limit it to between 1.0 and 0.0? Sample scene (very simplistic) attached using the X position of the ScaleNull to scale the Instances as it passes. The Vector2Scalar nodes extract the X component of the Instance Base Position and the position of the Scale Null. The Max node ensures that the calculated distance never goes below 0.0, and the Min node ensures that it never goes above 1.0. Maybe?

mTp

135205

Nice setup but unfortunately doesn't leave a trail behind.

What's that setup that adds a scale to something? The more you go over the same spot, the larger the scale gets - some kind of additive function. Would that work here?

mummyman
11-30-2016, 07:19 AM
The 'blink' makes me think that there's an extra key in the gradient, right on top of the 'real one'. Rebuild the gradient to make sure (one of the weaknesses of gradients is no good way to zoom in on the gradient continuum and check such things). Also, check past the END of your current gradient to make sure there's not one just out where you don't expect it.

The blinking is random. The gradient / image is a 1000x1000 black to white.. so it's pretty clean. The method just doesn't work. It's linear, so there should be, at most, no blinks until the gradient reaches the area of influence I would think.. Hard to say.

mummyman
11-30-2016, 07:24 AM
I'm probably missing some critical information about the setup, but could you use Nodes to subtract the location of the Null controlling the Scale, and then use Min and Max nodes to limit it to between 1.0 and 0.0? Sample scene (very simplistic) attached using the X position of the ScaleNull to scale the Instances as it passes. The Vector2Scalar nodes extract the X component of the Instance Base Position and the position of the Scale Null. The Max node ensures that the calculated distance never goes below 0.0, and the Min node ensures that it never goes above 1.0. Maybe?

mTp

135205

Just quickly trying this on one part of many in my scene. I believe we might have a winner!!!!!! Thanks for the help. Going to test further.

-update-.. thank you.. network render worked just fine! Amazing!

mummyman
12-01-2016, 08:36 AM
I'm probably missing some critical information about the setup, but could you use Nodes to subtract the location of the Null controlling the Scale, and then use Min and Max nodes to limit it to between 1.0 and 0.0? Sample scene (very simplistic) attached using the X position of the ScaleNull to scale the Instances as it passes. The Vector2Scalar nodes extract the X component of the Instance Base Position and the position of the Scale Null. The Max node ensures that the calculated distance never goes below 0.0, and the Min node ensures that it never goes above 1.0. Maybe?

mTp

135205

This totally worked... even thought I'm still confused at the setup.. Ha. that's me.. .mister nodal confused. Thanks!

jeric_synergy
12-01-2016, 10:09 AM
Looking at the network: doesn't the two VECTOR>SCALAR nodes only reference the X coordinates?

That is: does this only work as regards the X axis, versus all-axis distance(s)? That might work perfectly for the intended application, but, just sayin'....

EDIT: NM, I see Monroe addresses that in his post.

EDIT2: also, to explain my #12: when mummyman used 'gradient', I thought he meant the gradient node, not an actual bitmap. That said, I'm still surprised at the bump, unless there's something wrong with the LW, ummmmmmmmmm ahhhhhhhhhhhhhh, bitmap edge behaviors, RESET/REPEAT/Tile (iirc).

MonroePoteet
12-01-2016, 01:08 PM
Glad it worked for you! The setup relies on the signed distance from the ScaleNull to each Instance's Base Position. In my setup, I chose the X axis, and the ScaleNull starts at X=-3.0, which means the first Instance on the left is 1.0 away from it, the second one is 2.0, etc. The Min node returns 1.0 for the scale of all Instances until the ScaleNull starts moving to the right.

As the ScaleNull moves to the right it passes each successive Instance, causing the distance to go down to 0.0 and then negative. The Max node returns 0.0 from then on (the "trail"), preventing each scaled-down Instance from scaling back up with inverted geometry.

Hope this description doesn't confuse things even more!

mTp

mummyman
12-01-2016, 01:29 PM
No.. the description helps. But I'll never come up with this stuff on my own! It works for now... which is a huge help