Jump to content

GPU (shaders) for vertex animation


Recommended Posts

I've been using the CPU for vertex animation which you can see in my demo here: http://punkoffice.com/fabric

I'm updating all vertex positions and normals every frame then using this to update:

mesh.updateVerticesData(BABYLON.VertexBuffer.PositionKind, newPositions);            
mesh.updateVerticesData(BABYLON.VertexBuffer.NormalKind, newNormals);      

So basically if there's 10 frames of animation I have 10 different versions of the mesh's vertex positions and normals and I cycle through them.  Yes, it can take up a lot of memory if the mesh is large or there are many frames.

I'm wondering if its possible to do all this via the GPU.  I guess that would require some kind of shader coding.  I'm not sure how this would work, but if its possible I'll try and figure it out.

Link to comment
Share on other sites

18 hours ago, NasimiAsl said:

hi oz  if you have time (2 week )for this project we can make it and need your cloth vertex data  and obj too 


yeh cool.  I'm cleaning up my CPU code now so you can easily see what my processes are.  Once that's done I'll get back to you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...