Forum Discussion
Marielle_HPE
3 years agoExplorer
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...
- 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.
Marielle_HPE
3 years agoExplorer
I was able to access my Oculus Meta CDN avatar files using this method:
- save a copy of the authentication token
- using the same URL from the Oculus logs, request the CDN packet again from my code
- parse the json in the returned CDN packet which contains 2 url files for a zip and glb file
- Added code to the SampleAvatarEntity script to ReloadAvatarManually to also accept a url
- Shipped the urls to a user on Windows
The good news is that the Windows user can access the CDN avatar files using the urls without authenticating or using an API key. The bad news is that the textures aren't supported on Windows:
[ovrAvatar2 ovrAvatarPrimitive][Debug] Created image for id 1467
Texture creation failed. 'ASTC_6x6' is not supported on this platform. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support.
[ovrAvatar2 ovrAvatarImage] Unable to create texture with size (2048, 2048) and formats (ASTC_RGBA_6x6, ASTC_6x6)
[ovrAvatar2 ovrAvatarPrimitive][Debug] Created image for id 1468
Texture creation failed. 'ASTC_6x6' is not supported on this platform. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support.
[ovrAvatar2 ovrAvatarImage] Unable to create texture with size (2048, 2048) and formats (ASTC_RGBA_6x6, ASTC_6x6)
Does anyone have any suggestions? I was so close to having it all working 😞
Thank you.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 8 months ago
- 6 months ago
- 3 months ago
- 1 month ago
- 1 month ago