cancel
Showing results for 
Search instead for 
Did you mean: 

Not seeing Avatars on-device

phindle
Protege
Hi,

I'm working on getting Mobile Avatars working on GearVR. I've made a Unity player build of our app, using Unity 5.4.3f1 and the 3/3 drop of the Mobile Avatar SDK. This integrated without difficulty into the existing codebase (which already supports Oculus Avatars on the Rift).

I deploy the built .apk onto my Android Phone, and boot the game using a GearVR headset.

I can then pair with the game running on my PC in the Unity Editor, set to build-platform Android.

On the Gear : I create a game room in the app, invite a friend (who's the Unity Editor player - using a valid user token), and once the invite is accepted, I know we're both present in the game room. (Just by observing our normal UI - I can see both player's usernames listed in the room).

Here's the problem:
On the PC Unity Editor, I see the Avatar of the GearVR guy.
On the GearVR though I see nothing - no avatar.

However, I've got sufficient debugging text being displayed on the Android device, to be sure I've instantiated both the local & remote avatars, and the position of the remote avatar should be correctly visible.

The network connection is solid - pose data packets are being correctly transmitted from GearVR -> Unity Editor. I know this because if I move the GearVR headset about, I can see the Avatar of the GearVR guy bobbing around on the PC in the Unity Editor. I also see that the GearVR device is receiving pose packets from the Unity Editor build. (I'm just displaying the packet sequence int, which is being incremented all the time).

Can anyone suggest why the avatar is not showing when running on GearVR? Is it shaders? DLLs or libs? Something I need to set up in Unity or the player preferences?

Thanks,

13 REPLIES 13

Ross_Beef
Heroic Explorer
Alternatively, is there any logging you can provide which indicates something not working quite right?

Ross_Beef
Heroic Explorer
Final thought, we updated the location that Unity points too for assets and shaders in the latest build - can you check where you're referencing from in Unity and let me know?

phindle
Protege
It seems to be a shader issue. Our code uses shader LODs, and if I change the following line in the 3 AvatarSurfaceShader*.shader files from:
LOD 200
to
LOD 50

then our avatar appears to work correctly now on-device. I'm winding back a tonne of debug stuff I've hacked in and doing some more builds & tests, but this is our smoking gun right now.

So it was an issue with our game's shader LOD system. Not sure if that would help the other guy here who's having shader problems with his avatars?

Ross_Beef
Heroic Explorer
worth suggesting and it's a helpful hint at what the broader issue might be.

FWIW - we've done a tonne of work to optimize our shaders for mobile perf in terms of texture size, etc. We're also combining meshes for the Avatars on the fly at initialization for mobile to get down to 3 DCs, part of which involves mapping the alpha fade across the Avatar - potentially the LOD optimization was somehow stretching the alpha over the avatar and making them invisible?