Q: How to import a 3D model from the web?

Eric G
Eric G Posts: 8

Hello, thanks for taking the time to read this. I've been exploring the RemoteAPI offering and have been able to implement it with json data, image data but am having trouble with 3D data. Any help would be greatly appreciated!

  • Request
    For the request I have defined an API spec with an appropriate response size definition.

  • Response
    For the response I am handling the request via a CameraKit iOS app. I am intercepting the request, retrieving a gltf asset from bundle and reading it into a Data object. This Data object is what I am returning in the response to the lens.

  • Load
    ApiModule.prototype.requestRemoteModel = function(mediaManager, callback) {
    var req = global.RemoteApiRequest.create();
    req.endpoint = "requestRemoteModel";

    this.remoteServiceModule.performApiRequest(req, function(response) {
    function (gltfAsset) {
    function (error) {

  • Display
    To display I am attempting to call 'tryInstantiate' method on the gltfAsset but am receiving errors. I have defined an empty scene object in the Camera and a Material object in the Resources and attempt to use these for the inputs to 'tryInstantiate'

[error] Cannot parse file : Unsupported file format
[error] Error importing glTF file with material: glTF asset does not contain a root SceneObject


  • nhbg yhjm
    nhbg yhjm Posts: 2

    I'd be happy to help you out! From what you've described, it sounds like you're experiencing some connectivity issues with your 5G Wi-Fi. It's possible that the firmware version you're using could be causing the problem, as you've already tried downgrading the firmware without success.

    One thing you could try is resetting your router to its default settings, which may help resolve the issue. Alternatively, you could try contacting your internet service provider or the manufacturer of your router for further assistance.

    If you find that you're still experiencing issues, it may be best to switch over to an ethernet connection to ensure a stable connection. Let me know if there's anything else I can do to assist you.

  • Eric G
    Eric G Posts: 8

    Thanks for the response, I don't think it's related to my connection however!