Skip to content

Conversation

@magnuspri
Copy link

@magnuspri magnuspri commented Jan 12, 2026

The fbx loader did not recognize maya's openPBRsurface shader, instead it defaulted to the phong material.

Changed so it gets converted to MeshStandardMaterial instead.

Fixed #15927

This is the second attempt to solve this issue, since I failed to provide an example fbx-file last time. The request was closed.
#32584 (comment)

In this pull request I have attempted to resolve that issue and other issues mentioned:

In the last issue I submitted an overly complex and partly unnecessary regex. The code piece is now simpler and more straight to the point.
#32584 (comment)

I made a change that could cause transparency not to be set, it has now been resolved.
#32584 (comment)

I have never used a linter before, so the code broke some rules. Have tried to set up the development enviroment the way I think it should be setup. So hopefully the code will follow the formatting and linter rules now.
#32584 (comment)

Thank you @Mugen87 for pointing out those issues.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 12, 2026


if ( materialNode[ 'Maya|baseMetalness' ] ) {

parameters.metalness = materialNode[ 'Maya|baseMetalness' ].value;
Copy link
Collaborator

@Mugen87 Mugen87 Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add metalness/roughness support, can you also support the respective textures?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that should probably be possible. Will look into that as well.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 13, 2026

Is there some sort of official/unofficial documentation about the Maya FBX fields that are supported by this PR? It would be great if you can share a least one resource that we can refer to.

@magnuspri
Copy link
Author

Is there some sort of official/unofficial documentation about the Maya FBX fields that are supported by this PR? It would be great if you can share a least one resource that we can refer to.

I'm not sure I understand what you mean? I found this page:
https://docs.vizrt.com/viz-artist-guide/5.3/FBX_Files.html#id-(5.3)FBXFiles-MaterialsMaterials
It seems to give some guidance on how the FBX-materials relate to the "Viz Engine". Which I have never tried. Is that the kind of documentation you're asking about?

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 13, 2026

I did a search right by myself but did not find the document what I was looking for. I found below link but that's more a general explanation of Open PBR and how it is supposed to be implemented.

https://academysoftwarefoundation.github.io/OpenPBR/

Anyway, I was looking for an official resource that actually documents the Maya OpenPBR fields inside the FXB. E.g. a definition of Maya|transmissionWeight (meaning the property name) and the expected data type. In context of textures, the number of texture channels or its data type.

Regarding Open PBR: I understand it's advantage to be able to load OpenPBR FBX files but for a correct representation/rendering you would actually need a custom material. MeshStandardMaterial or MeshPhysicalMaterial are aligned towards glTF which deviates from OpenPBR. So all we can do is adding partial/limited support in FBXLoader.

@Mugen87 Mugen87 changed the title Fbx maya open pb rsurface support FBXLoader: Add basic support for OpenPBR. Jan 13, 2026
@magnuspri
Copy link
Author

Jo that is unfortunate. Thought that might be the case. Was thinking about writing a custom shader, but looking at the documentation you provided. I quickly realized that it is well beyond my capabilities as of today.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 13, 2026

I'm not even sure we want to support this kind of complexity in FBXLoader, tbh... Devs should use GLTFLoader whenever possible.

@mrdoob
Copy link
Owner

mrdoob commented Jan 13, 2026

Agreed. Haven't heard of OpenPBR other than for USD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature suggestion: Support Maya's PBR material in FBXLoader

3 participants