Collada exporter: Redundancy in UV coordinating #35499

Closed
opened 2013-05-24 16:19:15 +02:00 by Hossein Noroozpour · 9 comments

%%%--- Ubuntu 13.04 x64, Nvidia G105 ---

- Blender v 2.66 ---

Short description:
I using blender for creating scene for my application, and I'm using Collada format for exporting my scene. when I started importing basic shapes in my 3D engine I encountered some kind of redundancy in UV texture coordinating, I mean element in .dae file, It seems the exporter module create UV values for every polygon, while this redundancy is not necessary, redundancy for UV must occur only for vertices that are in unwrap seem edges. I have some algorithm in my mind, but I don't know if it's implemented, can be implemented in blender or even it is a bug or whatever.

Steps:
1-run
2-empty scene
3-create cube
4-triangulate mesh
5-make a proper unwrapping
6-export collada
7-see what redundant collada you have.%%%

%%%--- Ubuntu 13.04 x64, Nvidia G105 --- - Blender v 2.66 --- Short description: I using blender for creating scene for my application, and I'm using Collada format for exporting my scene. when I started importing basic shapes in my 3D engine I encountered some kind of redundancy in UV texture coordinating, I mean <source id="objectMeshName-mesh-map-number"> element in .dae file, It seems the exporter module create UV values for every polygon, while this redundancy is not necessary, redundancy for UV must occur only for vertices that are in unwrap seem edges. I have some algorithm in my mind, but I don't know if it's implemented, can be implemented in blender or even it is a bug or whatever. Steps: 1-run 2-empty scene 3-create cube 4-triangulate mesh 5-make a proper unwrapping 6-export collada 7-see what redundant collada you have.%%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%Gaia, can you please look into this? :)%%%

%%%Gaia, can you please look into this? :)%%%
Member

%%%We could improve the export of UV coordinates by using the same method as we do for exporting of vertex normals:

I think that we only need to store each UV Vertex coordinate (u,v) once in the "mesh-map" array and later adjust the index array of the related such that it points to the right uv coordinates in the mesh-map.

As far as i know seams are not exported with Collada (we could eventually add them to the blender collada profile though), so we do not have to take care of them here.
%%%

%%%We could improve the export of UV coordinates by using the same method as we do for exporting of vertex normals: I think that we only need to store each UV Vertex coordinate (u,v) once in the "mesh-map" array and later adjust the index array of the related <polylist> such that it points to the right uv coordinates in the mesh-map. As far as i know seams are not exported with Collada (we could eventually add them to the blender collada profile though), so we do not have to take care of them here. %%%

%%%Hi Gaia !
I didn't say to export seam information. I said those vertices that take part in seam edges must be duplicated.
This redundancy is really a big issue, just imagine every object has been exported with collada have a least 7 redundant data per each vertices.
One of the importance of this issue, today every group using other game engines and blender for they modeling, are using collada for exporting method.%%%

%%%Hi Gaia ! I didn't say to export seam information. I said those vertices that take part in seam edges must be duplicated. This redundancy is really a big issue, just imagine every object has been exported with collada have a least 7 redundant data per each vertices. One of the importance of this issue, today every group using other game engines and blender for they modeling, are using collada for exporting method.%%%
Member

%%%hi, Hossein;

Sorry, i just wanted to point out that we do not need to take special care about seem edges when optimizing the UVTexture export. m Imentioned the export of seam information just as a side note.%%%

%%%hi, Hossein; Sorry, i just wanted to point out that we do not need to take special care about seem edges when optimizing the UVTexture export. m Imentioned the export of seam information just as a side note.%%%

%%%This isn't a bug, as in - the exporter is working as intended.
Of course the suggested improvement could be made, moving to TODO.

http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Import_Export#Export:_missing_features_or_not_a_Collada_issue%%%

%%%This isn't a bug, as in - the exporter is working as intended. Of course the suggested improvement could be made, moving to TODO. http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Import_Export#Export:_missing_features_or_not_a_Collada_issue%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

%%%OH! Really! Seven redundant data for vertices which are not participating in seam edges, is not a bug!?
Let me explain more.
When you want to draw a model (I mean mesh or geometry or whatever you say) in OpenGL you must have an unique index for all of the vertices, normals, UVs, etc.
Now look at collada file, expoerter create UVs data for vertices according to each triangle (if your mesh is triangulated), while only those vertices are in "seam edge"s must have multiple UV coordinate. This issue force programmer to copy unnecessary data for each triangle.
For example, assume we have a mesh which has 2000 vertices and only 100 of the vertices participating in "seam edge"s so in theory in worst case you must have (2000 - 100) + (100 * 7) but now exporter easily make 2000 * 7.%%%

%%%OH! Really! Seven redundant data for vertices which are not participating in seam edges, is not a bug!? Let me explain more. When you want to draw a model (I mean mesh or geometry or whatever you say) in OpenGL you must have an unique index for all of the vertices, normals, UVs, etc. Now look at collada file, expoerter create UVs data for vertices according to each triangle (if your mesh is triangulated), while only those vertices are in "seam edge"s must have multiple UV coordinate. This issue force programmer to copy unnecessary data for each triangle. For example, assume we have a mesh which has 2000 vertices and only 100 of the vertices participating in "seam edge"s so in theory in worst case you must have (2000 - 100) + (100 * 7) but now exporter easily make 2000 * 7.%%%

%%%Oh sorry for mistake!
Worst case In theory: 2000 + 100 * 7
Current Exporter: 2000 * 8
(for a model which has a well square wired form)%%%

%%%Oh sorry for mistake! Worst case In theory: 2000 + 100 * 7 Current Exporter: 2000 * 8 (for a model which has a well square wired form)%%%
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#35499
No description provided.