FBX export scale is incorrect when animations are included #41605

Closed
opened 2014-08-27 22:32:20 +02:00 by Pete Chown · 40 comments

System Information
Windows 8.1 Pro, GTX 780

Blender Version
Broken: 2.71
Worked: No version worked as far as I know.

The FBX exporter provides a scale function, to accommodate software which uses different units. For example, when exporting to Unreal, it is normally necessary to scale up by 100, to convert metres to centimetres.

This scaling doesn't work properly if animations are included in the FBX file. Objects tend to end up unscaled, so extremely small in most software packages.

To reproduce:

  1. Load the attached .blend file. fbx_export_bug.blend

  2. Export FBX with the following settings: fbx_export.png

  3. Load the FBX into the Autodesk FBX converter/viewer. No object is visible because it is 100x too small.

  4. Import the FBX into Unreal as a skeletal mesh. The mesh is visible but 100x too small. (If you find it difficult to see, it may help if you set the skeletal mesh editor to wireframe.)

  5. Export the FBX again without animations, using these settings: fbx_export2.png

  6. Import the FBX into Unreal as a static mesh. Notice that the scale is now correct.

I hope this makes sense, please ask if you need any more information. And thanks for all your work on Blender!

**System Information** Windows 8.1 Pro, GTX 780 **Blender Version** Broken: 2.71 Worked: No version worked as far as I know. The FBX exporter provides a scale function, to accommodate software which uses different units. For example, when exporting to Unreal, it is normally necessary to scale up by 100, to convert metres to centimetres. This scaling doesn't work properly if animations are included in the FBX file. Objects tend to end up unscaled, so extremely small in most software packages. To reproduce: 1. Load the attached .blend file. [fbx_export_bug.blend](https://archive.blender.org/developer/F107049/fbx_export_bug.blend) 2. Export FBX with the following settings: ![fbx_export.png](https://archive.blender.org/developer/F107050/fbx_export.png) 3. Load the FBX into the Autodesk FBX converter/viewer. No object is visible because it is 100x too small. 4. Import the FBX into Unreal as a skeletal mesh. The mesh is visible but 100x too small. (If you find it difficult to see, it may help if you set the skeletal mesh editor to wireframe.) 5. Export the FBX again without animations, using these settings: ![fbx_export2.png](https://archive.blender.org/developer/F107054/fbx_export2.png) 6. Import the FBX into Unreal as a static mesh. Notice that the scale is now correct. I hope this makes sense, please ask if you need any more information. And thanks for all your work on Blender!
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @PeteX-2

Added subscriber: @PeteX-2

blender/blender#44045 was marked as duplicate of this issue

blender/blender#44045 was marked as duplicate of this issue

#44424 was marked as duplicate of this issue

#44424 was marked as duplicate of this issue
Bastien Montagne was assigned by Sergey Sharybin 2014-08-28 11:52:52 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Could you please check and confirm whether the issue still exists with fresh Blender 2.72?

Could you please check and confirm whether the issue still exists with fresh Blender 2.72?
Author

There is no improvement with 2.72 I'm afraid.

There is no improvement with 2.72 I'm afraid.

Changed once more time handling of scale… :/ Can you please try (tomorrow) with this night's builds from our buildbot?

Changed once more time handling of scale… :/ Can you please try (tomorrow) with this night's builds from [our buildbot](https://builder.blender.org/download)?
Author

Still no joy I'm afraid. I wasn't sure which build you wanted me to try with. The Official build still showed the bug. The Testbuild Branch build crashed when I tried to do an FBX export, giving the following error:

Traceback (most recent call last):
File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\__init__.py", line 521, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2892, in save
  ret = save_single(operator, context.scene, filepath, **kwargs_mod)
File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2787, in save_single
  scene_data = fbx_data_from_scene(scene, settings)
File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2346, in fbx_data_from_scene
  connections.append((b"OO", node_uuid, parent_uuid, None))
NameError: name 'parent_uuid' is not defined
location: <unknown location>:-1

I'm not sure if this is new or if I just never noticed it before, but the mesh seems to get exported at the correct scale. The problem is that, in the animation, the bones are at the original scale. This seems to cause the mesh to revert to the original scale when you run an animation.

In the Autodesk viewer, you can't really see this, because it always runs the animation. In Unreal, you may be able to see this. If you open the Skeletal Mesh object, you will see it at the correct scale. If you then switch to the Animation panel and preview the animation, the scale will suddenly change to 100x too small.

