Vertex Animation Basics in Shaders using World Position Offset (UE4, valid for UE5)

Sdílet
Vložit
  • čas přidán 1. 11. 2021
  • In this video I go through some basic animation logics, very useful to animate 3D models directly in the shader.
    The main topics touched are Translation, Rotation, Scale, Complex Movements, Timings.
    At the end of the video there's a bit of discussion about the strengths and weaknesses of this animation approach.
    Discord: / discord
    Patreon: / visualtechart

Komentáře • 58

  • @KuroRadin
    @KuroRadin Před 29 dny

    Thank you for this! This is easy to understand and very useful, especially for VFX!

  • @javieralaiz9572
    @javieralaiz9572 Před 2 lety +2

    Nice! Controlling the timeline in shaders is such an ignored topic and it can be really useful not only for vertex animations but for all types of data. Thanks for your explanation!

  • @scottcourtney8878
    @scottcourtney8878 Před 10 měsíci

    Very useful tutorial. I appreciate how you brought multiple WPO-related concepts together in a succinct and focused presentation. This makes a great resource not only for those learning the techniques but also as a quick refresher for those who've done this before but not recently enough to remember offhand. :)

  • @YuuJer
    @YuuJer Před rokem

    so much info in such a short video! so cool!

  • @augustinchauveau6787
    @augustinchauveau6787 Před rokem +1

    This is a great video, golden learning material : well done you've won a subscriber

  • @IPpainting
    @IPpainting Před 2 lety +1

    Good stuff! Also really valuable note about the mesh bounds

    • @VisualTechArt
      @VisualTechArt  Před 2 lety

      ;) I also forgot to mention that the same thing is true for physics collisions, of course

  • @shark6334
    @shark6334 Před 2 lety

    This is educational! Thank you for your sharing!!

  • @portmandrotikitordnamtrop

    Great video!

  • @S-I-T
    @S-I-T Před 2 měsíci

    fantastic tutorial - thank you :D

  • @rauljaramillo923
    @rauljaramillo923 Před 2 lety

    Thank you so much!

  • @ChrixB
    @ChrixB Před 2 lety

    This is a revelation to me: animate Mesh with the Shader.. wow! thanks for sharing that, you show it in a very clear and simple way!

  • @miloszgierczak4806
    @miloszgierczak4806 Před 2 lety

    this is gold

  • @MonsterJuiced
    @MonsterJuiced Před rokem

    Nice video. Using this technique I have seen some mind blowing animations which were substituted for crowds of NPC's. Rather than them having bones, they have vertex animations that somehow still had really nice walk/ cheer/ sigh/ run/ conversation and gesture animations. To me, that was just straight up black magic

    • @VisualTechArt
      @VisualTechArt  Před rokem +2

      That's one step further, you bake the vertices position on a texture and you use it to reproduce the animation :)

    • @MonsterJuiced
      @MonsterJuiced Před rokem

      @@VisualTechArt do you know how to do this?

    • @VisualTechArt
      @VisualTechArt  Před rokem +1

      Yes :D but you can also find some tools around for that

    • @MonsterJuiced
      @MonsterJuiced Před rokem

      @Visual Tech Art I will look into, I've spend hundreds on third party tools for unreal and blender so far haha I do enjoy playing with them

  • @reachingeric
    @reachingeric Před rokem +1

    You saved me!

  • @sahinerdem5496
    @sahinerdem5496 Před 8 měsíci

    This video is most valuable through the deep knowledge of 3D rendering algorithms. i know nothing. Since 2005 i use DCC 3D softwares asa hobbyist, MY guess is after using UE the RGB is XYZ. And what is happening in 3D animation is Maths calculated like in this material example. The 3D animation calculations each part is a Time rooted material flush on screen. That's my guess. Sorry for bad english and noobness. Regards.

  • @user-pb5mq1qs6n
    @user-pb5mq1qs6n Před 2 lety

    interesting!

  • @MIKELENZTIPS
    @MIKELENZTIPS Před rokem

    Really enjoyed this and learned a lot - Thank you - How would you add any easing control to vertex animation?

    • @VisualTechArt
      @VisualTechArt  Před rokem

      For that you need to modify the animation gradient with some smoothing function or curve :)

    • @MIKELENZTIPS
      @MIKELENZTIPS Před rokem

      @@VisualTechArt I've figured it out using squared ands square root alpha value and stacking those or smoothstep nodes for varying easing controls. whoop!

  • @God0fTime
    @God0fTime Před rokem

    I want to see deforming meshes when hit

  • @eduardogodoy2133
    @eduardogodoy2133 Před rokem

    Great video, what would you need to do to make some parts of the mesh more affected by the animation than others? Thank you

    • @VisualTechArt
      @VisualTechArt  Před rokem +1

      Use some gradient as 'weight' for the animation :)

    • @eduardogodoy2133
      @eduardogodoy2133 Před rokem

      @@VisualTechArt That's great to know, thank you man 👍

  • @north6935
    @north6935 Před 3 měsíci

    thank you for this tutorial! You may saved my school project as I have been hand-animating a leaf in the wind and it has been painstaking haha I'll try this out tomorrow, I think just simply animating the translation and rotation in the shader as the leaf moves along a spline should work no? I'm wondering though, after hearing your summary at the end, if my textures would break?

    • @VisualTechArt
      @VisualTechArt  Před 3 měsíci

      That will take some work but it can be done :)
      Otherwise you can come up with a wind movement approximation that you just apply to the whole mesh

    • @north6935
      @north6935 Před 3 měsíci

      @@VisualTechArt I did actually get that to sort of work! 👍 However, I have a problem that when I move the mesh to a certain location then the rotation becomes chaotic; which must have something to do wit the World Position part of the shader but I cannot think of why that is.
      Even at minuscule values the rotation is default wacky

  • @sintrano
    @sintrano Před 3 měsíci

    Thanks so much for this video! I'm running into something where I am rotating along Y axis in the same way you set it up in this video, but if my asset is rotated at all my rotation goes completely wonky, is there anyway I can keep this kind of motion that I generate at rest position constant while my asset transforms/moves around?

    • @VisualTechArt
      @VisualTechArt  Před 3 měsíci

      You have to be careful in combining transformations in an order that makes sense :)

  • @AlGny2
    @AlGny2 Před 6 měsíci

    i was woundering if its possible, to make attritions from the mesh for fake furr, like the one on ds1 sif and priscilla .
    wher it feels like they inflated the mesh via shader and applied alpha map to it.

    • @VisualTechArt
      @VisualTechArt  Před 6 měsíci

      I think Acerola has a video exactly on that tech :)
      In that case you render the mesh multiple times, and each time you inflate it a bit more and make it transparent with the fur map

  • @BucketKingu
    @BucketKingu Před 7 měsíci

    Quick question, when you're wiggling the character at 3:09, is there a way to manipulate the center of the mesh as well? I'm trying to figure out how to sort of animate a snake using materials and this seems like the closest method, but I'm struggling to figure out how to make the center of the mesh move...

    • @VisualTechArt
      @VisualTechArt  Před 7 měsíci

      Well yes, you just figure out a function that changes those values too

  • @YourSandbox
    @YourSandbox Před 9 měsíci

    maybe u can help. do u know how to blend between animations in vat textures. like blendspace in anim graph

    • @VisualTechArt
      @VisualTechArt  Před 9 měsíci

      With a lerp between the two wpo? What did you try already?

    • @YourSandbox
      @YourSandbox Před 9 měsíci +1

      @@VisualTechArt I actually just found a way to calculate frame from previous animation and yeap, blend between 2 WPO with help of AnimToTexture native plugin :)

  • @NeatWolf
    @NeatWolf Před 6 měsíci

    Is there a way to "animate" the vertex colours via shader tho? For instance in dense meshes, to add some world-space noise variations of the colours (doing it at vertex level instead of pixel level)

    • @VisualTechArt
      @VisualTechArt  Před 6 měsíci +1

      You can't write the Vertex Colour attribute from the shader, but you can do stuff in the Vertex Shader and pass the result to the Pixel Shader. Just use a Vertex Interpolator node to do that.
      You can watch my very first video on this channel, it briefly explains that :)

    • @NeatWolf
      @NeatWolf Před 6 měsíci

      @@VisualTechArt Thanks, I'm going to have a look! I mean, in HLSL you can set them in the Vfrag - I could do it in Unity but I'm not fully sure how it translates in Unreal

  • @nodelayfordays8083
    @nodelayfordays8083 Před rokem

    How to prevent Volume Preserving Scaling from translating the mesh as well?

  • @ajibolalaleye769
    @ajibolalaleye769 Před 3 měsíci

    can this be used to morph a mesh like clothing with a cloth sim assigned to the mesh

    • @VisualTechArt
      @VisualTechArt  Před 3 měsíci +1

      Why not :)

    • @ajibolalaleye769
      @ajibolalaleye769 Před 3 měsíci

      @@VisualTechArt okay because I was having a difficult time. Exported a point cache animation (baked) of the pose morph in cinema 4d to transfer to unreal. (I had to try baking because I can see for example, 3ds max has an unreal engine vertex animation tool. But the exported file from that is exr and a bitmap. But I can't seem to find something similar for cinema 4d. As once I assign a cloth sim to the mesh the morphs no longer work on the simulated area.
      My bad for the long explanation, but if you have any way to nudge me in the right direction it will be awesome. As I don't want to use a skeletal rig control on a cloth and animate the motion with jiggle physics. Or it maybe best to use rban . As the clothing item is kind of like a puncho. Please help. Thanks

    • @ajibolalaleye769
      @ajibolalaleye769 Před 3 měsíci

      Just found Animtotexture.

  • @Drakuba
    @Drakuba Před 6 měsíci

    how would you animate vehicles using this method? Is it even possible? Im making RTS and skeletal meshes have high cost and having hundreds of them is not an option

    • @VisualTechArt
      @VisualTechArt  Před 6 měsíci +1

      Well it depends on how you want to animate them, that would be an interesting experiment I think

  • @torgath5088
    @torgath5088 Před rokem

    Thank you for your video! But I have a question torturing me for a long time. I'm making RTS game, and to make it more performant I rotate the turret using WPO, and making barrel move using WPO as well. I also make buildings like this. The problem is that I want to understand how get mesh orientation CONSIDERING current world position offset. Because some animations break as I need to consider all previous rotations when I connect something to NormalizedRotationAxis. Or, as another example, when I move the barrel of my tank, but the turret has already been rotated by "Rotate about axis" node and barrel moves incorrectly. Could you please share your knowledge on how to do things like that. Someone on UE4 forums called that heirarcal WPO movement/rotation. I'd be happy if you could help!

    • @VisualTechArt
      @VisualTechArt  Před rokem

      I'm not 100% sure I understood your problem but we can have a chat about that on my Discord? Seems like a fun problem to solve and definitely tech art related! :D

    • @torgath5088
      @torgath5088 Před rokem

      @@VisualTechArt somehow my reply is getting deleted, but I would love to. How can I find you on discord?

    • @torgath5088
      @torgath5088 Před rokem

      @@VisualTechArt my ID is Soberhead (Паша) 6103

    • @VisualTechArt
      @VisualTechArt  Před rokem

      It's in every video description!