Announcement

Collapse
No announcement yet.

Vertex Animation Tool in 4.8

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Vertex Animation Tool in 4.8

    So, just saw the twitter post about the new Vertex Animation Tools in 4.8 https://docs.unrealengine.com/latest...ool/index.html and I had some questions:

    1. The doc page only talks about using it with 3Ds Max. Will it eventually be usable for Maya? If so, how far away is that?

    2. The example meshes all had the same number of vertices during their animations. Does this still work if the number of vertices changes? (like in a water simulation?)

    #2
    I just came across the VAT page and wanted to bump this.
    I'm interested in trying to create a similar tool within houdini but the docs only explain how to use the script itself and not whats going on underneath. It would be cool to get an explanation of how those 2d maps were created at a basic level, so that anyone interested could potentially make a tool in there dcc of choice. Thanks.

    Comment


      #3
      I was going to tackle something like that in Houdini but the lack of reference made me drop it for other things. This has an interesting lead though. We do have this formula for determining the texture resolution which I believe points us in the right direction:

      Final texture resolution: X = number of vertices in the mesh, Y = Number of frames captured.
      We might be able to image it like this:

      [V1] [V2] [V3] ... [VX]
      [F2] [F2] [F2] ... [F2]
      [F3] [F3] [F3] ... [F3]
      ... ... ... ... ...
      [FY] [FY] [FY] ... [FY]

      Where V is the original vertex location and each F is the vertex in that corresponding frame. So in Houdini, we could do two for-loops:

      1) For all vertices, record their locations in the texture's columns
      2) For each frame, repeat step 1 on the corresponding row

      That would explain why these textures look really long (all the vertices) and might have only 32 pixels of height (number of captured frames).

      Annnnnnd now I want to play with this instead of sleeping.

      UPDATE: Based on the algorithm above, I put together some simple parameters and created the right resolution for the texture. But now I'm going in circles from being too worn out and dealing with the color value ordering and whatnot. I'll have to pick this up again tomorrow :P
      Last edited by Shadowist; 07-14-2015, 03:47 AM.

      Comment


        #4
        I also wanted to try and tackle this in houdini. I'm pretty new to houdini in general so I'm still not sure how to go about writing out the vert values to pixels in a texture. However I did start to pick apart what the 3d max tool does and wrote down the following notes. Maybe they will be helpful to you guys, who knows

        What the Epic tool seems to do:

        Writes out a 32 bit floating point EXR

        pixels in the X axis correspond to vert numbers
        pixels in the Y axis correspond to frames in the timeline

        start in top left corner of the image.

        first X row seems to be the “default” pose, so all pixel values are 0, and each pixel value in the rows that follow is relative to the first row.

        to inspect an image:
        open it in the comp window in houdini, set the file node to 32 bit floating point depth and turn off linearize image. right click in the comp view and turn on “inspect”. Run the mouse down each column in the image to see the rgb values, which show you the position offsets per vert/per pixel

        3d max vert numbering seems to start at 1, not 0.

        so in X:
        pixel 0 = vert 1
        pixel 1 = vert 2
        pixel 3 = vert 3
        etc…

        exr pixel coords seem to start bottom left
        the tool starts writing from top left.

        so frame 0 doesnt equal pixel column 0, its reversed.
        Senior Tech Artist - WingnutAR
        Developing Flak Jack - A farcical WW1 Dogfighting VR shooter.
        Flak Jack Blog - www.lippykid.com/blog
        Twitter - @ Lippykid
        www.lippykid.com
        Film VFX Reel - https://vimeo.com/116944330

        Comment


          #5
          Forgot to post, I actually got this working in Houdini.

          A major gotcha is that I believe the material function reads with the top scanline first. Houdini writes to the bottom scanline first. So if you're storing the vertex (WHICH IS ACTUALLY THE POINTS IN HOUDINI...ugh) into an array, starting with the last frame and working backwards works.

          Something interesting is that the mesh needs a UV1. The 3DSMax tool kind of goes into this. Basically, each UV point is evenly spaced on the U axis and V is set to 0.5: where UV[0..1, 0.5]. The last UV point is set to UV[1,1]. It appears that's required for the material function, but I'm not entirely sure how. Haven't broken down the material function yet.

          Anyway, video of it working below. Once I do some more testing, I'll post the HDA some place.

          https://drive.google.com/file/d/0B4c...ew?usp=sharing

          Comment


            #6
            Prety awesome! Anyway to get this working for Maya?
            Bacon Man : An Adventure (UE4)

            Comment


              #7
              Originally posted by Shadowist View Post
              Forgot to post, I actually got this working in Houdini.

              A major gotcha is that I believe the material function reads with the top scanline first. Houdini writes to the bottom scanline first. So if you're storing the vertex (WHICH IS ACTUALLY THE POINTS IN HOUDINI...ugh) into an array, starting with the last frame and working backwards works.

              Something interesting is that the mesh needs a UV1. The 3DSMax tool kind of goes into this. Basically, each UV point is evenly spaced on the U axis and V is set to 0.5: where UV[0..1, 0.5]. The last UV point is set to UV[1,1]. It appears that's required for the material function, but I'm not entirely sure how. Haven't broken down the material function yet.

              Anyway, video of it working below. Once I do some more testing, I'll post the HDA some place.

              https://drive.google.com/file/d/0B4c...ew?usp=sharing
              That's awesome! Can't wait to try it out Thanks

              Comment


                #8
                What I would like to know is why not use FBX's ability to support the export of point cache data?
                Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
                Custom Map Maker Discord
                https://discord.gg/t48GHkA
                Urban Terror https://www.urbanterror.info/home/

                Comment


                  #9
                  Originally posted by FrankieV View Post
                  What I would like to know is why not use FBX's ability to support the export of point cache data?
                  I don't think UE4 supports vertex cache yet, correct me if I'm wrong please. If you look at the roadmap its the highest voted animation feature but no indication they are actually working on it.

                  Comment


                    #10
                    Originally posted by elindell View Post
                    I don't think UE4 supports vertex cache yet, correct me if I'm wrong please. If you look at the roadmap its the highest voted animation feature but no indication they are actually working on it.
                    Nope you are right we do not support vertex cache data and I have no idea if we will in the future or not.

                    Comment


                      #11
                      Cool - it's great to see that you wrote a Houdini version of the script!

                      Let me know if you have any questions. I wrote the max version.

                      Something interesting is that the mesh needs a UV1. The 3DS Max tool kind of goes into this. Basically, each UV point is evenly spaced on the U axis and V is set to 0.5: where UV[0..1, 0.5]. The last UV point is set to UV[1,1]. It appears that's required for the material function, but I'm not entirely sure how.

                      The texture is sampled in the following manner :
                      U: the red channel texture coordinate 1
                      v: 1/the number of morph target frames (to find the uv value that correlates with 1 pixel) * the current frame number (to find the correct UV V value)

                      That combination will locate each verts new morph target location.

                      Comment


                        #12
                        Originally posted by TheAgent View Post
                        Prety awesome! Anyway to get this working for Maya?
                        I imagine there's probably a way. However, I'm just so deep in Houdini land that I probably won't get around to it for a while. Unless I get taken in by a Maya-centric studio...that would probably accelerate things

                        Oh hey! You're awesome for putting the max one together I have some plans with taking advantage of Houdini's features and this tool. I think some really cool effects can be made using this, especially larger effects in VR space where sprites don't really work with depth. That definitely makes sense with how the texture's being sampled. Whenever I get the chance, I'll dig through the material function to understand the steps better. I'll definitely ping you if I have any questions

                        As for anyone who's interested in the Houdini version, I'll make a separate post in the [hopefully] near future with some guidelines and the HDA. Some examples too if I have the time =]

                        EDIT: Link to tool =]
                        https://forums.unrealengine.com/show...n-Tool-Houdini
                        Last edited by Shadowist; 09-07-2015, 06:07 PM. Reason: Linked to tool

                        Comment


                          #13
                          Cool

                          Yeah, I feel like we've barely scratched the surface of what can be done with sampling the morph targets over time. Geometry based motion blur, for instance, is just one of the cool techniques that come out of texture based targets.

                          Comment


                            #14
                            Haha! I was playing around with this exact thing today. I should perhaps have searched around before spending the afternoon in houdini Oh well, your videos don't seem to be up at the moment so I'll share my work in progress. As it's early days I still haven't set up the second UVset or tried to import it into unreal. So far it's been mostly a learning experience in houdini. It's so nice getting to a setup where it's very visual and easy to work with. Most of the work was actually spent setting up useful preview options so it's simple to get a feel for how it will look if you skip some more frames without having to actually bake it out and test it in engine.

                            Here's the video:


                            Things left to do:
                            Make sure it's compatible with the Unreal setup.
                            Fix the twitch when using interpolation preview.
                            Make a houdini engine version for Maya.

                            My current plan is to get more into unreal and making marketplace assets during the fall. Hopefully that'll mean I can hard test this and work out all the kinks so I can release it into the world, is anyone would want it.
                            Last edited by partikelstudio; 06-19-2016, 06:08 PM.
                            Games shipped: Crow: The Legend, Apex Construct, Battlefield 1, Mirror's Edge Catalyst, Battlefield 4, F1 Race Stars, Harry Potter Kinect, Disney Universe, Rio: The Videogame, Goldeneye 007, Dead Space Extraction, Ice Age 3: Dawn of the Dinosaurs.

                            http://partikel.co/

                            Comment


                              #15
                              I am also trying to write a quick tool in Houdini to take advantage of this. Not sure what happened with the other peoples efforts. I have the positional data all happy and working, but I can't quite get the normals behaving correctly. Are the normals written in the image in world space or tangent space? And are they a difference, like the positions, or a raw value from the geometry?

                              Comment

                              Working...
                              X