Still no joy I'm afraid. I wasn't sure which build you wanted me to try with. The Official build still showed the bug. The Testbuild Branch build crashed when I tried to do an FBX export, giving the following error: ``` Traceback (most recent call last): File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\__init__.py", line 521, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2892, in save ret = save_single(operator, context.scene, filepath, **kwargs_mod) File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2787, in save_single scene_data = fbx_data_from_scene(scene, settings) File "C:\Users\Pete\Downloads\testbuild-blender-2.72-6b2952c-win64\testbuild-blender-2.72-6b2952c-win64\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2346, in fbx_data_from_scene connections.append((b"OO", node_uuid, parent_uuid, None)) NameError: name 'parent_uuid' is not defined ``` ``` location: <unknown location>:-1 ``` I'm not sure if this is new or if I just never noticed it before, but the mesh seems to get exported at the correct scale. The problem is that, in the animation, the bones are at the original scale. This seems to cause the mesh to revert to the original scale when you run an animation. In the Autodesk viewer, you can't really see this, because it always runs the animation. In Unreal, you may be able to see this. If you open the Skeletal Mesh object, you will see it at the correct scale. If you then switch to the Animation panel and preview the animation, the scale will suddenly change to 100x too small.

Yeah, was referring to test builds. That bug I fixed one or two days ago (only lived ~24 hours, guess it was just bad timing ;) ).

Will check again that scaling mess with armatures, then :/

Yeah, was referring to test builds. That bug I fixed one or two days ago (only lived ~24 hours, guess it was just bad timing ;) ). Will check again that scaling mess with armatures, then :/

Added subscriber: @S_Wilke

Added subscriber: @S_Wilke

Hi there,

I just wanted to post strange scalation-errors in blender since the experimental merge but found this ticket, so im posting my tests here (please note it was tested with the nightly build 2.72-f7957e2 )

I used my old blend-file from #42110 as a starting point (set to metric 0.01):
Blend: Mesh-RotationErrorAnim.blend
FBX: Export_Scale_OldScale.fbx

With this, now the mesh in UE4 comes out as a giant:

OldScale_Mesh.jpg

but the animation is "correctly" scaled, while now hovering above the ground:

From the same view as above:
OldScale_AnimA.jpg

zoomed in, revealing it is still same sized and now flying:
OldScale_AnimB.jpg

So the next thing i tried was to scale the mesh down to 1/100 of its size and changed the metric scale in blender from 0.01 to 1.000 (file: Mesh-RotationErrorAnim_Scaled.blend )
Export_Scale_NewScale.fbx

Now the results are funny, because now the mesh and the animation are super tiny but the same size:

Mesh:
NewScale_Mesh.jpg

Animation:
NewScale_Anim.jpg

So i think that the export for the mesh-size and the animation-size are somehow differently hooked. So now i took the original file (the upper one, not scalled) and only changed the metric scale of blender from 0.01 to 1.00 and now the resulted FBX has the correct size:

OldScaleChangedMetric_Mesh.jpg

OldScaleChangedMetric_Anim.jpg

So from my point of view it looks like the exporter takes the mesh, devides it by the scale (170 units / 0.01 = 17000 unit mesh) and then the animation size is multiplicated by the scale, resulting in its original size.

I also took the file and changed the metric to 2.0, now the base mesh is half the size but the animation is, again, correctly scaled only this time not flying but clipping through the floor which the preview player automaticly tries to correct (so its not really visible in the screenshot but you can see it in the browser window of unreal engine i added):

Mesh:
OldScaleMetric2_Mesh.jpg

Anim:
OldScaleMetric2_Anim.jpg

Browser:
OldScaleMetric2_Browser.jpg

