Something in Blender can generate invalid (Nan) values in UVMaps #79775
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
30 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#79775
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See e.g. nan-nan_with-bevel.blend (run
mesh_data.validate(verbose=True)
in py console to see the issues).It might be caused by Bevel code? Needs investigation.
Original Report:
System Information
Operating system: Windows 10
Graphics card: 1080 Ti
Blender Version
Broken: 2.83.4, 2.82a,
e4932d1167
Worked: No Idea
Short description of error
Exact steps for others to reproduce the error
Export the fbx. (Only default settings were tested.)
Voiture.blend
here is log
Added subscriber: @takaralolita
blender/blender-addons#97197 was marked as duplicate of this issue
#96951 was marked as duplicate of this issue
#92329 was marked as duplicate of this issue
#91707 was marked as duplicate of this issue
blender/blender-addons#90581 was marked as duplicate of this issue
blender/blender-addons#90003 was marked as duplicate of this issue
#89012 was marked as duplicate of this issue
blender/blender-addons#88736 was marked as duplicate of this issue
#88704 was marked as duplicate of this issue
#88615 was marked as duplicate of this issue
blender/blender-addons#88573 was marked as duplicate of this issue
blender/blender-addons#88495 was marked as duplicate of this issue
#88024 was marked as duplicate of this issue
#88003 was marked as duplicate of this issue
#87807 was marked as duplicate of this issue
blender/blender-addons#87103 was marked as duplicate of this issue
#86831 was marked as duplicate of this issue
#86734 was marked as duplicate of this issue
#86703 was marked as duplicate of this issue
blender/blender-addons#86593 was marked as duplicate of this issue
#85590 was marked as duplicate of this issue
#85283 was marked as duplicate of this issue
#84809 was marked as duplicate of this issue
#84635 was marked as duplicate of this issue
#84617 was marked as duplicate of this issue
#84085 was marked as duplicate of this issue
#84066 was marked as duplicate of this issue
#84056 was marked as duplicate of this issue
#82391 was marked as duplicate of this issue
#82146 was marked as duplicate of this issue
#82125 was marked as duplicate of this issue
#81822 was marked as duplicate of this issue
#81713 was marked as duplicate of this issue
#80835 was marked as duplicate of this issue
blender/blender-addons#80816 was marked as duplicate of this issue
#80584 was marked as duplicate of this issue
#80540 was marked as duplicate of this issue
blender/blender-addons#79660 was marked as duplicate of this issue
#79994 was marked as duplicate of this issue
blender/blender-addons#80075 was marked as duplicate of this issue
Just Rebuild everything and The exact same problem when exporting, what is going on???
Created a New file, No textures, just the shapes
Traceback (most recent call last):
KeyError: ((nan, nan), 11)
location: :-1
Added subscriber: @rjg
Changed status from 'Needs Triage' to: 'Needs User Info'
This comment was removed by @rjg
Added subscriber: @StephenSwaney
Along with providing a .blend, you might want to test this with the current 2.84 release, preferably from blender.org.
Blender does not need to be installed. You can simply download it, unpack the archive and run it directly.
It may seem simple when you are clicking Export, but FBX is a very complicated format. Worse, it is proprietary which means you need a license from Autodesk to read the specification or use their libraries to read and write the format. Worse still, Autodesk is rumored to change the format regularly to prevent reverse-engineering.
Added subscriber: @andresalim
Added subscriber: @Ying-Wang
Added subscribers: @TyrManda, @Jijones, @carlhughes, @ankitm
Changed status from 'Needs User Info' to: 'Confirmed'
Added subscriber: @Baguette
Added subscribers: @3di, @mano-wii, @lichtwerk
Since this is reported often and we keep this report open for it [not sure if we should, usually the "corrupted" meshes are not tracked in the bugtracker, we only do if we can find the source for the corruption within blender tools], I'll drop the following comment here. I guess this is relevant for all of the reported files:
Maybe the fact that this is specifically about the custom-data layers will help us track the issue down further.
Added subscriber: @20Martin
Added subscriber: @AdamPreisler
Dropping this comment here [might help track down the issue as well]:
Added subscribers: @meysamFk97, @iss, @gobb_blend
More information:
@gobb_blend thank you for example file, can you add steps to what exactly should I extrude to cause the bug? also do I have to use specific Blender version?
I copied the object, extruded faces of frame to make "tunnel", exported FBX and I had no issue.
This issue could be caused by some addon as well, so it would be good to check that as well if you can reproduce the issue.
Error when exporting FBXto Error when exporting FBX (presumably caused by conflicting cached uv customdatalayer)@iss In our case Blender 2.83.3 was used when the bug occurred. No add-ons besides the ones that are active by default. The artist extruded (E key) the arch above the door into the wall of the building like so:
That's all I can tell you. I personally never encountered this bug, and following these steps as described doesn't cause it for me either.
Added subscriber: @Cybernetfreek
Setting to hig prio since it is reported so often.
Slight amendment to the code I posted above (forgot to check if it's a mesh). If this is run from the text editor prior to export, then the fbx error disappears.
Workaround until the devs find out the root cause.
Error when exporting FBX (presumably caused by conflicting cached uv customdatalayer)to Something in Blender can generate invalid (Nan) values in UVMapsAdded subscriber: @mont29
Changed status from 'Confirmed' to: 'Needs User Info'
Note: nan-nan_with-bevel.blend does exhibit the issue in 2.83, but not in current master, so I would assume the issue from Bevel modifier has already been fixed.
It remains unclear whether other tools can still generate such invalid data in current master?
Added subscribers: @sharlybg, @brecht
Added subscriber: @Ashtray
My problem was merged into this one. You mentioned that the UV Mapping was corrupted.
I went into the UV Maps in the currupted object properties. Removed the UV Map and added one. It's solved the problem on my end.
So I guess the workaround is reapply the UV Maps on all your objects.
@Ashtray This is a better workaround:
stick this in the text editor and hit run script before you try and export. It'll fix the entire scene.
import bpy
for ob in bpy.data.objects:
Added subscriber: @jordanirwin
Added subscriber: @Udjanii
I am having this issue for the last 4 versions of blender 2.90 and 2.91. The only reliable way to fix it is to export the mesh as OBJ and import again to export as FBX
Michael Campbell script only works on scene where i appended the corrupt objects to a new file to test, on the original scene were i have hundreds of the script does not fix the bug.
Added subscriber: @mhmmtuzn61
Added subscriber: @ptNutty
Added subscriber: @Step202
Added subscriber: @esgnn
The way I have this problem is when I extrude the newly created area has no uv area at all, it is like an edge (screenshot attached). After mapping uv properly I can export it as fbx file. However it is not a practical solution at all. Hope it helps.
(I am a blender newbie, please excuse the lack of lingo)
@esgnn I couldn't reproduce this with a simple mesh. Extruding a mesh and not unwrapping it afterwards still exports fine.
Added subscriber: @eko_lx
Added subscriber: @ShinkiPham
Removed subscriber: @Ashtray
Added subscriber: @Mr_Badoor
Added subscribers: @rockittt, @filedescriptor, @erik85
Added subscriber: @Adrian1
Added subscriber: @aldzz
Added subscriber: @miralyondev
Added subscriber: @Foggy
Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
In order to not let this report die, I will set its status to "Needs developer To Reproduce".
Removed subscriber: @eko_lx
Added subscriber: @ee.hristolubov
Added subscriber: @LKelda
Added subscriber: @jcmind
Added subscriber: @Jaxtronaut
Added subscriber: @apprenti90
Added subscriber: @screwballll
Added subscriber: @PCotton
Added subscriber: @Marlo
Removed subscriber: @AdamPreisler
Added subscriber: @Vyach
Not sure if it helps, but will set to High prio (just due to the fact it has been reported so often lately)
@lichtwerk sadly it wasn
t my file (subsriber sent this issue) So info is poor: this mesh was produced by blender (without any import), and such thing happens very rare, as he said (it was few times, last time a month ago). I still don
t have the way to reproduce.Removed subscriber: @erik85
Added subscriber: @DORI
Added subscriber: @Ksard
Removed subscriber: @Ksard
Added subscriber: @shaprinskiy
Added subscriber: @Benyaminpr2000
Added subscriber: @stnslvkey
Removed subscriber: @Jaxtronaut
Added subscribers: @tomankubik, @chemicalcrux
I wrote a "fuzzer" that randomly performs mesh operations and attempts to export to FBX after each step. I managed to produce NaN UV coordinates via an Inset operation.
The resulting geometry was a mess...
I narrowed it down to five vertices, four of which are perfectly stacked on top of each other. If you inset (no mouse movement) with them all selected, you should get NaN UVs and be unable to export to FBX. Before the inset, you should be able to export.
minimal.blend
I don't think you can remove any of the vertices, but I am having some trouble selecting them :p
I did this in 2.93
edit -- I've got another example here. It generates bogus UVs when inset with a thickness of zero, when beveled with a non-zero width, and when using Poke Faces.
poke.blend
It involves more degenerate geometry. The original geometry is on the left; I pulled it apart on the right to visualize the actual topology.
The bug is extremely sensitive to the specifics of the vertex coordinates. Rotating the mesh data or moving individual vertices even slightly will make the bug go away.
Also, this is not invalid mesh data; it's simply degenerate. The validate function has no effect on these two examples.
This issue was referenced by
b21db5e698
Thanks a lot @chemicalcrux with that kind of file reproducing and fixing the issue becomes trivial! :D
Note that I'll keep the report open for now, there might be other cases still floating around...
I was about to complain that I couldn't get these to work on the latest alpha for some reason...then I looked at the related commit :'D
I'm fuzzing around for more NaN UVs right now. None yet -- although I have been getting crashes and NaN coordinates for vertices, so that's exciting! I'll try to make some more simple reproductions for those, but that may be a better fit for a different task.
Added subscribers: @srinivasdhuddu, @PratikPB2123
Added subscriber: @CyberStien
I'm sorry if this is wrong place for this, but is there a workaround/process for fixing these NaN UV coordinates once they've been created? I currently have a ton of geometry with this issue and I'd like to not have to recreate it all if possible.
@CyberStien See the code in #79775#1016390
mesh.validate
Added subscriber: @iMakeMehModels
I had another repro case in #90609 (Can't export as FBX) (involving bevel with zero-scaled faces), but that was also fixed with
b21db5e698
-- hooray!@mont29: can we get this into 2.93 LTS? (huh, just noticed you were asking the same in
b21db5e698
, will put that on the list of #88449 (Blender LTS: Maintenance Task 2.93))Added subscriber: @DankJerry
Any news? Hope it will be fixed for 3.0
Well in 3.0, it should actually not happen anymore (see
b21db5e698
).This does not repair old files though (for that, you need to
mesh.validate()
still see #79775#1016390)If it will not, and it is possible to fix it is okay for me! Good news at least for 3.0!
Added subscriber: @CJaiswal
Added subscriber: @HakunaMytata
Added subscriber: @Tigre8002
Added subscriber: @ideasman42
This is marked as a high priority bug report but as far as I can see the issue reported has been resolved.
Is there any need to keep this open?
Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
The issues reported are all from files authored before
b21db5e698
afaict, so it might be time to finally close this as resolved.Should issues ever creep up again, we can always reopen.
Removed subscriber: @gobb_blend
the issue still there in 3.6.2
@Sergey many values in this UVMap are NaN... as usual, need to know how such invalid data is generated.
@mont29 Think the wrong Sergey was poked via the AT-thingie?
@Sergey Woops indeed, sorry 😅
so funny thing right
i have this ar15 model ive worked for a while and the second i try and merge everything and export it so i can texture it or even i tried to texture it in blender but my uv wont work and it wont let me export at all
my version of blender is 3.6 i know this is old but i hope i can find help anyway i dont want o just throw it in the bin yet
i dont know if this is normal but there are weird links between my meshes