From 7778faa32e2a658f5159f95d4ba015abfd6cd911 Mon Sep 17 00:00:00 2001 From: Jaimi Date: Mon, 4 Jan 2021 22:42:09 -0600 Subject: [PATCH] 32bit mesh fix --- .../UMA/Core/Editor/Scripts/UmaAboutWindow.cs | 2 +- .../StandardAssets/UMA/Scripts/UMAMeshData.cs | 4 ++++ .../UMA/Scripts/UMASimpleLOD.cs | 19 ++++++++++++++---- .../UMA/InternalDataStore/AssetVersion.xml | 2 +- .../InGame/Resources/AssetIndexer.asset | Bin 126028 -> 125956 bytes UMAProject/Assets/UMA/Whats New in UMA.txt | 5 ++++- 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/UMAProject/Assets/UMA/Core/Editor/Scripts/UmaAboutWindow.cs b/UMAProject/Assets/UMA/Core/Editor/Scripts/UmaAboutWindow.cs index 317eb231b..3acb8060d 100644 --- a/UMAProject/Assets/UMA/Core/Editor/Scripts/UmaAboutWindow.cs +++ b/UMAProject/Assets/UMA/Core/Editor/Scripts/UmaAboutWindow.cs @@ -7,7 +7,7 @@ namespace UMA public class UmaAboutWindow : EditorWindow { public static string umaVersion { get { return _version; } } - private static readonly string _version = "2.11.2"; + private static readonly string _version = "2.11.3; private string windowTitle = "UMA About"; private string wikiLink = "http://umadocs.secretanorak.com/doku.php"; private string githubLink = "https://github.com/umasteeringgroup"; diff --git a/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAMeshData.cs b/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAMeshData.cs index 5064e09bf..27d3f7425 100644 --- a/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAMeshData.cs +++ b/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAMeshData.cs @@ -623,6 +623,10 @@ public void ApplyDataToUnityMesh(SkinnedMeshRenderer renderer, UMASkeleton skele CreateTransforms(skeleton); Mesh mesh = new Mesh();//renderer.sharedMesh; +#if UMA_32BITBUFFERS + mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; +#endif + #if UNITY_EDITOR if (UnityEditor.PrefabUtility.IsAddedComponentOverride(renderer)) { diff --git a/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASimpleLOD.cs b/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASimpleLOD.cs index 7626dff4d..b41d3314a 100644 --- a/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASimpleLOD.cs +++ b/UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASimpleLOD.cs @@ -28,6 +28,11 @@ public class UMASimpleLOD : MonoBehaviour public int CurrentLOD { get { return _currentLOD - lodOffset; } } private int _currentLOD = -1; private float lastDist = 0.0f; + private float NextTime = 0.0f; + [Tooltip("How much time must pass before this is checked again. Default = 0.5 seconds")] + public float MinCheck = 0.5f; + [Tooltip("Random Variance in time (added to MinCheck) so that everything doesn't trigger at the same time. Default = 0.25 seconds")] + public float CheckRange = 0.25f; private DynamicCharacterAvatar _avatar; private UMAData _umaData; @@ -102,10 +107,19 @@ public void CharacterBegun(UMAData umaData) public void Update() { + if (!initialized) return; - PerformLodCheck(); + if (Time.time > NextTime) + { + PerformLodCheck(); + NextTime = Time.time + MinCheck; + if (CheckRange > 0.0f) + { + NextTime += UnityEngine.Random.Range(0.0f, CheckRange); + } + } } private void PerformLodCheck() @@ -151,11 +165,8 @@ private void PerformLodCheck() } if (_currentLOD != currentLevel) { - if (Mathf.Abs(cameraDistance - lastDist) > BufferZone) - { lastDist = cameraDistance; _currentLOD = currentLevel; - } } if (atlasResolutionScale < maxReductionf) diff --git a/UMAProject/Assets/UMA/InternalDataStore/AssetVersion.xml b/UMAProject/Assets/UMA/InternalDataStore/AssetVersion.xml index fd6ed5500..eded661e1 100644 --- a/UMAProject/Assets/UMA/InternalDataStore/AssetVersion.xml +++ b/UMAProject/Assets/UMA/InternalDataStore/AssetVersion.xml @@ -1,7 +1,7 @@ UMA 2 UMA Steering Group - 2.11.A4 + 2.11.3 -Update bone builder -URP, HDRP Compatibility diff --git a/UMAProject/Assets/UMA/InternalDataStore/InGame/Resources/AssetIndexer.asset b/UMAProject/Assets/UMA/InternalDataStore/InGame/Resources/AssetIndexer.asset index 66aa7202d044a4af5a7071e3dc158ded74a7f1a6..405a5ecdb2a49c97d6629d4c04a3ff12b269c6ba 100644 GIT binary patch delta 1864 zcmaJ>YfzMB6y67sT^Cl+jKs|ZG(7*&1 z>|_&~nW-fuZG{T8;)-}#Sy$vHmjzZq6l4(lv|cZDPI7+>wU z(b3TA$Gp6agIw^c@;iw{64aU@tVHsrcqYcjFI*X~(kzULTa-Ycl zSLLieU6nFU?SoJXGTBqbss8w$a`Q&ggK_;SATI^`MP$Sely=&P12jM1h=b&RMu$Vx zawZ!;QpVYA{6zkNeymG^6YV>fio?&s1?M*-gIfN{4mG6WXUZ_-;}=SPX9#UQ=SVqk z^`oN~HsA;a6r4vU?OowXg95yF7^O7Vn1El&WYj||W)3Ia#dQ28_zY)N3SOiArWE{6 z>X4x{^U}BYgIX?SBa1Q$^*Bn)FY9oO{ELh@PAJwRTi6ilTe89~N5TcGF_=b_xst9V z6@QXPj3-5fIg_GYPU}lI;V)4;p4OGRP-s~abYv>a$B8ap&#L59btOTO`<%FMld0kj z`l5U#PKxQiG@`gSZ7X-A=@kjklVYAfr9bRNofZ3WiaZ*-C)yBmh+qU#hHjqm%U;?MzQ}iMdX=L}<{Vka8Qc zaanZrq&+t>P}Jqc-poX?SV2BYgw;?$Q#?v3vnd~C!fNQkt$19aiOuIxE^HWmXkCK} zQb%}Fr!@nWU7oS!5UMEgb~(&~gD0u1UX^{1KSi3)b=fyHPQv{ih<0ZQ7mM!^OfcIPR^ z>+F$;yMlOkjV+e)l%80Fdz|I~4ZAsD720fmKJMEFOyWIKB;f%Mlpz}rZLfFPy_cZ# z$d(S^-Euf^buX;PW1cS;HSM<7G+yF}SafvzuR968os=A_;_Y(0!e%GYQo`zK@Z@z0 zqyubPEBwIT*af?%{xBZmj5ze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Gu9P2C^4*oBe^JEvqV@UkBUaWV) zA=t3%XR!Ldd|ZWXGJwvSJz4Jn4_@Yq4Pt>x7UudN z%!|&x?270RHml(wCc$Eu1pD}vqH)}AxO2u5D7ilp3igY{ZoJRhNKx?te;y?kF`onX zV5U@aPAI2d3X3dE>g~x{3*g3a%WyyphiDXIA*;U@J+oF|0*_gaFJ%#+!BltdjK*Z{ zSdQUo?Avzbe=2NuaUpn>a5V$F?KG8|C>Uv4iGGTh_%au{Sy!^6haVk}RogbQmb zAYL(dSBQyQIJXi#Xysrt=JH?_zLm8-uMgnXYNW{8g$Qk)EE(GlX>2NM@wZNM*>ah>qtck!Fj;I%EWz|8&$1Oq(j|$kb`7Ttl2iAu`J2uP3 n&OO+#1ah8Qf(^2s7m31L5Bn)=6B0g5wBec(EY0q-z)AiOkXiLY diff --git a/UMAProject/Assets/UMA/Whats New in UMA.txt b/UMAProject/Assets/UMA/Whats New in UMA.txt index b1f60968d..402d50305 100644 --- a/UMAProject/Assets/UMA/Whats New in UMA.txt +++ b/UMAProject/Assets/UMA/Whats New in UMA.txt @@ -1,4 +1,7 @@ -Whats new in 2.11.2 +Whats new in 2.11.3 +Fixed issue where 32 bit meshes were corrupted. +Fixed issue where LOD system could "thrash" and flipflop LOD levels. +Added time and random variation to LOD test so all checks do not happen on the same frame. Bugfix release Expression player fixes - now works in Edit Mode