Compatibility of exporting FBX with multiple color attributes to other software #104827

Closed
opened 2023-02-16 16:52:34 +01:00 by Andrej · 4 comments
Contributor

Blender Version: 3.4

If you have multiple color attributes and export object to fbx and then open in 3ds MAX, Substance Painter (there is probably more software with that problem, just the 2 programs I know about atm) they treat first color attribute as the main one and discard every other (Substance Painter) or just put them to some other map channels (3ds Max). Some other software could have similar problem with UVmap. Basically it creates some minor software compatibility issue.

image

So the order of color attributes is important but in Blender there is no option to easily prioritize some color at export. There is actually no option easily move colors in the list

Ideas how to solve that problem:

  1. Add in Blender FBX exporter option to "prioritize active color attribute" - basically it will export obj.data.color_attributes.active_color as the first one to make sure other software will see it. That's easy to implement - if everyone agrees I can create pull request with that feature.

  2. Add buttons to change order of attributes in the list to keep the main one on top.
    image

Blender Version: 3.4 If you have multiple color attributes and export object to fbx and then open in 3ds MAX, Substance Painter (there is probably more software with that problem, just the 2 programs I know about atm) they treat first color attribute as the main one and discard every other (Substance Painter) or just put them to some other map channels (3ds Max). Some other software could have similar problem with UVmap. Basically it creates some minor software compatibility issue. ![image](/attachments/006f4f3b-2601-4b49-bfcc-9fa9543e09a2) So the order of color attributes is important but in Blender there is no option to easily prioritize some color at export. There is actually no option easily move colors in the list Ideas how to solve that problem: 1) Add in Blender FBX exporter option to "prioritize active color attribute" - basically it will export `obj.data.color_attributes.active_color` as the first one to make sure other software will see it. That's easy to implement - if everyone agrees I can create pull request with that feature. 2) Add buttons to change order of attributes in the list to keep the main one on top. ![image](/attachments/c40ffeb5-478b-4d20-a59e-1eb5f4376a74)
Andrej added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-02-16 16:52:35 +01:00
Contributor

Add in Blender FBX exporter option to "prioritize active color attribute" - basically it will export obj.data.color_attributes.active_color

Requested (without the option) at blender/blender-addons#104214. OBJ and glTF also do this. The glTF exporter used to use the first but switched for the same reason: you can't control the order anymore.

There's still one problem though: do you use the active attribute (the one that's highlighted) or the active render one (the one with the clicked camera)?

Color attributes showing difference between active and active render

Currently OBJ uses the active one, but glTF uses the active render one. It'd be great for the exporters to all agree.

> Add in Blender FBX exporter option to "prioritize active color attribute" - basically it will export `obj.data.color_attributes.active_color` Requested (without the option) at https://projects.blender.org/blender/blender-addons/issues/104214. OBJ and glTF also do this. The glTF exporter used to use the first but switched for the same reason: you can't control the order anymore. There's still one problem though: do you use the _active_ attribute (the one that's highlighted) or the _active render_ one (the one with the clicked camera)? ![Color attributes showing difference between active and active render](/attachments/ac73054c-65d9-48c8-bb17-d3808c4a8e37) Currently OBJ uses the active one, but glTF uses the active render one. It'd be great for the exporters to all agree.
Author
Contributor

There's still one problem though: do you use the active attribute (the one that's highlighted) or the active render one (the one with the clicked camera)?

As far as I know "active render color/uvmap" will be used if those nodes in shader graph will be left without specifying attribute.
image

And "active color" is used by this thing
image
Weirdly enough, on contrary to colors "Active Render" for UVMap also defines what UVMap that will be used in viewport (which is probably another subject).

From coding point of view I met obj.data.color_attributes.active and obj.data.uv_layers.active all the time and really rarely I see checking [a for a in obj.data.uv_layers if a.active_render][0] (which is kind of weird because active_render is the uvmap that you'll actually see everywhere).
For color attributes I've no idea where render flag is even stored.

If we look at some other render properties export handled - when applying modifiers during export the viewport settings is used, not the render ones.
From that perspective currently using active_color seems to be better way to prioritize colors and active_render to prioritize UVMaps.

> There's still one problem though: do you use the active attribute (the one that's highlighted) or the active render one (the one with the clicked camera)? As far as I know "active render color/uvmap" will be used if those nodes in shader graph will be left without specifying attribute. ![image](/attachments/a9969f23-06e5-4a4c-97aa-1630577b806d) And "active color" is used by this thing ![image](/attachments/596188b3-85f0-41de-aa27-28e8521b52f0) Weirdly enough, on contrary to colors "Active Render" for UVMap also defines what UVMap that will be used in viewport (which is probably another subject). From coding point of view I met `obj.data.color_attributes.active` and `obj.data.uv_layers.active` all the time and really rarely I see checking `[a for a in obj.data.uv_layers if a.active_render][0]` (which is kind of weird because `active_render` is the uvmap that you'll actually see everywhere). For color attributes I've no idea where render flag is even stored. If we look at some other render properties export handled - when applying modifiers during export the viewport settings is used, not the render ones. From that perspective currently using `active_color` seems to be better way to prioritize colors and `active_render` to prioritize UVMaps.
9.0 KiB
5.9 KiB
Member

prioritize_active_color is now added in master so closing the ticket. Thanks @Andrej-4 :)
@mont29 hi, can we include this in 3.5 too?

`prioritize_active_color` is now added in master so closing the ticket. Thanks @Andrej-4 :) @mont29 hi, can we include this in 3.5 too?
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-03-15 11:55:25 +01:00
Pratik Borhade added
Status
Resolved
and removed
Status
Archived
labels 2023-03-15 11:55:36 +01:00

@PratikPB2123 looks safe enough yes, will do, thanks for the heads up.

@PratikPB2123 looks safe enough yes, will do, thanks for the heads up.
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#104827
No description provided.