Are animated UVs currently possible?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By xrg
:warning: Old Version Published before Godot 3 was released.

I’m trying to figure out how to animate the UVs on a model to do things such as change a characters face expression. Basically how most games back in the 90s did eye blinks and things.

In Blender, I can animate them using either the Anim All add-on, or the UV Warp modifier, but I’ve had no luck figuring out how to transfer either method into Godot.

Is there a way to transfer it out of Blender and into Godot? Alternatively, is there a way to do it in Godot, similar to Sprite3D except on a mesh?

:bust_in_silhouette: Reply From: zendorf

You can animate uv co-ordinates, by using the animation player node and the UV Xform option.

  • Add an animation player node into your scene and create a new track.
  • On your material select the uv xform option for your diffuse texture.
  • On frame 0 of the animation player, create a keyframe by clicking on the key icon for uv xform on the material.
  • Move to another keyframe in the animation player.
  • Adjust the uv co-cordinates in the uv xform and hit the key icon again.
  • Rinse and repeat…
  • You can now scrub the animation player to view the results. The beautiful thing is that any parameters in Godot can be animated in this manner :slight_smile:

Oh wow, it’s like super simple, but something that would have taken me a million years to discover on my own. Thanks for the fast reply!

xrg | 2016-03-06 13:21

:bust_in_silhouette: Reply From: Bojidar Marinov

Just to mention it, you can use shaders to do the job for you (and also, shader graphs). Here is a short article on docs for shaders. (Unfortunately, it doesn’t use shader graphs…)

Not the answer you are looking for but might get you moving in the right direction in regards to ShaderGraph.

If you wish to have a ‘scrolling texture’ through the use of ShaderGraph you can achieve that by doing the following:

  1. plug a time and a scalar constant node into a scalar operator node, set to multiply.
  2. plug the output of the operator to one or more scalar input(s) of a scalar2vector node.
  3. Plug the output from scalar2vector node into the first input in a vector operator node.
  4. add an Input node from which you plug the UV output to the vector operator node’s second input.
  5. finally plug the vector operators output to the texture uniform’s uv input.
  6. Control the scrolling speed from the scalar constant added in step 1.

edit: fixed image link. sadly google photos isn’t a good platform for image hosting.

megalomaniakaal | 2016-03-08 01:11