Bug #642

FBX export broken in 1.1 (both binary and text)

Added by Francois Grobbelaar about 4 years ago. Updated almost 3 years ago.

Status:FixedStart date:11/29/2014
Priority:HighDue date:
Assignee:Jonas Hauquier% Done:

80%

Category:File export
Target version:MakeHuman 1.1.0

Description

The other night I attempted to import an FBX exported from the current build of MakeHuman 1.1 (with bones) to Unreal Engine 4, but it just came up with a useless error message. At first I thought it must be an issue with the binary FBX exporter, but I found that the ascii exporter doesn't work either. To rule out an issue with UE4, I exported a character in FBX from MakeHuman 1.0 only to find that it worked correctly (though as usual, the axis is not correct for UE4 use - but that's a different issue).

At this point I decided to try opening the exported FBX's using the FBX viewer that's integrated with Autodesk's official FBX converter. Again, with the 1.1 exports (both binary and ascii) the viewer was unable to display the model, whereas the exports from 1.0 worked. It would appear that something has broken compatibility with the official FBX SDK. Unfortunately, nothing seems to be giving me meaningful error messages so I can't track down the issue any further than this. I was able to import static meshes into UE4, but not skeletal meshes.

The easiest way to verify if our exports will work correctly in software linking to the official FBX SDK is to attempt to view them in the viewer included with the official FBX converter. This tool can be downloaded freely from Autodesk's website:
http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=22694909

fbx_ascii_stable_unstable2.JPG - Comparing old (left) ASCII FBX export from stable with new unstable version (right) (241 KB) Jonas Hauquier, 02/02/2015 09:33 PM

001_fbx_test_mh_orig.png (51.3 KB) Joel Palmius, 05/16/2015 07:23 PM

002_fbx_test_blender_import_collada.png (80.8 KB) Joel Palmius, 05/16/2015 07:23 PM

004_fbx_test_unity_import_from_mh_fbx-fixed.png (85.5 KB) Joel Palmius, 05/16/2015 07:23 PM

003_fbx_test_unity_import_from_mh_fbx.png (76.8 KB) Joel Palmius, 05/16/2015 07:23 PM

006_fbx_test_unity_import_from_mh_fbx-eyes1.png (128 KB) Joel Palmius, 05/16/2015 07:23 PM

005_fbx_test_unity_import_from_mh_fbx-ingame.PNG (149 KB) Joel Palmius, 05/16/2015 07:23 PM

007_fbx_test_unity_import_from_mh_fbx-eyes2.PNG (48.9 KB) Joel Palmius, 05/16/2015 07:23 PM

Screen Shot 2016-01-30 at 1.20.12 PM.png (397 KB) Francois Grobbelaar, 01/30/2016 04:23 AM

screenshot_1_1454282731.png (107 KB) Rob Baer, 02/01/2016 12:27 AM

627
804
805
806
807
808
809
810
1178
1179

Related issues

Related to MakeHuman - Bug #91: Normals bug in fbx (Test in XSI) Fixed 02/11/2014
Related to MakeHuman - Feature #664: Custom Rig with IK joints--Epic Games UE Accepted 01/11/2015
Related to MakeHuman - Feature #623: Allow binary FBX export Fixed 11/02/2014
Related to MakeHuman - Bug #635: FBX (binary) Exporter to Blender - Feedback on behaviors New 11/11/2014

Associated revisions

1700:4b1522d35559
Added by Jonas Hauquier almost 4 years ago

Fix missing newline in ASCII FBX export

1701:738bde9108f6
Added by Jonas Hauquier almost 4 years ago

Fix ASCII FBX export materials

1702:113607398196
Added by Jonas Hauquier almost 4 years ago

Fix UVs in ASCII FBX export.

1703:23a639b1d20e
Added by Jonas Hauquier almost 4 years ago

Fix FBX material, curiously by changing a combination of its material properties

1707:8bbf38fa36bc
Added by Jonas Hauquier almost 4 years ago

Fix binary FBX bind pose in Blender. Not working for Maya yet, though

History

#1 Updated by Jonas Hauquier about 4 years ago

Francois Grobbelaar wrote:

The easiest way to verify if our exports will work correctly in software linking to the official FBX SDK is to attempt to view them in the viewer

Yes, I'm aware
I have been working on the FBX export lately, but it's still unfinished. Since the viewer is not available on linux systems, I haven't yet taken a look at its current state, but that will happen eventually, when I get around to it.

Thanks for reporting the status with the official SDK.

#2 Updated by Anonymous about 4 years ago

  • Related to Bug #91: Normals bug in fbx (Test in XSI) added

#3 Updated by Anonymous about 4 years ago

  • Assignee set to Jonas Hauquier

#4 Updated by Anonymous about 4 years ago

  • Related to Feature #664: Custom Rig with IK joints--Epic Games UE added

#5 Updated by Jonas Hauquier almost 4 years ago

  • Category set to File export
  • Status changed from New to Accepted
  • Target version set to MakeHuman 1.1.0

The bind matrices are wrong.

http://forum.makehuman.org/viewtopic.php?f=3&t=11306

Needs verification whether this applies to Collada export too: http://forum.makehuman.org/viewtopic.php?f=3&t=11329&p=26638&hilit=bind+matrices#p26638

#6 Updated by Jonas Hauquier almost 4 years ago

  • Status changed from Accepted to In Progress
  • % Done changed from 0 to 20

Status update:

  • ASCII almost works again (disable the "binary" checkbox): only UV coordinates need fixing
  • Binary has vertices bound to bones wrongly. Only human base mesh is parented to skeleton, other meshes not. This makes the importer of blender 2.73 crash, in 2.72 it works though.
    Binary file import works in blender (2.72) and Maya (see forum post) apart from the still ongoing issues. This is hopeful.
    Binary import does not work in FBX Converter 2013, but the same is true for binary FBX files exported from Blender (on which this exporter was based).
  • UVs are correct in the binary export

#7 Updated by Jonas Hauquier almost 4 years ago

With r1702 ASCII FBX export is working again. I still have one issue though: the shading looks different compared with the old file. Also there is a shading artefact on the head.
I'm not sure what the cause is at this time.
Comparing old (left) ASCII FBX export from stable with new unstable version (right)

#8 Updated by Jonas Hauquier almost 4 years ago

It appears as though this difference might be caused by the "specular hardness" property alone. The old exporter had 103 as value for this, the new has 5 (in Blender material properties).

A side note: when using Autodesk FBX Converter 2013 to create a binary FBX file from the ASCII MH export, Blender 2.72 has better results importing that file than 2.73.

Note to self, this is how the blender importer sets this value:

ma_spec_hardness = elem_props_get_number(fbx_props, b'Shininess', 9.6)
ma.specular_hardness = ma_spec_hardness * 5.10 + 1.0

#9 Updated by Jonas Hauquier almost 4 years ago

  • % Done changed from 20 to 50

Fixed the shading issues in r1703 It appears the cause was effectively a way too sharp specular reflectance value.
Leaving out some material properties and changing their order magically fixes it. I think Thomas experienced a similar issue when he did the first version of the FBX exporter.

Now remaining is fixing the bind matrices with the binary FBX export.

#10 Updated by Jonas Hauquier almost 4 years ago

I investigated more into the binary FBX's rigging's distortion.
It appears that the static positions of the skeleton bones (location of edit bones) -- or at least, most bones -- is 0. The Blender FBX importer appears to grab the edit bone positions from the TransformLink property of the (first) BoneDeformer.
Very strange, really because this can also be gotten from the Lcl Translation property in the bone object properties (which would be more logical).
Also, Transform and TransformLink properties are repeated in the bindpose PoseNode, which adds to the confusion (which signifies which?).

