Maniphest T53209

FBX material export issues
Closed, Resolved

Assigned To
Bastien Montagne (mont29)
Authored By
Juri Unt (juri3d)
Oct 31 2017, 8:51 AM
Tags
  • BF Blender
Subscribers
Bastien Montagne (mont29)
Felix Herbst (herbst)
Juri Unt (juri3d)
Linda Capito (lijecaru)
Sergey Sharybin (sergey)

Description

  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.

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[0] = math.pow(obj.active_material.diffuse_color[0],1/2.2) )

B 2.79.

Thank You

Revisions and Commits

rBA Blender Add-ons

Event Timeline

Juri Unt (juri3d) created this task.Oct 31 2017, 8:51 AM
Sergey Sharybin (sergey) assigned this task to Bastien Montagne (mont29).Oct 31 2017, 10:13 AM
Sergey Sharybin (sergey) lowered the priority of this task from 90 to 30.
Sergey Sharybin (sergey) added subscribers: Bastien Montagne (mont29), Sergey Sharybin (sergey).

Please always attach .blend file to demonstrate the issue.

@Bastien Montagne (mont29), is it enough information for you to do some bugfix already?

Juri Unt (juri3d) added a comment.Oct 31 2017, 10:45 AM

Blend file with embedded description attached

  • 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)
Bastien Montagne (mont29) added a comment.Oct 31 2017, 11:37 AM

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.

Juri Unt (juri3d) added a comment.Oct 31 2017, 2:50 PM

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!

Bastien Montagne (mont29) added a comment.Oct 31 2017, 3:14 PM

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

Bastien Montagne (mont29) changed the task status from Unknown Status to Resolved by committing rBA3e29cb17a7a0: Fix T53209: FBX exporter: Add very basic diffuse-color exporting for node-based….Oct 31 2017, 3:26 PM
Bastien Montagne (mont29) added a commit: rBA3e29cb17a7a0: Fix T53209: FBX exporter: Add very basic diffuse-color exporting for node-based….
Linda Capito (lijecaru) added a subscriber: Linda Capito (lijecaru).Jul 5 2019, 8:42 AM

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?

Omar Emara (OmarSquircleArt) added a subscriber: Felix Herbst (herbst).