webaverse / app

Web metaverse client
https://app.webaverse.com
MIT License
344 stars 207 forks source link

Support separate UV texture scaling #645

Open karunakaruna opened 3 years ago

karunakaruna commented 3 years ago

Currently UVs can be scaled per-texture using a 'mapping' node in blender, however when imported into webaverse - all textures conform to diffuse UV scaling. This means normal maps and diffuse maps cannot have scaling independent from eachother.

Test .blend and .glb : https://www.dropbox.com/sh/is6de0jbg71qt0v/AADtDbUcrE2Bt7cLEx9UImUga?dl=0 Webaverse scene: https://webaverse.com/assets/513

brave!UNITO-UNDERSCORE!2021-01-19!UNITO-UNDERSCORE!12-04-12 blender!UNITO-UNDERSCORE!2021-01-19!UNITO-UNDERSCORE!12-03-35

Testing with don's gltf viewer shows same result. brave!UNITO-UNDERSCORE!2021-01-19!UNITO-UNDERSCORE!12-32-32 Babylon.js shows independent UV scaling properly: Can't zoom in with babylon.js for some reason - scaling seen on right brave!UNITO-UNDERSCORE!2021-01-19!UNITO-UNDERSCORE!12-32-47

avaer commented 3 years ago

Per 2) here: https://threejs.org/docs/#examples/en/loaders/GLTFLoader

We might need to do some THREE.js work to patch this in from Babylon.js.