Skip to content

Unable to load .obj file with .mtl #41

Open
@potatoengineer

Description

@potatoengineer

Requirements:

Please go through this checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: iOS version 14.7.1
  3. Version: ViroReact version 2.20.2 and React Native version 0.65.1
  4. Device(s): iPhone 7

Description

Using a fresh clone of the starter-kit repo to try to render my 3D object but all I'm seeing is the "Hello World". I have tried adding ViroAmbientLight as per docs and I'm using the resources prop to require all my files.

This is my code:

    <ViroARScene onTrackingUpdated={onInitialized}>
      <ViroAmbientLight color="#ffffff" />
      <ViroText
        text={text}
        scale={[0.5, 0.5, 0.5]}
        position={[0, 0, -1]}
        style={styles.helloWorldTextStyle}
      />
      <Viro3DObject
        scale={[0.1, 0.1, 0.1]}
        position={[0, -0.5, -1]}
        source={require('./res/car/prius.obj')}
        resources={[
          require('./res/car/prius.mtl'),
          require('./res/car/Prius_Color.png'),
          require('./res/car/Prius_Normal.png'),
          require('./res/car/Prius_Rough.png'),
          require('./res/car/Tire_Normal.png'),
          require('./res/car/Tire_Rough.png'),
          require('./res/car/Plate.png'),
        ]}
        type="OBJ"
      />

      <ViroAmbientLight />
    </ViroARScene>

Anyone know what's wrong and/or how to fix this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions