FBX I/O Imports and exports objects with wrong scale transform #70161

Open
opened 2019-09-22 11:31:31 +02:00 by Ludvik Koutny · 15 comments

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.70

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: blender/blender@f6cb5f5449
Worked: (optional)

Short description of error
Blender's FBX exporter and importer consistently exports and imports objects with wrong scale transform:

  1. Whenever Blender imports any FBX from any non-Blender FBX supporting software, many objects have the scale transforms imported at 0.01
  2. Whenever Blender exports FBX to any non-Blender FBX supporting software, the objects come in scaled at 100.0 parented under a root node scaled at 0.01.

This is despite the fact that all the objects had scale at 1.0 when imported or exported. The experimental apply transform checkbox does solve the issue to some extends, but will always break any hierarchy that's deeper than one level, and will break any skeletal skinning. The experimental apply transform checkbox is also wrong, and misleading, implying that the option will apply/collapse any irregular transformations. This is not the case when exporting scene where all the scale transformations are at 1.0, so it makes no sense that the checkbox has actually any effect, if the scale transformations are uniform and already applied at 1.0 prior to export.

The scale parameter slider (defaulting at 1.0) is also not helpful, as modifying it in any way changes the actual physical scale of the imported objects to be non matching of the original scene scale. Any value other than 1.0 will results in imported scene being either larger or smaller than they should be.

This issue makes it very difficult for Blender to interoperate with Unreal Engine 4.

Exact steps for others to reproduce the error

  1. Import any FBX file exported from any standard non-Blender 3D app, which had scale transforms at 1.0 (100%) when exported

  2. Notice most objects have transforms imported at 0.01

  3. Export FBX from Blender to any standard non-Blender 3D app, and make sure all the objects have uniform default scale of 1.0

  4. Observe that the imported objects in target application have non-default scale, usually 100.0 or 10000%, depending on how the destination application displays scale

Result: Blender's FBX I/O consistently both imports and exports wrongly scaled objects

Expected Blender's FBX I/O consistently imports and exports correctly scaled objects, without necessity to anyhow "apply transforms", breaking rigs and hierarchies in the process.

**System Information** Operating system: Windows-10-10.0.18362 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.70 **Blender Version** Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: `blender/blender@f6cb5f5449` Worked: (optional) **Short description of error** Blender's FBX exporter and importer consistently exports and imports objects with wrong scale transform: 1. Whenever Blender imports **any** FBX from any non-Blender FBX supporting software, many objects have the scale transforms imported at 0.01 2. Whenever Blender exports FBX to **any** non-Blender FBX supporting software, the objects come in scaled at 100.0 parented under a root node scaled at 0.01. This is despite the fact that all the objects had scale at 1.0 when imported or exported. The experimental apply transform checkbox does solve the issue to some extends, but will always break any hierarchy that's deeper than one level, and will break any skeletal skinning. The experimental apply transform checkbox is also wrong, and misleading, implying that the option will apply/collapse any irregular transformations. This is not the case when exporting scene where all the scale transformations are at 1.0, so it makes no sense that the checkbox has actually any effect, if the scale transformations are uniform and already applied at 1.0 prior to export. The scale parameter slider (defaulting at 1.0) is also not helpful, as modifying it in any way changes the actual physical scale of the imported objects to be non matching of the original scene scale. Any value other than 1.0 will results in imported scene being either larger or smaller than they should be. This issue makes it very difficult for Blender to interoperate with Unreal Engine 4. **Exact steps for others to reproduce the error** 1. Import any FBX file exported from any standard non-Blender 3D app, which had scale transforms at 1.0 (100%) when exported 2. Notice most objects have transforms imported at 0.01 1. Export FBX from Blender to any standard non-Blender 3D app, and make sure all the objects have uniform default scale of 1.0 2. Observe that the imported objects in target application have non-default scale, usually 100.0 or 10000%, depending on how the destination application displays scale Result: Blender's FBX I/O consistently both imports and exports wrongly scaled objects Expected Blender's FBX I/O consistently imports and exports correctly scaled objects, without necessity to anyhow "apply transforms", breaking rigs and hierarchies in the process.
Author

Added subscriber: @Rawalanche

Added subscriber: @Rawalanche

#79265 was marked as duplicate of this issue

#79265 was marked as duplicate of this issue
Ludvik Koutny changed title from FBX I/O Imports and exports objects in wrong scale to FBX I/O Imports and exports objects with wrong scale transform 2019-09-22 11:36:08 +02:00

Added subscriber: @gnawli

Added subscriber: @gnawli

I have this problem as well, except for the fact that blender does this to a random mesh that's animated:
https://developer.blender.org/T70340

I have this problem as well, except for the fact that blender does this to a random mesh that's animated: https://developer.blender.org/T70340

Added subscriber: @DougRichardson

Added subscriber: @DougRichardson

An example of scaling being wrong is if you have an empty in the scene that you export. Blender sets the FBX Local Scaling of empties to 100. Doing a unit conversion only makes sense if lengths are being converted. If a unit-less multiplier is being used, it should not be scaled.

