avonian/soundstage-vr

add altImage to video avatars

Closed this issue · 7 comments

So far video avatars have two modes: text (displays user id) and video.
Introduce 3rd mode that will display given image as texture instead of id.
That does not include transparency (alpha chanell).

Alt image added to VideoAvatar, takes precedence over alt text.
Shared properties require new version of server, deployed.
So each user can now share properties object. It's not persisted but is shared.
One of these properties (so far the only one) is altImage. Avatar factory uses that property to set altImage on avatars.
Currently altImage is passed as argument to world showVideo().

Looks like the avatar is backwards on the front, can that be fixed?

Screenshot from 2021-04-02 08-44-41

Looks fine to me:
image
image

Interesting there seems to be a difference in the way "own" avatar is rendered vs the way others perceive it.

To simulate my example you'll need to toggle to freecam (required the stage_controls permission)

Ah I see what you mean :) Own avatar is rotated so it doesn't look backwards :)
We can show own avatar backwards, as there's movementTracker mesh dedicated to rotation tracking, see startTrackingRotation().
It applies camera rotation to own avatar, 1st person camera, and movemenTracker.
this.video.mesh.rotation.y = .5*Math.PI-camera3.alpha;
turns own mesh to the front, i.e. makes it looks backwards to self but will look fine from free camera.
I guess one if ( activeCameraType == 'free' ) there will do the trick.

OK not there but in activateCamera, done.

Awesome it checks out now! :)

Closing ticket.