FBX material export issues #53209

Closed
opened 2017-10-31 08:51:48 +01:00 by Juri Unt · 14 comments
  1. While Render Engine is set to Cycles, Regardless of Material color or Viewport Color of the material, Materials do not export with Color information (FBX). They will only export if material "use_nodes" is set False. To do that artists needs to switch to Blender Render. It's very clunky and unpredictable workflow.
  2. While exporting FBX Materials when use_nodes is enabled, GAMMA is not taken into account (2.2 needs to be applied). As a result target software loads it Darker.
    gamma_bug.png

Why is this important? When working with Game assets, colored materials are assigned to parts of highpoly mesh that is then baked onto LowPoly where Material colors become ID Masks (please google for more examples). 1) makes this task of exporting materials very clunky, wasteful, confusing and disappointing when bakes show blank. 2) creates very DARK materials which are very hard to color key and share in production between applications.

To summarize. Please consider small tweak to .fbx exporter to carry material color information regardless of render engine (e.g if Cycles, viewport_color should be exported). Also please apply Gamma fix (e.g obj.active_material.diffuse_color- [x] = math.pow(obj.active_material.diffuse_color- [x],1/2.2) )

B 2.79.

Thank You

1) While Render Engine is set to Cycles, Regardless of Material color or Viewport Color of the material, Materials do not export with Color information (FBX). They will only export if material "use_nodes" is set False. To do that artists needs to switch to Blender Render. It's very clunky and unpredictable workflow. 2) While exporting FBX Materials when use_nodes is enabled, GAMMA is not taken into account (2.2 needs to be applied). As a result target software loads it Darker. ![gamma_bug.png](https://archive.blender.org/developer/F1079022/gamma_bug.png) Why is this important? When working with Game assets, colored materials are assigned to parts of highpoly mesh that is then baked onto LowPoly where Material colors become [ID Masks ](https://support.allegorithmic.com/documentation/display/SD5/Color+Map+from+Mesh) (please google for more examples). 1) makes this task of exporting materials very clunky, wasteful, confusing and disappointing when bakes show blank. 2) creates very DARK materials which are very hard to color key and share in production between applications. To summarize. Please consider small tweak to .fbx exporter to carry material color information regardless of render engine (e.g if Cycles, viewport_color should be exported). Also please apply Gamma fix (e.g obj.active_material.diffuse_color- [x] = math.pow(obj.active_material.diffuse_color- [x],1/2.2) ) B 2.79. Thank You
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JuriUnt

Added subscriber: @JuriUnt

blender/blender-addons#93174 was marked as duplicate of this issue

blender/blender-addons#93174 was marked as duplicate of this issue

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey
Bastien Montagne was assigned by Sergey Sharybin 2017-10-31 10:13:46 +01:00

Please always attach .blend file to demonstrate the issue.

@mont29, is it enough information for you to do some bugfix already?

Please always attach .blend file to demonstrate the issue. @mont29, is it enough information for you to do some bugfix already?
Author

Blend file with embedded description attached fbx_materials_export.blend

  • To replicate issue of missing colors just export as .fbx, reimport it in Blender - all colors will be blank.
  • To replicate issue with Gamma, export fbx with materials (use_nodes=False), import in Maya/Max or some other program to see the issue ( Blender imports its own FBX correctly as well as FBX of other software)
Blend file with embedded description attached [fbx_materials_export.blend](https://archive.blender.org/developer/F1079193/fbx_materials_export.blend) - To replicate issue of missing colors just export as .fbx, reimport it in Blender - all colors will be blank. - To replicate issue with Gamma, export fbx with materials (use_nodes=False), import in Maya/Max or some other program to see the issue ( Blender imports its own FBX correctly as well as FBX of other software)

Technically, this is not a bug at all, we have absolutely no Cycles material support at all in FBX exporter… So that’s a feature request. ;)

We could use that viewport_color as diffuse one for Cycles materials, this one would sound like a reasonable hack, but… I don’t think we have any such thing currently??? Cycles seems to just use the regular diffuse color of the material in solid view, afaict.

Colors space is another topic, quoting official docs, « The FBX file format does not support Color space information. » And going to screen space from linear one by a mere 'random' gamma correction is not the way to go here anyway, that would have to be applied to all colors (not to mention other 'magic' conversions that could break…). That sounds like a whole big fat TODO topic that would need serious investigation first etc. Totally outside of bug tracker scope am afraid.

Technically, this is not a bug at all, we have absolutely no Cycles material support at all in FBX exporter… So that’s a feature request. ;) We could use that `viewport_color` as diffuse one for Cycles materials, this one would sound like a reasonable hack, but… I don’t think we have any such thing currently??? Cycles seems to just use the regular diffuse color of the material in solid view, afaict. Colors space is another topic, quoting [official docs](https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/files/GUID-AA3B8EA4-DDFB-4B0F-9654-2BF6B8781AE7-htm.html), « The FBX file format does not support Color space information. » And going to screen space from linear one by a mere 'random' gamma correction is not the way to go here anyway, that would have to be applied to all colors (not to mention other 'magic' conversions that could break…). That sounds like a whole big fat TODO topic that would need serious investigation first etc. Totally outside of bug tracker scope am afraid.
Author

Thank You for the insight!

  • viewport_color - Cycles seems to use viewport_color, not anything from nodes ( http://cgstrive.com/SS/2_10312017_83db.png ). So having this referenced upon export would already be a victory.
  • gamma/color space - In production max<->maya<->substance painter/designer transfer colors among one another identically. I suspect some issue with way Blender deals with it (bug?). I resolved my problem with pow(color, 1/2.2) matching Maya, Max as expected using custom python based export routine. Color IDs play pivotal role in texturing pipeline (SP, SD) so having them near black is a bit of an issue for artist using Blender in gamedev pipeline.

I hoped it would be an easy, fast fix. Certainly not a priority. I understand there are more urgent things to do, just thought might be worth noting. Thank You!

Thank You for the insight! - viewport_color - Cycles seems to use viewport_color, not anything from nodes ( http://cgstrive.com/SS/2_10312017_83db.png ). So having this referenced upon export would already be a victory. - gamma/color space - In production max<->maya<->substance painter/designer transfer colors among one another **identically**. I suspect some issue with way Blender deals with it (bug?). I resolved my problem with pow(color, 1/2.2) matching Maya, Max as expected using custom python based export routine. Color IDs play pivotal role in texturing pipeline (SP, SD) so having them near black is a bit of an issue for artist using Blender in gamedev pipeline. I hoped it would be an easy, fast fix. Certainly not a priority. I understand there are more urgent things to do, just thought might be worth noting. Thank You!

Ah ok, so 'viewport color' is actually just the regular diffuse color from materials… that I can add, remaining will be considered as TODO.

Ah ok, so 'viewport color' is actually just the regular diffuse color from materials… that I can add, remaining will be considered as TODO.

This issue was referenced by blender/blender-addons@3e29cb17a7

This issue was referenced by blender/blender-addons@3e29cb17a7a0964259b44e5053c7ae925d2874ec

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @lijecaru

Added subscriber: @lijecaru

Hello, any news regarding development to export .fbx from cycles render? I found a post from 2015 also asking for this feature. Is there a workaround?

Hello, any news regarding development to export .fbx from cycles render? I found a post from 2015 also asking for this feature. Is there a workaround?
Member

Added subscriber: @herbst

Added subscriber: @herbst
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
6 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#53209
No description provided.