FBX material export issues #53209

Closed
opened 5 years ago by JuriUnt · 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
Poster

Changed status to: 'Open'

Changed status to: 'Open'
Poster

Added subscriber: @JuriUnt

Added subscriber: @JuriUnt
Collaborator

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

blender/blender-addons#93174 was marked as duplicate of this issue
Sergey commented 5 years ago
Owner

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey
mont29 was assigned by Sergey 5 years ago
Sergey commented 5 years ago
Owner

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?
Poster

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)
mont29 commented 5 years ago
Owner

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.
Poster

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!
mont29 commented 5 years ago
Owner

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.
Collaborator

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

This issue was referenced by blender/blender-addons@3e29cb17a7a0964259b44e5053c7ae925d2874ec
mont29 commented 5 years ago
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
mont29 closed this issue 5 years ago

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?
Collaborator

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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#53209
Loading…
There is no content yet.