In any case I can confirm (by testing with the FBX parser in Blender) that whatever matrices I put in the binary file from MakeHuman, comes out correctly on the other end.

#11 Updated by Jonas Hauquier almost 4 years ago

I made some progress. In r1707 I fixed skeleton import of binary FBX in Blender.
Maya still distorts the mesh though, with binary.

Another remaining issue is that the binary FBX only links the first mesh to the skeleton (deformer, I believe). This leads to a crash in the newer Blender 2.73

#12 Updated by Jonas Hauquier almost 4 years ago

  • % Done changed from 50 to 70

#13 Updated by Jonas Hauquier almost 4 years ago

I believe I know what the bindpose is. It's not necessarily the rest pose, it's the pose in which the mesh geometry was bound to the skeleton. In blender, rest and bind pose are the same, hence the confusion.
The blender importer only uses the Deformers. (also see: http://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_TODO_2014_07#Import:_Also_support_BindPose.3F)

I also suspect that this note is about a MH model:

I ran into a file having only one Deformer system linking the armature to a mesh, all other meshes (wig, eyes, teeth, …) were only linked to same armature through BindPoses.

Which gives some insight in the "only one mesh linked" problem.

#14 Updated by Jonas Hauquier almost 4 years ago

#15 Updated by Jonas Hauquier almost 4 years ago

  • Related to Bug #635: FBX (binary) Exporter to Blender - Feedback on behaviors added

#16 Updated by Jonas Hauquier almost 4 years ago

#635 reminded me that I also have to verify the textures of the binary FBX.

#17 Updated by Rob Baer over 3 years ago

  • Status changed from In Progress to Fix exists, needs testing
  • % Done changed from 70 to 80

So, I think the ascii fbx exporter is currently working to provide good throughput to Unreal Engine 4 (see http://bugtracker.makehuman.org/issues/664#note-18) although there are minor glitches in neck and toes which are probably skeleton related not fbx related. Unreal Engine 4 (but not Blender) can read fbx ASCII just fine it seems. The "original issue" is in a position to be marked as "fixed needs testing", but the thread has introduced other aspects of fbx export.

I have not tried the binary fbx. I thought that I saw that binary export was temporarily removed from the fbx export module (comment #6, rescinded comment # 15) and indeed it IS there again. Perhaps binary export is fixed and should be tried?

What is on the TODO to close this one?
?? Comment 9 Now remaining is fixing the bind matrices with the binary FBX export. Fixed?
?? Comment 16 Textures of the binary fbx
?? I don't suppose it is possible to figure out how to tell fbx importers how to properly handle transparency for various geometries. :(
?? Issue 91 - Normals bug
?? I recall an issue with the fbx exported ignoring scale (can't find). Is that fixed?
?? Other things that need testing ??

Alternatively, this issue could be closed and fbx issues collected elsewhere

#18 Updated by Jonas Hauquier over 3 years ago

Rob Baer wrote:

Perhaps binary export is fixed and should be tried?

Completely and utterly broken, I fear.
It will need quite a bit of time and devotion to debug. Something I don't have at the moment, or at least cannot put into this particular feature.

#19 Updated by Joel Palmius over 3 years ago

Decided to do some testing with latest nightly build in windows. Blender version is 2.74.

Initially I was planning to compare FBX exported from blender with FBX exported from MH, but as it stands now, I can only get a crippled model into blender (see collada below). So skipping comparison and testing unity instead.

Toon in MH:

Toon in Blender as MH -> Collada -> Blender. Shoes didn't make it, and hair and eye textures seem to have ended up wrong.

Skipped attempt:

Toon in Blender as MH -> FBX -> Blender: Crash in blender with message "ASCII FBX is not supported" (but since binary FBX is reportedly broken, I leave it)

Toon in Unity as MH -> FBX -> Unity: Obviously it doesn't automatically find textures at import. Also, shoes missing here too.

After manually adding textures in Unity:

In game render (looks pretty much exactly as the preview)

Closer look at the eyes. Settings are exactly as they are for hair (see below), except with a different image file. Hair works, eye doesn't. Maybe Unity can't deal with holes in a mesh?

Settings for eyes. Maybe someone who understands unity can tell me what's wrong.

#20 Updated by Joel Palmius over 3 years ago

Some sections from log

Traceback (most recent call last):
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\mhmain", line 494, in loadPlugin
  File "plugins/2_posing_expression.py", line 332, in load
    expressionChooser = ExpressionTaskView(category)
  File "plugins/2_posing_expression.py", line 218, in __init__
    bvhfile = bvh.load(getpath.getSysDataPath('poseunits/face-poseunits.bvh'), allowTranslation="none")
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\bvh", line 772, in load
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\bvh", line 294, in fromFile
IOError: [Errno 2] No such file or directory: u'data/poseunits/face-poseunits.bvh'
[2015-05-16 18:49:37,000] logging->info():1622 -- MESSAGE -- Importing plugin 3_libraries_clothes_chooser
[2015-05-16 18:49:37,003] logging->info():1622 -- MESSAGE -- Imported plugin 3_libraries_clothes_chooser
[2015-05-16 18:49:37,005] logging->info():1622 -- MESSAGE -- Loading plugin 3_libraries_clothes_chooser
[2015-05-16 18:49:37,009] logging->info():1622 -- MESSAGE -- Loaded plugin 3_libraries_clothes_chooser
[2015-05-16 18:49:37,013] logging->info():1622 -- MESSAGE -- Importing plugin 3_libraries_eye_chooser
[2015-05-16 18:49:37,015] logging->info():1622 -- MESSAGE -- Imported plugin 3_libraries_eye_chooser
[2015-05-16 18:49:37,016] logging->info():1622 -- MESSAGE -- Loading plugin 3_libraries_eye_chooser
[2015-05-16 18:49:37,020] logging->info():1622 -- MESSAGE -- Selecting proxy file "data/eyes/high-poly/high-poly.mhclo" from eyes library.
[2015-05-16 18:49:37,023] logging->debug():1630 -- DEBUG -- Loading binary proxy data/eyes/high-poly/high-poly.mhpxy.
[2015-05-16 18:49:37,023] logging->debug():1630 -- DEBUG -- Loading proxy file: data/eyes/high-poly/high-poly.mhpxy.
[2015-05-16 18:49:37,039] logging->debug():1630 -- DEBUG -- Loading material from file E:/makehuman-unstable-20150516-win32/data/eyes/materials/brown.mhmat
[2015-05-16 18:49:37,045] logging->debug():1630 -- DEBUG -- VectorUniform(AdditiveShading) = [ 0.]
[2015-05-16 18:49:37,046] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_ModelViewProjectionMatrixTranspose
[2015-05-16 18:49:37,046] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_NormalMatrix
[2015-05-16 18:49:37,046] logging->debug():1630 -- DEBUG -- VectorUniform(AdditiveShading) = [ 0.]
[2015-05-16 18:49:37,049] logging->debug():1630 -- DEBUG -- Loading binary mesh E:/makehuman-unstable-20150516-win32/data/eyes/high-poly/high-poly.npz

...

[2015-05-16 18:49:40,507] logging->debug():1630 -- DEBUG -- initTexture: 256, 256, False
[2015-05-16 18:49:40,516] logging->debug():1630 -- DEBUG -- Creating new texture for image E:/makehuman-unstable-20150516-win32/data/eyes/materials/brown_eye.png.
[2015-05-16 18:49:40,601] logging->debug():1630 -- DEBUG -- initTexture: 1024, 1024, False
[2015-05-16 18:49:40,602] logging->debug():1630 -- DEBUG -- Creating new texture for image E:/makehuman-unstable-20150516-win32/data/litspheres/skinmat_eye.png.
[2015-05-16 18:49:40,608] logging->debug():1630 -- DEBUG -- initTexture: 256, 256, False
[2015-05-16 18:49:45,398] logging->debug():1630 -- DEBUG -- Updating skeleton joint positions
[2015-05-16 18:49:45,483] logging->debug():1630 -- DEBUG -- Done baking animations
[2015-05-16 18:49:45,571] logging->info():1622 -- MESSAGE -- do Change modifier
[2015-05-16 18:49:45,992] logging->debug():1630 -- DEBUG -- hiding task Macro modelling
[2015-05-16 18:49:45,993] logging->debug():1630 -- DEBUG -- showing task Gender
[2015-05-16 18:49:47,687] logging->debug():1630 -- DEBUG -- hiding task Gender
[2015-05-16 18:49:47,687] logging->debug():1630 -- DEBUG -- showing task Macro modelling
[2015-05-16 18:49:51,548] logging->debug():1630 -- DEBUG -- Updating skeleton joint positions
[2015-05-16 18:49:51,632] logging->debug():1630 -- DEBUG -- Done baking animations
[2015-05-16 18:49:51,720] logging->info():1622 -- MESSAGE -- do Change modifier
[2015-05-16 18:49:53,095] logging->debug():1630 -- DEBUG -- hiding category Modelling
[2015-05-16 18:49:53,095] logging->debug():1630 -- DEBUG -- showing category Geometries
[2015-05-16 18:49:53,096] logging->debug():1630 -- DEBUG -- hiding task Macro modelling
[2015-05-16 18:49:53,096] logging->debug():1630 -- DEBUG -- showing task Clothes
[2015-05-16 18:49:53,111] logging->warning():1612 -- WARNING -- WARNING: Duplicate UUID found for different proxy files in clothes library (files E:/makehuman-unstable-20150516-win32/data/clothes/shoes02/shoes02.mhpxy and E:/makehuman-unstable-20150516-win32/data/clothes/shoes05/shoes05.mhpxy share uuid 8887caca-d6fb-4d73-af10-1d4fb740a936). Make sure that all proxy files in your data folders have unique UUIDs (unless they are exactly the same file). Else this may lead to unexpected behaviour.
[2015-05-16 18:49:54,815] logging->debug():1630 -- DEBUG -- hiding task Clothes
[2015-05-16 18:49:54,815] logging->debug():1630 -- DEBUG -- showing task Hair
[2015-05-16 18:49:54,822] logging->warning():1612 -- WARNING -- WARNING: Duplicate UUID found for different proxy files in hair library (files E:/makehuman-unstable-20150516-win32/data/hair/afro01/afro01.mhpxy and E:/makehuman-unstable-20150516-win32/data/hair/hairtype02/afro01.mhpxy share uuid 59627022-32e9-4126-9cf1-036d4b9335fc). Make sure that all proxy files in your data folders have unique UUIDs (unless they are exactly the same file). Else this may lead to unexpected behaviour.
[2015-05-16 18:49:56,552] logging->info():1622 -- MESSAGE -- Selecting proxy file "data/hair\long01\long01.mhpxy" from hair library.
[2015-05-16 18:49:56,552] logging->debug():1630 -- DEBUG -- Loading binary proxy data/hair\long01\long01.mhpxy.
[2015-05-16 18:49:56,552] logging->debug():1630 -- DEBUG -- Loading proxy file: data/hair\long01\long01.mhpxy.
[2015-05-16 18:49:56,578] logging->debug():1630 -- DEBUG -- Loading material from file E:/makehuman-unstable-20150516-win32/data/hair/long01/long01.mhmat
[2015-05-16 18:49:56,582] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_ModelViewProjectionMatrixTranspose
[2015-05-16 18:49:56,582] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_NormalMatrix
[2015-05-16 18:49:56,585] logging->debug():1630 -- DEBUG -- VectorUniform(AdditiveShading) = [ 0.]
[2015-05-16 18:49:56,585] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_ModelViewProjectionMatrixTranspose
[2015-05-16 18:49:56,585] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_NormalMatrix
[2015-05-16 18:49:56,585] logging->debug():1630 -- DEBUG -- VectorUniform(AdditiveShading) = [ 0.]
[2015-05-16 18:49:56,588] logging->debug():1630 -- DEBUG -- Loading binary mesh E:/makehuman-unstable-20150516-win32/data/hair/long01/long01.npz.
[2015-05-16 18:49:56,851] logging->info():1622 -- MESSAGE -- do Change hair
[2015-05-16 18:49:56,868] logging->debug():1630 -- DEBUG -- VectorUniform(AdditiveShading) = [ 0.]
[2015-05-16 18:49:56,871] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_ModelViewProjectionMatrixTranspose
[2015-05-16 18:49:56,871] logging->debug():1630 -- DEBUG -- Shader: adding built-in uniform gl_NormalMatrix
[2015-05-16 18:49:56,871] logging->debug():1630 -- DEBUG -- VectorUniform(AdditiveShading) = [ 0.]
[2015-05-16 18:49:56,871] logging->debug():1630 -- DEBUG -- Creating new texture for image E:/makehuman-unstable-20150516-win32/data/hair/long01/long01_diffuse.png.
[2015-05-16 18:49:57,128] logging->debug():1630 -- DEBUG -- initTexture: 2048, 2048, False
[2015-05-16 18:49:57,131] logging->debug():1630 -- DEBUG -- Creating new texture for image E:/makehuman-unstable-20150516-win32/data/litspheres/lit_hair.png.
[2015-05-16 18:49:57,134] logging->debug():1630 -- DEBUG -- initTexture: 256, 256, False

...

[2015-05-16 18:50:10,848] logging->info():1622 -- MESSAGE -- Selecting proxy file "data/clothes\shoes06\shoes06.mhpxy" from clothes library.
[2015-05-16 18:50:10,848] logging->debug():1630 -- DEBUG -- Loading binary proxy data/clothes\shoes06\shoes06.mhpxy.
[2015-05-16 18:50:10,848] logging->debug():1630 -- DEBUG -- Loading proxy file: data/clothes\shoes06\shoes06.mhpxy.
[2015-05-16 18:50:10,868] logging->debug():1630 -- DEBUG -- Loading material from file E:/makehuman-unstable-20150516-win32/data/clothes/shoes06/shoes06.mhmat
[2015-05-16 18:50:10,871] logging->debug():1630 -- DEBUG -- VectorUniform(ambient) = [ 0.  0.  0.]
[2015-05-16 18:50:10,872] logging->debug():1630 -- DEBUG -- VectorUniform(diffuse) = [ 0.  0.  0.  0.]
[2015-05-16 18:50:10,875] logging->debug():1630 -- DEBUG -- VectorUniform(emissive) = [ 0.  0.  0.]
[2015-05-16 18:50:10,875] logging->debug():1630 -- DEBUG -- VectorUniform(specular) = [ 0.  0.  0.  0.]

This seems to be a crash related to the shoes:

[2015-05-16 18:50:10,901] logging->info():1622 -- MESSAGE -- Loaded vertex weights MakeHuman weights from file E:/makehuman-unstable-20150516-win32/data/clothes/shoes06/shoes06.jsonw
[2015-05-16 18:50:10,937] logging->debug():1630 -- DEBUG -- Loading binary mesh E:/makehuman-unstable-20150516-win32/data/clothes/shoes06/shoes06.npz.
[2015-05-16 18:50:10,960] logging->warning():1612 -- WARNING -- Exception during event onFileSelected
Traceback (most recent call last):
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\events3d", line 212, in callEvent
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\proxychooser", line 163, in onFileSelected
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\proxychooser", line 230, in proxyFileSelected
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\mhmain", line 811, in do
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\proxychooser", line 77, in do
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\proxychooser", line 320, in selectProxy
  File "plugins/3_libraries_clothes_chooser.py", line 80, in proxySelected
    self.human.addClothesProxy(pxy)
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\human", line 194, in addClothesProxy
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\human", line 217, in _swapProxies
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\human", line 1319, in _updateMeshVertexWeights
  File "c:\jenkins\workspace\Windows_unstable\buildscripts\win32\build\makehuman\out00-PYZ.pyz\proxy", line 262, in getVertexWeights
AttributeError: 'NoneType' object has no attribute 'getVertexWeights'
[2015-05-16 18:50:10,983] logging->debug():1630 -- DEBUG -- VectorUniform(ambient) = [ 0.  0.  0.]
[2015-05-16 18:50:10,983] logging->debug():1630 -- DEBUG -- VectorUniform(diffuse) = [ 0.  0.  0.  0.]
[2015-05-16 18:50:10,986] logging->debug():1630 -- DEBUG -- VectorUniform(emissive) = [ 0.  0.  0.]
[2015-05-16 18:50:10,986] logging->debug():1630 -- DEBUG -- VectorUniform(specular) = [ 0.  0.  0.  0.]

...

[2015-05-16 18:50:59,105] logging->info():1622 -- MESSAGE -- Writing Collada file C:\Users\joepal\Documents\makehuman\v1\exports\fbxtest3.dae
[2015-05-16 18:50:59,976] logging->info():1622 -- MESSAGE -- Wrote Collada file in 0.97273 s: C:\Users\joepal\Documents\makehuman\v1\exports\fbxtest3.dae
[2015-05-16 18:51:05,759] logging->info():1622 -- MESSAGE -- Write FBX file C:\Users\joepal\Documents\makehuman\v1\exports\fbxtest4.fbx
[2015-05-16 18:51:06,434] logging->info():1622 -- MESSAGE -- C:\Users\joepal\Documents\makehuman\v1\exports\fbxtest4.fbx written

#21 Updated by Rob Baer over 3 years ago

Joel Palmius wrote:

Settings for eyes {in unity materials}. Maybe someone who understands unity can tell me what's wrong.

I think the shader needs to be changed from 'standard'. The shader for the eyes needs to be something like: transparent | cutout | diffuse. You didn't add eyebrows or eyelashes, but they also need a change from the standard shader.

I'm basing this information on having watched this video (https://www.youtube.com/watch?v=IflzMxdvEtQ) when we (well you) started our MH "proposed helpful video" list I'm pretty sure I put it on that page as a contribution. The video is from 2/2014 so the details may need some updating. I have never tried unity (yet) myself because Manuel asked me to look at some Unreal Engine issues before I ever got to it.

As to ASCII fbx, it is working again. Not so the binary fbx , according to Jonas. The ASCII FBX can be used in Blender by running it through the free autodesk converter (Windows or Mac) to make it binary first: http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=22694909 My memory from the last time I tested it is that fbx export was not honoring choice of export unit scale, but it has been a while. The most painless/natural export scale for unity, I think, is 1 unit = 1 meter. Can Unity directly import ASCII FBX without a trip through Blender? (e.g., Unreal engine can).

#22 Updated by Anonymous over 3 years ago

Joel Palmius wrote:

This seems to be a crash related to the shoes:
[...]

Thank you. Just added issue #828 for it.

#23 Updated by Joel Palmius over 3 years ago

Rob Baer wrote:

Can Unity directly import ASCII FBX without a trip through Blender? (e.g., Unreal engine can).

Yes. Since the collada import in blender (or possibly collada export in MH) seems to be wrecked atm, none of the above was passed through blender. The unity import was based on an unmodified ascii fbx export from MH.

Question though: Can binary fbx pack textures while ascii fbx can not? It's kind of annoying that (in unity) an imported model is stripped of all textures.

#24 Updated by Rob Baer over 3 years ago

So "pack" is a loaded word, but I can tell you that ASCII fbx exported from MH on my laptop and imported directly (no Blender) into Unreal Engine on this same laptop does include the clothes, skin, eye, etc textures on import.

#25 Updated by Jonas Hauquier almost 3 years ago

Did the recent changes in the binary FBX exporter fix at least some of the issues here?

It would be good if someone could make a short summary of this outstanding issues with FBX, and see what was fixed as well.
I doubt we'll have the time to address all tiny FBX quirks for the 1.1 release, but we could push some to v1.1.1 or v1.2 so that we can finally release 1.1

#26 Updated by Francois Grobbelaar almost 3 years ago

I'll do a binary FBX export and try it in UE4 and Blender.

#27 Updated by Francois Grobbelaar almost 3 years ago

I tried a binary FBX export in UE4, fbxConverter and Blender. Findings as below:
UE4: Works fine as far as I can tell, imports with skeleton (retargeting works), also imported textures etc. I even did an export with clothes and materials in both binary and ascii, imported both into UE4 and confirmed that they behave the same. Eye material renders almost solid-white, easy fix in the material editor.
fbxConverter: Works fine, keeping in mind we don't export animation, but from what we do export it looked good. There was one material that I noticed exported really shiny, so there might be a glitch there (see screenshot), but nothing seriously broken. Same issue with eye material, can't fix - but nothing terribly serious.
Blender: Imported fine and could pose bones, but when entering edit mode the whole model and some of the bones rotate, though I suspect this is most likely an issue with Blender's importer rather than our exporter. Didn't test out the materials, only basic importing.

Conclusion: I don't see any of the major issues we had back when I originally raised this bug. I think we should call it fixed and close the issue. Around the materials, I think there might be a couple of minor issues, but since FBX seems to be working for the most part, let's not try and fix it under this ticket. We can create separate tickets for that and anything new that's noticed.

Those are my thoughts anyway.

#28 Updated by Joel Palmius almost 3 years ago

I tested FBX with unity a week or so ago. Worked for me.

#29 Updated by Rob Baer almost 3 years ago

r1976 Win 10
There are multiple other threads tracking aspects of FBX, but the cardinal issues of this report seem addressed.

Adding to what Joel and Francois already reported:
  • I was able to import an MH FBX export (both ASCII and binary) into 3DSMax 2014 and cmu skeleton, clothes, and even expressions seemed to arrive intact
  • I was also able to import an MH FBX export (both ASCII and binary) into Maya 2016. I did experience some issues related to scaling translation of various export choices during import, but those issues seem outside the scope of the current bug report.
  • Finally, I was able to import binary MH export into Blender 2.76b. A couple of issues here. Skeleton and Mesh import with different rotations and scales. The skeleton ends z-up and about 1/10 the size of the mesh which is y-up. Both the skeleton and mesh rotate around x-axis by 90 degrees when entering edit mode, with the mesh z-up and the skeleton face-planted. Is this because we don't indicate rotation for all assets on export or is it a Blender importer issue? Do we apply all rotations before export? Second. The imported MH assets used named in Blender based on the file they were imported from. Now FBX imports get named by their skeleton, for example, 'CMU compliant skeleton' regardless of file origin. Is this an export related issue? I vaguely remember Jonas fixing this type of behavior in a previous iteration.

Still, none of this seems to be directly related to the current bug issue. The current bug should probably be closed in favor of more current status reports on FBX as we organize the MH 1.1 roll-out

#30 Updated by Rob Baer almost 3 years ago

And following on Francois's suggestion to use Autodesk FBX viewer as our 'gold standard', I'm reminded that we still have not figured out how to provide transparency for the eyes, eyebrows, eyelashes or hair that can be use-ably imported by other programs without post-import modification (exported - FBX or collada).

Again, not a barrier to closing this particular issue report, though.

#31 Updated by Rob Baer almost 3 years ago

  • Status changed from Fix exists, needs testing to Fixed

Converting status to fixed given the absence of counter-argument.

Also available in: Atom