Custom tangents are destroyed upon FBX import and export #101303

Closed
opened 2022-09-23 16:24:30 +02:00 by Festivity · 9 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.94

Blender Version
Broken: version: 3.3.0, branch: master, commit date: 2022-09-06 15:39, hash: 0759f671ce
Worked: As far as I know, never.

Short description of error
Meshes can have custom tangent data just as meshes can have custom normal data. With the in-built FBX I/O, I cannot bring meshes in and out of Blender without being able to keep data intact. Attached are images of what the custom tangents should look like in Unity. I know that Unity is Y-up and Blender is Z-up which could potentially cause these differences, but please read a bit further for my explanation.

Normals in Unity:
image.png
Custom tangents in Unity:
image.png

Normals in Blender:
image.png
Custom tangents in Blender:
image.png

The logic is this - if in Unity, the custom tangents (in this specific scenario) resemble the normals of the mesh, why does it look so vastly different from the normals in Blender? IF I were to take a guess, it might be Blender performing unnecessary calculations with the imported custom tangents. I hope I've gotten my point across.

Exact steps for others to reproduce the error

  1. The problem can be seen when importing the mesh I will provide. Use the shader editor and the Geometry node outputting the Tangent to see the supposed custom tangents.

testmodel1.fbx

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.94 **Blender Version** Broken: version: 3.3.0, branch: master, commit date: 2022-09-06 15:39, hash: `0759f671ce` Worked: As far as I know, never. **Short description of error** Meshes can have custom tangent data just as meshes can have custom normal data. With the in-built FBX I/O, I cannot bring meshes in and out of Blender without being able to keep data intact. Attached are images of what the custom tangents should look like in Unity. I know that Unity is Y-up and Blender is Z-up which could potentially cause these differences, but please read a bit further for my explanation. *Normals in Unity:* ![image.png](https://archive.blender.org/developer/F13560328/image.png) *Custom tangents in Unity:* ![image.png](https://archive.blender.org/developer/F13560312/image.png) *Normals in Blender:* ![image.png](https://archive.blender.org/developer/F13560330/image.png) *Custom tangents in Blender:* ![image.png](https://archive.blender.org/developer/F13560387/image.png) The logic is this - if in Unity, the custom tangents *(in this specific scenario)* resemble the normals of the mesh, why does it look so vastly different from the normals in Blender? IF I were to take a guess, it might be Blender performing unnecessary calculations with the imported custom tangents. I hope I've gotten my point across. **Exact steps for others to reproduce the error** 1. The problem can be seen when importing the mesh I will provide. Use the shader editor and the Geometry node outputting the Tangent to see the supposed custom tangents. [testmodel1.fbx](https://archive.blender.org/developer/F13560442/testmodel1.fbx)
Author

Added subscriber: @Festivity

Added subscriber: @Festivity
Contributor

Added subscriber: @scurest

Added subscriber: @scurest
Contributor

Does Blender have custom tangents?

Does Blender have custom tangents?
Author

In #101303#1421664, @scurest wrote:
Does Blender have custom tangents?

I am not sure what this means unfortunately. The meshes themselves have the custom tangents that are properly interpreted in Unity, Maya and 3DS Max.

> In #101303#1421664, @scurest wrote: > Does Blender have custom tangents? I am not sure what this means unfortunately. The meshes themselves have the custom tangents that are properly interpreted in Unity, Maya and 3DS Max.
Contributor

The FBX may have custom tangents, but if custom tangents are not a feature that exists in Blender they won't be imported. I'm asking does Blender even have custom tangents at all? AFAIK it doesn't. There are custom normals, but tangents are always computed as far as I can tell.

The FBX may have custom tangents, but if custom tangents are not a feature that exists in Blender they won't be imported. I'm asking does Blender even have custom tangents at all? AFAIK it doesn't. There are custom normals, but tangents are always computed as far as I can tell.
Author

In #101303#1421688, @scurest wrote:
The FBX may have custom tangents, but if custom tangents are not a feature that exists in Blender they won't be imported. I'm asking does Blender even have custom tangents at all? AFAIK it doesn't. There are custom normals, but tangents are always computed as far as I can tell.

They are imported albeit broken as I've said earlier. Tangents don't need to be computed. If a game developer wants to put custom information nothing related to tangents in the tangents then they can do it and access it in the shader. It seems that Blender doesn't allow us to choose between calculating the tangents or using the imported ones and so therefore, the custom tangents are always prioritized as far I know. These imported custom tangents are bugged however.

> In #101303#1421688, @scurest wrote: > The FBX may have custom tangents, but if custom tangents are not a feature that exists in Blender they won't be imported. I'm asking does Blender even have custom tangents at all? AFAIK it doesn't. There are custom normals, but tangents are always computed as far as I can tell. They are imported albeit broken as I've said earlier. Tangents don't need to be computed. If a game developer wants to put custom information nothing related to tangents in the tangents then they can do it and access it in the shader. It seems that Blender doesn't allow us to choose between calculating the tangents or using the imported ones and so therefore, the custom tangents are always prioritized as far I know. These imported custom tangents are bugged however.

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'

I don't know what you mean by "custom tangent data".
The tangents used for the normal maps are calculated from the UV map.
This is a convention of many 3D applications, otherwise a normal map would not work between applications.

And the image only shows a radially generated tangent in Blender. This is not informative.

This report does not contain all the requested information, which is required for us to investigate the issue.

Please submit a new report and carefully follow the instructions.

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

I don't know what you mean by "custom tangent data". The tangents used for the normal maps are calculated from the UV map. This is a convention of many 3D applications, otherwise a normal map would not work between applications. And the image only shows a radially generated tangent in Blender. This is not informative. This report does not contain all the requested information, which is required for us to investigate the issue. Please submit a new report and carefully follow the instructions. A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports
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
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
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
3 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#101303
No description provided.