Hi there, I just wanted to post strange scalation-errors in blender since the experimental merge but found this ticket, so im posting my tests here (please note it was tested with the nightly build 2.72-f7957e2 ) I used my old blend-file from #42110 as a starting point (set to metric 0.01): Blend: [Mesh-RotationErrorAnim.blend](https://archive.blender.org/developer/F115982/Mesh-RotationErrorAnim.blend) FBX: [Export_Scale_OldScale.fbx](https://archive.blender.org/developer/F115993/Export_Scale_OldScale.fbx) With this, now the mesh in UE4 comes out as a giant: ![OldScale_Mesh.jpg](https://archive.blender.org/developer/F115983/OldScale_Mesh.jpg) but the animation is "correctly" scaled, while now hovering above the ground: From the same view as above: ![OldScale_AnimA.jpg](https://archive.blender.org/developer/F115985/OldScale_AnimA.jpg) zoomed in, revealing it is still same sized and now flying: ![OldScale_AnimB.jpg](https://archive.blender.org/developer/F115986/OldScale_AnimB.jpg) So the next thing i tried was to scale the mesh down to 1/100 of its size and changed the metric scale in blender from 0.01 to 1.000 (file: [Mesh-RotationErrorAnim_Scaled.blend](https://archive.blender.org/developer/F115992/Mesh-RotationErrorAnim_Scaled.blend) ) [Export_Scale_NewScale.fbx](https://archive.blender.org/developer/F115994/Export_Scale_NewScale.fbx) Now the results are funny, because now the mesh and the animation are super tiny but the same size: Mesh: ![NewScale_Mesh.jpg](https://archive.blender.org/developer/F115995/NewScale_Mesh.jpg) Animation: ![NewScale_Anim.jpg](https://archive.blender.org/developer/F115997/NewScale_Anim.jpg) So i think that the export for the mesh-size and the animation-size are somehow differently hooked. So now i took the original file (the upper one, not scalled) and only changed the metric scale of blender from 0.01 to 1.00 and now the resulted FBX has the correct size: ![OldScaleChangedMetric_Mesh.jpg](https://archive.blender.org/developer/F115999/OldScaleChangedMetric_Mesh.jpg) ![OldScaleChangedMetric_Anim.jpg](https://archive.blender.org/developer/F116000/OldScaleChangedMetric_Anim.jpg) So from my point of view it looks like the exporter takes the mesh, devides it by the scale (170 units / 0.01 = 17000 unit mesh) and then the animation size is multiplicated by the scale, resulting in its original size. I also took the file and changed the metric to 2.0, now the base mesh is half the size but the animation is, again, correctly scaled only this time not flying but clipping through the floor which the preview player automaticly tries to correct (so its not really visible in the screenshot but you can see it in the browser window of unreal engine i added): Mesh: ![OldScaleMetric2_Mesh.jpg](https://archive.blender.org/developer/F116004/OldScaleMetric2_Mesh.jpg) Anim: ![OldScaleMetric2_Anim.jpg](https://archive.blender.org/developer/F116006/OldScaleMetric2_Anim.jpg) Browser: ![OldScaleMetric2_Browser.jpg](https://archive.blender.org/developer/F116008/OldScaleMetric2_Browser.jpg)

Added subscriber: @DanielCoy

Added subscriber: @DanielCoy

running into the same issue

I have a model imported from make human and shows up at 1.67 meters
I have units set to metric and scale set 0.01

I am exporting as fbx from blender trunk updated from git yesterday (17th Feb 2015).
On Kubuntu 14.04

I am importing the FBX into Unreal Editor 4 from trunk (17th Feb 2015).

Static models and armatures are coming in correctly scaled, as soon as I apply an animation the whole setup shrinks to 1/100th of it's size. My conclusion is that the animation export is ignoring the global scale setting (or the export scale setting).

adding the scaling factor to fbx_animations_do seemed did seem to sort out the scaling issue but I am left with another issue I am not sure how to deal with.

From what I can tell the vertices are being bound to the bones about 100 times closer than they should be
It seems something else needs to be scaled but not sure what.

example of secondary issue

