You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'),
}
})
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 (
<ViroAmbientLight
color={"#ffffff"}
intensity={150}
/>
<ViroDirectionalLight
color={"#ffffff"}
direction={[0.5, -1, 0.5]}
castsShadow={true}
/>
<Viro3DObject
source={require('../assets/3d-model/aodai.obj')}
lightReceivingBitMask={3}
resources={[
require('../assets/3d-model/aodai.mtl'),
require('../assets/3d-model/aodai_Base_color.png'),
require('../assets/3d-model/aodai_Metallic.png'),
require('../assets/3d-model/aodai_Normal.png'),
require('../assets/3d-model/aodai_Opacity.png'),
require('../assets/3d-model/aodai_Roughness.png'),
]}
position={[0, 0.5, 0]}
scale={[1.5, 1.5, 1.5]}
type='OBJ'
animation={{ name: 'rotate', loop: true, run: true }}
/>
);
}
Here is the error i received:
I'm quite sure all the paths are correct. And there is only the model with no texture on the screen. Can anyone help?
The text was updated successfully, but these errors were encountered: