Strangest thing ive ever seen.
Threejs wouldnt load a normal map, but babylon would. then i rebooted and now threejs displays the normal maps correctly.
threejs before reboot
babylon before reboot
threejs after reboot
Strangest thing ive ever seen.
Threejs wouldnt load a normal map, but babylon would. then i rebooted and now threejs displays the normal maps correctly.
threejs before reboot
babylon before reboot
threejs after reboot
How do you load the textures?
I almost always load textures with
await loader.loadAsync('......');
to be sure that the textures are loaded.
reboot my computer.
this is a GLB file, i loaded it with our online react-three-fiber based viewer, don mcurdys viewer, and the GLTF visual studio plugin.
also loaded it with sandbox.babylonjs.com.
same result across the board, threejs would not display the normalmap but babylon would.
i rebooted my computer for another reason, and then threejs loaded everything correctly.
there were no errors, some warnings.
Then I immediately ask myself, has the error been reproducible since then?
no. currently it works fine.
if it happens again ill do a better inspection to try to provide more info.
windows 11, 4090, 64mb ram, chrome browser
i just thought i was going insane. i was writing a longer post here documenting it, then had to reboot during that, and it fixed itself.
i think i rebooted because chrome hang up. (note i was testing this with the visual stuidio code, also)
this ticket can be closed, just wanted to report it.
If that’s something that’s happening on your machine - it’s possible you’ve just run out of memory, which would prevent Chrome from allocating any more GPU / CPU resources until you’ve restarted the system.
it has happened again
this is the warnings from gltf-validator
lgtracer said couldnt load texture.
so i have something to go on, figure out why this is texture error but the others dont
but it still works in babylon
but yes, there’s something system related going on too.
i had the same results using the gltf visual studio code plugin that has a threejs and babylon preview.
so my current thought is that this is a difference in how threejs and babylon load textures.
its interesting the other loaders [edit: threejs based engines] didnt report an error but lgtracer did. ill dig deeper into my threejs tool to look for errors.
but, without a doubt, something happens so that threejs across several apps (chrome and the visual studio code probably chromium based preview, and several threejs engines like mcurdys and lgtracer) would not show the bump map, after doing so correctly minutes before.
but babylon would continue to load the file over and over correctly.
my co-workers do no have the problem. but im the only one that checks these details
other tech details: nvidia driver 552.41 DCH (on 4090)
14mb PNG 4k normal map
ill update my drivers…
worth looking into.
once my content is done i might be able to help debug the issue some more.
@Attila_Schroeder
i look at my local threejs preview for hours a day everyday.
ive only seen this in the last 2 days. its caused me lots of stress.
the only thing i can think of that has really changed is windows updates…
its across several versions of threejs
There doesn’t have to be a code error for textures to not be displayed correctly. I recently wrote a texture array loader because two people in the forum asked for it and I also needed it myself. During extensive tests I also had the case that some textures were not loaded before the code continued to run. The reason was that the callback was executed before all textures was loaded. Such errors can be very troublesome because they are not an error in the code but rather an error in the code architecture.
I then used await async to make sure that textures were loaded with certainty.
Here you can see how I load 6 2k textures relative fast.
As far as I can tell, the gltf loader does that too. I have already loaded models that used several 4k textures and it took a long time to load. The textures were always there.
If you had an example code it might help narrow down the cause.