[Opensim-dev] avatar appearance and grayness

Michael Wright michaelwri22 at yahoo.co.uk
Sat Sep 27 11:17:28 UTC 2008



Mic Bowman <cmickeyb at gmail.com> wrote: for the last couple weeks i've been digging into the appearance and
attachments code. it started as an attempt to find that
inventory/attachments race condition and has turned into an attempt to
understand (and hopefully fix) the problem where all avatars on our
internal sims start gray (and stay that way until you rebake
textures/edit appearance). as part of the investigation, i'm convinced
that there is "magic" in here that i don't understand.

for the moment, i have two concrete questions...

* in scenepresence, the oncompletemovementtoregion event chains calls
to sendinitialdata() and completemovement(). is there a reason why
those two functions are separated? the only place either is called is
in that particular event handler... i want to experiment with changing
the order of some of the other tasks. specifically, getting the
appearance complete is much more important for my internal users than
getting the scene updated right away (something about semi-naked gray
avatars is an immediate turn-off for novice users working in open
cubicles :-).

> I don't think there is any actual reason for them to be seperated apart from that they perform the different functions, We should be performing the CompleteMovement on that event ( IClientAPI.OnCompleteMovementToRegion ) as that includes the reply to the client to confirm the movement into the region has completed. 
But as far as I remember we only have the SendInitialData attached to that event, as we can start sending region (prims and avatars) data to the client  at any point after it has sent the move into region packet. So its basically the earliest time we could run that method.



* here's the magic question... can anyone explain why the avatars
appear gray? i'm certain the avatar appearance data is being sent (and
i've verified that it is correct for both default and customized
avatars). often one or two parts of the appearance are correct (like
avatar hair). if i leave the call to "sendavatardata" in the later
sendinitialdata event handler, then i need to wait for quite awhile to
rebake.. but if i move it up so that it gets sent right after i create
the appearance (and before the initial inventory retrieval request
happens) then rebake *always* works the first time. (and edit
appearance  always fixes the grayness for my avatar and everyone who
is looking at my avatar)

> I actually think there are a few different problems with how we have appearance working, Ourselves(TribalMedia) only generally notice grey avatar after teleporting to new regions, as opensim isn't actually sending all the required data to the new regions (the visual params for example). But there also at times are inventory issues. Plus some pontential problems in the default avatarAppearanceFactory module in opensim.

like we have: 
      public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance)
         {
            CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
            //if ((profile != null) && (profile.RootFolder != null))
            if (profile != null)
            {
                appearance = m_scene.CommsManager.AvatarService.GetUserAppearance(avatarId);
               
 which means it checks for the userProfile in the cache before it tries to fetch the appearance, and its been noted that the fetch for the appearance often happens before the userprofile has been fetched. Really there is no reason for them to be related, we don't or at least shouldn't need the userprofile before we can get the appearance. 

I'm a bit pressed for time now and would need to refresh my memory before I tried to explain in any detail the whole appearance fetch process, but a couple of webpages that might help are:
http://blog.secondlife.com/2006/09/18/getting-technical-baked-avatar-textures/ and http://blog.secondlife.com/2006/10/11/gray-and-missing-image-avatars/ 

When I get a bit more time, I'll try to write in a bit more detail how (I remember) we are handling the whole appearance, and where the problems are most likely to be.


and for what its worth... just for kicks I added a 5 second sleep into
the inventory retrieval in the mysql inventory module, it fixes the
gray avatar problem. which seems to indicate that the client is
expecting a particular order... and speeding up inventory retrieval
broke that ordering.

thoughts? more places to start looking?

--mic
_______________________________________________
Opensim-dev mailing list
Opensim-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev


       
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080927/9e6529f4/attachment-0001.html>


More information about the Opensim-dev mailing list