Viro: 3DObject resources with file system path / uri doesn't work

Created on 10 Oct 2019  路  2Comments  路  Source: viromedia/viro

Environment

Please provide the following information about your environment:

  1. Version: ViroReact 2.16.0 and React Native 0.61.1
  2. Device(s): iPhone 8

Description

VRT3DObject resources source doesn't work with file system path like below:

<Viro3DObject
type="OBJ"
source={{
uri:"/var/mobile/Containers/Data/Application/C544EBCA-4173-4693-91C3-5AEC8519785B/Documents/models/5d5e5075dc0c6d00bae8d140/object.obj" 
}}
resources={[
{uri:"/var/mobile/Containers/Data/Application/C544EBCA-4173-4693-91C3-5AEC8519785B/Documents/models/5d5e5075dc0c6d00bae8d140/material.mtl" }, 
{url: "/var/mobile/Containers/Data/Application/C544EBCA-4173-4693-91C3-5AEC8519785B/Documents/models/5d5e5075dc0c6d00bae8d140/texture.jpg"}
]} 

Object works okay, It renders the physical object but it's white, without textures.

Also, opaque types works perfectly. require('assets/material.mtl')

Most helpful comment

Well, false alarm. File system path as source is working.
It was related to .mtl file name in .obj file 馃槄

All 2 comments

Well, false alarm. File system path as source is working.
It was related to .mtl file name in .obj file 馃槄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jungley picture jungley  路  3Comments

funkyfourier picture funkyfourier  路  3Comments

vuthanhtrung0504 picture vuthanhtrung0504  路  5Comments

SathishSaminathan picture SathishSaminathan  路  4Comments

u-can-miracle picture u-can-miracle  路  3Comments