UE4 - Blender FBX Export to Unreal Engine 4 Bone Translation Error. #41719
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#41719
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system and graphics card
OS :Windows 7 Professional 64 Bit. Service Pack 1.
GPU: ASUS Nvidia Geforce GTX 780Ti. Driver Version 9.18.13.3788
Blender Version
Broken: 2.71.6
Worked: (optional)
Short description of error
A spaceship model with animated parts made in Blender. With two animations. A canopy open animation and a landing gear down animation.
Both animations work absolutely fine inside Blender. However when exported as an FBX file and imported into Unreal Engine 4 version 4.4.1 or 4.2
the result is that some of the bones in the Armature have been moved. It looks as though they have been snapped to their parent.
This does not make any sense because I am using the exact same Mesh and Skeleton which has not been changed at all, but that worked
fine when exported with Blender Version 2.70, with its version of the FBX Exporter and imported into Unreal Engine 4.2 But now that I use that
same Blend File with Blender 2.71.6, I get bone translation errors inside Unreal Engine 4.
Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps
We also need to add a Sun Roof Mover mesh inside the Mesh Object to move the Sun Roof. So inside the Mesh Object we have three unconnected Meshes,
Car Body, Sun Roof Slider and Sun Roof.
at the exact same location as Root and name it "Car Body". Create another bone and move it to a location just behind the Sun Roof and name it
"Sun Roof Mover." Make another bone and move it to the approximate centre of the Sun Roof and name it "Sun Roof Rotator." We now have 4 bones.
by 100 - S, 100, Enter.
Assign all the Vertices of the Sun Roof to the Vertice Group "Sun Roof Rotator".
Select the Bone "Run Roof Slider" and move it along the Y Axis 3 Blender Units. The Sun Roof Slider and the Sun Roof itself will be moved because the
Sun Roof Rotator is parent to the Sun Roof Slider. Select All Bones and insert key frames Location and Rotation. Move the Timeline to Frame 80 and
select the bone Sun Roof Rotator. Rotate it 45o and select all Bones. Insert Location Rotation.
I don't know why. Please help!
So as an example of this error I include two Blend files.
similar in design to the Sun Roof animation on the car. This Skeletal Mesh also has the same errors inside UE4, that of incorrectly translated bones.
I hope that you guys at Blender Foundation can figure out what is going wrong here and help to fix it. Thanks so much!
Yours faithfully,
Russell Morahan
BlendertoUE4_CarSunRoof_ForBugReport.blend
Delta32toUE4_NewFileDebug_01.blend
Changed status to: 'Open'
Added subscriber: @DyotoOrion
#44083 was marked as duplicate of this issue
#42377 was marked as duplicate of this issue
#40947 was marked as duplicate of this issue
#43593 was marked as duplicate of this issue
blender/blender#44010 was marked as duplicate of this issue
Thanks for the report, we know our armature code is not quite right currently, and are working on improving it (not an easy task, unfortunately)…
PS: as a workaround, if old 6.1 exporter was working OK for you, please use it until 7.4 one is fixed.
Ok, so since I finally got UE4 'working' (software DX11, yuck :/) on my VBox, I had a look at your car file.
Issue is that UE4 seems unable to use both restpose and animation together! To be precise:
Now bone is at the right place, but of course it has lost its animation... Sigh.
Can I use your car model to open a ticket on UE4 side? I really think this is a bug from their side (of course bones' exported animation is relative to rest pose, not absolute (i.e. relative to parent bone in absolute).
I could add an option to export such kind of animation, but meh… :/
Dear Mont,
Thanks very much for investigating this issue and trying to fix it. Yes, its absolutely fine for you to use my Car and Sun Roof Model and Anim in your bug report to Epic Games. I hope they will be able to assist you in fixing this.
My only question is. The Exporter for Blender 2.70 actually works fine. That is I can export the Car and SunRoof Skeletal Mesh and Anim from Blender 2.70 and import to UE4 and all the bones are in the correct place and the Anims work perfectly. So... why did Blenders 2.70 Exporter work fine with UE4, but the 2.71.6 exporter doesnt?
Okay best of luck with it! And if I can do anything at all to help. Please let me know. Thanks again!
Kind regards,
Russell Morahan
Thanks, will do asap and keep you informed.
Regarding 2.70, you were using the old ascii 6.1 exporter (still available as option in current one), 6.1 FBX format handles armatures in a rather different way than modern 7.4 one… :/
https://answers.unrealengine.com/questions/98704/fbx-import-wrong-application-of-animations-to-bone.html ;)
Added subscriber: @S_Wilke
Still not much answers from UE4 side… :/
Hi Mont :) Thanks for your continued work on this issue.
There is a Thread on the Unreal Engine's Content Forum that requests users to submit bug reports of FBX Import Issues. It can be found here:
https://forums.unrealengine.com/showthread.php?1581-FBX-Import-Problems-Look-Here!
However this forum post directs to the UE4 Answer Hub, which is basically one long messy thread filled with tons of random FBX import bugs from Maya and 3DSMax. Not very good.
I have posted this bug there already but did not receive a response. I think I will complain to Epic Games about this, politely of course.
I hope we will be able to get a response from Epic Games about this issue and I hope they will be able to assist you in solving it. I will let you know if I get a response from them. I am also going to the EGX Games Conference in London this Friday and will meet some Epic Games developers. Perhaps I can ask them who to contact with regards this issue and get a name and an email address. I'll keep you updated. Thanks again Mont!
Yours sincerely,
Russell Morahan.
Hi again Mont :-)
I see you found the UE4 Answer Hub and posted a bug report there. Well done! Best of luck with it!
Kind regard,
Russell
Hi there,
I just tested the file that mont29 posted at the epic answer hub with Autodesk FBX Review (1.2.3.0) and with Unreal 4 (4.4) and the behavior of the file in both applications is the same!
I also tested my own animation exports with FBX Review and all errors (wrong rotations, scaling, etc.) in UE4 are the same in FBX Review!
So unfortunetly (or fortunetly?) it does not look like Epic is at fault here....
But I think the good news is that the error is repeatable in a different program and, more importantly, in an official application of the format creators.
Autodesk FBX Review can be obtained here: http://area.autodesk.com/products/features/fbx
As I already said, I would not use even FBXPreview as a reference!
To me, it does not really make sense to not use bindpose as restpose, and apply anim as 'diff' on it - but I might be wrong here, for sure!
The fact is, since Unity plays our animations correctly, it seems they think the same. So not sure which way to go. Or maybe even we'll have to support both ways (yuck!!!).
"Technically" this is (relatively) trivial to handle, but I would rather avoid yet another export option here, so would like to know what is the 'good' way to go…
Okay, so I have done a bit more testing with this error, trying to replicate the problem in a few different ways. Here's what I discovered.
First I tried to replicate the error with a slightly different skeletal mesh, that theoretically should have had the same problem: That any bone off set from its parent with translation data would have an incorrect position in UE4. But the problem was not replicated. Here are screens of that Skeletal Mesh in Blender and UE4.
http://s9.postimg.org/vcjjwv33z/FBXTranslation_Testing_Skel_Mesh_One_01.jpg
http://s27.postimg.org/jcjgrbps3/FBXTranslation_Testing_Skel_Mesh_One_02.jpg
All the bones are in the correct position and the animation works fine. "That's Strange!!" I said to myself. This Skeletal Mesh has essentially the same set up as The Car Sun Roof file. "Maybe I had made a mistake in the Car Sun Roof file?" I thought to myself. So I reconstructed The Car Sun Roof test file again from scratch this afternoon, but indeed I got the same error. "What was the only difference between The Car Sun Roof Test and new simple Skeletal Mesh test I had built today?" I asked myself.
The only fundamental difference is that in the Car Sun Roof Test one of the Bones that has translation data is offset vertically from its parent, and so the error occurs, as we have seen.
In the first simple Skeletal Mesh test I made today none of the Bones with translation data are offset in space vertically from their parent and so, amazingly, no error occurs.
So I decided to make another version of this simple Skeletal Mesh test but with one of its Bones that has translation data offset vertically from its parent. And voila!! The Error is there again. See the screens here:
http://s28.postimg.org/lofkcntlp/FBXTranslation_Testing_Skel_Mesh_Two_01.jpg
http://s1.postimg.org/sqw4rep27/FBXTranslation_Testing_Skel_Mesh_Two_02.jpg
Conclusion: Only bones with vertical offset from the parent AND translation data lose their correct world position - being incorrectly snapped to their parent On the right hand side of the SimpleSkeletalMesh you can see the shoulder that does not have translation data, only rotation data, and its child has translation data, but that does not return an error.
I understand that this may not be conclusive evidence of the cause of the bug, but I hope it points us closer to it.
Here is Zip of the Blend Files and FBXs (Theres a little download button at top of Google Drive Screen):
https://drive.google.com/file/d/0ByTG1Z_4SBShbWExOEE3UVhfX2M/edit?usp=sharing
Best of luck,
Russell :-) (aka Dyoto Orion)
Thanks for all those investigations… Unfortunately, so far I think this leads us to a bug on UE4 side - and I can’t say I got serious answers so far from them…
Blender FBX Export to Unreal Engine 4 Bone Translation Error.to UE4 - Blender FBX Export to Unreal Engine 4 Bone Translation Error.With regards a bug with UE4, I really don't know. Sorry.
Fortunately the ASCII 6.1 Exporter works absolutely fine for exporting Static and Skeletal Meshes from Blender into UE4. So we'll just have to work with that for now.
At least the 7.4 Binary Importer adds functionality for Importing FBX Skeletons. It would be awesome to see it capable of Importing FBX animations too!
Cheers! :-)
Added subscriber: @marcio-3
mont29, why do you think FBX Review is not a good reference?
You also commented that it can be (relatively) trivial to handle. Do you think it can be trivial enough to you give me some tips about how to start and implement? Maybe I can work on an external addon exclusivelly to export FBX files to Unreal. I've already worked on very small addons for myself, but the FBX exporter is very huge. I could use the old 6.1 ascii exporter, but it has some limitations (like it doesn't export shape key animations), so I simply can't use Blender with Unreal until one be compatible with the other.
Added subscribers: @VasiliySavin, @mont29
Added subscribers: @marco.p, @Sergey
Added subscribers: @Positivity, @JulianEisel
Added subscriber: @OscarFranco
Added subscriber: @item412
Added subscribers: @rimau, @MarcClintDion
Hi
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.
Hope that helps.
@rimau indeed, could confirm that here too, nice find!
Will report to ue4 team, this is definitively an issue on their side, I cannot imagine how an FBX file could magically become valid once some bones are slightly rotated…
I've been thinking a bit about that and it seems like the rotation value that goes wilde is the 'W' value, and this is the only value in Blender that is '1' in the rest pose, the others are '0'.
It looks like UE4 gets confused here, and sets this 'W' value to '0' in this scenario, as what I get in UE4 is exactly the position of the bone as in Blender after setting this value to '0' for the choosen bone.
This issue was referenced by
1f43f90763
Changed status from 'Open' to: 'Resolved'
Closed by commit
1f43f90763
.Note that this hack should not exists in theory, I can see absolutely no good reason for it to exists. But looks like it needs to exists nevertheless…
@rimau well… in FBX rotations are either represented as (part of) transform matrices, or as Euler rotations (e.g. for animations and such), so yes, float imprecision might explain partly the issue, but still…
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…).
Added subscriber: @VS
@mont29, I just wanted to summarize my comments from the Unreal answerhub post as the thread was getting hard to read!
I can confirm that the bone offset issue is indeed resolved in the latest build.
The mesh scale exported is now 100 times larger in Unreal with FBX 7.4 as compared to previous versions. Exporting using FBX 6.1 continues to export at the expected scale. Is this an intentional change? My setup is unchanged - I'm using Metric, Degress with the Scale value in the scene tab set to 0.01 which I believe is setting Blender-Unreal users have been using for a while.
Finnaly :) Thnx @mont29 now i can export and import animations really easy. New Fix works for UE4 :) with My Own animations and my own Rig and my own mesh ..
hmm and i still dont understand why ppl complain about scale in blender .. i dont set any scale to metrics or anything
i use blender units .. and it all works grate .. Ok so In UE4 Characters are 190 or 180 cm high so i just use 190 blender units in blender and export with scale 1.00 and it all works .. all my characters in UE4 is 190 cm
and again @mont29 this Fix speeds up everything so big thanks to you
@Positivity - can you confirm the default scale works for you not just in the latest preview build but in previous Blender releases as well?
From what I've read on the forums and see on various tutorials (eg: TeslaDev on youtube or the official Unreal Blender training series by Epic) there is always a scaling adjustment to be made so I would suggest that your experience is an exception rather than the norm. Perhaps others subscribed to this thread can pitch in.
To recap my second observation - in the latest preview build I agree that tweaking scale doesn't seem to be necessary as a scale of 1 (both in the scene view and on export) exports the model at scale that agrees with Unreal. i.e. for people who have applied a 'scale fix' from previous versions, it ends up 100 times larger now in FBX 7.4 binary (exporting as 6.1 ASCII continues to behave the same as previous versions - this means without a scale workaround I find the exported object 100 times smaller in Unreal). Hope that made sense!
@VS Yes i can Confirm it and if you wanna i can even Send you a screen shot where you will see default values in Blender :) I m working with Default scale all the time. at start i can confirm that i was trying to do like in thous tutorials what you described but it gave me all the time weird results... i switched to default units and all the time Apply Transforms and it works good .
Hmm i f you just look on blender Values they are blank numbers and if you wanna them to be cm just use them as cm
i just set up so that my scene in blender is much bigger ...
Update: More about Scale... My friend started to use Blender (Version 2.73) recently with UE4 and right out of box i teached him to use default Units in blender and he dont have issues with any Exports to UE4 he build all things and they all are in the scale he wants no issues there... so im not sure how good are thous tutorials what is provided by Tesla or Epic ( maybe thats before version 2.73 )
@Positivity - You're right about 2.73, now I understand what's happening.
From 2.73 onwards the scale indeed works out-of-the-box as you described, but only if you use FBX 7.4 binary it seems. FBX 6.1 ASCII (which many of us have been using because of these bone issues) still needs the scale fix.
So now that FBX 7.4 has been fixed, as you pointed out we don't need to apply any scale conversion either, this is indeed great news!
@VS Yes :) and i been using FBX 7.4 binary from day one it was implemented because i found workaround for thous bone issues .. you can find workaround in this Post made by me :) but now that is useless as fix is working really good :)