vector direction in cloud animation

Started by Dune, November 10, 2019, 06:19:39 am

Previous topic - Next topic

Dune

Am I correct in assuming that if you set a constant vector of minus X in this setup, that the cloud is actually moving positive X? Positive X is to the right (more or less), btw. Looks like it, but I don't understand why. Can anyone explain?
If that's the case; for a downward movement of clouds, I would expect to need a positive Y as vector.

Matt

November 10, 2019, 02:59:04 pm #1 Last Edit: November 10, 2019, 03:03:43 pm by Matt
Does this go into a warp shader? Warp is achieved by offsetting texture coordinates, so it reverses the apparent direction.

By the way, you can eliminate 9/11 of these nodes by simply plugging Get Frame into a Vector Displacement Shader. You can control the velocity in there. Breaking this down into optimization steps: First, converting to colour and then to red, green and blue is unnecessary. You could simply extract X, Y and Z scalars from the vector. Second, the Redirect Shader is only needed if you are starting with individual displacements for each direction, instead of a complete vector. But you already have a vector so you can go straight to a vector displacement shader. Third, the multiply vector isn't necessary because the Vector Displacement Shader has parameters to multiply the incoming value, so you can simply plug your Get Frame Scalar into it.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Yes it does. That explains it.

And thanks for your advice! My thinking hit a ceiling apparently. This setup wasn't mine, btw.

Dune

So this should be working. Setting the final multiplier by 1/frames/second and inverse function gives a m/s cloud warp speed in the XYZ inputs. Is that correctly assumed?

Matt

Quote from: Dune on November 11, 2019, 04:55:33 amSo this should be working. Setting the final multiplier by 1/frames/second and inverse function gives a m/s cloud warp speed in the XYZ inputs. Is that correctly assumed?

I think that's correct.
Just because milk is white doesn't mean that clouds are made of milk.

Dune