From b5b2d253f6306f20b67083258bd143c846c809a9 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 7 Apr 2020 21:28:44 +0100 Subject: SL-12996 - adding OverallAppearance state for avatars --- indra/newview/llvoavatar.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 00dccc5d12..ed0fc5a9d4 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -426,9 +426,12 @@ public: public: U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0); bool isVisuallyMuted(); - bool isInMuteList(); + bool isInMuteList() const; void forceUpdateVisualMuteSettings(); + // Visual Mute Setting is an input. Does not necessarily determine + // what the avatar looks like, because it interacts with other + // settings like muting, complexity threshold. Should be private or protected. enum VisualMuteSettings { AV_RENDER_NORMALLY = 0, @@ -438,6 +441,20 @@ public: void setVisualMuteSettings(VisualMuteSettings set); VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; }; + // Overall Appearance is an output. Depending on whether the + // avatar is blocked/muted, whether it exceeds the complexity + // threshold, etc, avatar will want to be displayed in one of + // these ways. Rendering code that wants to know how to display an + // avatar should be looking at this value, NOT the visual mute + // settings + enum AvatarOverallAppearance + { + AOA_NORMAL, + AOA_JELLYDOLL, + AOA_INVISIBLE + }; + AvatarOverallAppearance getOverallAppearance() const; + U32 renderRigid(); U32 renderSkinned(); F32 getLastSkinTime() { return mLastSkinTime; } @@ -467,8 +484,8 @@ public: mutable bool mVisualComplexityStale; U32 mReportedVisualComplexity; // from other viewers through the simulator - bool mCachedInMuteList; - F64 mCachedMuteListUpdateTime; + mutable bool mCachedInMuteList; + mutable F64 mCachedMuteListUpdateTime; VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV -- cgit v1.2.3 From 5c7e91f62fb8d76f437a751503c4e40f0c0fedf1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 8 Apr 2020 14:40:01 +0100 Subject: SL-12996 - replace checks of VisualMuteSettings with OverallAppearance --- indra/newview/llvoavatar.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index ed0fc5a9d4..2239e7b23e 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -91,6 +91,7 @@ class LLVOAvatar : public: friend class LLVOAvatarSelf; + friend class LLAvatarCheckImpostorMode; /******************************************************************************** ** ** @@ -439,8 +440,13 @@ public: AV_ALWAYS_RENDER = 2 }; void setVisualMuteSettings(VisualMuteSettings set); + +protected: + // If you think you need to access this outside LLVOAvatar, you probably want getOverallAppearance() VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; }; +public: + // Overall Appearance is an output. Depending on whether the // avatar is blocked/muted, whether it exceeds the complexity // threshold, etc, avatar will want to be displayed in one of @@ -467,7 +473,7 @@ public: static void restoreGL(); S32 mSpecialRenderMode; // special lighting - private: +private: F32 mAttachmentSurfaceArea; //estimated surface area of attachments U32 mAttachmentVisibleTriangleCount; F32 mAttachmentEstTriangleCount; -- cgit v1.2.3 From f81e6317903ddedb5db64158c319f5a65b413851 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 24 Apr 2020 20:47:00 +0100 Subject: SL-13000 - no attachments or joint pos overrides for jellydolls --- indra/newview/llvoavatar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2239e7b23e..a73b48863b 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -460,6 +460,7 @@ public: AOA_INVISIBLE }; AvatarOverallAppearance getOverallAppearance() const; + void updateOverallAppearance(); U32 renderRigid(); U32 renderSkinned(); @@ -474,6 +475,7 @@ public: S32 mSpecialRenderMode; // special lighting private: + AvatarOverallAppearance mOverallAppearance; F32 mAttachmentSurfaceArea; //estimated surface area of attachments U32 mAttachmentVisibleTriangleCount; F32 mAttachmentEstTriangleCount; -- cgit v1.2.3 From c65151b2b34e3dbc95e64bd9f4a358cad2609be4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 6 May 2020 20:55:03 +0100 Subject: SL-13000 - animation state mgmt for jellied pseudo-humans --- indra/newview/llvoavatar.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index a73b48863b..08f7706506 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -459,9 +459,16 @@ public: AOA_JELLYDOLL, AOA_INVISIBLE }; + AvatarOverallAppearance getOverallAppearance() const; + void setOverallAppearanceNormal(); + void setOverallAppearanceJellyDoll(); + void setOverallAppearanceInvisible(); + void updateOverallAppearance(); - + + std::set mJellyAnims; + U32 renderRigid(); U32 renderSkinned(); F32 getLastSkinTime() { return mLastSkinTime; } -- cgit v1.2.3 From 98d93bcacfe21530f44346674966a36ad6a80251 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 13 May 2020 15:10:04 +0100 Subject: SL-13000 - jellydoll param management --- indra/newview/llvoavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index ee7f3d6dca..28db007d56 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -407,6 +407,7 @@ public: void initAttachmentPoints(bool ignore_hud_joints = false); /*virtual*/ void buildCharacter(); void resetVisualParams(); + void applyDefaultParams(); void resetSkeleton(bool reset_animations); LLVector3 mCurRootToHeadOffset; -- cgit v1.2.3 From 95623bc740048f95b2f15c67d179e9782ee56b60 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 May 2020 17:50:17 +0100 Subject: SL-13000 - animation state management for jellydolled avatars --- indra/newview/llvoavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 28db007d56..6ef9e6a725 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -467,6 +467,7 @@ public: void setOverallAppearanceInvisible(); void updateOverallAppearance(); + void updateOverallAppearanceAnimations(); std::set mJellyAnims; -- cgit v1.2.3 From 9618df484b7659ed84285a9c16939b384dbe616c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Oct 2020 20:47:00 +0300 Subject: SL-14130 Jellydolls have wrong appearance when non-impostors is uncapped --- indra/newview/llvoavatar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 8d23d955e3..af65e5750f 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -320,7 +320,7 @@ public: static U32 sMaxNonImpostors; //(affected by control "RenderAvatarMaxNonImpostors") static F32 sRenderDistance; //distance at which avatars will render. static BOOL sShowAnimationDebug; // show animation debug info - static bool sUseImpostors; //use impostors for far away avatars + static bool sUseImpostors; //use impostors for far away avatars, impostors are always on for 'mute' list static BOOL sShowFootPlane; // show foot collision plane reported by server static BOOL sShowCollisionVolumes; // show skeletal collision volumes static BOOL sVisibleInFirstPerson; @@ -554,7 +554,7 @@ private: //-------------------------------------------------------------------- public: virtual BOOL isImpostor(); - BOOL shouldImpostor(const U32 rank_factor = 1) const; + BOOL shouldImpostor(const U32 rank_factor = 1); BOOL needsImpostorUpdate() const; const LLVector3& getImpostorOffset() const; const LLVector2& getImpostorDim() const; -- cgit v1.2.3 From caea7260c73eb606bb8b349debadf6682dbdb3a8 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 20 Oct 2020 13:51:58 +0100 Subject: SL-14142 - impostor management cleanup --- indra/newview/llvoavatar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 7f816d6a2e..b76d6abacd 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -315,8 +315,8 @@ public: public: static S32 sRenderName; static BOOL sRenderGroupTitles; - static const U32 IMPOSTORS_OFF; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors - * slider in panel_preferences_graphics1.xml */ + static const U32 NON_IMPOSTORS_MAX_SLIDER; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors + * slider in panel_preferences_graphics1.xml */ static U32 sMaxNonImpostors; //(affected by control "RenderAvatarMaxNonImpostors") static F32 sRenderDistance; //distance at which avatars will render. static BOOL sShowAnimationDebug; // show animation debug info @@ -554,7 +554,7 @@ private: //-------------------------------------------------------------------- public: virtual BOOL isImpostor(); - BOOL shouldImpostor(const U32 rank_factor = 1); + BOOL shouldImpostor(const F32 rank_factor = 1.0); BOOL needsImpostorUpdate() const; const LLVector3& getImpostorOffset() const; const LLVector2& getImpostorDim() const; -- cgit v1.2.3 From 263c4c341fc48065d79713e8e8a6a6f74fd1e3dc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 22 Oct 2020 16:32:31 +0100 Subject: SL-14142 - cleanup and fixes for non-functioning impostors, status tracking in debug view --- indra/newview/llvoavatar.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b76d6abacd..14badda48e 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -317,10 +317,10 @@ public: static BOOL sRenderGroupTitles; static const U32 NON_IMPOSTORS_MAX_SLIDER; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors * slider in panel_preferences_graphics1.xml */ - static U32 sMaxNonImpostors; //(affected by control "RenderAvatarMaxNonImpostors") - static F32 sRenderDistance; //distance at which avatars will render. + static U32 sMaxNonImpostors; // affected by control "RenderAvatarMaxNonImpostors" + static bool sLimitNonImpostors; // use impostors for far away avatars + static F32 sRenderDistance; // distance at which avatars will render. static BOOL sShowAnimationDebug; // show animation debug info - static bool sUseImpostors; //use impostors for far away avatars, impostors are always on for 'mute' list static BOOL sShowFootPlane; // show foot collision plane reported by server static BOOL sShowCollisionVolumes; // show skeletal collision volumes static BOOL sVisibleInFirstPerson; @@ -565,6 +565,7 @@ public: static void updateImpostors(); LLRenderTarget mImpostor; BOOL mNeedsImpostorUpdate; + S32 mLastImpostorUpdateReason; F32SecondsImplicit mLastImpostorUpdateFrameTime; const LLVector3* getLastAnimExtents() const { return mLastAnimExtents; } void setNeedsExtentUpdate(bool val) { mNeedsExtentUpdate = val; } -- cgit v1.2.3 From 8b9ed94a35d7e1cc3ced562eb9e6d303ce016ec6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 27 Oct 2020 16:04:19 +0100 Subject: SL-14183, SL-14142 - impostor management improvements, animesh attachments update on frames when their parent does --- indra/newview/llvoavatar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 14badda48e..b815b3b2cd 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -263,7 +263,8 @@ public: void updateAppearanceMessageDebugText(); void updateAnimationDebugText(); virtual void updateDebugText(); - virtual BOOL updateCharacter(LLAgent &agent); + virtual bool computeNeedsUpdate(); + virtual bool updateCharacter(LLAgent &agent); void updateFootstepSounds(); void computeUpdatePeriod(); void updateOrientation(LLAgent &agent, F32 speed, F32 delta_time); -- cgit v1.2.3 From c79e648aac9bb32cc1d49d39973b5e96f25828f0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Nov 2020 16:07:10 +0000 Subject: SL-14015 - possible fix for phantom animesh attachments on mac --- indra/newview/llvoavatar.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b815b3b2cd..a30cbc73b7 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -132,6 +132,7 @@ protected: public: /*virtual*/ void updateGL(); /*virtual*/ LLVOAvatar* asAvatar(); + virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, void **user_data, U32 block_num, @@ -253,6 +254,11 @@ public: virtual bool isControlAvatar() const { return mIsControlAvatar; } // True if this avatar is a control av (no associated user) virtual bool isUIAvatar() const { return mIsUIAvatar; } // True if this avatar is a supplemental av used in some UI views (no associated user) + // If this is an attachment, return the avatar it is attached to. Otherwise NULL. + virtual const LLVOAvatar *getAttachedAvatar() const { return NULL; } + virtual LLVOAvatar *getAttachedAvatar() { return NULL; } + + private: //aligned members LL_ALIGN_16(LLVector4a mImpostorExtents[2]); -- cgit v1.2.3