No announcement yet.

How to attach/set variables in skeletal animation in order to manipulate a material?

  • Filter
  • Time
  • Show
Clear All
new posts

    How to attach/set variables in skeletal animation in order to manipulate a material?

    Lol, reposting cuz of loss during downtime T_T

    So, I have this skeletal mesh and accompanying animation that I want to be able to attach variables to and to change the variables at certain frames in said animation. These variables, such as 3 vector color, floats, etc, would be used to change the values of the material instance that is on the mesh. E.X. The mesh will be red at the beginning of the animation, then during the middle, it might change to black for 3 frames, then it would change to blue for the rest of the animation. I would prefer to use the frames of the animation, rather than some arbitrary time value, so I can more accurately time the variable changes.

    How would I do this? (The variables on the animation, changing the variables per frame, and attaching said variables to a material instance).

    anim notifies for sure....

    create a dynamic material - follow along here if you don't have one set up yet...
    here's where you'll be setting up the color change stuff...only need to watch until he gets to the spawning the cows section....(although the whole video is great...)

    then notify time ... So you'll be creating a Custom Notify - (if you need some info on notifies - )
    Here's where you'll be calling that color change stuff....exactly in the frame you'd like...
    After you create one In the Event Graph of your Anim Blueprint call your new notify and just "cast to your Mycharacter" (or whatever you have the characters Blueprint named) and call that event(or function) you've created to change your character to whatever color you'd like.

    If you have any questions let me know.....
    Last edited by President; 06-19-2014, 12:47 AM.