obj export degenerate mesh #52833

Closed
opened 2017-09-19 18:00:03 +02:00 by mathieu menuet · 15 comments

System Information
Windows 7 x64

Blender Version
Broken: 2.79 release and latest master

Short description of error
meshes exported with as obj are sometime degenerated

Exact steps for others to reproduce the error
Open attached file and export as obj, you get this (left is original, right is exported and then imported):
bug obj export.PNG

bug obj export.blend

**System Information** Windows 7 x64 **Blender Version** Broken: 2.79 release and latest master **Short description of error** meshes exported with as obj are sometime degenerated **Exact steps for others to reproduce the error** Open attached file and export as obj, you get this (left is original, right is exported and then imported): ![bug obj export.PNG](https://archive.blender.org/developer/F825433/bug_obj_export.PNG) [bug obj export.blend](https://archive.blender.org/developer/F825434/bug_obj_export.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli
Author

just tested, collada export doesn't has this bug

just tested, collada export doesn't has this bug

Added subscriber: @VukGardasevic

Added subscriber: @VukGardasevic

The error doesn't show up when the faces are triangulated before export.
The mesh is quite messy.

The error doesn't show up when the faces are triangulated before export. The mesh is quite messy.
Author

it's the result of boolean modifier on a cube. Bug happen with boolean modifier too (so a simple cube with cubes cutting it). I applied everything and removed some parts for simplification purpose.

it's the result of boolean modifier on a cube. Bug happen with boolean modifier too (so a simple cube with cubes cutting it). I applied everything and removed some parts for simplification purpose.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Campbell Barton self-assigned this 2017-09-20 05:35:29 +02:00

The error is in the polygon, not the OBJ import/export

There are some polygons which will display correctly by accident - that is, depending on the first vertex in the face and their exact shape, they may fill correctly or not.

The bug is that the boolean modifier produces a face with a zero area corner.

Could you submit a new report with the boolean used to create this data?


Edit, polygon filling could be made to better support this too, its such a border-line case though and prone to failing.

For example, by using doubles to calculate the area this can be made to work, but rotating the geometry immediately fails to fill properly.

The error is in the polygon, not the OBJ import/export There are some polygons which will display correctly *by accident* - that is, depending on the first vertex in the face and their exact shape, they may fill correctly or not. The bug is that the boolean modifier produces a face with a zero area corner. Could you submit a new report with the boolean used to create this data? ---- Edit, polygon filling could be made to better support this too, its such a border-line case though and prone to failing. For example, by using doubles to calculate the area this can be made to work, but rotating the geometry immediately fails to fill properly.
Author

@ideasman42 I'm working on a file for the boolean part. If collada and FBX exporter manage to export the geometry correctly, even with 0 area face, why not make the obj export also work in such cases like the 2 others?

@ideasman42 I'm working on a file for the boolean part. If collada and FBX exporter manage to export the geometry correctly, even with 0 area face, why not make the obj export also work in such cases like the 2 others?
Author

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Author

The boolean in question was applied many month ago already in the project files. Trying to recreate the same object with a modifier, the bug doesn't show up.

Nonetheless, as @VukGardasevic noted, triangulating manually before exporting works, while obj export with triangulate options fail. I see definitely potential here to deduplicate code by making use of Blender's API triangulate operator in the exporter and it would make the exporter to work properly.

The boolean in question was applied many month ago already in the project files. Trying to recreate the same object with a modifier, the bug doesn't show up. Nonetheless, as @VukGardasevic noted, triangulating manually before exporting works, while obj export with triangulate options fail. I see definitely potential here to deduplicate code by making use of Blender's API triangulate operator in the exporter and it would make the exporter to work properly.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by bfae39e9c1

This issue was referenced by bfae39e9c191d4f94cd36726ff2d6c1029128463

This issue was referenced by ce7685695e

This issue was referenced by ce7685695e9aedc2852289f772c8400674fd1025
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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#52833
No description provided.