Hi,
I’m so xcite about the basis format ! - I am updating a scene with this format and in latest repo version 106.
I’m using this post https://medium.com/samsung-internet-dev/using-basis-textures-in-three-js-6eb7e104447d and the three.js example
The textures load fine according to console, but I’m getting a white mesh with the errors below, whereas it would have worked just fine MeshStandardMaterial and pngs in three.js version 104.
THREE.Material: ‘map’ parameter is undefined.
THREE.Material: ‘normalMap’ parameter is undefined.
THREE.Material: ‘aoMap’ parameter is undefined.
This is a snippet:
//
const basisLoader = new BasisTextureLoader(textureManager);
basisLoader.setTranscoderPath( ‘js/libs/basis/’ );
basisLoader.detectSupport( renderer );
// Make a new instance of the loader
var albedoM = basisLoader.load( "Photog_Vase1/albedoBasis.basis");
var normalMap = basisLoader.load( "Photog_Vase1/normalBasis.basis");
var aoMap = basisLoader.load( "Photog_Vase1/aoBasis.basis");
var roughMap = basisLoader.load( "Photog_Vase1/roughnessBasis.basis");
textureManager.onLoad=function () {
vaseMeshMaterial = new THREE.MeshStandardMaterial( {
roughness: roughMap,
metalness: settings.metalness,
roughness: settings.roughness,
map: albedoM,
normalMap: normalMap,
normalScale: new THREE.Vector2( 1, -1 ),
aoMap: aoMap,
aoMapIntensity: 1,
flatShading: false,
//envMap: reflectionCube,
//envMapIntensity: settings.envMapIntensity,
side: THREE.DoubleSide
});
Can someone please share some guidance where i may have gone wrong pls?
Here’s the scene if that could help https://drive.google.com/drive/folders/1riXdJE6j62cbmejsxPGnjHlj2sliOmNu?usp=sharing
Thanks a bunch!