FBX export lacking image paths for 3rd party applications (eg unity) #74070
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#74070
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
win10
2080ti
Blender Version
2.82
Short description of error
When exporting FBX files it is possible to embed image paths for third party applications such as unity3d to use to create materials for their shaders.
With blender eevee Principled BSDF shader you can easily use the same textures Unity needs for its shader.
When you export as FBX and bring into unity, unity will automatically hook up the "Base Color" texture in the material. But ignores the other textures.
On closer inspection opening the FBX file in a text editor reveals that only the path for the "Base Color" exists in the FBX data. This must explain why unity isn't able to rebuild the material.
Exact steps for others to reproduce the error
Open blend file
double check images are attached to material correctly
export FBX (or open the existing one)
open FBX in a text editor
search for "green_metal_rust_diff_2k" and notice how it appears
search for either of the other 2 materials and notice how it doesn't appear
Extra notes
Unity uses a packed "mask map" where Red channel: Metallic mask, Green channel: Ambient occlusion. Blue channel: Detail map mask. Alpha channel: Smoothness.
This needs to be unpacked with a separate RGB node in blender.
FBX filepath bug.zip
Added subscriber: @FrankieHobbins
After reporting I thought I would check some more things.
The separate RGB node stops the link between the mask image and the node connection. Without the node you can save links to whatever the metallic/specular slots have plugged into them.
It would be ideal if this node didn't break and the links and the image trace could continue past it.
Normal map texture is not getting exported whatever I do.
Someone just pointed out to me that the normal map path will get exported if I put a normal map node between the image node and the shader normal input.
I suppose that has made this bug invalid, however if possible can I have clarity on the "mask map" export path so I can file a but report to unity that its possible to output from blender but unity is failing to import?
Added subscriber: @lichtwerk
This issue is coming up once in a while.
It is documented though:
https://docs.blender.org/manual/en/2.82/addons/import_export/node_shaders_info.html
That is correct, see the documentation also
I am afraid that is not possible to support that pipeline directly from blender atm. (textures need to be directly linked to the sockets, no other nodes in between allowed [except normalmap]-- would be hard to keeps this symmetrical like the docs mention)
I am confused though:
Separate RGB
in your file and map thegreen_metal_rust_mask_2k.png
directly to Metallic & Roughness just for export purposes, does Unity read the FBX correctly into their own mask maps?)Unity HDRP/Lit shader only works with mask maps. It's its possible for the user to make their own shader with the built in shader graph that would allow separate images to replace the mask map. However you cannot change the shader in the embedded material with so I don't think anything else would work.
I tried remapping images directly to the shader nodes and they appear in the FBX file but nothing seems to get picked up by unity.
My hope is now if we had Blender exporting the path to Metallic or Roughness images though the Separate RGB (and actually we need an invert node for the roughness) node we could go to Unity and tell them to assign them it to their mask map.
Changed status from 'Needs Triage' to: 'Archived'
I dont think it would make a difference if paths were exported even with the
Separate RGB
still in the nodegraph (this Separate RGB will never be included in FBX, afaict FBX has no concept/knowledge of shader nodes really, so you'd have the same texture hooked up to Metallic and Roughness in the FBX -- and this is what seems to already fail in Unity...)Sorry to say that I am not very familiar with the HDRP/Lit shader workflow, but it seems strange to me that there would be no way to pack the channels from [possibly separate] textures inside Unity? Or that Unity simply doesnt pick those PBR textures up in the HDRP case at all?
In any case, this would not be considered a bug on blenders side for now, will have to close this I am afraid...
If you get an answer from Unity on how this should work (FBX PBR textures to channel packed mask maps) or if you find a place where this is documented, please still drop a message here, I'd be interested :)