Getworld+UV duplication + texture resize?

Couple of last mile questions before we launch our platform (spoiler: it’s a surprise :wink:

I keep getting these messages in console which may be normal (or not ) but here it goes:

  1. Get world direction: I guess it’s a simple fix? But what should I instruct dev team to avoid?
  2. UV duplication: this one seems weird: why does it duplicate UV’s to support Aom? We use a gltf export from substance. Shouldn’t happen?
    3- texture resize: we use 1k textures and confirmed proper set up size from substance and in the gltf file… its all 512/1024/2048… why does three.js resize?

Thanks !

  1. Looking at the docs, .getWorldDirection() now needs to receive an argument like this .getWorldDirection(targetVector); so the result gets stored in targetVector.
  2. AOMaps require a second set of UVs because AO is often mapped differently than the diffuse .map texture. If GLTFLoader doesn’t see a second set of UVs in the export, then it’ll just duplicate the first set.
  3. Don’t know what’s happening here, but Three.js is saying that your textures are coming in at 309x328, not 1024x1024 as you think. You might want to look into what setting in Substance is changing this.

This one’s harmless — you could put a second UV set into the model to get rid of the warning, but it’d just add to the file size for no reason. GLTFLoader is just warning you that it has to modify the file a bit, because reasons.

The other two are probably worth fixing, but not necessarily critical.

1 Like