Broken materials when importing FBX

When we import FBXes, and Playcanvas creates materials, the new materials don’t work properly. Diffuse has no effect on the materials appearence in the scene (it just looks black), and the glossiness seems to be stuck at 1 no matter what the glossiness value is set to. Interestingly, we see the diffuse color in the material preview, but not in the scene.

There are no apparent differences in the material properties compared to a material created manually in Playcanvas. One clue is when we run our in-house extension on these materials, the console throws an exception, and the extension breaks:

Error: invalid:exception: Invalid path for: .shadingModel
    y share.uncompressed.js:8187
    handleMessage share.uncompressed.js:8113
    onmessage share.uncompressed.js:8064
    onmessage editor-api.js:1

We’ve tried importing FBXes from both 3ds Max and Blender, and both create broken materials. This feels like a recent bug, since we’ve not encountered it before.

Hi @Sidelity,

Diffuse color/textures should work, are you able to share an example model or even scene to take a look?

Just to be sure, here is some guidelines on importing FBX to PlayCanvas: Exporting Assets | Learn PlayCanvas

Also this may be related? [SOLVED] FBX import problems

Importing glTF in editor is in the works right now and it’s coming really soon, this will help tons with bringing model/materials in PlayCanvas from modelling apps.

Here’s a scene:
https://playcanvas.com/project/1023161/overview/imported-fbx-materials

I’d like to share the source FBXes as well, but the forum doesn’t allow the FBX file type. But they are the most basic of FBXes - a single sphere with a default material.

1 Like

So importing your FBX model (Test_Blender.fbx) in a brand new PlayCanvas project (model viewer starter kit) does show the correct color material:

Can you try that on your side? And/or add a dynamic light in your scene. Your imported material seems to be correct:

Okay, the diffuse color shows when lit by realtime lights. It does not however get lit by the skybox. Reflections from the skybox are broken too (the gloss value has no effect).

Here are some sample values to get reflections from the Skybox:

Try to change the glossiness value. It has no effect on the skybox reflection appearence. It behaves as if the skybox isn’t prefiltered. With a glossiness value of 50, you should get blurry reflections.

Confirmed that seems like a bug, creating a material from scratch seems to work but not the FBX imported material. Materials seem identical, apart from diffuse color (unless I missed something).

Curious about this, calling @Gustav_Sterbrant @Elliott on this from the PlayCanvas team (they may be slow to respond due to holidays):

Catching up to this issue at the moment.

@Leonidas, can you sure that project please?

And also what the issues are please?

Here you go: PlayCanvas | HTML5 Game Engine

The issue is that both materials appear to have the same settings (I think so, unless I missed something) but the end result isn’t the same: the reflection on the purple sphere isn’t blurred by glossiness.

The purple material was created by the imported FBX.

Definitely looks like a bug. Please follow this ticket for updates

Hi @Sidelity, @Leonidas,

Putting my hand up here. I broke some bits on the backend while making preparations for importing gltf. Will get this fixed asap. Sorry for the trouble!

Thanks!

2 Likes

The fix for this is now released!

2 Likes