Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Marielle_HPE's avatar
Marielle_HPE
Explorer
3 years ago
Solved

How to Access Raw Bytes of Meta Avatar CDN data?

I have the Meta Avatars working in a networked app on the Oculus Quest.  Now I want to get the raw bytes of the Avatar data retrieved from the CDN so I can send them to a room server that can send th...
  • Marielle_HPE's avatar
    3 years ago

    I finally have this working on Windows.  On the Oculus, I now load the following url:

     

     string uri = "https://graph.oculus.com/" + _localAvatar._userId + "?fields=id,avatar_v3{model.profile(fastload_v04).platform(pc).sdk_version(Avatar2%20runtime%20SDK%2015.0.0.40.89%20client%20SDK%2015.0.0.40.89).client_version(0.1%2B2021.3.6f1).client_name(DefaultCompany.Avatar){url,id,creation_time,animation_set}}";    
            

    My original url that I found in the Oculus logs used a profile of quest2_v04 but when I switched to fastload_v04, then the json would contain url pointers to assets that could be rendered on Windows.  Also, the fastload assets are not as crisp as I would like but it will have to do.

    I then take the json returned from the http request and parse out both urls for the avatar assets and send them to the windows user who reloads the avatar manually from the urls.  I have tested that the Windows exe works on machines that do not have Oculus home installed and will display the correct Avatar CDN assets of Oculus users that are in the same room.

     

    Please note that the above http request requires your auth token be attached.  Also, I had to make a few enhancements in the Oculus Integration code to get all this working.