Page MenuHome

Array throwing error when exporting to fbx
Closed, ArchivedPublic

Description

System Information
Operating system:
Graphics card:
Nvidia 2080ti

Blender Version
Broken: 2.8

Short description of error
Saving a complicated mesh with numerous unapplied arrays (I assume this is issue, based on what I observed adding arrays and based on the error message below) as a .blend file for use in Unity, I was getting an intermittent error message from Unity:

UNITY ERROR MESSAGE
Blender could not convert the .blend file to FBX file.
You need to use Blender 2.45-2.49 or 2.58 and later versions for direct Blender import to work.

Adding a few more arrays and now intermittent is always. I attempted to export as an fbx from Blender and I get the following error message:

BLENDER ERROR MESSAGE
FBX export fetch meshes (77)...
Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\__init__.py", line 552, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3118, in save
  ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3015, in save_single
  fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2816, in fbx_objects_elements
  fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1123, in fbx_data_mesh_elements
  elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv_id] for uv_id in _uvtuples_gen(t_luv, t_lvidx)))
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\fbx_utils.py", line 503, in elem_data_single_int32_array
  return _elem_data_single(elem, name, value, "add_int32_array")
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\fbx_utils.py", line 450, in _elem_data_single
  getattr(sub_elem, func_name)(value)
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
  data = array.array(data_types.ARRAY_INT32, data)
File "C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1123, in <genexpr>
  elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv_id] for uv_id in _uvtuples_gen(t_luv, t_lvidx)))

KeyError: ((nan, nan), 3)

location: <unknown location>:-1

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

Details

Type
Bug

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Needs Information from User priority.

Do you have a .blend for us that shows the error upon FBX export?
(this ensures we are all on the same page -- when multiple devs are looking into this issue...)

Uploaded. Even after removing arrays the issue remains, so not sure about cause.

After removing all the arrays and recalculating all the UVs the error is gone and can export / open in Unity, in case that helps in finding the source of the issue,.

Philipp Oeser (lichtwerk) raised the priority of this task from Needs Information from User to Needs Triage by Developer.Sun, Aug 11, 8:45 PM
Philipp Oeser (lichtwerk) triaged this task as Needs Information from User priority.Mon, Aug 12, 3:37 PM

There seems to be just one object making problems: Cylinder.001 (in Windows > First Floor collection) .

This object has NaN location and near infinite negative scale...
Totally unsure how this got into such a state?
Anyways, if you remove that object, everything seems to be fine...
(it would be non-sense to safeguard all operators/exporters against such "invalid" objects, so this might very well be not considered a bug)

Would be interesting though if you would know how this could happen? Has this been edited with blender? (blenders tools?)

I’m not sure how it got into this state. Objects were not edited in anything except Blender 2.8 -- though saved and opened in Unity -- and I don’t recall doing anything particularly odd with it (created a UV map, added an array), but I’m new to 2.8. so more than possible it is some form of user error.

I redid every UV map throughout the project (without isolating the specific source of the problem) and that seems to have fixed it, so possibly UV related? Anyway, feel free to close if you think appropriate.

Bastien Montagne (mont29) closed this task as Archived.
Bastien Montagne (mont29) claimed this task.

Archiving, thanks for the report but we cannot do much about corrupted data, unless you can provide us with a clear and reproducible way to get such corruption...