question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exporting custom normals imported from an FBX throws error

See original GitHub issue

Blender version: 2.80.0-git.168d3fd528c4-windows64 Import-Export: FBX format version: 4.14.3 Import-Export glTF 2.0 format version: 0.0.1

I imported a very simple cube object from an FBX (created with C4D) and wanted to export it to glTF. I’m getting an error that an element-wise multiplication between a Matrix and a Vector is not allowed.

I did a bit of research and got some interesting findings that might help pinpoint the problem:

  • When importing with an older 2.79 version (Import-Export FBX format version: 3.7.17), saving as a blend file, opening it with 2.80 and then exporting it the problem does not occur and the export is successful.
  • When Clearing the custom split normals data, the export is successful as well dirtyfix

Here are the blend files from 2.79 which has not problem, and 2.80 with throws the error when exporting. FBXImportCustomNormals.zip

Error:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\__init__.py", line 354, in execute
    return gltf2_blender_export.save(context, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 39, in save
    json, buffer = __export(export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 53, in __export
    __gather_gltf(exporter, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 68, in __gather_gltf
    scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 34, in gather_gltf2
    scenes.append(__gather_scene(blender_scene, export_settings))
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 52, in __gather_scene
    node = gltf2_blender_gather_nodes.gather_node(blender_object, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 40, in gather_node
    children=__gather_children(blender_object, export_settings),
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 90, in __gather_children
    node = gather_node(child_object, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 44, in gather_node
    mesh=__gather_mesh(blender_object, export_settings),
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 187, in __gather_mesh
    result = gltf2_blender_gather_mesh.gather_mesh(blender_mesh, vertex_groups, modifiers, skip_filter, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 38, in gather_mesh
    primitives=__gather_primitives(blender_mesh, vertex_groups, modifiers, export_settings),
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 89, in __gather_primitives
    return gltf2_blender_gather_primitives.gather_primitives(blender_mesh, vertex_groups, modifiers, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 55, in gather_primitives
    material=__gather_materials(internal_primitive, blender_mesh, modifiers, export_settings),
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 70, in __gather_materials
    return gltf2_blender_gather_materials.gather_material(material, mesh_double_sided, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 52, in gather_material
    pbr_metallic_roughness=__gather_pbr_metallic_roughness(blender_material, export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 160, in __gather_pbr_metallic_roughness
    export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials_pbr_metallic_roughness.py", line 32, in gather_material_pbr_metallic_roughness
    base_color_texture=__gather_base_color_texture(blender_material, export_settings),
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials_pbr_metallic_roughness.py", line 97, in __gather_base_color_texture
    return gltf2_blender_gather_texture_info.gather_texture_info((base_color_socket,), export_settings)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture_info.py", line 34, in gather_texture_info
    extensions=__gather_extensions(blender_shader_sockets_or_texture_slots, export_settings),
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture_info.py", line 60, in __gather_extensions
    texture_transform = gltf2_blender_get.get_texture_transform_from_texture_node(texture_node)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_get.py", line 402, in get_texture_transform_from_texture_node
    mapping_transform = inverted(mapping_transform)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.168d3fd528c4-windows64\2.80\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_get.py", line 394, in inverted
    new_offset = Matrix.Rotation(-rotation, 3, 'Z') * Vector((-offset[0], -offset[1], 1))
TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector' types

location: <unknown location>:-1

Any ideas of where the problem might be?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Mar 4, 2019

Do you maybe use the latest commit of this repo as well instead of version 0.0.1 from the install itself?

You are right! But good that it seems to be fixed now 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Normals Not Exporting Properly to FBX/DAE - Maya LT
Before the 2016 update, when I exported my models to FBX to convert to DAE with the FBX converter, hard/smooth edges exported fine....
Read more >
Exporting and importing FBX in Blender - Artisticrender.com
If the FBX model has custom normals blender will attempt to import them, if it cannot find them or import them it will...
Read more >
FBX Import Errors - Unreal Engine Documentation
This error is thrown when importing an LOD (or importing a Skeletal Mesh with LODs) and the requested mesh for the LOD does...
Read more >
"Mesh Normals Invalid" when importing mesh
Hi,. This issue is a modeling one. If you fail to provide Painter with normals, tangents and bi-tangeants ; Painter will recalculate them....
Read more >
T56792 Alembic doesn't export custom normals correctly
I have had the exact same problem these guys ave had. The only way to fix this that I know of is to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found