SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
979 stars 132 forks source link

Loading blendshape gltf. #6

Closed wolfviking0 closed 1 week ago

wolfviking0 commented 6 years ago

Did you try to load some gltf model with blend shape animation ??

https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/AnimatedMorphCube/README.md

SaschaWillems commented 6 years ago

There's no animation support yet. It's on my list, but no ETA.

sjfricke commented 6 years ago

@wolfviking0 I actually was in need of blend shapes for another project of mind, I took this project template and adjusted it with implementation for blend shapes https://github.com/sjfricke/Vulkan-glTF-Morph-Target

syoyo commented 4 years ago

I have combined Vulkan-glTF-Morph-Target and Vulkan-glTF-PBR(skin) in my internal test app and confirmed it works well.

I'm considering to send a PR to support Morph. Before of it, I have a question.

@sjfricke 's implementation uses SSBO for morph data. Using SSBO for morph data may be flexible, but it makes shader and vulkan data structure complex and codes become difficult to read and maintain(and sometimes it tend to become the source of various bugs(I've faced the out-of-bounds access error for some glTF scene, it was difficult to debug)).

Using VertexAttribute for morph data may be much simpler and clean, but it cannot support sparse morph target data. Also, the number of morph targets may be limited by Vulkan HW limits(although, at least we should be able to support up to 100 morph targets on low-end and mobile GPUs(Mali, Adreno)).

We could also use Texture(or Image) as an morph data storage.

@SaschaWillems how do you think? Do you have any good practice how to implement Morph in Vulkan?

SaschaWillems commented 4 years ago

@syoyo: That sounds awesome. And even though code for using SSBOs may be more complex I'd prefer using SSBOs for their flexibility. So feel free to open a PR :)

syoyo commented 4 years ago

@SaschaWillems OK, will use SSBO. It requires some amount of code and data structure refactoring, so probably PR will be sent around the end of March, 2020

SaschaWillems commented 4 years ago

If the SSBO way is too complex or requires too much effort, the other options would be fine too. So feel free to choose the option that suits you best :)

questgugou commented 1 year ago

good idea

apchenstu commented 1 month ago

@SaschaWillems OK, will use SSBO. It requires some amount of code and data structure refactoring, so probably PR will be sent around the end of March, 2020

It will be very helpful if you can share your implementation!

SaschaWillems commented 1 week ago

Closing this due to inacvitiy.