avonian / soundstage-vr

0 stars 0 forks source link

add altImage to video avatars #1

Closed jalmasi closed 3 years ago

jalmasi commented 3 years ago

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).

jalmasi commented 3 years ago

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().

avonian commented 3 years ago

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

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

jalmasi commented 3 years ago

Looks fine to me: image image

avonian commented 3 years ago

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)

jalmasi commented 3 years ago

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.

jalmasi commented 3 years ago

OK not there but in activateCamera, done.

avonian commented 3 years ago

Awesome it checks out now! :)

Closing ticket.