Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Animate transforms with a texture?

Anonymous

Animate transforms with a texture?

Anonymous
Not applicable

Hello there!

 

I am trying to animate a large number of standins (think thousands) with a ramp texture...just going up and down in Y.

 

Not having much luck. I have created a ramp with a worldspace projection and connected the output to the Y transform, but it doesn't seem to do much when I move the projection, although there is some movement it's not connected to the projection.

 

Better way of doing this? I can't use MASH because it's an existing layout that has been made by hand.

 

Thanks for any ideas

 

Dave

0 Likes
Reply
420 Views
3 Replies
Replies (3)

mcw0
Advisor
Advisor

Is there a reason you are using a projection?  Unless your standins have to be visually tied to this texture, I would suggest keeping things simple and stay in a 2D texture.

 

And just curious what output are you using to connect to the translateY?  If it's the outAlpha, how are you assigning unique texture coordinates for each standin?

 

There are possibly other ways to achieve what you are trying to achieve.  You could use the "noise" function in an expression.

 

int $num = "numberOfStandins";  //  Input the number of standins

float $amp = 1.0;

float $freq = 0.1;

for($i=0;$i<$num;$i++)

{

    seed($i);

    float $offset = rand($num*10);

    ty = noise(frame * $freq + $offset) * $amp;

}

Anonymous
Not applicable

Well the idea was to use the projection like a MASH influence object. So the white areas of the ramp would be up and the black down, to have an easily controllable progression of the animation through the scene.

 

I guess I could add individual expressions to the objects, but I imagine that would be heavy and hard to create that graded falloff in the transforms through the scene. If the ramp can't do it, I will have to use something else...

 

Thanks

0 Likes

mcw0
Advisor
Advisor

Sorry, I've only used MASH for animated blendshapes.  There's a lot of cool stuff in MASH that I haven't had the time to try out.

 

My suggestion for the expression is only to use 1 expression.  Not an expression per standin.  Notice the "$num" variable is for the number of standins.  Now you said you have 1000s so it's going to take awhile to execute in any case.  If there are that many, I was also thinking maybe a particle instance would be a better approach.

 

Finally, a 2D ramp can be used.  But you'd still need to query the value at unique texture coordinates so that each standin behaves uniquely.  The only way to do that is with the "colorAtPoint" function and then you are back to an expression.

 

I think you're right in that there's probably a way to do this in a MASH network because this sounds like something MASH is good for.  I just don't have the experience in MASH.

0 Likes