Jump to content

[SOLVED] Loading animated skinned mesh during runtime using FBXImporter


photo

Recommended Posts

Hi,

I am currently facing a problem when I am loading an custom FBX-model during runtime which have some bones attached. The issue appears only when I load the files via the FBXImporter (Engineering 2.13.0.1) but not within editor. Loading the FBX model and applying the animation file does work as intended. So what I have tried:

  1. Load the mesh file in editor and apply the animation to it. Everything worked fine. Running the animation during runtime via setFrame() also works as intended.
  2. Load the mesh in editor and safe it. Load the animation during runtime and play the animation via setFrame() also worked as intended.
  3. Load the mesh during runtime using FBXImporter resulting in a correct mesh. Applying an animation file to it, results in miscalculated vertices.

grafik.png.74104928377244696b91d67634c697c7.png

I attached a small project sample which should isolate the problem. The code consists of a small interface, so loading mesh/animation during runtime should be easy without any modifications.

Thanks

Christian

 

animation_test.rar

Link to comment

@werner.poetzelberger

Good question. I can't find any useful hints in the documentation about additional parameters that can be used with the FbX-Importer. If I miss anything I would be glad to know that.

@silent

Thanks, next week would definetly fine. We can currently use the workaround with adding the mesh via editor and loading the animation during runtime.

Link to comment

Thanks a lot devrom, I totally missed that post.

 

importer->setParameterInt("joints_reorientation", 1);

I added this parameter before initializing the importer and I got a correct result.

  • Like 1
Link to comment

ha, this default active joint reorientation cost us some hours as well... I think now it is OFF by default (at least in the editor).

Link to comment
  • silent changed the title to [SOLVED] Loading animated skinned mesh during runtime using FBXImporter
×
×
  • Create New...