Closed TheExeQ closed 2 years ago
Hi,
do i need to include the sample code in order to do that?
The mesh format is not part of ozz API / library, indeed. The mesh format is part of ozz sample code, in order to demonstrate the use of the skinning job.
I've tried doing that it fails at TestTagozz::sample::mesh
Yes you have to include (or copy as it's not part of the library) the mesh.h/.cc files
not quite sure cus i don't have a way to visualize it yet
I'd recommend to find a way to display the skeleton, like joints position / orientation, as a way to debug it step by step. The skinning job is agnostic of the mesh format, you should be able to use it with a mesh coming from assimp. The trick is going to match ozz skeleton joints indices with those from assimp. That will probably require a kinda "mapping table". ozz fbx importer does it internally (no way to avoid it), using matching bone names: https://github.com/guillaumeblanc/ozz-animation/blob/master/samples/framework/tools/fbx2mesh.cc#L472
Hope this helps.
Cheers, Guillaume
I'd recommend to find a way to display the skeleton, like joints position / orientation, as a way to debug it step by step.
Yeah, i added cubes on each position of the joints a couple of hours after i posted this issue, the skeleton and animation looks perfect, just the skinning part im struggling with right now.
That will probably require a kinda "mapping table". ozz fbx importer does it internally (no way to avoid it)
ah okay, i thought both ozz and assimp stored the joints in the same order. I'll give it another try with a map thanks :)
i thought both ozz and assimp stored the joints in the same order
No you can't assume that. Order depends on skeleton tree traversal, which is in implementation space. It's joint's name purpose to allow the mapping between different formats or specifications.
I'am having some problems when trying to add skinning. First of all i can't figure out how to load meshes using ozz, do i need to include the sample code in order to do that? i've tried doing that it fails at TestTag but if the sample code isn't required how can i take the data i get from assimp for example and get the skinning matrices from that?
Other than that i have gotten skeleton and animation loading to work i believe (not quite sure cus i don't have a way to visualize it yet) however i tried setting the vertex weights with assimp which i didn't really expect to work and it didn't but it was worth a try.