running into the same issue I have a model imported from make human and shows up at 1.67 meters I have units set to metric and scale set 0.01 I am exporting as fbx from blender trunk updated from git yesterday (17th Feb 2015). On Kubuntu 14.04 I am importing the FBX into Unreal Editor 4 from trunk (17th Feb 2015). Static models and armatures are coming in correctly scaled, as soon as I apply an animation the whole setup shrinks to 1/100th of it's size. My conclusion is that the animation export is ignoring the global scale setting (or the export scale setting). adding the scaling factor to fbx_animations_do seemed did seem to sort out the scaling issue but I am left with another issue I am not sure how to deal with. From what I can tell the vertices are being bound to the bones about 100 times closer than they should be It seems something else needs to be scaled but not sure what. [example of secondary issue ](fbx_animations_do)
[sorry actual link to screenshot of issue ](http://imgur.com/14K8OKn)

Added subscriber: @DBAGibbz

Added subscriber: @DBAGibbz

I have noticed that the "Forward" and "Up" settings also do not work with the armature, only the mesh, so the animations are coming in facing the wrong direction...

I have noticed that the "Forward" and "Up" settings also do not work with the armature, only the mesh, so the animations are coming in facing the wrong direction...

Ok, ive included some test file for this issue, and im happy to help out with 3ds max files etc if need be.

First this bug is for the scale issue, so ive done a sample file.

In the zip i have some files:

TestFile.blend

  • this is the file as the artist would create it. So use the file when working on this bug. To export, use the default fbx exporter settings, but change Scale to 100

TestFile.fbx

  • as above i have already exported scale at 100 using 2.74rc2

TestPreScaled.blend

  • this is the same as the file above, except i have manually scaled the armature object 100x, and applied the scale to the object.

TestPreScaled.fbx

  • exported with stock settings, scale 1 as i have scaled in blender. This is what the first example should aim to be like scale wise

scale difference.jpeg
This shows the different files in unreal engine 4. The thumbnail shows the scale difference. The one on the right is the correct scale which is the pre scaled file. The one on the left is the testfile, clearly showing the scale setting not working.

Best to test in unreal engine 4(which is free), as ive found some of the fbx viewers you cant tell scale...

FBXScale.zip

Ok, ive included some test file for this issue, and im happy to help out with 3ds max files etc if need be. First this bug is for the scale issue, so ive done a sample file. In the zip i have some files: TestFile.blend - this is the file as the artist would create it. So use the file when working on this bug. To export, use the default fbx exporter settings, but **change Scale to 100** TestFile.fbx - as above i have already exported scale at 100 using 2.74rc2 TestPreScaled.blend - this is the same as the file above, except i have manually scaled the armature object 100x, and applied the scale to the object. TestPreScaled.fbx - exported with stock settings, scale 1 as i have scaled in blender. **This is what the first example should aim to be like scale wise** scale difference.jpeg This shows the different files in unreal engine 4. The thumbnail shows the scale difference. The one on the right is the correct scale which is the pre scaled file. The one on the left is the testfile, clearly showing the scale setting not working. Best to test in unreal engine 4(which is free), as ive found some of the fbx viewers you cant tell scale... [FBXScale.zip](https://archive.blender.org/developer/F152934/FBXScale.zip)

Ok, ive done some more experimenting with 3ds max. Ive put together the same scene in 3ds max to see if it will help you.

So this all works great in ue4. But ive noticed with the blender files, when viewing them in the free autodesk fbx viewer that the scale of the blender versions are much bigger. But in unreal one matches, and one is to small (as per the bug).

Ill include another file, which has a 3ds max version
FBXScale.zip

Ok, ive done some more experimenting with 3ds max. Ive put together the same scene in 3ds max to see if it will help you. So this all works great in ue4. But ive noticed with the blender files, when viewing them in the free autodesk fbx viewer that the scale of the blender versions are much bigger. But in unreal one matches, and one is to small (as per the bug). Ill include another file, which has a 3ds max version [FBXScale.zip](https://archive.blender.org/developer/F152978/FBXScale.zip)

Ok ive also just noticed a difference in the behavior between the way 3ds max imports fbx and blender if its any help:

  1. blender imports the object, then applies what looks like the scale value from the exporter to each object.

  2. when 3ds max imports the object, it has only the default scale applied
    so re-importing the exported object comes back in the right size

the max importer gives these statistics:

File Name: MaxDirections.FBX
File Directory: C:\Users\Bronson\Desktop\FBXScale
File Version: 7.4.0
File Creator: FBX SDK/FBX Plugins version 2015.0
File Custom Writer: No
File Creation Time: 2015/3/19 12:13:15
File Axis Direction: Z-up
File Units: Centimeters
System Axis Direction: Z-up
System Units: Inches
System frame rate: 30.0
File frame rate: 30.0
File content: 4 Elements

And for the blender version:
File Name: Directions.fbx
File Directory: C:\Users\Bronson\Desktop\FBXScale
File Version: 7.4.0
File Creator: Blender (stable FBX IO) - 2.74 (sub 0)
File Custom Writer: No
File Creation Time: 2015/3/19 12:7:36
File Axis Direction: Z-up
File Units: Meters
System Axis Direction: Z-up
System Units: Inches
System frame rate: 30.0 Warning: Frame rates do not match
File frame rate: 24.0
File content: 4 Elements

So i think its realizing what units the fbx format is in and adjusting it to the scene.
So exposing a way to set what units we are working in may also be useful (unreal engine is in cm)...

Ok ive also just noticed a difference in the behavior between the way 3ds max imports fbx and blender if its any help: 1. blender imports the object, then applies what looks like the scale value from the exporter to each object. 2. when 3ds max imports the object, it has only the default scale applied so re-importing the exported object comes back in the right size the max importer gives these statistics: File Name: MaxDirections.FBX File Directory: C:\Users\Bronson\Desktop\FBXScale File Version: 7.4.0 File Creator: FBX SDK/FBX Plugins version 2015.0 File Custom Writer: No File Creation Time: 2015/3/19 12:13:15 File Axis Direction: Z-up File Units: Centimeters System Axis Direction: Z-up System Units: Inches System frame rate: 30.0 File frame rate: 30.0 File content: 4 Elements And for the blender version: File Name: Directions.fbx File Directory: C:\Users\Bronson\Desktop\FBXScale File Version: 7.4.0 File Creator: Blender (stable FBX IO) - 2.74 (sub 0) File Custom Writer: No File Creation Time: 2015/3/19 12:7:36 File Axis Direction: Z-up File Units: Meters System Axis Direction: Z-up System Units: Inches System frame rate: 30.0 ***Warning: Frame rates do not match*** File frame rate: 24.0 File content: 4 Elements So i think its realizing what units the fbx format is in and adjusting it to the scene. So exposing a way to set what units we are working in may also be useful (unreal engine is in cm)...

Added subscriber: @72u34h23d8f

Added subscriber: @72u34h23d8f

Added subscriber: @Cancer-2

Added subscriber: @Cancer-2

I wanted to leave a note for the Developers on this subject.

Currently, it doesn't seem as if Blender's .FBX Importer and Exporters are following the individual version standards of the .FBX format.

Basically, the FBX format changes with each iteration. It isn't just bug fixes and new features tacked on, the format itself is different from release to release. For example, Unreal Engine 4 specifically is using the 2014.2.1 version of the .FBX standard. In many other 3D Packages, there is an option inside of the .fbx importers and exporters to select which version of the standard you want to use to handle the file.

UE4's official Documentation specifically states "The UE4 FBX import pipeline uses FBX 2014. Using a different version during export may result in incompatibilities." And I read a comment on their forums from their devs that specifically mentioned it's the 2014.2.1 release, though feel free to triple check that.

This is important because in the future if changes are made to make Blender's .FBX format more compatible with the newest .FBX 2015+, etc., you will possibly break some compatibility with 2014 .FBX files which is it's own separate standard, albeit I'm sure very similar. Aka, fixing something for Unreal 4 users might break something for Unity users, etc..

I think once this distinction between .FBX versions is part of the options of Blender's importers/exporters, that a version/preset that properly targets 2014.2.1 successfully will resolve most of the issues UE4 users are having.

Blender to (and from) UE4 is far from perfect at this moment, but I've found a myriad of work-arounds and tricks to get most things working well enough for now so I am happy, but I hope the concern, time, availability and funding is there to continue on this. Please let me know if there is anything at all that I can do. I will be making a donation to the foundation shortly, thank you for the great work, this is all very amazing, even as is, ty.

I wanted to leave a note for the Developers on this subject. Currently, it doesn't seem as if Blender's .FBX Importer and Exporters are following the individual version standards of the .FBX format. Basically, the FBX format changes with each iteration. It isn't just bug fixes and new features tacked on, the format itself is different from release to release. For example, Unreal Engine 4 specifically is using the 2014.2.1 version of the .FBX standard. In many other 3D Packages, there is an option inside of the .fbx importers and exporters to select which version of the standard you want to use to handle the file. UE4's official Documentation specifically states "The UE4 FBX import pipeline uses FBX 2014. Using a different version during export may result in incompatibilities." And I read a comment on their forums from their devs that specifically mentioned it's the 2014.2.1 release, though feel free to triple check that. This is important because in the future if changes are made to make Blender's .FBX format more compatible with the newest .FBX 2015+, etc., you will possibly break some compatibility with 2014 .FBX files which is it's own separate standard, albeit I'm sure very similar. Aka, fixing something for Unreal 4 users might break something for Unity users, etc.. I think once this distinction between .FBX versions is part of the options of Blender's importers/exporters, that a version/preset that properly targets 2014.2.1 successfully will resolve most of the issues UE4 users are having. Blender to (and from) UE4 is far from perfect at this moment, but I've found a myriad of work-arounds and tricks to get most things working well enough for now so I am happy, but I hope the concern, time, availability and funding is there to continue on this. Please let me know if there is anything at all that I can do. I will be making a donation to the foundation shortly, thank you for the great work, this is all very amazing, even as is, ty.

Added subscriber: @rimau

Added subscriber: @rimau

@Cancer-2 this is BS from UE4, FBX format did not (really) change that much since 7.3 at least (FBX 2013), afaik. And anyway, they are using official SDK, which key feature is to be able to read/convert any FBX version…

Aside from that, @rimau found a very nice piece of info in #41719:

I can confirm one thing: the bones that are causing problems are the bones with rotation values at 0, but they are transformed by the animation of parent bones. Like Positivity found out in some other thread, applying any rotation (even the slightest one) directly to the corrupted bone, solves the problem.He tested out my .blend file, I did test it again afterwards, and it works. So the problem is somehow connected to the transformations of the bones that are having zero values in themselfs, but are animated due to the parent bones transforation.

I could confirm that, and this behavior makes absolutely no sense to me… Would be nice though if you could check your problematic files and see whether, ensuring all your bones are slightly rotated compared to rest pose (even 0.1° is enough), issue get 'fixed' with UE4?

@Cancer-2 this is BS from UE4, FBX format did not (really) change that much since 7.3 at least (FBX 2013), afaik. And anyway, they are using official SDK, which key feature is to be able to read/convert any FBX version… Aside from that, @rimau found a very nice piece of info in #41719: > I can confirm one thing: the bones that are causing problems are the bones with rotation values at 0, but they are transformed by the animation of parent bones. Like Positivity found out in some other thread, applying any rotation (even the slightest one) directly to the corrupted bone, solves the problem.He tested out my .blend file, I did test it again afterwards, and it works. So the problem is somehow connected to the transformations of the bones that are having zero values in themselfs, but are animated due to the parent bones transforation. I could confirm that, and this behavior makes **absolutely** no sense to me… Would be nice though if you could check your problematic files and see whether, ensuring all your bones are slightly rotated compared to rest pose (even 0.1° is enough), issue get 'fixed' with UE4?

Hey guys, I forced a new build on our buildbot, which shall have the fix for #41719, please check your problematic files and report here the results (dreaming that it solves everything would be insane, but since FBX itself is insane…).

Hey guys, I forced a new build on [our buildbot](https://builder.blender.org/download), which shall have the fix for #41719, please check your problematic files and report here the results (dreaming that it solves everything would be insane, but since FBX itself is insane…).
Author

This still isn't working, I'm afraid, but the behaviour is slightly different. I have a hierarchy where the armature is the parent of the mesh (obviously). I start with a situation where the armature has a scale of 0.01 and that makes it the normal size for Blender. If I export this as FBX with scale 100, everything works.

If I apply the scale on the armature, and do the same export, Unreal ends up with a very small mesh that appears to be floating a long way above the ground. If I play an animation, the mesh is thrown around all over the place, perhaps because the scale of the animation would be correct if the mesh were the correct size.

Applying the scale on the mesh doesn't change anything.

This still isn't working, I'm afraid, but the behaviour is slightly different. I have a hierarchy where the armature is the parent of the mesh (obviously). I start with a situation where the armature has a scale of 0.01 and that makes it the normal size for Blender. If I export this as FBX with scale 100, everything works. If I apply the scale on the armature, and do the same export, Unreal ends up with a very small mesh that appears to be floating a long way above the ground. If I play an animation, the mesh is thrown around all over the place, perhaps because the scale of the animation would be correct if the mesh were the correct size. Applying the scale on the mesh doesn't change anything.

Added subscriber: @mont29

Added subscriber: @mont29

In #41605#297680, @mont29 wrote:
@Cancer-2 this is BS from UE4, FBX format did not (really) change that much since 7.3 at least (FBX 2013), afaik. And anyway, they are using official SDK, which key feature is to be able to read/convert any FBX version…

It's all good Mont. The exporter as is has me 95+% of the way there after learning some tricks and quirks and it's getting better every day, it gets me where I need to go in the end. Just for leanings sake, I might try to compile the official .FBX SDK as a separate plug-in for Blender in the next few months. (I'm sure it's a lot harder than it sounds, and it sounds difficult, but I think I'd learn a ton) Either way, I wait patiently for your regular updates to the fully FOSS version of .FBX compatibility, I can't thank you enough. Cheers good sir.

> In #41605#297680, @mont29 wrote: > @Cancer-2 this is BS from UE4, FBX format did not (really) change that much since 7.3 at least (FBX 2013), afaik. And anyway, they are using official SDK, which key feature is to be able to read/convert any FBX version… > It's all good Mont. The exporter as is has me 95+% of the way there after learning some tricks and quirks and it's getting better every day, it gets me where I need to go in the end. Just for leanings sake, I might try to compile the official .FBX SDK as a separate plug-in for Blender in the next few months. (I'm sure it's a lot harder than it sounds, and it sounds difficult, but I think I'd learn a ton) Either way, I wait patiently for your regular updates to the fully FOSS version of .FBX compatibility, I can't thank you enough. Cheers good sir.

Here's a sample of the same problem originally posted as a bug here, it's still an active issue. Tried using the newest official release as well as the most recent nightly build as of this posting.

(The only solution, that I can find, is to re-build the scene completely from scratch and at the correct scale from the beginning - that means I can export FBX setting scale 1, then there are no problems) Trying to export items that have a non-1 scale value in blender, AND / OR using the FBX exporters scale functionality, lead to the same/similar problems > the Item looks fine when first imported to UE4 and put into a level so long as animation isn't playing, but once you try to play it's accompanying animation, it is scaled HUGE.

Again, I stress, that the only solution I can currently find, is to re-build the scene from scratch, and I mean, from scratch, as trying to scale up in Blender, and using apply transforms function in advance (on the armature and object and animations), just leads to other seemingly un-workable problems.... So, make sure the object is scale 1 in blender, and the armature is scale 1 in blender BEFORE rigging/animation, because apply transform techniques on the armature and or object after rigging/animating lead to other problems upon export (for me).

(again the current work-around is to not work in blender at scales that are not 1, and do not use the exporters scale funcationality, as both lead to problems) of coarse, these limitations, further bottleneck the already extremely rigid pipe-line between UE4 and Blender. Do not use, apply transform on armatures/bones, instead build them at the correct scale, before export, and set the exporter scale at 1:1 (do your measurements 1st or face re-doing all of your rigging/animation work in the current state of things)

sorry to repeat myself 50x but the post is very confusing if I don't

this file was built to be exported at FBX 100 scale. it doesn't work. I also have no luck scaling up the object/armature to 100 in blender and applying transforms and exporting at FBX 1 scale. You can try both and see if there is a fix.

REDO.blend

Please load that into Blender, export it as .FBX (setting scale 100), load it into Unreal, drop the object in the level (it's tiny scrap of paper that would fit into a characters hand, but that is the desired size), with the object still selected, open the level blueprint, right click the graph, create a link to the selected object from the menu, add/link a play animation node, select the imported animation, link that node up to event begin play and set the animation to loop if you like. Compile and play test the level, and you will see that a very small object has become 100 to 1000x it's original size when animation is attached and playing.


I'm beginning to think, that because UE4's source code is open to modify/add to, that it might be more effective to write a plug-in for UE4 that allows importing/exporting .blend files or something along those lines.

Here's a sample of the same problem originally posted as a bug here, it's still an active issue. Tried using the newest official release as well as the most recent nightly build as of this posting. (The only solution, that I can find, is to re-build the scene completely from scratch and at the correct scale from the beginning - that means I can export FBX setting scale 1, then there are no problems) Trying to export items that have a non-1 scale value in blender, AND / OR using the FBX exporters scale functionality, lead to the same/similar problems > the Item looks fine when first imported to UE4 and put into a level so long as animation isn't playing, but once you try to play it's accompanying animation, it is scaled HUGE. Again, I stress, that the only solution I can currently find, is to re-build the scene from scratch, and I mean, from scratch, as trying to scale up in Blender, and using apply transforms function in advance (on the armature and object and animations), just leads to other seemingly un-workable problems.... So, make sure the object is scale 1 in blender, and the armature is scale 1 in blender BEFORE rigging/animation, because apply transform techniques on the armature and or object after rigging/animating lead to other problems upon export (for me). (again the current work-around is to not work in blender at scales that are not 1, and do not use the exporters scale funcationality, as both lead to problems) of coarse, these limitations, further bottleneck the already extremely rigid pipe-line between UE4 and Blender. Do not use, apply transform on armatures/bones, instead build them at the correct scale, before export, and set the exporter scale at 1:1 (do your measurements 1st or face re-doing all of your rigging/animation work in the current state of things) sorry to repeat myself 50x but the post is very confusing if I don't ----------------------------------------------------------------------------------------------------- this file was built to be exported at FBX 100 scale. it doesn't work. I also have no luck scaling up the object/armature to 100 in blender and applying transforms and exporting at FBX 1 scale. You can try both and see if there is a fix. [REDO.blend](https://archive.blender.org/developer/F169651/REDO.blend) Please load that into Blender, export it as .FBX (setting scale 100), load it into Unreal, drop the object in the level (it's tiny scrap of paper that would fit into a characters hand, but that is the desired size), with the object still selected, open the level blueprint, right click the graph, create a link to the selected object from the menu, add/link a play animation node, select the imported animation, link that node up to event begin play and set the animation to loop if you like. Compile and play test the level, and you will see that a very small object has become 100 to 1000x it's original size when animation is attached and playing. -------------------------------------------------------------------- I'm beginning to think, that because UE4's source code is open to modify/add to, that it might be more effective to write a plug-in for UE4 that allows importing/exporting .blend files or something along those lines.

Added subscriber: @ucupumar

Added subscriber: @ucupumar

Added subscribers: @Rays-Lv, @JoshuaLeung

Added subscribers: @Rays-Lv, @JoshuaLeung

Those are the same issues actually…

I spent whole day using file from #44424 (FBX_scale_bug.blend and maya_scale_10.fbx). With latest code Blender's FBX export (nearly) the same thing as maya, and yet, that scaling bug remain… makes no sense, as usual…

Can someone confirm me that this bug does not happen with Unity? Or does it?

Also, this example file remain rather heavy to investigate, could someone make similar one, but with only a cube and a single bone? I need the .blend file, and its equivalent exported from latest Maya (or Max), with some FBX export scaling…

Those are the same issues actually… I spent whole day using file from #44424 ([FBX_scale_bug.blend](https://archive.blender.org/developer/F163874/FBX_scale_bug.blend) and [maya_scale_10.fbx](https://archive.blender.org/developer/F163909/maya_scale_10.fbx)). With latest code Blender's FBX export (nearly) the same thing as maya, and yet, that scaling bug remain… makes no sense, as usual… Can someone confirm me that this bug **does not** happen with Unity? Or does it? Also, this example file remain rather heavy to investigate, could someone make similar one, but with only a cube and a single bone? I need the .blend file, and its equivalent exported from latest Maya (or Max), with some FBX export scaling…
Author

I can see why you need that file, but unfortunately I don't have access to Maya or Max so I can't make it for you. Is there anyone here who has access to one of those products in addition to Blender?

I can see why you need that file, but unfortunately I don't have access to Maya or Max so I can't make it for you. Is there anyone here who has access to one of those products in addition to Blender?

My file above (found here https://developer.blender.org/F152978)
Should have everything you need, a simple case.
If theres anything else specific you need changed, let me know.

Cheers

My file above (found here https://developer.blender.org/F152978) Should have everything you need, a simple case. If theres anything else specific you need changed, let me know. Cheers

This issue was referenced by f30fc86ab5

This issue was referenced by f30fc86ab552f193b891bbb68317b0c123e73b75

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @SiTmOsNoED

Added subscriber: @SiTmOsNoED

I have the same thing happen in my project. It only happens after I cycles render materials. Prior to that my fbx is made just fine.

Here is error: Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\__init__.py", line 583, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3039, in save
  ret = save_single(operator, context.scene, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2949, in save_single
  fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2764, in fbx_objects_elements
  fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1127, in fbx_data_mesh_elements
  def_mat = blmats_to_fbxmats_idxs[0]

IndexError: list index out of range

location: :-1

I was using Cycles render to texture because I'm new and can't figure out how under blender render to get my textures to show up(no matter how many times I unwrap or what view I'm in). Prob cause I'm new to this. I thought at first it would be because my array wasn't applied but no I found this error only occurred when exporting fbx AFTER I had cycle rendered materials.

I have the same thing happen in my project. It only happens after I cycles render materials. Prior to that my fbx is made just fine. Here is error: Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\__init__.py", line 583, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3039, in save ret = save_single(operator, context.scene, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2949, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2764, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1127, in fbx_data_mesh_elements def_mat = blmats_to_fbxmats_idxs[0] ``` IndexError: list index out of range location: <unknown location>:-1 I was using Cycles render to texture because I'm new and can't figure out how under blender render to get my textures to show up(no matter how many times I unwrap or what view I'm in). Prob cause I'm new to this. I thought at first it would be because my array wasn't applied but no I found this error only occurred when exporting fbx AFTER I had cycle rendered materials.

@SiTmOsNoED this sounds like totally different issue, please make new report (with file and steps to reproduce the bug).

@SiTmOsNoED this sounds like totally different issue, please make new report (with file and steps to reproduce the bug).
Sign in to join this conversation.
No Milestone
No project
No Assignees
10 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#41605
No description provided.