viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.3k stars 482 forks source link

My texture of Viro3DObject doesn't work properly. #988

Open PhamTrungMinh opened 1 year ago

PhamTrungMinh commented 1 year ago

I'm new to React Native as well as AR and viro-react. Here is my code i've been working on: const InitialScene = () => { ViroMaterials.createMaterials({ aodai: { diffuseTexture: require('../assets/3d-model/aodai_Base_color.jpg'), metalness: 1, metalnessTexture: require('../assets/3d-model/aodai_Metallic.jpg'), normalIntensity: 0.8, normalTexture: require('../assets/3d-model/aodai_Normal.jpg'), roughness: 1, roughnessTexture: require('../assets/3d-model/aodai_Roughness.jpg'), }, quanvai: { diffuseTexture: require('../assets/3d-model/quanvai_Base_color.jpg'), metalness: 1, metalnessTexture: require('../assets/3d-model/quanvai_Metallic.jpg'), normalIntensity: 0.8, normalTexture: require('../assets/3d-model/quanvai_Normal.jpg'), roughness: 1, roughnessTexture: require('../assets/3d-model/quanvai_Roughness.jpg'), } })

return (

); }

Here is the error i received: image

I'm quite sure all the paths are correct. And there is only the model with no texture on the screen. Can anyone help?