From 0cb2b30bfb239f05e1780cae5e3a7328a1474416 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 17 May 2013 11:45:06 -0700 Subject: Simple imposter AV rendering cleanup --- indra/newview/app_settings/settings.xml | 28 ++++------- indra/newview/llvoavatar.cpp | 55 +++------------------- indra/newview/llvoavatar.h | 1 - indra/newview/skins/default/xui/en/menu_viewer.xml | 9 ---- .../newview/skins/default/xui/en/notifications.xml | 39 --------------- 5 files changed, 15 insertions(+), 117 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 676ba57726..7cb45559fa 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9480,7 +9480,7 @@ RenderAutoMuteByteLimit Comment - Maximum bytes of attachments before an avatar is automatically visually muted (0 for no limit). + Maximum bytes of attachments before an avatar is rendered as a simple imposter (0 for no limit). Persist 1 Type @@ -9491,7 +9491,7 @@ RenderAutoMuteRenderCostLimit Comment - Maximum render weight before an avatar is automatically visually muted (0 to not use this limit). + Maximum render weight before an avatar is rendered as a simple imposter (0 to not use this limit). Persist 1 Type @@ -9502,7 +9502,7 @@ RenderAutoMuteSurfaceAreaLimit Comment - Maximum surface area of attachments before an avatar is automatically visually muted (0 to not use this limit). + Maximum surface area of attachments before an avatar is rendered as a simple imposter (0 to not use this limit). Persist 1 Type @@ -9510,16 +9510,16 @@ Value 0 - RenderAutoMuteEnabled + RenderAutoMuteThreshold Comment - Apply visual muting to high cost, non-friends, not in IM, or somewhat distant avatars + Threshold on the Avatar Detail slider where simple imposter mode is enabled. (less than 0 is always on, greather than 1 always off) Persist 1 Type - Boolean + F32 Value - 0 + 0.25 RenderAutoMuteLogging @@ -9531,19 +9531,7 @@ Boolean Value 0 - - RenderAutoMuteVisibilityRank - - Comment - Number of avatars to show normally for visual muting mode. - Persist - 1 - Type - U32 - Value - 0 - - + RenderAutoHideSurfaceAreaLimit Comment diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3c25339037..4de2f4684e 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2999,11 +2999,10 @@ bool LLVOAvatar::isVisuallyMuted() if (!isSelf()) { - static LLCachedControl render_mute_enabled(gSavedSettings, "RenderAutoMuteEnabled"); + static LLCachedControl render_mute_threshold(gSavedSettings, "RenderAutoMuteThreshold"); static LLCachedControl max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit"); static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit"); static LLCachedControl max_render_cost(gSavedSettings, "RenderAutoMuteRenderCostLimit"); - static LLCachedControl visibility_rank(gSavedSettings, "RenderAutoMuteVisibilityRank"); if (mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE) { // Always want to see this AV as an imposter @@ -3013,7 +3012,7 @@ bool LLVOAvatar::isVisuallyMuted() { // Never show as imposter muted = false; } - else if (render_mute_enabled) + else if (LLVOAvatar::sLODFactor <= render_mute_threshold) { F64 now = LLFrameTimer::getTotalSeconds(); @@ -3034,13 +3033,14 @@ bool LLVOAvatar::isVisuallyMuted() // Could be part of the grand || collection above, but yanked out to make the logic visible if (!muted) { - if (visibility_rank > 0) + if (sMaxVisible > 0) { // They are above the visibilty rank - mute them - muted = (mVisibilityRank > visibility_rank); + muted = (mVisibilityRank > sMaxVisible); } + /* Not used - always draw friends or those in IMs. Works nicely, needs UI? if (muted || // Don't mute friends or IMs - visibility_rank == 0) + sMaxVisible == 0) { muted = !(LLAvatarTracker::instance().isBuddy(getID())); if (muted) @@ -3049,6 +3049,7 @@ bool LLVOAvatar::isVisuallyMuted() muted = !gIMMgr->hasSession(session_id); } } + */ } // Save visual mute state and set interval for updating @@ -7879,8 +7880,6 @@ void LLVOAvatar::idleUpdateRenderCost() calculateUpdateRenderCost(); // Update mVisualComplexity if needed - doRenderCostNagging(max_render_cost); // Remind the user their AV is too complex - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME)) { std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus()); @@ -7892,46 +7891,6 @@ void LLVOAvatar::idleUpdateRenderCost() } -// Remind the user about their expensive avatar -void LLVOAvatar::doRenderCostNagging(U32 max_render_cost) -{ - if (isSelf()) - { - static S32 sOldComplexity = 0; - static F64 sLastRenderCostNagTime = 0.0; - - const F64 RENDER_NAG_INTERVAL = 60.0; - - F64 now = LLFrameTimer::getTotalSeconds(); - if (sLastRenderCostNagTime > 0.0 && - (now - sLastRenderCostNagTime) > RENDER_NAG_INTERVAL && - sOldComplexity != mVisualComplexity) - { - sOldComplexity = mVisualComplexity; - - if (max_render_cost > 0) - { //pop up notification that you have exceeded a render cost limit - if (mVisualComplexity > max_render_cost+max_render_cost/2) - { - LLNotificationsUtil::add("ExceededHighDetailRenderCost"); - sLastRenderCostNagTime = now; - } - else if (mVisualComplexity > max_render_cost) - { - LLNotificationsUtil::add("ExceededMidDetailRenderCost"); - sLastRenderCostNagTime = now; - } - else if (mVisualComplexity > max_render_cost/2) - { - LLNotificationsUtil::add("ExceededLowDetailRenderCost"); - sLastRenderCostNagTime = now; - } - } - } - } -} - - // Calculations for mVisualComplexity value void LLVOAvatar::calculateUpdateRenderCost() { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 8862056066..afe1d56059 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -250,7 +250,6 @@ public: static void invalidateNameTags(); void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); void idleUpdateRenderCost(); - void doRenderCostNagging(U32 max_render_cost); void calculateUpdateRenderCost(); void updateVisualComplexity() { mVisualComplexityStale = TRUE; } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index f66272aa2e..9c8313f46c 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -547,15 +547,6 @@ - - - - - - Your avatar has become too complex to be rendered by even high performance computers. Almost all Residents will see a low detail stand in instead of your actual avatar. - - - - - - Your avatar has become too complex to be rendered by most computers. Many Residents will see a low detail stand in instead of your actual avatar. - - - - - - Your avatar has become too complex to be rendered by some computers. Some Residents will see a low detail stand in instead of your actual avatar. - - - -