Collada Export: texcoord set="N" no longer starts at 0 #108053

Closed
opened 2023-05-18 19:09:56 +02:00 by Scurest · 2 comments
Contributor

System Information
Operating system: Linux

Blender Version
Broken: blender-3.5.0-beta+v35.f23e3c7f04f3-linux.x86_64-release

Short description of error
In Collada exports, texcoord attributes are ordered by a "set" number, eg <input semantic="TEXCOORD" source="#Cube-mesh-map-0" offset="2" set="0"/>. The set used to start at zero for the first UVMap and go up, set="0", then set="1", etc.

It no longer does this. I think it changed because of the UVMap -> generic attribute conversion: non-UV attributes affect the layer index.

AFAICT, this isn't actually wrong according to spec, but I don't think it was an intentional change and it's been noticed: https://www.vg-resource.com/thread-41711.html

I believe the relevant code is 406cfd214a/source/blender/io/collada/GeometryExporter.cpp (L373-L382). Note that when the "UV|Only Selected Map" option is on, it does default to set="0", which reinforces that the code was intended to start from 0.

Exact steps for others to reproduce the error

  1. Create default cube.
  2. Export to Collada with default options.
  3. Search .dae for <input semantic="TEXCOORD" and observe that set="1".
  4. Add some Face Corner color attributes.
  5. Export to Collada again.
  6. Observe the set has gone up by the number of attributes you added.
**System Information** Operating system: Linux **Blender Version** Broken: blender-3.5.0-beta+v35.f23e3c7f04f3-linux.x86_64-release **Short description of error** In Collada exports, texcoord attributes are ordered by a "set" number, eg `<input semantic="TEXCOORD" source="#Cube-mesh-map-0" offset="2" set="0"/>`. The set used to start at zero for the first UVMap and go up, `set="0"`, then `set="1"`, etc. It no longer does this. I think it changed because of the UVMap -> generic attribute conversion: non-UV attributes affect the layer index. AFAICT, this isn't actually wrong according to spec, but I don't think it was an intentional change and it's been noticed: https://www.vg-resource.com/thread-41711.html I believe the relevant code is https://projects.blender.org/blender/blender/src/commit/406cfd214aaad9c90b62ce48eda6d72d2eacb6fe/source/blender/io/collada/GeometryExporter.cpp#L373-L382. Note that when the "UV|Only Selected Map" option is on, it does default to set="0", which reinforces that the code was intended to start from 0. **Exact steps for others to reproduce the error** 1. Create default cube. 2. Export to Collada with default options. 3. Search .dae for `<input semantic="TEXCOORD"` and observe that `set="1"`. 4. Add some Face Corner color attributes. 5. Export to Collada again. 6. Observe the set has gone up by the number of attributes you added.
Scurest added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-05-18 19:09:57 +02:00
Member

Thanks for the report. Can confirm.
I also think this is affected by 6c774feba2
@Baardaap ^

Thanks for the report. Can confirm. I also think this is affected by 6c774feba2c9a1eb5834646f597a0f2c63177914 @Baardaap ^

I'll have a look.

Sounds like the collada exporter needs to restrict it's layer number by type as well as domain.

I'll have a look. Sounds like the collada exporter needs to restrict it's layer number by type as well as domain.
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2023-06-16 15:38:43 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-06-20 16:24:44 +02:00
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
3 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#108053
No description provided.