Download

Material WPO animation

Hi,

I’m currently trying to setup some animation on various static meshes, moving them away from being skeletal meshes.

One example would be a satellite dish rotation. At present it simply rotates the main dish part around z-axis, with a pause in rotation at 45 degree intervals.
So, at present, I have a basic rototion set up using a rotate about axis node (with a time node & multiplier for speed), but little else… kind of struggling to add a pause

Wondering if anyone can help with some pointers please?

Thank you

Dav.

Animating via WPO largely boils down to two main things:

  1. Being able to visualize what you are trying to do as a curve on a graph
  2. Being able to construct a math function to represent that curve

In your case, you want it to rotate a certain amount and then stop. Rotate about axis animates via a single angle input, so what would that look like as a curve? Well, it’d basically be a ramp that increases to a certain point and then plateaus and repeats ad infinitum…


Assuming time is on the X axis and rotation is on the Y axis, this will complete a quarter turn every 1 second.

Here is what that would look like on a node graph:


Whats happenin here; I take the frac of the input and multiply it by the PauseFraction which will determine the steepness of the slope, that is then saturated to clamp it at 1 and then added to the floor of the input so that it repeats at a regular interval. Then it is multiplied by the amount of turns we want it to take, in this case a quarter turn (0.25)

Edit: I used rotate about axis here but you should know that it doesn’t rotate normals. For that you have to use the FixRotateAboutAxisNormals node, functions basically the same.

Also keep in mind that a skeletal mesh can provide collision but doing this in materials cannot.
(i suppose you can script some collision to the BP, having it rotate at the same interval if you really want, but it shouldn’t be less expensive than a skeletal mesh…)

AFAIK it also won’t rotate the distance field so keep that in mind if you’re using distance fields for anything

Thanks so much for this! As this will be for small background items, there shouldn’t be an issue with collision… Distance fields are also not used (at present anyway), so should be fine.

Thanks again for the help :slight_smile:

Dav.