FBX Export: Duplicate materials cause material indices to be offset #103976
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#103976
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.94
Blender Version
Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash:
blender/blender@55485cb379
, version: 2.80.75Worked:
Short description of error
When meshes have duplicate materials in their slots, the material is added to the fbx only once, but the material index for that material is incremented each time the material is found. This causes the material index to increase beyond the number of materials, offsetting subsequent material indices and causing material indices to go out of bounds.
The polygons assigned to either slot containing
Duplicate Material
were given a material index of 2, which now corresponds toOther Material
in the exported FBX. (green has become red)The polygons assigned to
Other Material
were given a material index of 3, which is now out of bounds, so the FBX importer has reassigned them to the first slot. (red has become purple)Exact steps for others to reproduce the error
Attached is the .blend file shown in the description (authored in 3.4.1) and the .fbx exported from it
FBXDuplicateMaterialTest.blend
FBXDuplicateMaterialTest.fbx
Added subscriber: @Mysteryem-2
This issue was referenced by
5c9ecad1d2
Changed status from 'Needs Triage' to: 'Resolved'