Collada: export destroys mesh in some cases #35555

Closed
opened 2013-05-29 01:22:11 +02:00 by Henry Lang · 9 comments

%%%--- Operating System, Graphics card ---
here Win7 32 Bit, GeForce GTX 460/PCIe/SSE2/3DNOW!
But other People have the same problem

- Blender version with error, and version that worked ---

2.66a worked well. 2.67 and 2.67a have the problem

- Short description of error ---

In some cases vertices are wrong connected after collada-export.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

Example1:

  
  1. Cube
  2. second cube, scale it down, then scale y-axis a little bit up
  3. Boolean Modifier for Cube1 with Cube2 as bool-object
  4. You have now an cube with an hole (See the example-Object "Example_1" in blendfile)
  5. Use "Limited Dissolve" with this cube.
  6. Export it as collada.
  7. Reimport the dae-file: The hole is screwed up.

Example2:

  
  1. Cube
  2. Bevel one of the Edges with some segments (4 as example)
  3. Drag as example two of the segments inward into the cube
    (helpful to do this is to switch to Transformorientation "Normal")
    (See the example-Object "Example_2" in blendfile)
  4. Export it as collada.
  5. Reimport the dae-file: One side (here the right side) is screwed up.

%%%

%%%--- Operating System, Graphics card --- here Win7 32 Bit, GeForce GTX 460/PCIe/SSE2/3DNOW! But other People have the same problem - Blender version with error, and version that worked --- 2.66a worked well. 2.67 and 2.67a have the problem - Short description of error --- In some cases vertices are wrong connected after collada-export. - Steps for others to reproduce the error (preferably based on attached .blend file) --- Example1: ``` ``` 1. Cube 2. second cube, scale it down, then scale y-axis a little bit up 3. Boolean Modifier for Cube1 with Cube2 as bool-object 4. You have now an cube with an hole (See the example-Object "Example_1" in blendfile) 5. Use "Limited Dissolve" with this cube. 6. Export it as collada. 7. Reimport the dae-file: The hole is screwed up. Example2: ``` ``` 1. Cube 2. Bevel one of the Edges with some segments (4 as example) 3. Drag as example two of the segments inward into the cube (helpful to do this is to switch to Transformorientation "Normal") (See the example-Object "Example_2" in blendfile) 6. Export it as collada. 7. Reimport the dae-file: One side (here the right side) is screwed up. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%Hi Gaia! Afraid you're the only who could really easy resolve the issue. We'll really appreciate your help here :)%%%

%%%Hi Gaia! Afraid you're the only who could really easy resolve the issue. We'll really appreciate your help here :)%%%
Member

%%%Works for me.
Please can you provide:

  • what exact settings do you use for exporting the objects ?
  • a blend file that contains the screwed up object after import.

thanks%%%

%%%Works for me. Please can you provide: - what exact settings do you use for exporting the objects ? - a blend file that contains the screwed up object after import. thanks%%%
Author

%%%The problem occurs, when in collda-export "Triangulate" is activated. See the pic in the 2nd Attachment.

  

When i activate the "Export for SecondLife"-Option, than the problem occurs inworld
in both cases: With and without "triangulate"-Option.

The workaround for SecondLife-Upload is at the moment:

  

Attach the triangulate-modifier to the object: Without APPLY.

Instead activate in the collada-export-options "Apply Modifiers".

%%%

%%%The problem occurs, when in collda-export "Triangulate" is activated. See the pic in the 2nd Attachment. ``` ``` When i activate the "Export for SecondLife"-Option, than the problem occurs inworld in both cases: With and without "triangulate"-Option. The workaround for SecondLife-Upload is at the moment: ``` ``` Attach the triangulate-modifier to the object: Without APPLY. Instead activate in the collada-export-options "Apply Modifiers". %%%
Author

%%%The internal-uploader don't work. I get errors. So i use pasteall.org:

The Blendfile:

http://www.pasteall.org/blend/21723

The oicture for collada-settings:

http://www.pasteall.org/pic/52438

%%%

%%%The internal-uploader don't work. I get errors. So i use pasteall.org: The Blendfile: http://www.pasteall.org/blend/21723 The oicture for collada-settings: http://www.pasteall.org/pic/52438 %%%
Member

%%%The problem is in the triangulate function. Investigating...%%%

%%%The problem is in the triangulate function. Investigating...%%%
Member

%%%Hi, Ideasman_42;

I have added a blend file which contains 2 ngons for comparison.
Both ngons behave differently:

the left object exports wrong, and shows broken triangles on re import.
the right object exports correct and can correctly be re imported.

the export/import fails only when the export option "triangulate" is checked.
When triangulate is disabled, then ngons always export/import just right.

Observations:

1.) the vertex order of both objects is different. hence the normals show in opposite direction.
2.) for the broken object, the function poly_find_ear() always returns NULL
3.) I think that the function poly_find_ear() will fail if the order of vertices in the mloop is not clockwise (or anti clockwise)
4.) right after triangulation, the resulting Mesh object already contains the wrong triangles.
5.) The problem is somewhwere in / below bc_triangulate_mesh() (in the collada module)

Further: The right object (working) has been created manually. I just created an edge loop and then filled the loop.
The left object is a copy of the OP's initial demo, but reduced to just one ngon.%%%

%%%Hi, Ideasman_42; I have added a blend file which contains 2 ngons for comparison. Both ngons behave differently: the left object exports wrong, and shows broken triangles on re import. the right object exports correct and can correctly be re imported. the export/import fails only when the export option "triangulate" is checked. When triangulate is disabled, then ngons always export/import just right. Observations: 1.) the vertex order of both objects is different. hence the normals show in opposite direction. 2.) for the broken object, the function poly_find_ear() always returns NULL 3.) I think that the function poly_find_ear() will fail if the order of vertices in the mloop is not clockwise (or anti clockwise) 4.) right after triangulation, the resulting Mesh object already contains the wrong triangles. 5.) The problem is somewhwere in / below bc_triangulate_mesh() (in the collada module) Further: The right object (working) has been created manually. I just created an edge loop and then filled the loop. The left object is a copy of the OP's initial demo, but reduced to just one ngon.%%%

%%%face normals were not calculated, added an argument to the conversion function for this and asserts so the error is much more obvious next time.

fixed r57208.%%%

%%%face normals were not calculated, added an argument to the conversion function for this and asserts so the error is much more obvious next time. fixed r57208.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
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#35555
No description provided.