Should FBX exporter exports the base color when there is a texture embedded, or instead always export a white base color? #101198

Open
opened 2022-09-19 21:41:50 +02:00 by Julian · 15 comments

System Information
Operating system: Debian 11
Graphics card: Nvidia GTX 1080

Blender Version
Broken: 3.3.0

Short description of error
Exporting an FBX file that has a texture connected to the Base Color node results in Blender also exporting the Base Color value that is “under” the texture.
This can result in some hard to debug issues in other applications, since many mix the Base Color and the Base Color texture.

Exact steps for others to reproduce the error

  1. Create a cube
  2. Change the Base Color of its material
  3. Add a Base color texture after changing its Base Color
  4. Export as FBX with embedded textures
  • The FBX now contains the Base Color set before adding the texture and the texture.

Comparision
The first cube uses the default Blender material settings.
The second cube just has a grey texture applied.
The third cube has the base color changed to almost fully black before getting the grey texture added.
The fourth cube has its base color changed to fully white before getting the grey texture added.
Blender:
Bildschirmfoto vom 2022-09-30 15-06-10.png
Autodesk FBX Review:
Autodesk_FBX_Review.png
Overte:
overte-snap-by-JulianGro-on-2022-09-30_15-19-40.png
Godot:
Test - Godot Engine_001.png

Here is the file used for comparision: blender_FBX_base_color_export.fbx
And the Blend file it is created from: blender_FBX_base_color_export.blend

