viro icon indicating copy to clipboard operation
viro copied to clipboard

Work with a room object exported from RoomScanLiDAR application

Open arthedza opened this issue 4 years ago • 1 comments

Hello! I try to add a 3D Object of a room in actual size (.obj) exported from the RoomScanLiDAR application to my scene but it isn't appearing in the AR scene. I set both of the onLoadStart and onLoadEnd callbacks and they work as expected, which means that the object was successfully loaded. I have added an ambient light to the scene, and another 3d object was rendered as expected. What I am doing wrong?

ViroMaterials.createMaterials({
  test: {
    lightingModel: 'Blinn',
    diffuseColor: 'yellow',
    shininess: 0.5,
  },
});

<ViroARScene
        onTrackingUpdated={this._onInitialized}
      >
        <ViroAmbientLight color="#ffffff" />
        <ViroNode scale={[0.7, 0.7, 0.7]} position={[0, 0, -1]}>
          <ViroText
            text={this.state.text}
            scale={[0.7, 0.7, 0.7]}
            position={[0, 0, 0]}
            style={styles.helloWorldTextStyle}
          />
          <Viro3DObject
            source={require('./src/assets/3d/property-obj.obj')}
            materials={['test']}
            scale={[0.5, 0.5, 0.5]}
            type="OBJ"
            onLoadStart={() => {
              console.log('LoadStart');
            }}
            onLoadEnd={() => {
              console.log('LoadEnd');
            }}
          />
        </ViroNode>
      </ViroARScene>

UPDATE I've tried to put a small Viro box and small custom object also in the scene and everything was rendered. I think that probably Viro doesn't work with point cloud objects. Is there maybe some way to convert the point cloud to a normal 3d object?

arthedza avatar Jun 29 '21 16:06 arthedza

I'm not sure if I can reproduce this - can you help by seeing if you get the same behavior I'm seeing?

I do see an error in the console but it looks like everything is working to me.

IMG_E1643209DBCC-1

Error: Asset not found: /Users/XXX/starter-kit/assets/vp.mtl for platform: null
    at getAbsoluteAssetRecord (/Users/XXXXX/starter-kit/node_modules/metro/src/Assets.js:110:11)
    at async getAsset (/Users/XXX/starter-kit/node_modules/metro/src/Assets.js:238:18)
    at async Server._processSingleAssetRequest (/Users/XXX/starter-kit/node_modules/metro/src/Server.js:326:20)
    at async Server._processRequest (/Users/XXX/starter-kit/node_modules/metro/src/Server.js:401:7)

robertjcolley avatar Dec 18 '21 19:12 robertjcolley

closing for no response.

robertjcolley avatar Jan 29 '24 22:01 robertjcolley