FBX exporter in Blender cause artifacts to appear on meshes with Shape Keys #41316

Closed
opened 2014-08-04 15:44:41 +02:00 by Geir Ove · 19 comments

System Information
Windows 7 64-bit, Geforce GTX 660 / Geforce GTX 690

Blender Version
Broken: 2.71 9337574

Short description of error
When adding Shape Keys to some 3D models and exporting to FBX, shadow-like artifacts appear on said 3D models when imported to game engines like Unity. This appears to be a problem with Blender's FBX exporter, as importing the exported FBX to 3ds Max and re-exporting it from there will fix the issue. Scaling up the model in Blender and applying the scale also seems to help. The problem is not unique to 2.71 and happens in earlier versions as well (I also tested 2.70, 2.69, 2.68). The amount of shape keys or their content does not seem to matter, and recalculating normals does not help.

A couple of threads on Unity community forum that explore the issue:
http://forum.unity3d.com/threads/problem-artifacts-on-surface-of-character-model-when-blendshapes-via-blender-are-present.250279/
http://forum.unity3d.com/threads/shape-keys-cause-mesh-display-error-bug.260374/
http://answers.unity3d.com/questions/717832/blendshape-import-mesh-normals-dont-import-correct.html

Screenshot of the model with artifacts showing in Unity:
modelartifacts.jpg

Exact steps for others to reproduce the error
Step 1) Download the attached test-model with shape keys: testmodel_with_shapekeys.zip
Step 2) Export file as FBX using ASCII FBX exporter if using Blender 2.71, as Binary exporter doesn't export shape keys.
Step 3) Import FBX to Unity (or possibly other game-engines that support the FBX format and shape keys).
Step 4) Observe artifacts/black spots in high-detail areas of the test-model (around eyes, nose, mouth, fingers, etc).

**System Information** Windows 7 64-bit, Geforce GTX 660 / Geforce GTX 690 **Blender Version** Broken: 2.71 9337574 **Short description of error** When adding Shape Keys to some 3D models and exporting to FBX, shadow-like artifacts appear on said 3D models when imported to game engines like Unity. This appears to be a problem with Blender's FBX exporter, as importing the exported FBX to 3ds Max and re-exporting it from there will fix the issue. Scaling up the model in Blender and applying the scale also seems to help. The problem is not unique to 2.71 and happens in earlier versions as well (I also tested 2.70, 2.69, 2.68). The amount of shape keys or their content does not seem to matter, and recalculating normals does not help. A couple of threads on Unity community forum that explore the issue: http://forum.unity3d.com/threads/problem-artifacts-on-surface-of-character-model-when-blendshapes-via-blender-are-present.250279/ http://forum.unity3d.com/threads/shape-keys-cause-mesh-display-error-bug.260374/ http://answers.unity3d.com/questions/717832/blendshape-import-mesh-normals-dont-import-correct.html Screenshot of the model with artifacts showing in Unity: ![modelartifacts.jpg](https://archive.blender.org/developer/F101464/modelartifacts.jpg) **Exact steps for others to reproduce the error** Step 1) Download the attached test-model with shape keys: [testmodel_with_shapekeys.zip](https://archive.blender.org/developer/F101466/testmodel_with_shapekeys.zip) Step 2) Export file as FBX using ASCII FBX exporter if using Blender 2.71, as Binary exporter doesn't export shape keys. Step 3) Import FBX to Unity (or possibly other game-engines that support the FBX format and shape keys). Step 4) Observe artifacts/black spots in high-detail areas of the test-model (around eyes, nose, mouth, fingers, etc).
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Xoduz

Added subscriber: @Xoduz

Added subscriber: @mont29

Added subscriber: @mont29

What I need here is:

  • A very simple model with shape keys (e.g. a cube or low-def sphere) showing that issue;
  • The same scene as exported by a reference FBX app, showing correct results.

There is a 'normal' layer in FBX's shapkeys, but since I did not have any ref material about it, I assumed it was optional and could be ignored… :/

What I need here is: * A *very* simple model with shape keys (e.g. a cube or low-def sphere) showing that issue; * The same scene as exported by a reference FBX app, showing correct results. There is a 'normal' layer in FBX's shapkeys, but since I did not have any ref material about it, I assumed it was optional and could be ignored… :/
Bastien Montagne self-assigned this 2014-08-04 15:52:55 +02:00
Author

I don't know how to create a model from scratch in such a way that the issue appears, but I cut down the original testmodel to 12 polygons (removed everything but a small part of the nose that shows the issue), exported it from Blender (2.71, FBX 6.1 ascii format) then imported + re-exported from max (2015, FBX 2014 ascii format). Will that suffice?

Blender file + the two FBXes attached here: testmodel_simple.zip

I don't know how to create a model from scratch in such a way that the issue appears, but I cut down the original testmodel to 12 polygons (removed everything but a small part of the nose that shows the issue), exported it from Blender (2.71, FBX 6.1 ascii format) then imported + re-exported from max (2015, FBX 2014 ascii format). Will that suffice? Blender file + the two FBXes attached here: [testmodel_simple.zip](https://archive.blender.org/developer/F101478/testmodel_simple.zip)

thanks.

thanks.

Sooooo… I really have the feeling shape keys are handled correctly in new 7.4 bin exporter (was not there for 2.71 Blender release), could you please try and test a nightly build from our buildbot?

Sooooo… I really have the feeling shape keys are handled correctly in new 7.4 bin exporter (was not there for 2.71 Blender release), could you please try and test a nightly build from [our buildbot](http://builder.blender.org/download)?
Author

I tested using Blender 2.71 e13d6e2 win64 (Thu Aug 7 02:33:24 2014) just now, and the 7.4 bin exporter doesn't seem to export the shape keys at all (same as 2.71 release).

I tested using Blender 2.71 e13d6e2 win64 (Thu Aug 7 02:33:24 2014) just now, and the 7.4 bin exporter doesn't seem to export the shape keys at all (same as 2.71 release).

It does, provided there is something to export (in your example file, your shape key is empty, it’s the same as org mesh, does not make sense to export that).

It does, provided there is something to export (in your example file, your shape key is empty, it’s the same as org mesh, does not make sense to export that).
Author

You speak the truth. That seems to be a change from earlier versions that also exported empty shape keys, which makes my testmodel obsolete, I guess. :P However, I did some random modification (scaled part of the mesh up) in the shape key and tested again, and the artifacts/black spots still show up. Running the FBX I exported through 3ds Max import + re-export still gets rid of those issues.

You speak the truth. That seems to be a change from earlier versions that also exported empty shape keys, which makes my testmodel obsolete, I guess. :P However, I did some random modification (scaled part of the mesh up) in the shape key and tested again, and the artifacts/black spots still show up. Running the FBX I exported through 3ds Max import + re-export still gets rid of those issues.

Ok, so issue is still there…

I’d like to have that (7.4bin) FBX file exported from Blender, and same once imported/exported from max (as binary too, simpler for me).

There must be some difference, but could not see anything meaningful in previous files you gave me :/

Ok, so issue is still there… I’d like to have that (7.4bin) FBX file exported from Blender, and same once imported/exported from max (as binary too, simpler for me). There must be some difference, but could not see anything meaningful in previous files you gave me :/
Author

Here's a zip with the original .blend, as well as both binary and ascii versions of the exported FBX from both Blender and Max: testmodel_simple_v2.zip

All of these have 1 shape key that scales the mesh up 5 times.

Here's a zip with the original .blend, as well as both binary and ascii versions of the exported FBX from both Blender and Max: [testmodel_simple_v2.zip](https://archive.blender.org/developer/F101935/testmodel_simple_v2.zip) All of these have 1 shape key that scales the mesh up 5 times.

Thanks for the files… In fact, they are almost identical (blender and max versions), only tiny differences, those that should not count - but that often f**k things up in FBX!

Here is a modified version of Blender's export (hand-forged to make it even more similar to max one on shape side), could you check whether it works?

testmodel_simple_v2_blender_binary_tweaked.fbx

PS: actually, would be simpler if I could do it myself, but I did not find easy ways to use shapes with Unity, esp. when they are not animated, would you have a nice link for that by any chance?

Thanks for the files… In fact, they are almost identical (blender and max versions), only tiny differences, those that should not count - but that often f**k things up in FBX! Here is a modified version of Blender's export (hand-forged to make it even more similar to max one on shape side), could you check whether it works? [testmodel_simple_v2_blender_binary_tweaked.fbx](https://archive.blender.org/developer/F102020/testmodel_simple_v2_blender_binary_tweaked.fbx) PS: actually, would be simpler if I could do it myself, but I did not find easy ways to use shapes with Unity, esp. when they are not animated, would you have a nice link for that by any chance?
Author

I tested your modified version, and the shape key (called "BlendShape" in Unity) is there and working, but the artifacts are also still there, unfortunately: modelartifact_simple.jpg

Note that the blend shapes can be easily tested in Unity by first dragging the testmodel from the project panel to the hiearchy/scene view, selecting the instance of the model from the hierarchy/scene view, then (in the inspector panel) expanding the Skinned Mesh Renderer component, where a list of "BlendShapes" should be visible. You can tweak each shape by adjusting its value from 0 (min) to 100 (max).

Btw, remember to adjust the "Scale Factor" from 0.01 to 1.00 in the import settings for the model (Unity defaults imported FBXes to a scale of 0.01 for some reason), or you'll have a hard time seeing it.

I tested your modified version, and the shape key (called "BlendShape" in Unity) is there and working, but the artifacts are also still there, unfortunately: ![modelartifact_simple.jpg](https://archive.blender.org/developer/F102077/modelartifact_simple.jpg) Note that the blend shapes can be easily tested in Unity by first dragging the testmodel from the project panel to the hiearchy/scene view, selecting the instance of the model from the hierarchy/scene view, then (in the inspector panel) expanding the Skinned Mesh Renderer component, where a list of "BlendShapes" should be visible. You can tweak each shape by adjusting its value from 0 (min) to 100 (max). Btw, remember to adjust the "Scale Factor" from 0.01 to 1.00 in the import settings for the model (Unity defaults imported FBXes to a scale of 0.01 for some reason), or you'll have a hard time seeing it.

Thanks for the tip, much simpler to test now!

Strange thing is, when shape is fully applied normals are OK, it's without shape that they are weird :/

Anyway, I have everything to investigate this now! :)

Thanks for the tip, much simpler to test now! Strange thing is, when shape is fully applied normals are OK, it's without shape that they are weird :/ Anyway, I have everything to investigate this now! :)

This issue was referenced by blender/blender-addons@c9cde56179

This issue was referenced by blender/blender-addons@c9cde56179ce50605822eac25b4979c911feffe6

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Closed by commit blender/blender-addons@c9cde56179.

This issue was referenced by blender/blender-addons@ca450064a5

This issue was referenced by blender/blender-addons@ca450064a5a4cebc802f2947b19bdbfc8424ed0a
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
3 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#41316
No description provided.