Array throwing error when exporting to fbx #68292

Closed
opened 2019-08-06 07:40:41 +02:00 by Gene · 19 comments

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: :-1

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

**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).
Author

Added subscriber: @floatingfactory

Added subscriber: @floatingfactory
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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...)

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...)
Author

cathedral.blend

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

[cathedral.blend](https://archive.blender.org/developer/F7651753/cathedral.blend) Uploaded. Even after removing arrays the issue remains, so not sure about cause.
Author

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,.

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,.
Member

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?)

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?)
Author

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.

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.

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2019-08-20 11:06:24 +02:00

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...

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...

Added subscriber: @AdamPreisler

Added subscriber: @AdamPreisler

I have the same problem. The issue is my file has ~6000 objects and I don't know of a way how to pinpoint which of them is causing this. :/

I have the same problem. The issue is my file has ~6000 objects and I don't know of a way how to pinpoint which of them is causing this. :/

So by hiding halfs of the model I narrowed it down to this object after a while:

nan-nan.blend

Tried deleting UVs, clearing custom split data and still not sure what could it be.

Edit1: Found out that if I delete both UV maps it works. But the question is - what is wrong with the UV maps? They look fine.

Edit2: OK so I redid both UV maps again and now it can be exported. The original object had a bevel modifier on it. Wondering if that could cause this.

Here is blend with bevel: nan-nan_with-bevel.blend

So by hiding halfs of the model I narrowed it down to this object after a while: [nan-nan.blend](https://archive.blender.org/developer/F8791421/nan-nan.blend) Tried deleting UVs, clearing custom split data and still not sure what could it be. Edit1: Found out that if I delete both UV maps it works. But the question is - what is wrong with the UV maps? They look fine. Edit2: OK so I redid both UV maps again and now it can be exported. The original object had a bevel modifier on it. Wondering if that could cause this. Here is blend with bevel: [nan-nan_with-bevel.blend](https://archive.blender.org/developer/F8791479/nan-nan_with-bevel.blend)

Added subscriber: @Godfather-2

Added subscriber: @Godfather-2

I know what's the the problem. I just found the solution. Some days ago i installed armory add ons in blender. So i uninstalled them and now i can save my fbx. So you can try to uninstall recently added addon in blender and try again.

I know what's the the problem. I just found the solution. Some days ago i installed armory add ons in blender. So i uninstalled them and now i can save my fbx. So you can try to uninstall recently added addon in blender and try again.

Added subscriber: @Abru

Added subscriber: @Abru

also i am having this problem on my project, can you help me?

also i am having this problem on my project, can you help me?

Old thread, still an existing problem.
So I had the same issue and found out, that if an UV Texture is applied to an object it can't be exported as a .FBX.
UV Maps though can be exported. I don't know when it creates an UV Texture and when an UV Map, but that sorted the problem for me.

Old thread, still an existing problem. So I had the same issue and found out, that if an UV Texture is applied to an object it can't be exported as a .FBX. UV Maps though can be exported. I don't know when it creates an UV Texture and when an UV Map, but that sorted the problem for me.

Had the same issue, tried to export multiple objects as one FBX and some of these objects had no generated UV Maps.
Seems like all objects need to have UV Maps to export multiple objects to one FBX file.
I simply removed the objects without a UV Map and then I was able to export to FBX without a problem.

Had the same issue, tried to export multiple objects as one FBX and some of these objects had no generated UV Maps. Seems like all objects need to have UV Maps to export multiple objects to one FBX file. I simply removed the objects without a UV Map and then I was able to export to FBX without a problem.
Sign in to join this conversation.
No Milestone
No project
No Assignees
8 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-addons#68292
No description provided.