From 92de9801d8a06e3a64e300e7978708ea1ca9d5d8 Mon Sep 17 00:00:00 2001 From: "qsxft258@gmail.com" Date: Thu, 25 Dec 2025 18:36:38 +0900 Subject: [PATCH] =?UTF-8?q?Remove=20:=20iFacialMocap=20BlendShape=20?= =?UTF-8?q?=EB=B3=B4=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ...tyRecieve_FACEMOTION3D_and_iFacialMocap.cs | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/Assets/External/Ifacialmocap/UnityRecieve_FACEMOTION3D_and_iFacialMocap.cs b/Assets/External/Ifacialmocap/UnityRecieve_FACEMOTION3D_and_iFacialMocap.cs index 8762a557..1d7c0992 100644 --- a/Assets/External/Ifacialmocap/UnityRecieve_FACEMOTION3D_and_iFacialMocap.cs +++ b/Assets/External/Ifacialmocap/UnityRecieve_FACEMOTION3D_and_iFacialMocap.cs @@ -14,16 +14,6 @@ public class UnityRecieve_FACEMOTION3D_and_iFacialMocap : MonoBehaviour public bool gameStartWithConnect = true; public string iOS_IPAddress = "255.255.255.255"; public bool mirrorMode = false; // ์ขŒ์šฐ ๋ฐ˜์ „ ๋ชจ๋“œ ์„ค์ • - - [Header("BlendShape ๋ณด์ •")] - [Tooltip("์„ธ๋กœ ๋ฐฉํ–ฅ BlendShape ๋ณด์ • (0.75 = ์„ธ๋กœ๋กœ 75%๋กœ ๋ˆŒ๋ฆผ โ†’ ์ž๋™์œผ๋กœ 1/0.75 ๋ณด์ •)")] - [Range(0.5f, 1.5f)] - public float verticalRatio = 0.75f; - - [Tooltip("๊ฐ€๋กœ ๋ฐฉํ–ฅ BlendShape ๋ณด์ • (1.0 = ๋ณด์ • ์—†์Œ)")] - [Range(0.5f, 1.5f)] - public float horizontalRatio = 1.0f; - private UdpClient client; private bool StartFlag = true; @@ -50,33 +40,6 @@ public class UnityRecieve_FACEMOTION3D_and_iFacialMocap : MonoBehaviour private readonly char[] splitHash = new char[] { '#' }; private readonly char[] splitComma = new char[] { ',' }; - // ์„ธ๋กœ ๋ฐฉํ–ฅ BlendShape (์œ„์•„๋ž˜ ์›€์ง์ž„) - verticalScale ์ ์šฉ - private static readonly HashSet VerticalBlendShapes = new HashSet(StringComparer.OrdinalIgnoreCase) { - // ์ž… ์„ธ๋กœ - "jawopen", "mouthclose", "mouthfunnel", "mouthpucker", - // ๋ˆˆ ์œ„์•„๋ž˜ - "eyelookupleft", "eyelookupright", "eyelookdownleft", "eyelookdownright", - "eyewideleft", "eyewideright", "eyesquintleft", "eyesquintright", - "eyeblinkleft", "eyeblinkright", - // ๋ˆˆ์น ์œ„์•„๋ž˜ - "browinnerup", "browdownleft", "browdownright", "browouterupright", "browouterupleft" - }; - - // ๊ฐ€๋กœ ๋ฐฉํ–ฅ BlendShape (์ขŒ์šฐ ์›€์ง์ž„) - horizontalScale ์ ์šฉ - private static readonly HashSet HorizontalBlendShapes = new HashSet(StringComparer.OrdinalIgnoreCase) { - // ์ž… ์ขŒ์šฐ - "mouthsmileleft", "mouthsmileright", "mouthfrownleft", "mouthfrownright", - "mouthdimpleleft", "mouthdimpleright", "mouthstretchleft", "mouthstretchright", - "mouthpressleft", "mouthpressright", "mouthlowerdownleft", "mouthlowerdownright", - "mouthupperupleft", "mouthupperupright", - "mouthleft", "mouthright", - // ๋ˆˆ ์ขŒ์šฐ - "eyelookinleft", "eyelookinright", "eyelookoutleft", "eyelookoutright", - // ๋ณผ/์ฝ” - "cheekpuff", "cheeksquintleft", "cheeksquintright", - "nosesneerleft", "nosesneerright" - }; - // Mirror mode์šฉ ์ •์  ๋งคํ•‘ ํ…Œ์ด๋ธ” private static readonly Dictionary EyeMirrorMap = new Dictionary() { {"eyelookupleft", "EyeLookUpRight"}, @@ -275,9 +238,6 @@ public class UnityRecieve_FACEMOTION3D_and_iFacialMocap : MonoBehaviour // ์ •๊ทœํ™”๋œ ์ด๋ฆ„์œผ๋กœ ์บ์‹œ ๊ฒ€์ƒ‰ string normalizedName = NormalizeBlendShapeName(shapeName).ToLowerInvariant(); - // ์„ธ๋กœ/๊ฐ€๋กœ ๋ฐฉํ–ฅ์— ๋”ฐ๋ผ ๋ณด์ • ๋น„์œจ ์ ์šฉ - weight = ApplyScaleCorrection(normalizedName, weight); - if (blendShapeCache.TryGetValue(normalizedName, out List mappings)) { // ์บ์‹œ์—์„œ ์ฐพ์€ ๋ชจ๋“  ๋งคํ•‘์— ๋Œ€ํ•ด weight ์„ค์ • @@ -291,31 +251,6 @@ public class UnityRecieve_FACEMOTION3D_and_iFacialMocap : MonoBehaviour } } - // ์„ธ๋กœ/๊ฐ€๋กœ ๋ฐฉํ–ฅ์— ๋”ฐ๋ฅธ BlendShape ๋ณด์ • ๋น„์œจ ์ ์šฉ - // Power ๊ณก์„ ์œผ๋กœ ๋ˆŒ๋ฆฐ ๋น„์œจ ๋ณด์ • (0~100 ๋ฒ”์œ„ ์œ ์ง€) - float ApplyScaleCorrection(string normalizedName, float weight) - { - float ratio = 1.0f; - - if (VerticalBlendShapes.Contains(normalizedName)) - { - ratio = verticalRatio; - } - else if (HorizontalBlendShapes.Contains(normalizedName)) - { - ratio = horizontalRatio; - } - - if (Mathf.Approximately(ratio, 1.0f)) - return weight; - - // ratio๊ฐ€ 0.75๋ฉด โ†’ power = 0.75 โ†’ ์ž‘์€ ๊ฐ’์ด ๋” ์ปค์ง - // ์˜ˆ: ์ž…๋ ฅ 25 โ†’ ์ถœ๋ ฅ ์•ฝ 5 ์ˆ˜์ค€์œผ๋กœ ๋ณด์ • - float normalized = weight / 100f; - float corrected = Mathf.Pow(normalized, ratio); - return corrected * 100f; - } - // BlendShape ์ด๋ฆ„ ์ •๊ทœํ™” ํ•จ์ˆ˜ string NormalizeBlendShapeName(string name) {