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

Поділитися
Вставка
  • Опубліковано 7 лют 2025
  • 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

КОМЕНТАРІ • 62

  • @scottcourtney8878
    @scottcourtney8878 Рік тому +2

    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. :)

  • @javieralaiz9572
    @javieralaiz9572 3 роки тому +3

    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!

  • @MonsterJuiced
    @MonsterJuiced Рік тому +1

    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  Рік тому +3

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

    • @MonsterJuiced
      @MonsterJuiced Рік тому

      @@VisualTechArt do you know how to do this?

    • @VisualTechArt
      @VisualTechArt  Рік тому +2

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

    • @MonsterJuiced
      @MonsterJuiced Рік тому

      @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

  • @mandasartur
    @mandasartur 2 місяці тому

    Most impressive, well served.

  • @adrianeilsantos
    @adrianeilsantos 7 місяців тому +1

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

  • @augustinchauveau6787
    @augustinchauveau6787 Рік тому +1

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

  • @YuuJer
    @YuuJer 2 роки тому

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

  • @IPpainting
    @IPpainting 3 роки тому +1

    Good stuff! Also really valuable note about the mesh bounds

    • @VisualTechArt
      @VisualTechArt  3 роки тому

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

  • @StillSameSharkk
    @StillSameSharkk 2 роки тому

    This is educational! Thank you for your sharing!!

  • @S-I-T
    @S-I-T 9 місяців тому

    fantastic tutorial - thank you :D

  • @ChrixB
    @ChrixB 3 роки тому

    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!

  • @reachingeric
    @reachingeric Рік тому +1

    You saved me!

  • @north6935
    @north6935 10 місяців тому

    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  10 місяців тому

      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 10 місяців тому

      @@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

  • @muhammetemirbulut6511
    @muhammetemirbulut6511 Місяць тому

    Wow !

  • @sahinerdem5496
    @sahinerdem5496 Рік тому

    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.

  • @portmandro
    @portmandro 3 роки тому

    Great video!

  • @rauljaramillo923
    @rauljaramillo923 3 роки тому

    Thank you so much!

  • @miloszgierczak4806
    @miloszgierczak4806 2 роки тому

    this is gold

  • @BucketKingu
    @BucketKingu Рік тому

    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  Рік тому

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

  • @sintrano
    @sintrano 9 місяців тому

    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  9 місяців тому

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

  • @YourSandbox
    @YourSandbox Рік тому

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

    • @VisualTechArt
      @VisualTechArt  Рік тому

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

    • @YourSandbox
      @YourSandbox Рік тому +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 :)

  • @rtea_academy
    @rtea_academy 3 місяці тому

    Amazing job like always. Do you know in this cases why I have in the version 5.x has artefacts in the shadows event the shadows not is dynamic?. Do you think that the problem is something of lumen and nanite world?. More problems with the normal representation when I create dynamic movements using mathematics. Example: Waves in a plane moving the vertex position with a shader. Or using vertex animation texture the shadows not is working well and the normal of this assets have bugs. However when I use this methods In the version 4.x I have not problems.

    • @VisualTechArt
      @VisualTechArt  3 місяці тому

      Not sure tbh, I should check.
      But yeah, it's probably something related to VSM update, lumen and so on :)

  • @AlGny2
    @AlGny2 Рік тому

    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  Рік тому

      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

  • @eduardogodoy2133
    @eduardogodoy2133 Рік тому

    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  Рік тому +1

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

    • @eduardogodoy2133
      @eduardogodoy2133 Рік тому

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

  • @MIKELENZTIPS
    @MIKELENZTIPS Рік тому

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

    • @VisualTechArt
      @VisualTechArt  Рік тому

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

    • @MIKELENZTIPS
      @MIKELENZTIPS Рік тому

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

  • @NeatWolf
    @NeatWolf Рік тому

    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  Рік тому +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 Рік тому

      @@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

  • @ajibolalaleye769
    @ajibolalaleye769 10 місяців тому

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

    • @VisualTechArt
      @VisualTechArt  10 місяців тому +1

      Why not :)

    • @ajibolalaleye769
      @ajibolalaleye769 10 місяців тому

      @@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 10 місяців тому

      Just found Animtotexture.

  • @Drakuba
    @Drakuba Рік тому

    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  Рік тому +1

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

  • @Retrocaus
    @Retrocaus 2 роки тому

    I want to see deforming meshes when hit

  • @nodelayfordays8083
    @nodelayfordays8083 Рік тому

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

  • @雨里-i7j
    @雨里-i7j 3 роки тому

    interesting!

  • @torgath5088
    @torgath5088 2 роки тому

    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  2 роки тому

      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 2 роки тому

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

    • @torgath5088
      @torgath5088 2 роки тому

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

    • @VisualTechArt
      @VisualTechArt  2 роки тому

      It's in every video description!