f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.93k stars 215 forks source link

FBX skinning animation is not working as expected with recent version of assimp #414

Closed GitCodeBoy closed 5 months ago

GitCodeBoy commented 2 years ago

I loaded a fbx file and the f3d window can show the model, but when I press the space key to play animation,f3d cant play animation correctly like other software like motionbuilder or maya.

Here is the test fbx i use :https://github.com/GitCodeBoy/test-fbx , when I open it on motionbuilder or 3D Viewer window 10 ,i can see a catwomen walk around.

To Reproduce Steps to reproduce the behavior: 1.open the f3d.exe 2.drag the test file into the application window

  1. press 'space'
  2. find the model get strange
  3. image

Expected behavior play animation correctly

System Information:

F3D Information f3d 1.3.0

F3D - A fast and minimalist 3D viewer Version: 1.3.0. Build date: 2022-09-06 20:50:14. Build system: Windows AMD64. Compiler: MSVC 19.33.31629.0. External rendering module: ON. Raytracing module: OFF. Exodus module: ON. OpenCASCADE module: 7.6.0 (no metadata). Assimp module: 5.1.0. Alembic module: 1.8.3. VTK version: 9.2.20220821 (build 20220821). Copyright (C) 2019-2021 Kitware SAS. Copyright (C) 2021-2022 Michael Migliore, Mathieu Westphal. License BSD-3-Clause. By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

Meakk commented 2 years ago

It's an issue in Assimp, it has been reported many times, for example here: https://github.com/assimp/assimp/issues/4620 https://github.com/assimp/assimp/issues/4487 https://github.com/assimp/assimp/issues/3390
Animations were working well in Assimp 5.0
Let's keep this issue open until it's fixed in Assimp.

GitCodeBoy commented 2 years ago

这是 Assimp 中的一个问题,已多次报告,例如这里:assimp/assimp#4620 assimp/assimp#4487 assimp/assimp#3390 动画在 Assimp 5.0 中运行良好 让我们保持这个问题开放,直到它在 Assimp 中得到修复。

Are there any temporary solutions?

Meakk commented 2 years ago

You can try to build f3d yourself with a downgraded Assimp version 5.0

mwestphal commented 2 years ago

Please note there is some texture issues with assimp 5.0

mwestphal commented 2 years ago

Another workaround would be to convert your fbx to gltf/glb.

GitCodeBoy commented 2 years ago

Another workaround would be to convert your fbx to gltf/glb.

f3d does not show anything after i convert my test file to glb by Windows 3D Viewer 'Save as',the glb file can be opened by Windows 3D Viewer corretly image

image

mwestphal commented 2 years ago

Could you share the .glb file ?

GitCodeBoy commented 2 years ago

Could you share the .glb file ?

I uploaded it on my test repo :repo

GitCodeBoy commented 2 years ago

Could you share the .glb file ?

If I need to do anything else when converting FBX files?

mwestphal commented 1 year ago

Looks like we forgot to check this one @Meakk

Meakk commented 1 year ago

I think that's because the model is very large and the frustum culling isn't working when there is an animation (it is based on the T-pose bounding box).
It's a duplicate of https://github.com/f3d-app/f3d/issues/57

mwestphal commented 1 year ago

Closing as duplicate then. @GitCodeBoy you can work around it by positioning the camera in the right location.

mwestphal commented 1 year ago

Keeping it open for the Assimp bug though.

mwestphal commented 5 months ago

Workaround to try out: https://github.com/assimp/assimp/issues/4620#issuecomment-2186209971