virocore icon indicating copy to clipboard operation
virocore copied to clipboard

Load mtl file manually from firebase

Open HLneoh opened this issue 5 years ago • 1 comments

  1. OS: Windows
  2. Version: ViroCore version
  3. Device(s): samsung a5

Description

I have uploaded the mtl file and obj file separately to firebase database. When I loaded the 3d obj model, it cannot read mtl file. May i know is there any way to load mtl file to 3d obj model programmatically?

HLneoh avatar Oct 25 '18 06:10 HLneoh

Hi @HLneoh , Thanks for reaching out. From our Object3D,

To load an OBJ with an associated MTL file, the MTL file and all of its associated textures must placed in the same directory as the OBJ file. They will then be automatically retrieved and applied.

Currently there is no way to manually load the mtl file to the 3d obj model. But you can manually set the material textures, colors, etc. Example here -> https://virocore.viromedia.com/v1.11.0/docs/3d-scene-lighting#materials . If manually constructing the materials object is too cumbersome, I'd recommend trying to pre-download the mtl & obj files from firebase to local media in the same directory, before trying to render the 3d object on to the scene.

manbod avatar Oct 26 '18 19:10 manbod