**System Information** Operating system: Debian 11 Graphics card: Nvidia GTX 1080 **Blender Version** Broken: 3.3.0 **Short description of error** Exporting an FBX file that has a texture connected to the Base Color node results in Blender also exporting the Base Color value that is “under” the texture. This can result in some hard to debug issues in other applications, since many mix the Base Color and the Base Color texture. **Exact steps for others to reproduce the error** 1. Create a cube 2. Change the Base Color of its material 3. Add a Base color texture *after* changing its Base Color 4. Export as FBX with embedded textures - > The FBX now contains the Base Color set before adding the texture *and* the texture. **Comparision** The first cube uses the default Blender material settings. The second cube just has a grey texture applied. The third cube has the base color changed to almost fully black before getting the grey texture added. The fourth cube has its base color changed to fully white before getting the grey texture added. Blender: ![Bildschirmfoto vom 2022-09-30 15-06-10.png](https://archive.blender.org/developer/F13598077/Bildschirmfoto_vom_2022-09-30_15-06-10.png) Autodesk FBX Review: ![Autodesk_FBX_Review.png](https://archive.blender.org/developer/F13598067/Autodesk_FBX_Review.png) Overte: ![overte-snap-by-JulianGro-on-2022-09-30_15-19-40.png](https://archive.blender.org/developer/F13598071/overte-snap-by-JulianGro-on-2022-09-30_15-19-40.png) Godot: ![Test - Godot Engine_001.png](https://archive.blender.org/developer/F13598098/Test_-_Godot_Engine_001.png) Here is the file used for comparision: [blender_FBX_base_color_export.fbx](https://archive.blender.org/developer/F13598125/blender_FBX_base_color_export.fbx) And the Blend file it is created from: [blender_FBX_base_color_export.blend](https://archive.blender.org/developer/F13598127/blender_FBX_base_color_export.blend)
Author

Added subscriber: @MotoFckr9k

Added subscriber: @MotoFckr9k
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

since they might mix the Base Color and the Base Color texture.

Can you elaborate on this? Which software does that and how does it do the mixing?

> since they might mix the Base Color and the Base Color texture. Can you elaborate on this? Which software does that and how does it do the mixing?
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Author

In #101198#1424147, @OmarEmaraDev wrote:
Can you elaborate on this? Which software does that and how does it do the mixing?

I cannot elaborate much on it.
It happens in Overte and I don't think the mixing is even working properly in there. The result is too dark.

Regardless of what software is supposed to do with this Base Color value though, Blender doesn't show the user this value when you add a Base Color texture.
I don't know how this case is supposed to be handled in FBX since there doesn't appear to be any proper spec on it, but at the very least Blender shouldn't export a Base Color that is invisible to the user.

> In #101198#1424147, @OmarEmaraDev wrote: > Can you elaborate on this? Which software does that and how does it do the mixing? I cannot elaborate much on it. It happens in Overte and I don't think the mixing is even working properly in there. The result is too dark. Regardless of what software is supposed to do with this Base Color value though, Blender doesn't show the user this value when you add a Base Color texture. I don't know how this case is supposed to be handled in FBX since there doesn't appear to be any proper spec on it, but at the very least Blender shouldn't export a Base Color that is invisible to the user.
Member

The last time this was brought up in blender/blender#72983, it wasn't considered a bug, and since you can't elaborate further except for Overte, I doubt this will change.
If you have any more information regarding this with respect to the FBX spec or a servey of different software behavior, feel free to bring that up and this will be looked into. But otherwise, I will merge to blender/blender#72983 for now.

The last time this was brought up in blender/blender#72983, it wasn't considered a bug, and since you can't elaborate further except for Overte, I doubt this will change. If you have any more information regarding this with respect to the FBX spec or a servey of different software behavior, feel free to bring that up and this will be looked into. But otherwise, I will merge to blender/blender#72983 for now.
Member

Closed as duplicate of blender/blender#72983

Closed as duplicate of blender/blender#72983
Author

I took a look at Autodesks FBX Review tool and it actually does the same mixing that Overte does.
Here is a comparision:
The first cube uses the default Blender material settings.
The second cube just has a grey texture applied.
The third cube has the base color changed to almost fully black before getting the grey texture added.
The fourth cube has its base color changed to fully white before getting the grey texture added.
Blender:
Bildschirmfoto vom 2022-09-30 15-06-10.png
Autodesk FBX Review:
Autodesk_FBX_Review.png
Overte:
overte-snap-by-JulianGro-on-2022-09-30_15-19-40.png
Godot:
Test - Godot Engine_001.png

I took a look at Autodesks FBX Review tool and it actually does the same mixing that Overte does. Here is a comparision: The first cube uses the default Blender material settings. The second cube just has a grey texture applied. The third cube has the base color changed to almost fully black before getting the grey texture added. The fourth cube has its base color changed to fully white before getting the grey texture added. Blender: ![Bildschirmfoto vom 2022-09-30 15-06-10.png](https://archive.blender.org/developer/F13598077/Bildschirmfoto_vom_2022-09-30_15-06-10.png) Autodesk FBX Review: ![Autodesk_FBX_Review.png](https://archive.blender.org/developer/F13598067/Autodesk_FBX_Review.png) Overte: ![overte-snap-by-JulianGro-on-2022-09-30_15-19-40.png](https://archive.blender.org/developer/F13598071/overte-snap-by-JulianGro-on-2022-09-30_15-19-40.png) Godot: ![Test - Godot Engine_001.png](https://archive.blender.org/developer/F13598098/Test_-_Godot_Engine_001.png)
Member

Changed status from 'Duplicate' to: 'Confirmed'

Changed status from 'Duplicate' to: 'Confirmed'
Member

Thanks for the extra information. Looks like this need to be considered indeed. So I will confirm. Can you update the original report with the information in your last comment.

Thanks for the extra information. Looks like this need to be considered indeed. So I will confirm. Can you update the original report with the information in your last comment.

Added subscriber: @mont29

Added subscriber: @mont29

That sounds like yet another undocumented, unexpected behavior of FBX... I do not see any reason to implicitly mix base color with texture, the later should just take over (unless it has some level of alpha maybe)... We could force base color to white when there is a texture I guess, but then it means you lose even more data in the round trip (export and re-import in Blender)...

In any case, this is not a bug, at best a design issue. If majority of userbase of FBX IO agrees that white base color when there is a texture is the desired behavior, we can change it.

That sounds like yet another undocumented, unexpected behavior of FBX... I do not see any reason to implicitly mix base color with texture, the later should just take over (unless it has some level of alpha maybe)... We could force base color to white when there is a texture I guess, but then it means you lose even more data in the round trip (export and re-import in Blender)... In any case, this is not a bug, at best a design issue. If majority of userbase of FBX IO agrees that white base color when there is a texture is the desired behavior, we can change it.
Bastien Montagne changed title from FBX exporter exports a base color even when there is a texture embedded to Should FBX exporter exports the base color when there is a texture embedded, or instead always export a white base color? 2022-10-07 14:41:04 +02:00
Author

I would certainly like it just exporting white as the base colour in this scenario.
I feel like the round trip of Blender to FBX to Blender is generally less important than Blender to FBX, but in this case we are even talking about a value that is unused and not visible in Blender unless you get rid of the texture.

Also just for reference, there is a slight reason to mix base colour and base texture. It can be used to save on filesize by mixing a greyscale texture with the base colour. That way you can use the same texture for multiple different coloured materials.

We actually sometimes do something similar in Overte, where we use a greyscale texture and vertex colours to save on file size.

I would certainly like it just exporting white as the base colour in this scenario. I feel like the round trip of Blender to FBX to Blender is generally less important than Blender to FBX, but in this case we are even talking about a value that is unused and not visible in Blender unless you get rid of the texture. Also just for reference, there is a slight reason to mix base colour and base texture. It can be used to save on filesize by mixing a greyscale texture with the base colour. That way you can use the same texture for multiple different coloured materials. We actually sometimes do something similar in Overte, where we use a greyscale texture and vertex colours to save on file size.

The 3ds format got same problem, textures are imported with a percentage value and will be mixed with the base color. I updated the scripts for importing and exporting 3ds in Blender 3.x The base color will be imported to a mix shader and will be mixed with the texture percentage. Those color values will also be exported again together with texture and percentage. If no mixshader is connected, the base color will be taken though

Here is a screenshot of what you will get by importing a 3ds to blender:
Blender 3ds import.png

Maybe this solution will also work for fbx since those file formats have a lot similarities

The 3ds format got same problem, textures are imported with a percentage value and will be mixed with the base color. I updated the scripts for importing and exporting 3ds in Blender 3.x The base color will be imported to a mix shader and will be mixed with the texture percentage. Those color values will also be exported again together with texture and percentage. If no mixshader is connected, the base color will be taken though Here is a screenshot of what you will get by importing a 3ds to blender: ![Blender 3ds import.png](/attachments/819f247e-7457-443e-8b69-1d6352652110) Maybe this solution will also work for fbx since those file formats have a lot similarities
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 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-addons#101198
No description provided.