Loading Quaternius models with textures

Hi there!

I just can’t manage to load some models by Quaternius. I can load from some of his other packs easily but I just can’t load properly, for example, from his Ultimate Stylized Nature pack.

The pack even comes with the models in FBX, GLTF and OBJ format, textures included. After loading the models show, but the FBX and OBJ show completely white while the GLTF model is black. So obviously it doesn’t load the textures.

Full short source code here: https://codepen.io/michelrichel/pen/OJoJmLX?editors=1111 (took me forever to get it working online).

Does anyone have an idea of what is wrong with the loading? Do I need to load the textures separately manually? I thought that normally the loaders fetch everything on their own…?

I don’t think textures are the cause of the difference. These formats have different material properties, glTF in particular supports PBR materials and may just look different under ambient lighting. In general you will need more than an ambient light for materials to appear correct, particularly if they’re metallic.

Not sure whether any of these models are supposed to be metallic, but for a nature scene probably not. You can erase any metallic property on the material by adding this to the onLoad function:

model.traverse((object) => {
  if (object.material) {
    object.material.metalness = 0;

It looks like the glTF model (center) has some other differences, possibly in the vertex normals…

… so maybe the conversion made when exporting to glTF was not quite right.

1 Like