ozRocker Posted May 16, 2018 Share Posted May 16, 2018 I don't think Babylon.js supports alembic files. If not I'm thinking of parsing it and processing the vertex transformations myself. I know you can change vertex positions and normals easily in Babylon.js using mesh.updateVerticesData(BABYLON.VertexBuffer.PositionKind, newPositions); mesh.updateVerticesData(BABYLON.VertexBuffer.NormalKind, newNormals); but I think this is all done on the CPU. Is there a way to get these updates per frame to happen on the GPU? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 16, 2018 Share Posted May 16, 2018 I suggest creating morph targets: http://doc.babylonjs.com/how_to/how_to_use_morphtargets Quote Link to comment Share on other sites More sharing options...
ozRocker Posted May 17, 2018 Author Share Posted May 17, 2018 Morph targets use linear interpolation, but not all vertex animation is linear. To get around that using morph targets you'd have to create a shape key for every frame. Is that what you're suggesting? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 17, 2018 Share Posted May 17, 2018 Well no this will be an immense waste of memory (You will duplicate the mesh per frame) But anyhow, you need to either do this animation CPU side as the cost to generate shader accessible content will be prohibitive Quote Link to comment Share on other sites More sharing options...
ozRocker Posted May 17, 2018 Author Share Posted May 17, 2018 I don't think there's any way around that. Animation cache and volumetric data is practically a new mesh per frame (just the positions and normals though). My fabric demo (http://punkoffice.com/fabric) uses a new mesh per frame for the dress. I can't think of any other way to do that since the changes are not linear. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 17, 2018 Share Posted May 17, 2018 Agree! Quote Link to comment Share on other sites More sharing options...
ozRocker Posted May 17, 2018 Author Share Posted May 17, 2018 Does anyone here know much about alembic files? In general are they processed via GPU or CPU? You can drag and drop them into Unity3D and Unreal Engine and play them straight away. Just wondering how they are processing this data Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.