That said, it isn't clear to me how Blender can distinguish between unit and unitless values to decide what it should apply the FBX scaling factor to, though perhaps it should only apply the scaling factor to renderable objects like meshes.

An example of scaling being wrong is if you have an empty in the scene that you export. Blender sets the FBX Local Scaling of empties to 100. Doing a unit conversion only makes sense if lengths are being converted. If a unit-less multiplier is being used, it should not be scaled. That said, it isn't clear to me how Blender can distinguish between unit and unitless values to decide what it should apply the FBX scaling factor to, though perhaps it should only apply the scaling factor to renderable objects like meshes.
Author

This is still a giant issue making FBX export of animated meshes totally incompatible with Unreal Engine 4. Any export of skeletal mesh (mesh with animation) will export the mesh scaled at 100x the default size. This initially seems working in the engine but as soon as one wants to use sockets in UE4, anything parented under those sockets inherits the wrong scale and is suddenly scaled 100x. No other software which exports FBX to UE4 does this.

This is still a giant issue making FBX export of animated meshes totally incompatible with Unreal Engine 4. Any export of skeletal mesh (mesh with animation) will export the mesh scaled at 100x the default size. This initially seems working in the engine but as soon as one wants to use sockets in UE4, anything parented under those sockets inherits the wrong scale and is suddenly scaled 100x. No other software which exports FBX to UE4 does this.

Added subscribers: @Astar_SPB, @mano-wii, @mont29

Added subscribers: @Astar_SPB, @mano-wii, @mont29

Added subscriber: @sbaranov

Added subscriber: @sbaranov

Added subscriber: @nooneswork

Added subscriber: @nooneswork

Added subscriber: @Jaxxtrend

Added subscriber: @Jaxxtrend
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @MatBrady

Added subscriber: @MatBrady

I discovered something about the scaling issue. Even though Blender can display a rig at 1.0 scale, (with the scale having been applied) it can be a false 1.0 scale, because the FBX Exporter will be reading something different and export the same rig but at a scale that the Exporter is reading (where ever that info is. From I don't know where). That's why the scale issue was happening with me.
I experimented and found a solution (which I posted here: https://blender.stackexchange.com/questions/265519/fbx-export-scaling-issue-into-unity-solution ).
Essentially, I proved that applying a scale through normal means is not enough for the FBX Exporter, and to solve this I needed to make this rig (which had the false 1.0 scale) a Child Of an empty (using the Child Of constraint) knowing that the empty will have by default a true 1.0 scale.
I could then export the rig at the correct scale (adopting the Empty's true 1.0 scale).
I then applied the Child Of constraint, transferring the true 1.0 scale from the empty to the rig, and could then safely delete the empty.
This is a work-around, but it's also proof that the FBX Exporter is reading different info to what Blender is displaying.
I hope that helps.

I discovered something about the scaling issue. Even though Blender can display a rig at 1.0 scale, (with the scale having been applied) it can be a false 1.0 scale, because the FBX Exporter will be reading something different and export the same rig but at a scale that the Exporter is reading (where ever that info is. From I don't know where). That's why the scale issue was happening with me. I experimented and found a solution (which I posted here: https://blender.stackexchange.com/questions/265519/fbx-export-scaling-issue-into-unity-solution ). Essentially, I proved that applying a scale through normal means is not enough for the FBX Exporter, and to solve this I needed to make this rig (which had the false 1.0 scale) a Child Of an empty (using the Child Of constraint) knowing that the empty will have by default a true 1.0 scale. I could then export the rig at the correct scale (adopting the Empty's true 1.0 scale). I then applied the Child Of constraint, transferring the true 1.0 scale from the empty to the rig, and could then safely delete the empty. This is a work-around, but it's also proof that the FBX Exporter is reading different info to what Blender is displaying. I hope that helps.

@MatBrady It is interesting that your link above has been removed by the moderators, obviously someone doesn't want this to be fixed.

However, I found a very simple solution that seems to import/export fbx at scale 1.0 both in object space and pose space. Just use cm for the blender unit scale, that is, scene properties > units > unit scale = 0.01.

p.s. Another way is to apply all transforms, which will not scale the animation. Then go to the graph editor and scale all translations. Usually for human mocaps the only bones which translate are root and hip, so only a few channels are involved.

@MatBrady It is interesting that your link above has been removed by the moderators, obviously someone doesn't want this to be fixed. However, I found a very simple solution that seems to import/export fbx at scale 1.0 both in object space and pose space. Just use cm for the blender unit scale, that is, scene properties > units > unit scale = 0.01. **p.s.** Another way is to apply all transforms, which will not scale the animation. Then go to the graph editor and scale all translations. Usually for human mocaps the only bones which translate are root and hip, so only a few channels are involved.
Sign in to join this conversation.
No Milestone
No project
No Assignees
11 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#70161
No description provided.