Closed johndpope closed 4 years ago
Hi @johndpope,
Loading FBX files— no. The only loading/saving my MDLVoxelAsset library does is to/from MagicaVoxel .vox files. That’s really the goal of MDLVoxelAsset— to add .vox file support to ModelIO.
Once you have a mesh loaded into SceneKit, you can convert it to a voxel array with Apple’s MDLVoxelArray, though I’ve had a lot of trouble getting that to produce sane results, so I’m currently working on my own replacement algorithm for mesh->voxel rasterization. The reverse is also possible (voxel->mesh) and again MDLVoxelArray is Apple’s API for that, which I’ve found horribly buggy, so MDLVoxelAsset has its own mesher.
But in terms of reading/writing FBX files, that’s out of scope for this. I haven’t had much trouble using SceneKit/ModelIO’s built-in FBX stuff, but it seems it isn’t working out as well for you. Side-note: I don’t currently support any of MagicaVoxel’s animation stuff, but I may in the future.
Thx / SceneKit / dae is fine out of the box. I’m needed to take an animation eg walking and apply it to a t-pose. As per tickets / pulling out my hair. Autodesk should really come to the party here.
I imagine you’ve already tried everything sensible, but have you checked how the character animation works in the Apple sample code that was released alongside SceneKit/ModelIO WWDC sessions circa 2015-2018-ish?
I’m sorry I can’t help any more than this. Just not something I’ve needed or explored.
Checking it out - thanks https://developer.apple.com/videos/play/wwdc2015/602/
is this the sort of detail your aiming for with voxels? https://ephtracy.github.io/#ss-carousel_ss fyi - got the fbx animations loading with an older assimp / objective-c library https://github.com/johndpope/swift-2
there's some reference to loading fbx files. Was this on the roadmap? It seems your code is programmed to use modelio.
I'm aware of some libraries that use FBX / swift - but have bumped up against some issues. https://github.com/eugenebokhan/AssetImportKit/issues/14