From 7fc9c10619c3ab65735692046256101e32830fd0 Mon Sep 17 00:00:00 2001 From: swrring Date: Tue, 15 Sep 2026 01:01:59 +0900 Subject: [PATCH] =?UTF-8?q?[WL-816k]=20=EC=84=AC=20=EB=B0=94=EB=8B=A4=20?= =?UTF-8?q?=3D=20=EC=96=95=EC=9D=80=20=EB=AC=BC=20=EA=B7=B8=EB=9D=BC?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=EC=85=98=20=C2=B7=20=EB=91=98=EB=A0=88=20?= =?UTF-8?q?=ED=9D=B0=20=EB=9D=A0=20=EC=A0=9C=EA=B1=B0=20(#816)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD 2026-09-15: ① 흰 거품띠가 안개 같다 ② 물이 섬을 통과하는 느낌. 데모(Critter) 물 셰이더는 우리 카메라/URP 에서 **돌긴 한다**(복사본 Farm_Water_Demo.mat · 깨짐 0 · queue 3000 · URP-Balanced 깊이·불투명 텍스처 둘 다 on 실측). 다만 ⓐ 무늬가 UV 기반이라 섬 물 평면(1000 m)이 데모 평면(10 m)의 100배 → 무늬가 사라지고 ⓑ 색 6안을 돌려도 814t 톤(#5C96C2)에 못 닿는다(최선 #2EBCF3 · 거리 77.2 · 쨍한 원색) ⓒ 물가Δ 가 음수(-0.02) = 섬에 반응하지 않는다. → 채택하지 않고 대안 ⓑ 로 갔다(증거용으로 복사본은 남긴다). 채택 = Farm_Water_WL_F.mat (= E 복사본 · ToonWaterU · 814t 톤 그대로) FoamColor (0.62,0.82,0.90) · FoamDistance 2.2 · FoamEdge 3 816j2 가 꺼 둔 깊이 거품을 **흰 거품이 아니라 물색을 밝힌 색**으로 되살려 섬과 만나는 선에 얕은 물이 생기게 했다 → 물가Δ 0.0736 → 0.1129, 밝은(흰) 픽셀 0.00 % · R-B 0(중립) = 안개로 읽힐 흰 덩어리가 없다. SO: waterTo = Farm_Water_WL_F · shoreFoamEnabled 0 (둘레 띠 끔). 게이트 PASS(resident · up_to_date · console error 0) · ProjectSettings/ Packages/ 0줄 걷기 6.00 m · grounded=True. Co-Authored-By: Claude Opus 5 (1M context) --- AgentScripts/WL816k_ALTB.txt | 21 ++ AgentScripts/WL816k_APPLY.txt | 3 + AgentScripts/WL816k_AltB.cs | 231 ++++++++++++++++ AgentScripts/WL816k_Apply.cs | 54 ++++ AgentScripts/WL816k_BUILD.txt | 38 +++ AgentScripts/WL816k_Build.cs | 83 ++++++ AgentScripts/WL816k_FINAL.txt | 25 ++ AgentScripts/WL816k_Final.cs | 253 +++++++++++++++++ AgentScripts/WL816k_PROBE.txt | 32 +++ AgentScripts/WL816k_PROPS.txt | 44 +++ AgentScripts/WL816k_Probe.cs | 218 +++++++++++++++ AgentScripts/WL816k_Props.cs | 32 +++ AgentScripts/WL816k_TUNE.txt | 40 +++ AgentScripts/WL816k_Tune.cs | 259 ++++++++++++++++++ .../Look/Farm/Materials/Farm_Water_Demo.mat | 196 +++++++++++++ .../Farm/Materials/Farm_Water_Demo.mat.meta | 8 + .../Look/Farm/Materials/Farm_Water_WL_F.mat | 99 +++++++ .../Farm/Materials/Farm_Water_WL_F.mat.meta | 8 + .../Resources/WL/WLIslandLookSettings.asset | 4 +- 19 files changed, 1646 insertions(+), 2 deletions(-) create mode 100644 AgentScripts/WL816k_ALTB.txt create mode 100644 AgentScripts/WL816k_APPLY.txt create mode 100644 AgentScripts/WL816k_AltB.cs create mode 100644 AgentScripts/WL816k_Apply.cs create mode 100644 AgentScripts/WL816k_BUILD.txt create mode 100644 AgentScripts/WL816k_Build.cs create mode 100644 AgentScripts/WL816k_FINAL.txt create mode 100644 AgentScripts/WL816k_Final.cs create mode 100644 AgentScripts/WL816k_PROBE.txt create mode 100644 AgentScripts/WL816k_PROPS.txt create mode 100644 AgentScripts/WL816k_Probe.cs create mode 100644 AgentScripts/WL816k_Props.cs create mode 100644 AgentScripts/WL816k_TUNE.txt create mode 100644 AgentScripts/WL816k_Tune.cs create mode 100644 Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat create mode 100644 Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat.meta create mode 100644 Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat create mode 100644 Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat.meta diff --git a/AgentScripts/WL816k_ALTB.txt b/AgentScripts/WL816k_ALTB.txt new file mode 100644 index 000000000..899bab634 --- /dev/null +++ b/AgentScripts/WL816k_ALTB.txt @@ -0,0 +1,21 @@ +=== WL-816k ⑤ 대안 ⓑ — 지금 물 + 얕은 물 그라데이션 (PD 구도 15 m · 띠 off) === +카메라 거리 15.0 m · 각 (45, 0, 0) + +[전] 지금(물 E · 띠 on) 물가 바다 #5D94BF σ=0.0529 · 밝음 2.15%(R−B -18) · 물가Δ 0.1139 +[전] 띠만 off 물가 바다 #5C94BF σ=0.0493 · 밝음 0.00%(R−B 0) · 물가Δ 0.0736 + +[얕은 물 그라데이션 3안] FoamColor = 물색을 밝힌 색 · 띠 off + w1 FoamColorRGBA(0.62, 0.82, 0.90, 1.00) Dist 1.2 Edge 6 + 바다 #5C93BF σ=0.0489 · 밝음 0.00%(R−B 0) · 물가Δ 0.0651 + PD 바다 #5794C1 σ=0.0477 · 밝음 1.80%(R−B 0) + w2 FoamColorRGBA(0.62, 0.82, 0.90, 1.00) Dist 2.2 Edge 3 + 바다 #5C93BF σ=0.0491 · 밝음 0.00%(R−B 0) · 물가Δ 0.1129 + PD 바다 #5794C1 σ=0.0470 · 밝음 1.81%(R−B 0) + w3 FoamColorRGBA(0.78, 0.90, 0.95, 1.00) Dist 1.6 Edge 4 + 바다 #5C93BF σ=0.0474 · 밝음 1.72%(R−B -6) · 물가Δ 0.0946 + PD 바다 #5794C1 σ=0.0476 · 밝음 2.52%(R−B -1) + +🔴 ⓑ 채택 = w1 · FoamColor RGBA(0.620, 0.820, 0.900, 1.000) · FoamDistance 1.2 · FoamEdge 6 · 물가Δ 0.0651 +[후] PD 바다 #5794C1 σ=0.0479 · 밝음 1.80%(R−B 0) +[후] 물가 바다 #5C93BF σ=0.0481 · 밝음 0.00%(R−B 0) · 물가Δ 0.0740 +[전] PD 바다 #5794C1 σ=0.0483 · 밝음 2.51%(R−B -5) diff --git a/AgentScripts/WL816k_APPLY.txt b/AgentScripts/WL816k_APPLY.txt new file mode 100644 index 000000000..c9c3bfe38 --- /dev/null +++ b/AgentScripts/WL816k_APPLY.txt @@ -0,0 +1,3 @@ +복사 E → F 성공 +F = Farm_Water_WL_F · shader Shader Graphs/ToonWaterU · FoamColor RGBA(0.620, 0.820, 0.900, 1.000) · FoamDistance 2.2 · FoamEdge 3 +SO waterMode=1 · waterTo=Farm_Water_WL_F · shoreFoamEnabled=0 diff --git a/AgentScripts/WL816k_AltB.cs b/AgentScripts/WL816k_AltB.cs new file mode 100644 index 000000000..5a7cb4eaa --- /dev/null +++ b/AgentScripts/WL816k_AltB.cs @@ -0,0 +1,231 @@ +// WL-816k — ⑤ 대안 ⓑ: 지금 물(ToonWaterU · 814t 톤 유지)에 **얕은 물 그라데이션**을 되살린다. +// 816j2 는 깊이 거품을 껐다(FoamColor=WaterColor) → 섬과 만나는 선에 아무 반응이 없어 「통과하는 느낌」. +// 흰 거품(=PD 가 「안개 같다」) 대신 **물색을 밝힌 색**으로 되살려 얕은 물처럼 보이게 한다. 둘레 띠는 off. +using System.Collections; +using System.Text; +using UnityEngine; +using UnityEngine.Rendering.Universal; +using UnityEngine.SceneManagement; +using WL.Look.Farm; + +public static class WL816k_AltB +{ + public const string D = "Screenshots_WL/WL816k/"; + public const int PW = 1280, PH = 720; + public const string MatDir = "Assets/WL/Look/Farm/Materials/"; + public const string C_Foam = "Color_e1f155248d144786a62fc1585ca21e9a"; + public const string R_FoamDistance = "Vector1_101dc4546b684d40bc2ff2fc59ab43d5"; + public const string R_FoamEdge = "Vector1_34f757bec6b8422b9aef3b9d97117a6e"; + + public static void Open() + { + UnityEditor.SceneManagement.EditorSceneManager.OpenScene( + "Assets/Scenes/InGame.unity", UnityEditor.SceneManagement.OpenSceneMode.Single); + } + public static void Start() + { + var go = GameObject.Find("~WL816kB"); + if (go != null) Object.DestroyImmediate(go); + go = new GameObject("~WL816kB"); + go.AddComponent(); + } + public static Texture2D Grab(Camera cam, int w, int h) + { + var rt = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + rt.antiAliasing = 1; rt.Create(); + var pT = cam.targetTexture; var pA = RenderTexture.active; + cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt; + var t = new Texture2D(w, h, TextureFormat.RGB24, false); + t.ReadPixels(new Rect(0, 0, w, h), 0, 0); t.Apply(); + RenderTexture.active = pA; cam.targetTexture = pT; rt.Release(); Object.DestroyImmediate(rt); + return t; + } + static float Lum(Color32 c) { return (0.299f * c.r + 0.587f * c.g + 0.114f * c.b) / 255f; } + + public static string Shot(Camera cam, string path, int w, int h, bool shoreMetric, out float shore, out int rmb) + { + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path)); + var t = Grab(cam, w, h); + System.IO.File.WriteAllBytes(path, t.EncodeToPNG()); + var px = t.GetPixels32(); + long r = 0, g = 0, b = 0; int n = 0; double sum = 0, sum2 = 0; + int y0 = 20, y1s = shoreMetric ? 200 : Mathf.Min(320, h); + int x0 = shoreMetric ? 100 : 20, x1s = shoreMetric ? w - 100 : Mathf.Min(340, w); + for (int y = y0; y < y1s; y += 2) + for (int x = x0; x < x1s; x += 2) + { var c = px[y * w + x]; r += c.r; g += c.g; b += c.b; n++; float l = Lum(c); sum += l; sum2 += l * l; } + double mean = n > 0 ? sum / n : 0; + double sd = n > 0 ? System.Math.Sqrt(System.Math.Max(0, sum2 / n - mean * mean)) : 0; + shore = 0f; + string extra = ""; + if (shoreMetric) + { + double a = 0, b2 = 0; int an = 0, bn = 0; + for (int y = 300; y < 350; y++) for (int x = 100; x < w - 100; x += 2) { a += Lum(px[y * w + x]); an++; } + for (int y = 20; y < 70; y++) for (int x = 100; x < w - 100; x += 2) { b2 += Lum(px[y * w + x]); bn++; } + shore = (float)((an > 0 ? a / an : 0) - (bn > 0 ? b2 / bn : 0)); + extra = " · 물가Δ " + shore.ToString("F4"); + } + // 밝은 픽셀 R−B (분홍 방지 · 816j2 ②) + long fr = 0, fb = 0; int fn = 0, tot = 0; + int yh = (int)(h * 0.55f); + for (int y = 0; y < yh; y++) for (int x = 0; x < w; x += 2) + { var c = px[y * w + x]; tot++; if (c.r > 200 && c.g > 195 && c.b > 195) { fr += c.r; fb += c.b; fn++; } } + rmb = fn == 0 ? 0 : (int)(fr / fn) - (int)(fb / fn); + Object.DestroyImmediate(t); + return "바다 #" + ((int)(r / n)).ToString("X2") + ((int)(g / n)).ToString("X2") + ((int)(b / n)).ToString("X2") + + " σ=" + sd.ToString("F4") + " · 밝음 " + (100f * fn / tot).ToString("F2") + "%(R−B " + rmb + ")" + extra; + } + public static void Strip(string[] paths, string outPath, int div) + { + var ts = new Texture2D[paths.Length]; int w = 0, h = 0; + for (int i = 0; i < paths.Length; i++) + { + if (!System.IO.File.Exists(paths[i])) return; + ts[i] = new Texture2D(2, 2, TextureFormat.RGB24, false); + ts[i].LoadImage(System.IO.File.ReadAllBytes(paths[i])); + w = Mathf.Max(w, ts[i].width / div); h += ts[i].height / div; + } + var o = new Texture2D(w, h, TextureFormat.RGB24, false); + var f = new Color32[w * h]; + for (int i = 0; i < f.Length; i++) f[i] = new Color32(24, 24, 28, 255); + o.SetPixels32(f); + int yo = h; + for (int i = 0; i < ts.Length; i++) + { + int sw = ts[i].width / div, sh2 = ts[i].height / div; + var src = ts[i].GetPixels32(); int fw = ts[i].width; + var dst = new Color32[sw * sh2]; + for (int y = 0; y < sh2; y++) for (int x = 0; x < sw; x++) + { + int rr = 0, gg = 0, bb = 0; + for (int dy = 0; dy < div; dy++) for (int dx = 0; dx < div; dx++) + { var c = src[(y * div + dy) * fw + (x * div + dx)]; rr += c.r; gg += c.g; bb += c.b; } + int q = div * div; + dst[y * sw + x] = new Color32((byte)(rr / q), (byte)(gg / q), (byte)(bb / q), 255); + } + yo -= sh2; o.SetPixels32(0, yo, sw, sh2, dst); + } + o.Apply(); + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(outPath)); + System.IO.File.WriteAllBytes(outPath, o.EncodeToPNG()); + Object.DestroyImmediate(o); + for (int i = 0; i < ts.Length; i++) Object.DestroyImmediate(ts[i]); + } +} + +public class WL816k_AltBRunner : MonoBehaviour +{ + static StringBuilder sb; + static void L(string s) { sb.AppendLine(s); } + const string D = WL816k_AltB.D; + const int PW = WL816k_AltB.PW, PH = WL816k_AltB.PH; + Camera live, zoom; Renderer water; MeshRenderer band; + + void Start() { StartCoroutine(Co()); } + + IEnumerator Co() + { + sb = new StringBuilder(); + L("=== WL-816k ⑤ 대안 ⓑ — 지금 물 + 얕은 물 그라데이션 (PD 구도 15 m · 띠 off) ==="); + var op = SceneManager.LoadSceneAsync("Level01", LoadSceneMode.Additive); + while (op != null && !op.isDone) yield return null; + for (int i = 0; i < 8; i++) yield return new WaitForSeconds(1f); + + foreach (var r in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + if (r != null && r.gameObject.scene.name == "Level01" && r.name == "Water") water = r; + foreach (var c in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + { + if (!c.gameObject.activeInHierarchy || !c.enabled || c.targetTexture != null) continue; + if (c.name.StartsWith("~WL816")) continue; + if (live == null || c.depth > live.depth) live = c; + } + var foam = Object.FindFirstObjectByType(FindObjectsInactive.Include); + band = foam != null ? foam.GetComponent() : null; + if (water == null || live == null) { L("🔴 물/카메라 없음"); Done(); yield break; } + + foreach (var mb in live.GetComponents()) + if (mb != null && mb.GetType().Name.Contains("Cinemachine")) mb.enabled = false; + float d = 15f, k = d * 0.70710678f; + live.transform.position = new Vector3(0f, k, -k); + live.transform.rotation = Quaternion.Euler(45f, 0f, 0f); + live.fieldOfView = 60f; + yield return null; yield return new WaitForSeconds(0.3f); + L("카메라 거리 " + live.transform.position.magnitude.ToString("F1") + " m · 각 " + live.transform.eulerAngles.ToString("F0")); + + var E = UnityEditor.AssetDatabase.LoadAssetAtPath(WL816k_AltB.MatDir + "Farm_Water_WL_E.mat"); + if (E == null) { L("🔴 E 없음"); Done(); yield break; } + + var zgo = new GameObject("~WL816kBZ"); zgo.hideFlags = HideFlags.DontSave; + zoom = zgo.AddComponent(); + zoom.fieldOfView = 34f; zoom.nearClipPlane = 0.1f; zoom.farClipPlane = 2000f; + zoom.clearFlags = CameraClearFlags.Skybox; zoom.cullingMask = ~0; zoom.depth = -100f; + zgo.AddComponent().renderPostProcessing = true; + Bounds bb = band != null ? band.bounds : new Bounds(Vector3.zero, new Vector3(16, 1, 16)); + zgo.transform.position = new Vector3(bb.center.x, 3.2f, bb.min.z - 9f); + zgo.transform.LookAt(new Vector3(bb.center.x, -1f, bb.min.z + 2f)); + + float sh; int rmb; + L(""); + water.sharedMaterial = E; if (band != null) band.enabled = true; + yield return null; yield return new WaitForSeconds(0.35f); + L("[전] 지금(물 E · 띠 on) 물가 " + WL816k_AltB.Shot(zoom, D + "b_before_zoom.png", PW, PH, true, out sh, out rmb)); + if (band != null) band.enabled = false; + yield return null; yield return new WaitForSeconds(0.3f); + L("[전] 띠만 off 물가 " + WL816k_AltB.Shot(zoom, D + "b_bandoff_zoom.png", PW, PH, true, out sh, out rmb)); + + // 얕은 물 그라데이션 3안 (흰 거품 아님 — 물색을 밝힌 색) + var fc = new[] { new Color(0.62f, 0.82f, 0.90f, 1f), new Color(0.62f, 0.82f, 0.90f, 1f), new Color(0.78f, 0.90f, 0.95f, 1f) }; + var fd = new[] { 1.2f, 2.2f, 1.6f }; + var fe = new[] { 6f, 3f, 4f }; + var zp = new string[3]; var shores = new float[3]; + L(""); + L("[얕은 물 그라데이션 3안] FoamColor = 물색을 밝힌 색 · 띠 off"); + for (int i = 0; i < 3; i++) + { + var m = new Material(E); + m.SetColor(WL816k_AltB.C_Foam, fc[i]); + m.SetFloat(WL816k_AltB.R_FoamDistance, fd[i]); + m.SetFloat(WL816k_AltB.R_FoamEdge, fe[i]); + water.sharedMaterial = m; + yield return null; yield return new WaitForSeconds(0.3f); + zp[i] = D + "b_w" + (i + 1) + "_zoom.png"; + L(" w" + (i + 1) + " FoamColor" + fc[i].ToString("F2") + " Dist " + fd[i] + " Edge " + fe[i]); + L(" " + WL816k_AltB.Shot(zoom, zp[i], PW, PH, true, out sh, out rmb)); + shores[i] = sh; + L(" PD " + WL816k_AltB.Shot(live, D + "b_w" + (i + 1) + ".png", PW, PH, false, out _, out _)); + } + WL816k_AltB.Strip(zp, D + "b_w3_zoom.png", 3); + int best = 0; float bd = -9f; + for (int i = 0; i < 3; i++) if (shores[i] > bd && shores[i] <= 0.09f) { bd = shores[i]; best = i; } + L(""); + L("🔴 ⓑ 채택 = w" + (best + 1) + " · FoamColor " + fc[best].ToString("F3") + " · FoamDistance " + fd[best] + " · FoamEdge " + fe[best] + + " · 물가Δ " + shores[best].ToString("F4")); + System.IO.File.WriteAllText("AgentScripts/WL816k_PICKB.txt", + fc[best].r + "," + fc[best].g + "," + fc[best].b + "|" + fd[best] + "|" + fe[best]); + + // 후 = 채택안 PD 구도 + var win = new Material(E); + win.SetColor(WL816k_AltB.C_Foam, fc[best]); + win.SetFloat(WL816k_AltB.R_FoamDistance, fd[best]); + win.SetFloat(WL816k_AltB.R_FoamEdge, fe[best]); + water.sharedMaterial = win; + yield return null; yield return new WaitForSeconds(0.35f); + L("[후] PD " + WL816k_AltB.Shot(live, D + "zb_after_pd.png", PW, PH, false, out _, out _)); + L("[후] 물가 " + WL816k_AltB.Shot(zoom, D + "zb_after_zoom.png", PW, PH, true, out sh, out rmb)); + // 전 PD (띠 on) 도 같은 자리에서 + water.sharedMaterial = E; if (band != null) band.enabled = true; + yield return null; yield return new WaitForSeconds(0.35f); + L("[전] PD " + WL816k_AltB.Shot(live, D + "zb_before_pd.png", PW, PH, false, out _, out _)); + WL816k_AltB.Strip(new[] { D + "zb_before_pd.png", D + "zb_after_pd.png" }, D + "z_pd_before_after.png", 1); + WL816k_AltB.Strip(new[] { D + "b_before_zoom.png", D + "zb_after_zoom.png" }, D + "z_zoom_shore.png", 1); + + Object.DestroyImmediate(zgo); + Done(); + } + void Done() + { + System.IO.File.WriteAllText("AgentScripts/WL816k_ALTB.txt", sb.ToString()); + Debug.Log("[816k altB]\n" + sb); + } +} diff --git a/AgentScripts/WL816k_Apply.cs b/AgentScripts/WL816k_Apply.cs new file mode 100644 index 000000000..820ecef90 --- /dev/null +++ b/AgentScripts/WL816k_Apply.cs @@ -0,0 +1,54 @@ +// WL-816k — ⑥ 채택안 적용: Farm_Water_WL_F(= E 복사본 + 얕은 물 그라데이션) + shoreFoamEnabled 0 +using UnityEngine; +using UnityEditor; +using System.Text; + +public static class WL816k_Apply +{ + const string MatDir = "Assets/WL/Look/Farm/Materials/"; + const string SO = "Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset"; + const string C_Foam = "Color_e1f155248d144786a62fc1585ca21e9a"; + const string R_FoamDistance = "Vector1_101dc4546b684d40bc2ff2fc59ab43d5"; + const string R_FoamEdge = "Vector1_34f757bec6b8422b9aef3b9d97117a6e"; + + public static void Run() + { + var sb = new StringBuilder(); + string dst = MatDir + "Farm_Water_WL_F.mat"; + if (AssetDatabase.LoadAssetAtPath(dst) == null) + { + bool ok = AssetDatabase.CopyAsset(MatDir + "Farm_Water_WL_E.mat", dst); + sb.AppendLine("복사 E → F " + (ok ? "성공" : "🔴 실패")); + AssetDatabase.Refresh(); + } + var F = AssetDatabase.LoadAssetAtPath(dst); + if (F == null) { sb.AppendLine("🔴 F 로드 실패"); Done(sb); return; } + + // 🔴 채택 = ⓑ w2 — 흰 거품이 아니라 **물색을 밝힌 색**으로 얕은 물을 만든다(띠 대체) + F.SetColor(C_Foam, new Color(0.62f, 0.82f, 0.90f, 1f)); + F.SetFloat(R_FoamDistance, 2.2f); + F.SetFloat(R_FoamEdge, 3f); + EditorUtility.SetDirty(F); + + var so = AssetDatabase.LoadAssetAtPath(SO) as WL.Look.Farm.WLIslandLookSettings; + if (so == null) { sb.AppendLine("🔴 SO 로드 실패"); Done(sb); return; } + so.waterTo = F; + so.shoreFoamEnabled = 0; + EditorUtility.SetDirty(so); + AssetDatabase.SaveAssets(); + WL.Look.Farm.WLIslandLookSettings.Invalidate(); + + sb.AppendLine("F = " + F.name + " · shader " + F.shader.name + + " · FoamColor " + F.GetColor(C_Foam).ToString("F3") + + " · FoamDistance " + F.GetFloat(R_FoamDistance) + + " · FoamEdge " + F.GetFloat(R_FoamEdge)); + sb.AppendLine("SO waterMode=" + so.waterMode + " · waterTo=" + so.waterTo.name + + " · shoreFoamEnabled=" + so.shoreFoamEnabled); + Done(sb); + } + static void Done(StringBuilder sb) + { + System.IO.File.WriteAllText("AgentScripts/WL816k_APPLY.txt", sb.ToString()); + Debug.Log("[816k apply]\n" + sb); + } +} diff --git a/AgentScripts/WL816k_BUILD.txt b/AgentScripts/WL816k_BUILD.txt new file mode 100644 index 000000000..13471003e --- /dev/null +++ b/AgentScripts/WL816k_BUILD.txt @@ -0,0 +1,38 @@ +=== WL-816k ① 데모 물 복사본 + 셰이더 속성 실측 === +원본 = Water · shader Shader Graphs/Water +복사 성공 → Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat +복사본 = Farm_Water_Demo · shader Shader Graphs/Water · renderQueue 2000 · GUID e9a7a80e3400eb04dbae4e07584e57fa + +[셰이더 속성 33개] + _Color [Color] = RGBA(0.298, 0.800, 1.000, 0.573) + _FoamAmount [Float] = 1.0000 + _FoamScale [Float] = 50.0000 + _FoamSpeed [Float] = 0.0100 + _ParticleThreshold [Float] = 0.0100 + _TintStrength [Float] = 0.1300 + _Bands [Float] = 78.5200 + _TintBrightness [Float] = 1.0000 + _MinimumTint [Float] = -0.1000 + _DistortionTexture [TexEnv] = FlowMap 256x256 + _DistortionSpeed [Float] = 0.0600 + _DistortionTiling [Float] = 1.0000 + _DistortionDirection [Vector] = (0.250, 0.000, 0.000, 0.000) + _DistortionThreshold [Float] = 2.0000 + _DistortionStrength [Vector] = (0.050, 0.050, 0.000, 0.000) + _REFLECTIONSON [Float] = 0.0000 + _ReflectionStrength [Float] = 0.7000 + _ReflectionDistortion [Vector] = (0.030, 0.030, 0.000, 0.000) + _Cloud_Density [Float] = 0.0100 + _Cloud_Movement [Vector] = (1.000, 1.000, 0.000, 0.000) + _Cloud_Strength [Float] = 1.0000 + _Cloud_Cover [Float] = 0.5000 + _Cloud_Change [Float] = 0.0050 + _Cloud_Step [Vector] = (13.000, 17.000, 0.000, 0.000) + _Shades [Float] = 7.0000 + _Brightness [Float] = 0.2500 + _MinimumDarkness [Float] = 0.2000 + +[키워드] _MAIN_LIGHT_SHADOWS · _SHADOWS_SOFT + +[SO 지금] waterMode=1 · waterTo=Farm_Water_WL_E · waterFrom=SimpleWater · shoreFoamEnabled=1 · shoreFoamWidth=1.6 +데모 Water_Plane: scale (1.00, 1.00, 1.00) · mesh Plane bounds (10.0, 0.0, 10.0) diff --git a/AgentScripts/WL816k_Build.cs b/AgentScripts/WL816k_Build.cs new file mode 100644 index 000000000..fea9f5c50 --- /dev/null +++ b/AgentScripts/WL816k_Build.cs @@ -0,0 +1,83 @@ +// WL-816k — ① 데모 물 셰이더(Water.shadergraph) 복사본 생성 + 셰이더 속성 전수 실측 +// 원본 Assets/3DPixelArtEnvironment/** 는 0줄 수정. 복사본만 만든다. +using UnityEngine; +using UnityEditor; +using System.Text; + +public static class WL816k_Build +{ + const string SRC = "Assets/3DPixelArtEnvironment/Materials/Water.mat"; + const string DST = "Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat"; + const string SO = "Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset"; + + public static void Run() + { + var sb = new StringBuilder(); + sb.AppendLine("=== WL-816k ① 데모 물 복사본 + 셰이더 속성 실측 ==="); + + var src = AssetDatabase.LoadAssetAtPath(SRC); + sb.AppendLine("원본 = " + (src == null ? "🔴 없음" : src.name + " · shader " + src.shader.name)); + if (src == null) { Done(sb); return; } + + if (AssetDatabase.LoadAssetAtPath(DST) == null) + { + bool ok = AssetDatabase.CopyAsset(SRC, DST); + sb.AppendLine("복사 " + (ok ? "성공" : "🔴 실패") + " → " + DST); + AssetDatabase.Refresh(); + } + else sb.AppendLine("복사본 이미 있음 → " + DST); + + var dst = AssetDatabase.LoadAssetAtPath(DST); + if (dst == null) { sb.AppendLine("🔴 복사본 로드 실패"); Done(sb); return; } + sb.AppendLine("복사본 = " + dst.name + " · shader " + (dst.shader == null ? "null" : dst.shader.name) + + " · renderQueue " + dst.renderQueue + " · GUID " + AssetDatabase.AssetPathToGUID(DST)); + + // ── 셰이더 속성 전수 ──────────────────────────────────── + var sh = dst.shader; + sb.AppendLine(""); + sb.AppendLine("[셰이더 속성 " + ShaderUtil.GetPropertyCount(sh) + "개]"); + for (int i = 0; i < ShaderUtil.GetPropertyCount(sh); i++) + { + string n = ShaderUtil.GetPropertyName(sh, i); + var t = ShaderUtil.GetPropertyType(sh, i); + string v = "?"; + if (t == ShaderUtil.ShaderPropertyType.Color) v = dst.GetColor(n).ToString("F3"); + else if (t == ShaderUtil.ShaderPropertyType.Vector) v = dst.GetVector(n).ToString("F3"); + else if (t == ShaderUtil.ShaderPropertyType.Float || t == ShaderUtil.ShaderPropertyType.Range) v = dst.GetFloat(n).ToString("F4"); + else if (t == ShaderUtil.ShaderPropertyType.TexEnv) { var tx = dst.GetTexture(n); v = tx == null ? "(없음)" : tx.name + " " + tx.width + "x" + tx.height; } + if (ShaderUtil.IsShaderPropertyHidden(sh, i)) continue; + sb.AppendLine(" " + n + " [" + t + "] = " + v); + } + sb.AppendLine(""); + sb.AppendLine("[키워드] " + string.Join(" · ", dst.shaderKeywords)); + + // ── 지금 SO ──────────────────────────────────────────── + var so = AssetDatabase.LoadAssetAtPath(SO) as WL.Look.Farm.WLIslandLookSettings; + if (so != null) + { + sb.AppendLine(""); + sb.AppendLine("[SO 지금] waterMode=" + so.waterMode + + " · waterTo=" + (so.waterTo == null ? "null" : so.waterTo.name) + + " · waterFrom=" + (so.waterFrom == null ? "null" : so.waterFrom.name) + + " · shoreFoamEnabled=" + so.shoreFoamEnabled + + " · shoreFoamWidth=" + so.shoreFoamWidth); + } + else sb.AppendLine("🔴 SO 로드 실패"); + + // ── 섬 물 평면 vs 데모 평면 크기 ─────────────────────── + var pf = AssetDatabase.LoadAssetAtPath("Assets/3DPixelArtEnvironment/Prefabs/Water_Plane.prefab"); + if (pf != null) + { + var mf = pf.GetComponentInChildren(); + sb.AppendLine("데모 Water_Plane: scale " + pf.transform.localScale.ToString("F2") + + " · mesh " + (mf == null ? "?" : mf.sharedMesh.name + " bounds " + mf.sharedMesh.bounds.size.ToString("F1"))); + } + Done(sb); + } + + static void Done(StringBuilder sb) + { + System.IO.File.WriteAllText("AgentScripts/WL816k_BUILD.txt", sb.ToString()); + Debug.Log("[816k build]\n" + sb); + } +} diff --git a/AgentScripts/WL816k_FINAL.txt b/AgentScripts/WL816k_FINAL.txt new file mode 100644 index 000000000..b49a7de87 --- /dev/null +++ b/AgentScripts/WL816k_FINAL.txt @@ -0,0 +1,25 @@ +=== WL-816k ④ 최종 (PD 구도 · 거리 15 m 강제) === +카메라 MainCamera Cinemachine 컴포넌트 1개 끔 · pos=(0.00, 10.61, -10.61) 각=(45, 0, 0) fov=60 · 거리 15.0 m + +[전] 지금(물 E · 띠 on) PD 바다 #5694C1 σ=0.0474 · 밝음 3.09% + 물가 바다 #5D94BF σ=0.0524 · 밝음 2.33% · 물가Δ 0.1249 + +[데모 물 색 6안] _FoamScale 800 고정 · 목표 = 화면 #5C96C2 + v1 CRGBA(0.30, 0.80, 1.00, 0.57) Br0.25 MD0.2 MT-0.1 TS0.13 + 바다 #00C0FA σ=0.0215 · 밝음 0.23% · 물가Δ 0.0004 · 목표거리 116.3 + v2 CRGBA(0.55, 0.78, 0.90, 0.60) Br0.45 MD0.4 MT-0.1 TS0.13 + 바다 #2EBCF3 σ=0.0461 · 밝음 0.00% · 물가Δ -0.0245 · 목표거리 77.2 + v3 CRGBA(0.70, 0.85, 0.95, 0.60) Br0.45 MD0.4 MT-0.1 TS0.13 + 바다 #B6E0FD σ=0.0242 · 밝음 0.11% · 물가Δ -0.0370 · 목표거리 131.9 + v4 CRGBA(0.55, 0.78, 0.90, 0.60) Br0.6 MD0.5 MT0 TS0.13 + 바다 #2ABDF4 σ=0.0440 · 밝음 0.00% · 물가Δ -0.0215 · 목표거리 81.3 + v5 CRGBA(0.45, 0.70, 0.88, 0.65) Br0.55 MD0.45 MT-0.1 TS0.05 + 바다 #028FE8 σ=0.0533 · 밝음 0.34% · 물가Δ -0.0065 · 목표거리 98.0 + v6 CRGBA(0.70, 0.85, 0.95, 0.60) Br0.6 MD0.5 MT0 TS0.05 + 바다 #B5E1FD σ=0.0199 · 밝음 0.10% · 물가Δ -0.0357 · 목표거리 131.5 + +🔴 채택 = v2 · _ColorRGBA(0.550, 0.780, 0.900, 0.600) _Brightness 0.45 _MinimumDarkness 0.4 _MinimumTint -0.1 _TintStrength 0.13 _FoamScale 800 · 목표거리 77.2 + +[후] 데모 물 v2 · 띠 off PD 바다 #007EE2 σ=0.0286 · 밝음 1.88% + 물가 바다 #20BAF1 σ=0.0523 · 밝음 0.26% · 물가Δ -0.0086 +걷기 (0.00, 0.00, 0.00) → (4.24, 0.01, 4.24) · 6.00 m · grounded=True diff --git a/AgentScripts/WL816k_Final.cs b/AgentScripts/WL816k_Final.cs new file mode 100644 index 000000000..7429f7854 --- /dev/null +++ b/AgentScripts/WL816k_Final.cs @@ -0,0 +1,253 @@ +// WL-816k — ④ 최종: 데모 물 셰이더 색 6안 → 814t 톤(#5C96C2)에 가장 가까운 안 자동 선정 → 전/후 2장 +// 🔴 카메라 = PD 구도 거리 15 m 강제(Cinemachine 브레인 끔). Play 중 에셋 수정 0. +using System.Collections; +using System.Text; +using UnityEngine; +using UnityEngine.Rendering.Universal; +using UnityEngine.SceneManagement; +using WL.Look.Farm; + +public static class WL816k_Final +{ + public const string D = "Screenshots_WL/WL816k/"; + public const int PW = 1280, PH = 720; + public const string MatDir = "Assets/WL/Look/Farm/Materials/"; + + public static void Open() + { + UnityEditor.SceneManagement.EditorSceneManager.OpenScene( + "Assets/Scenes/InGame.unity", UnityEditor.SceneManagement.OpenSceneMode.Single); + } + public static void Start() + { + var go = GameObject.Find("~WL816kF"); + if (go != null) Object.DestroyImmediate(go); + go = new GameObject("~WL816kF"); + go.AddComponent(); + } + public static Texture2D Grab(Camera cam, int w, int h) + { + var rt = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + rt.antiAliasing = 1; rt.Create(); + var pT = cam.targetTexture; var pA = RenderTexture.active; + cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt; + var t = new Texture2D(w, h, TextureFormat.RGB24, false); + t.ReadPixels(new Rect(0, 0, w, h), 0, 0); t.Apply(); + RenderTexture.active = pA; cam.targetTexture = pT; rt.Release(); Object.DestroyImmediate(rt); + return t; + } + static float Lum(Color32 c) { return (0.299f * c.r + 0.587f * c.g + 0.114f * c.b) / 255f; } + + /// 캡처 + 지표. outRGB = 바다 평균색, outShore = 물가Δ(섬에 반응하는가) + public static string Shot(Camera cam, string path, int w, int h, bool shoreMetric, out Vector3 outRGB, out float outShore) + { + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path)); + var t = Grab(cam, w, h); + System.IO.File.WriteAllBytes(path, t.EncodeToPNG()); + var px = t.GetPixels32(); + long r = 0, g = 0, b = 0; int n = 0; double sum = 0, sum2 = 0; + // 바다만 있는 구역 — 확대 카메라는 아래쪽 절반, PD 구도는 왼쪽 아래 + int y0 = shoreMetric ? 20 : 20, y1s = shoreMetric ? 200 : Mathf.Min(320, h); + int x0 = shoreMetric ? 100 : 20, x1s = shoreMetric ? w - 100 : Mathf.Min(340, w); + for (int y = y0; y < y1s; y += 2) + for (int x = x0; x < x1s; x += 2) + { + var c = px[y * w + x]; r += c.r; g += c.g; b += c.b; n++; + float l = Lum(c); sum += l; sum2 += l * l; + } + double mean = n > 0 ? sum / n : 0; + double sd = n > 0 ? System.Math.Sqrt(System.Math.Max(0, sum2 / n - mean * mean)) : 0; + outRGB = new Vector3((float)r / n, (float)g / n, (float)b / n); + outShore = 0f; + string extra = ""; + if (shoreMetric) + { + double a = 0; int an = 0, bn = 0; double b2 = 0; + for (int y = 300; y < 350; y++) for (int x = 100; x < w - 100; x += 2) { a += Lum(px[y * w + x]); an++; } + for (int y = 20; y < 70; y++) for (int x = 100; x < w - 100; x += 2) { b2 += Lum(px[y * w + x]); bn++; } + outShore = (float)((an > 0 ? a / an : 0) - (bn > 0 ? b2 / bn : 0)); + extra = " · 물가Δ " + outShore.ToString("F4"); + } + int fn = 0, tot = 0; + int yh = (int)(h * 0.55f); + for (int y = 0; y < yh; y++) for (int x = 0; x < w; x += 2) { var c = px[y * w + x]; tot++; if (c.r > 200 && c.g > 195 && c.b > 195) fn++; } + Object.DestroyImmediate(t); + return "바다 #" + ((int)(r / n)).ToString("X2") + ((int)(g / n)).ToString("X2") + ((int)(b / n)).ToString("X2") + + " σ=" + sd.ToString("F4") + " · 밝음 " + (100f * fn / tot).ToString("F2") + "%" + extra; + } + public static void Strip(string[] paths, string outPath, int div) + { + var ts = new Texture2D[paths.Length]; int w = 0, h = 0; + for (int i = 0; i < paths.Length; i++) + { + if (!System.IO.File.Exists(paths[i])) return; + ts[i] = new Texture2D(2, 2, TextureFormat.RGB24, false); + ts[i].LoadImage(System.IO.File.ReadAllBytes(paths[i])); + w = Mathf.Max(w, ts[i].width / div); h += ts[i].height / div; + } + var o = new Texture2D(w, h, TextureFormat.RGB24, false); + var f = new Color32[w * h]; + for (int i = 0; i < f.Length; i++) f[i] = new Color32(24, 24, 28, 255); + o.SetPixels32(f); + int yo = h; + for (int i = 0; i < ts.Length; i++) + { + int sw = ts[i].width / div, sh = ts[i].height / div; + var src = ts[i].GetPixels32(); int fw = ts[i].width; + var dst = new Color32[sw * sh]; + for (int y = 0; y < sh; y++) + for (int x = 0; x < sw; x++) + { + int rr = 0, gg = 0, bb = 0; + for (int dy = 0; dy < div; dy++) for (int dx = 0; dx < div; dx++) + { var c = src[(y * div + dy) * fw + (x * div + dx)]; rr += c.r; gg += c.g; bb += c.b; } + int q = div * div; + dst[y * sw + x] = new Color32((byte)(rr / q), (byte)(gg / q), (byte)(bb / q), 255); + } + yo -= sh; o.SetPixels32(0, yo, sw, sh, dst); + } + o.Apply(); + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(outPath)); + System.IO.File.WriteAllBytes(outPath, o.EncodeToPNG()); + Object.DestroyImmediate(o); + for (int i = 0; i < ts.Length; i++) Object.DestroyImmediate(ts[i]); + } +} + +public class WL816k_FinalRunner : MonoBehaviour +{ + static StringBuilder sb; + static void L(string s) { sb.AppendLine(s); } + const string D = WL816k_Final.D; + const string MatDir = WL816k_Final.MatDir; + const int PW = WL816k_Final.PW, PH = WL816k_Final.PH; + + Camera live, zoom; Renderer water; MeshRenderer band; Material Demo; + + void Start() { StartCoroutine(Co()); } + + IEnumerator Co() + { + sb = new StringBuilder(); + L("=== WL-816k ④ 최종 (PD 구도 · 거리 15 m 강제) ==="); + var op = SceneManager.LoadSceneAsync("Level01", LoadSceneMode.Additive); + while (op != null && !op.isDone) yield return null; + for (int i = 0; i < 8; i++) yield return new WaitForSeconds(1f); + + foreach (var r in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + if (r != null && r.gameObject.scene.name == "Level01" && r.name == "Water") water = r; + foreach (var c in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + { + if (!c.gameObject.activeInHierarchy || !c.enabled || c.targetTexture != null) continue; + if (c.name.StartsWith("~WL816")) continue; + if (live == null || c.depth > live.depth) live = c; + } + var foam = Object.FindFirstObjectByType(FindObjectsInactive.Include); + band = foam != null ? foam.GetComponent() : null; + if (water == null || live == null) { L("🔴 물/카메라 없음"); Done(); yield break; } + + // 🔴 거리 15 m — 섬 카메라는 Level01 의 Cinemachine vcam(m_CameraDistance 22)이 매 프레임 덮어쓴다. + // FarmingIsland 씬 0줄 원칙이라 **런타임에 브레인만 끄고** 카메라를 직접 놓는다. + int off = 0; + foreach (var mb in live.GetComponents()) + if (mb != null && mb.GetType().Name.Contains("Cinemachine")) { mb.enabled = false; off++; } + float d = 15f, k = d * 0.70710678f; + live.transform.position = new Vector3(0f, k, -k); + live.transform.rotation = Quaternion.Euler(45f, 0f, 0f); + live.fieldOfView = 60f; + yield return null; yield return new WaitForSeconds(0.3f); + L("카메라 " + live.name + " Cinemachine 컴포넌트 " + off + "개 끔 · pos=" + live.transform.position.ToString("F2") + + " 각=" + live.transform.eulerAngles.ToString("F0") + " fov=" + live.fieldOfView + + " · 거리 " + live.transform.position.magnitude.ToString("F1") + " m"); + + var E = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_Water_WL_E.mat"); + Demo = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_Water_Demo.mat"); + if (Demo == null) { L("🔴 Farm_Water_Demo 없음"); Done(); yield break; } + + var zgo = new GameObject("~WL816kFZ"); zgo.hideFlags = HideFlags.DontSave; + zoom = zgo.AddComponent(); + zoom.fieldOfView = 34f; zoom.nearClipPlane = 0.1f; zoom.farClipPlane = 2000f; + zoom.clearFlags = CameraClearFlags.Skybox; zoom.cullingMask = ~0; zoom.depth = -100f; + zgo.AddComponent().renderPostProcessing = true; + Bounds bb = band != null ? band.bounds : new Bounds(Vector3.zero, new Vector3(16, 1, 16)); + zgo.transform.position = new Vector3(bb.center.x, 3.2f, bb.min.z - 9f); + zgo.transform.LookAt(new Vector3(bb.center.x, -1f, bb.min.z + 2f)); + + Vector3 rgb; float sh; + // ── 전 (지금 = 물 E + 띠 on) ──────────────────────────── + water.sharedMaterial = E; if (band != null) band.enabled = true; + yield return null; yield return new WaitForSeconds(0.35f); + L(""); + L("[전] 지금(물 E · 띠 on) PD " + WL816k_Final.Shot(live, D + "z_before_pd.png", PW, PH, false, out rgb, out sh)); + L(" 물가 " + WL816k_Final.Shot(zoom, D + "z_before_zoom.png", PW, PH, true, out rgb, out sh)); + + // ── 색 6안 (목표 = 814t 화면색 #5C96C2) ──────────────── + var TARGET = new Vector3(0x5C, 0x96, 0xC2); + var C = new[] { + new Color(0.298f,0.800f,1.000f,0.573f), new Color(0.55f,0.78f,0.90f,0.60f), + new Color(0.70f,0.85f,0.95f,0.60f), new Color(0.55f,0.78f,0.90f,0.60f), + new Color(0.45f,0.70f,0.88f,0.65f), new Color(0.70f,0.85f,0.95f,0.60f) }; + var BR = new[] { 0.25f, 0.45f, 0.45f, 0.60f, 0.55f, 0.60f }; + var MD = new[] { 0.20f, 0.40f, 0.40f, 0.50f, 0.45f, 0.50f }; + var MT = new[] { -0.1f, -0.1f, -0.1f, 0.0f, -0.1f, 0.0f }; + var TS = new[] { 0.13f, 0.13f, 0.13f, 0.13f, 0.05f, 0.05f }; + L(""); + L("[데모 물 색 6안] _FoamScale 800 고정 · 목표 = 화면 #5C96C2"); + int best = -1; float bestD = 1e9f; var zp = new string[6]; + for (int i = 0; i < 6; i++) + { + var m = new Material(Demo); + m.SetFloat("_FoamScale", 800f); m.SetColor("_Color", C[i]); + m.SetFloat("_Brightness", BR[i]); m.SetFloat("_MinimumDarkness", MD[i]); + m.SetFloat("_MinimumTint", MT[i]); m.SetFloat("_TintStrength", TS[i]); + water.sharedMaterial = m; if (band != null) band.enabled = false; + yield return null; yield return new WaitForSeconds(0.3f); + zp[i] = D + "v" + (i + 1) + "_zoom.png"; + string s = WL816k_Final.Shot(zoom, zp[i], PW, PH, true, out rgb, out sh); + float dist = Vector3.Distance(rgb, TARGET); + L(" v" + (i + 1) + " C" + C[i].ToString("F2") + " Br" + BR[i] + " MD" + MD[i] + " MT" + MT[i] + " TS" + TS[i]); + L(" " + s + " · 목표거리 " + dist.ToString("F1")); + if (dist < bestD) { bestD = dist; best = i; } + } + WL816k_Final.Strip(zp, D + "v_color6.png", 3); + L(""); + L("🔴 채택 = v" + (best + 1) + " · _Color" + C[best].ToString("F3") + " _Brightness " + BR[best] + + " _MinimumDarkness " + MD[best] + " _MinimumTint " + MT[best] + " _TintStrength " + TS[best] + + " _FoamScale 800 · 목표거리 " + bestD.ToString("F1")); + + // ── 후 (채택안 · 띠 off) ──────────────────────────────── + var win = new Material(Demo); + win.SetFloat("_FoamScale", 800f); win.SetColor("_Color", C[best]); + win.SetFloat("_Brightness", BR[best]); win.SetFloat("_MinimumDarkness", MD[best]); + win.SetFloat("_MinimumTint", MT[best]); win.SetFloat("_TintStrength", TS[best]); + water.sharedMaterial = win; if (band != null) band.enabled = false; + yield return null; yield return new WaitForSeconds(0.35f); + L(""); + L("[후] 데모 물 v" + (best + 1) + " · 띠 off PD " + WL816k_Final.Shot(live, D + "z_after_pd.png", PW, PH, false, out rgb, out sh)); + L(" 물가 " + WL816k_Final.Shot(zoom, D + "z_after_zoom.png", PW, PH, true, out rgb, out sh)); + WL816k_Final.Strip(new[] { D + "z_before_pd.png", D + "z_after_pd.png" }, D + "z_pd_before_after.png", 1); + WL816k_Final.Strip(new[] { D + "z_before_zoom.png", D + "z_after_zoom.png" }, D + "z_zoom_shore.png", 1); + + // ── 걷기(기능 무영향) ─────────────────────────────────── + var cc = Object.FindFirstObjectByType(FindObjectsInactive.Exclude); + if (cc != null) + { + var p0 = cc.transform.position; var dir = new Vector3(1f, 0f, 1f).normalized; float moved = 0f; + for (int i = 0; i < 120 && moved < 6f; i++) { cc.Move(dir * 0.05f + Vector3.down * 0.05f); moved += 0.05f; yield return null; } + L("걷기 " + p0.ToString("F2") + " → " + cc.transform.position.ToString("F2") + " · " + + Vector3.Distance(new Vector3(p0.x, 0, p0.z), new Vector3(cc.transform.position.x, 0, cc.transform.position.z)).ToString("F2") + + " m · grounded=" + cc.isGrounded); + } + // 채택값을 파일로 (에셋 반영은 Play 밖에서) + System.IO.File.WriteAllText("AgentScripts/WL816k_PICK.txt", + C[best].r + "," + C[best].g + "," + C[best].b + "," + C[best].a + "|" + BR[best] + "|" + MD[best] + "|" + MT[best] + "|" + TS[best] + "|800"); + Object.DestroyImmediate(zgo); + water.sharedMaterial = E; if (band != null) band.enabled = true; + Done(); + } + void Done() + { + System.IO.File.WriteAllText("AgentScripts/WL816k_FINAL.txt", sb.ToString()); + Debug.Log("[816k final]\n" + sb); + } +} diff --git a/AgentScripts/WL816k_PROBE.txt b/AgentScripts/WL816k_PROBE.txt new file mode 100644 index 000000000..5314b2cad --- /dev/null +++ b/AgentScripts/WL816k_PROBE.txt @@ -0,0 +1,32 @@ +=== WL-816k ② 데모 물 셰이더를 섬에 (PD 구도 · 거리 15 m) === +카메라 MainCamera pos=(0.00, 15.56, -15.56) 각=(45, 0, 0) fov=60 · 거리 22.0 m +물 오브젝트 Water pos=(0.00, -1.00, 0.00) scale=(100.0, 1.0, 100.0) · 지금 mat=Farm_Water_WL_E(queue 2000) +둘레 띠 = 있음 · 타일 4 · 띠 삼각형 1280 · 정점 772 · 폭 1.60 m · 격자 0.50 m · 드로우콜 +1 +머티리얼: E=q2000 Demo=q2000 FI=q2999 + +1) 지금 상태 (물 E + 띠 on) + PD 바다 #5794C1 σ=0.0457 · 밝음 1.24% #F4F3FC(R−B -8) · 검정 0.15% → Screenshots_WL/WL816k/a1_now.png + 물가 바다 #6094BE σ=0.0513 · 밝음 2.47% #EDE7FB(R−B -14) · 검정 0.00% → Screenshots_WL/WL816k/a1_now_zoom.png + +2) 데모 물 그대로 — 원본 값 · 띠 off + PD 바다 #0089FE σ=0.0018 · 밝음 0.69% #FBFCFB(R−B 0) · 검정 0.14% → Screenshots_WL/WL816k/b1_demo_raw.png + 물가 바다 #00C7FE σ=0.0029 · 밝음 0% · 검정 0.00% → Screenshots_WL/WL816k/b1_demo_raw_zoom.png + +3) 데모 물 · renderQueue 3000 (투명 정렬) · 띠 off + PD 바다 #0089FE σ=0.0018 · 밝음 0.69% #FBFCFB(R−B 0) · 검정 0.15% → Screenshots_WL/WL816k/b2_demo_q3000.png + 물가 바다 #00C8FE σ=0.0017 · 밝음 0% · 검정 0.00% → Screenshots_WL/WL816k/b2_demo_q3000_zoom.png + +4) 무늬 스케일 — 데모 평면 10 m vs 섬 물 1000 m (UV 기반이면 ×100 이 필요) + _FoamScale 50 _Bands 78.52 + PD 바다 #0089FE σ=0.0018 · 밝음 0.69% #FBFCFB(R−B 0) · 검정 0.14% → Screenshots_WL/WL816k/c_scale1.png + 물가 바다 #00C8FE σ=0.0017 · 밝음 0% · 검정 0.00% → Screenshots_WL/WL816k/c_scale1_zoom.png + _FoamScale 500 _Bands 785.2 + PD 바다 #008AFE σ=0.0169 · 밝음 0.98% #FBFCFC(R−B -1) · 검정 0.15% → Screenshots_WL/WL816k/c_scale2.png + 물가 바다 #00C8FE σ=0.0020 · 밝음 1.29% #FEFEFE(R−B 0) · 검정 0.00% → Screenshots_WL/WL816k/c_scale2_zoom.png + _FoamScale 5000 _Bands 7852 + PD 바다 #008BFE σ=0.0349 · 밝음 0.96% #FBFCFC(R−B -1) · 검정 0.15% → Screenshots_WL/WL816k/c_scale3.png + 물가 바다 #00C8FE σ=0.0251 · 밝음 0.29% #FEFEFE(R−B 0) · 검정 0.00% → Screenshots_WL/WL816k/c_scale3_zoom.png + +5) [기준] FI SimpleWater (816h 이전 물) + PD 바다 #5BB5FE σ=0.0024 · 밝음 1.14% #FAF7FC(R−B -2) · 검정 0.15% → Screenshots_WL/WL816k/d_fi.png + 물가 바다 #64BBFE σ=0.0407 · 밝음 2.85% #F9F1FE(R−B -5) · 검정 0.00% → Screenshots_WL/WL816k/d_fi_zoom.png diff --git a/AgentScripts/WL816k_PROPS.txt b/AgentScripts/WL816k_PROPS.txt new file mode 100644 index 000000000..f50c1ba69 --- /dev/null +++ b/AgentScripts/WL816k_PROPS.txt @@ -0,0 +1,44 @@ +=== Shader Graphs/Water 전체 속성 33개 (숨김 포함) === + _Color [Color] {MainColor} = RGBA(0.298, 0.800, 1.000, 0.573) + _FoamAmount [Float] = 1.0000 + _FoamScale [Float] = 50.0000 + _FoamSpeed [Float] = 0.0100 + _ParticleThreshold [Float] = 0.0100 + _TintStrength [Float] = 0.1300 + _Bands [Float] = 78.5200 + _TintBrightness [Float] = 1.0000 + _MinimumTint [Float] = -0.1000 + _DistortionTexture [Texture] {NoScaleOffset} = FlowMap + _DistortionSpeed [Float] = 0.0600 + _DistortionTiling [Float] = 1.0000 + _DistortionDirection [Vector] {Vector2} = (0.250, 0.000, 0.000, 0.000) + _DistortionThreshold [Float] = 2.0000 + _DistortionStrength [Vector] {Vector2} = (0.050, 0.050, 0.000, 0.000) + _REFLECTIONSON [Float] = 0.0000 + _ReflectionStrength [Float] = 0.7000 + _ReflectionDistortion [Vector] {Vector2} = (0.030, 0.030, 0.000, 0.000) + _Cloud_Density [Float] = 0.0100 + _Cloud_Movement [Vector] {Vector2} = (1.000, 1.000, 0.000, 0.000) + _Cloud_Strength [Float] = 1.0000 + _Cloud_Cover [Float] = 0.5000 + _Cloud_Change [Float] = 0.0050 + _Cloud_Step [Vector] {Vector2} = (13.000, 17.000, 0.000, 0.000) + _Shades [Float] = 7.0000 + _Brightness [Float] = 0.2500 + _MinimumDarkness [Float] = 0.2000 + _QueueOffset [Float] {HideInInspector} = 0.0000 + _QueueControl [Float] {HideInInspector} = 0.0000 + _XRMotionVectorsPass [Float] {HideInInspector} = 1.0000 + unity_Lightmaps [Texture] {HideInInspector, NoScaleOffset} = (없음) + unity_LightmapsInd [Texture] {HideInInspector, NoScaleOffset} = (없음) + unity_ShadowMasks [Texture] {HideInInspector, NoScaleOffset} = (없음) + +renderQueue=3000 · passes=8 · keywords=_MAIN_LIGHT_SHADOWS,_SHADOWS_SOFT + pass 0 = Universal Forward enabled=True + pass 1 = DepthOnly enabled=True + pass 2 = MotionVectors enabled=False + pass 3 = XRMotionVectors enabled=True + pass 4 = DepthNormalsOnly enabled=True + pass 5 = GBuffer enabled=True + pass 6 = SceneSelectionPass enabled=True + pass 7 = ScenePickingPass enabled=True diff --git a/AgentScripts/WL816k_Probe.cs b/AgentScripts/WL816k_Probe.cs new file mode 100644 index 000000000..59d8e1c94 --- /dev/null +++ b/AgentScripts/WL816k_Probe.cs @@ -0,0 +1,218 @@ +// WL-816k — ② 데모 물 셰이더를 섬에 씌워 본다 (PD 구도 · 거리 15 m) +// 실측 목표: ⓐ 깨지는가 ⓑ 무늬 크기가 UV 기반인가(평면 100배) ⓒ 섬과 만나는 선에 거품이 생기는가 +// 🔴 Play 중 에셋 수정 0 — 전부 런타임 Material 복사본. +using System.Collections; +using System.Text; +using UnityEngine; +using UnityEngine.Rendering.Universal; +using UnityEngine.SceneManagement; +using WL.Look.Farm; + +public static class WL816k_Probe +{ + public const string D = "Screenshots_WL/WL816k/"; + public const int PW = 1280, PH = 720; + public const string MatDir = "Assets/WL/Look/Farm/Materials/"; + + public static void Open() + { + UnityEditor.SceneManagement.EditorSceneManager.OpenScene( + "Assets/Scenes/InGame.unity", UnityEditor.SceneManagement.OpenSceneMode.Single); + } + public static void Start() + { + var go = GameObject.Find("~WL816kP"); + if (go != null) Object.DestroyImmediate(go); + go = new GameObject("~WL816kP"); + go.AddComponent(); + } + + public static Texture2D Grab(Camera cam, int w, int h) + { + var rt = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + rt.antiAliasing = 1; rt.Create(); + var pT = cam.targetTexture; var pA = RenderTexture.active; + cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt; + var t = new Texture2D(w, h, TextureFormat.RGB24, false); + t.ReadPixels(new Rect(0, 0, w, h), 0, 0); t.Apply(); + RenderTexture.active = pA; cam.targetTexture = pT; rt.Release(); Object.DestroyImmediate(rt); + return t; + } + + /// PD 구도 캡처 + ⓐ 바다 평균색 ⓑ 무늬 고주파 대비 σ ⓒ 밝은(거품) 픽셀 비율 ⓓ 어두운(깨짐) 픽셀 비율 + public static string Shot(Camera cam, string path, int w, int h) + { + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path)); + var t = Grab(cam, w, h); + System.IO.File.WriteAllBytes(path, t.EncodeToPNG()); + var px = t.GetPixels32(); + // 바다만 있는 왼쪽 아래 구역 + long r = 0, g = 0, b = 0; int n = 0; double sum = 0, sum2 = 0; + int xm = Mathf.Min(340, w), ym = Mathf.Min(320, h); + for (int y = 20; y < ym; y += 2) + for (int x = 20; x < xm; x += 2) + { + var c = px[y * w + x]; r += c.r; g += c.g; b += c.b; n++; + float lum = (0.299f * c.r + 0.587f * c.g + 0.114f * c.b) / 255f; + sum += lum; sum2 += lum * lum; + } + double mean = n > 0 ? sum / n : 0; + double sd = n > 0 ? System.Math.Sqrt(System.Math.Max(0, sum2 / n - mean * mean)) : 0; + // 화면 아래 55 % 에서 밝은/어두운 픽셀 + int fn = 0, dn = 0, tot = 0; long fr = 0, fg = 0, fb = 0; + int y1 = (int)(h * 0.55f); + for (int y = 0; y < y1; y++) + for (int x = 0; x < w; x += 2) + { + var c = px[y * w + x]; tot++; + if (c.r > 200 && c.g > 195 && c.b > 195) { fr += c.r; fg += c.g; fb += c.b; fn++; } + if (c.r < 40 && c.g < 40 && c.b < 40) dn++; + } + Object.DestroyImmediate(t); + string foam = fn == 0 ? "밝음 0%" : "밝음 " + (100f * fn / tot).ToString("F2") + "% #" + + ((int)(fr / fn)).ToString("X2") + ((int)(fg / fn)).ToString("X2") + ((int)(fb / fn)).ToString("X2") + + "(R−B " + ((int)(fr / fn) - (int)(fb / fn)) + ")"; + return "바다 #" + ((int)(r / n)).ToString("X2") + ((int)(g / n)).ToString("X2") + ((int)(b / n)).ToString("X2") + + " σ=" + sd.ToString("F4") + " · " + foam + " · 검정 " + (100f * dn / tot).ToString("F2") + "% → " + path; + } + + public static void Strip(string[] paths, string outPath) + { + var ts = new Texture2D[paths.Length]; int w = 0, h = 0; + for (int i = 0; i < paths.Length; i++) + { + if (!System.IO.File.Exists(paths[i])) return; + ts[i] = new Texture2D(2, 2, TextureFormat.RGB24, false); + ts[i].LoadImage(System.IO.File.ReadAllBytes(paths[i])); + w = Mathf.Max(w, ts[i].width); h += ts[i].height; + } + var o = new Texture2D(w, h, TextureFormat.RGB24, false); + var f = new Color32[w * h]; + for (int i = 0; i < f.Length; i++) f[i] = new Color32(24, 24, 28, 255); + o.SetPixels32(f); + int y = h; + for (int i = 0; i < ts.Length; i++) { y -= ts[i].height; o.SetPixels32(0, y, ts[i].width, ts[i].height, ts[i].GetPixels32()); } + o.Apply(); + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(outPath)); + System.IO.File.WriteAllBytes(outPath, o.EncodeToPNG()); + Object.DestroyImmediate(o); + for (int i = 0; i < ts.Length; i++) Object.DestroyImmediate(ts[i]); + } +} + +public class WL816k_ProbeRunner : MonoBehaviour +{ + static StringBuilder sb; + static void L(string s) { sb.AppendLine(s); } + const string D = WL816k_Probe.D; + const string MatDir = WL816k_Probe.MatDir; + const int PW = WL816k_Probe.PW, PH = WL816k_Probe.PH; + + Camera live, zoom; + Renderer water; + MeshRenderer band; + + void Start() { StartCoroutine(Co()); } + + IEnumerator Co() + { + sb = new StringBuilder(); + L("=== WL-816k ② 데모 물 셰이더를 섬에 (PD 구도 · 거리 15 m) ==="); + var op = SceneManager.LoadSceneAsync("Level01", LoadSceneMode.Additive); + while (op != null && !op.isDone) yield return null; + for (int i = 0; i < 8; i++) yield return new WaitForSeconds(1f); + + foreach (var r in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + if (r != null && r.gameObject.scene.name == "Level01" && r.name == "Water") water = r; + foreach (var c in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + { + if (!c.gameObject.activeInHierarchy || !c.enabled || c.targetTexture != null) continue; + if (c.name.StartsWith("~WL816")) continue; + if (live == null || c.depth > live.depth) live = c; + } + var foam = Object.FindFirstObjectByType(FindObjectsInactive.Include); + band = foam != null ? foam.GetComponent() : null; + if (water == null || live == null) { L("🔴 물/카메라 없음"); Done(); yield break; } + + L("카메라 " + live.name + " pos=" + live.transform.position.ToString("F2") + " 각=" + live.transform.eulerAngles.ToString("F0") + + " fov=" + live.fieldOfView + " · 거리 " + live.transform.position.magnitude.ToString("F1") + " m"); + L("물 오브젝트 " + water.name + " pos=" + water.transform.position.ToString("F2") + + " scale=" + water.transform.localScale.ToString("F1") + " · 지금 mat=" + water.sharedMaterial.name + + "(queue " + water.sharedMaterial.renderQueue + ")"); + L("둘레 띠 = " + (band == null ? "🔴 없음" : "있음 · " + WLShoreFoam.LastLog)); + + var E = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_Water_WL_E.mat"); + var Demo = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_Water_Demo.mat"); + var FI = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_SimpleWater_Demo.mat"); + L("머티리얼: E=" + (E == null ? "null" : "q" + E.renderQueue) + " Demo=" + (Demo == null ? "null" : "q" + Demo.renderQueue) + + " FI=" + (FI == null ? "null" : "q" + FI.renderQueue)); + if (Demo == null) { L("🔴 Farm_Water_Demo 없음"); Done(); yield break; } + + // 물가 확대 카메라 + var zgo = new GameObject("~WL816kZ"); zgo.hideFlags = HideFlags.DontSave; + zoom = zgo.AddComponent(); + zoom.fieldOfView = 34f; zoom.nearClipPlane = 0.1f; zoom.farClipPlane = 2000f; + zoom.clearFlags = CameraClearFlags.Skybox; zoom.cullingMask = ~0; zoom.depth = -100f; + zgo.AddComponent().renderPostProcessing = true; + Bounds b = band != null ? band.bounds : new Bounds(Vector3.zero, new Vector3(16, 1, 16)); + zgo.transform.position = new Vector3(b.center.x, 3.2f, b.min.z - 9f); + zgo.transform.LookAt(new Vector3(b.center.x, -1f, b.min.z + 2f)); + + // ── 1) 지금(E + 띠) ──────────────────────────────────── + L(""); + L("1) 지금 상태 (물 E + 띠 on)"); + yield return Show(E, true, "a1_now"); + + // ── 2) 데모 물 그대로 (띠 off) ────────────────────────── + L(""); + L("2) 데모 물 그대로 — 원본 값 · 띠 off"); + yield return Show(Demo, false, "b1_demo_raw"); + + // ── 3) 데모 물 + queue 3000 ──────────────────────────── + L(""); + L("3) 데모 물 · renderQueue 3000 (투명 정렬) · 띠 off"); + var q3 = new Material(Demo); q3.renderQueue = 3000; + yield return Show(q3, false, "b2_demo_q3000"); + + // ── 4) 무늬가 UV 기반인지 — 평면이 100배라 100배 스케일이 필요한가 ── + L(""); + L("4) 무늬 스케일 — 데모 평면 10 m vs 섬 물 1000 m (UV 기반이면 ×100 이 필요)"); + float[] fs = { 50f, 500f, 5000f }; + var names = new string[3]; + for (int i = 0; i < 3; i++) + { + var m = new Material(Demo); m.renderQueue = 3000; + m.SetFloat("_FoamScale", fs[i]); + m.SetFloat("_Bands", 78.52f * (fs[i] / 50f)); + names[i] = D + "c_scale" + (i + 1) + ".png"; + yield return Show(m, false, "c_scale" + (i + 1), " _FoamScale " + fs[i] + " _Bands " + (78.52f * (fs[i] / 50f))); + } + WL816k_Probe.Strip(names, D + "c_scale_steps.png"); + + // ── 5) 데모 씬 물 자체를 나란히 (기준) ────────────────── + L(""); + L("5) [기준] FI SimpleWater (816h 이전 물)"); + if (FI != null) yield return Show(FI, false, "d_fi"); + + Object.DestroyImmediate(zgo); + // 원복 + water.sharedMaterial = E; if (band != null) band.enabled = true; + Done(); + } + + IEnumerator Show(Material m, bool bandOn, string tag, string note = null) + { + water.sharedMaterial = m; + if (band != null) band.enabled = bandOn; + yield return null; yield return new WaitForSeconds(0.35f); + if (note != null) L(note); + L(" PD " + WL816k_Probe.Shot(live, D + tag + ".png", PW, PH)); + L(" 물가 " + WL816k_Probe.Shot(zoom, D + tag + "_zoom.png", PW, PH)); + } + + void Done() + { + System.IO.File.WriteAllText("AgentScripts/WL816k_PROBE.txt", sb.ToString()); + Debug.Log("[816k probe]\n" + sb); + } +} diff --git a/AgentScripts/WL816k_Props.cs b/AgentScripts/WL816k_Props.cs new file mode 100644 index 000000000..634ee7ffd --- /dev/null +++ b/AgentScripts/WL816k_Props.cs @@ -0,0 +1,32 @@ +// WL-816k — 데모 물 셰이더의 **숨김 포함 전체 속성** 실측 (깊이·불투명도 제어가 있는지) +using UnityEngine; +using System.Text; + +public static class WL816k_Props +{ + public static void Run() + { + var sb = new StringBuilder(); + var m = UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat"); + var sh = m != null ? m.shader : null; + if (sh == null) { Debug.Log("[816k props] 🔴 없음"); return; } + sb.AppendLine("=== " + sh.name + " 전체 속성 " + sh.GetPropertyCount() + "개 (숨김 포함) ==="); + for (int i = 0; i < sh.GetPropertyCount(); i++) + { + string n = sh.GetPropertyName(i); + var t = sh.GetPropertyType(i); + var fl = sh.GetPropertyFlags(i); + string v = "?"; + if (t == UnityEngine.Rendering.ShaderPropertyType.Color) v = m.GetColor(n).ToString("F3"); + else if (t == UnityEngine.Rendering.ShaderPropertyType.Vector) v = m.GetVector(n).ToString("F3"); + else if (t == UnityEngine.Rendering.ShaderPropertyType.Float || t == UnityEngine.Rendering.ShaderPropertyType.Range) v = m.GetFloat(n).ToString("F4"); + else if (t == UnityEngine.Rendering.ShaderPropertyType.Texture) { var tx = m.GetTexture(n); v = tx == null ? "(없음)" : tx.name; } + sb.AppendLine(" " + n + " [" + t + "]" + (fl == UnityEngine.Rendering.ShaderPropertyFlags.None ? "" : " {" + fl + "}") + " = " + v); + } + sb.AppendLine(""); + sb.AppendLine("renderQueue=" + m.renderQueue + " · passes=" + m.passCount + " · keywords=" + string.Join(",", m.shaderKeywords)); + for (int p = 0; p < m.passCount; p++) sb.AppendLine(" pass " + p + " = " + m.GetPassName(p) + " enabled=" + m.GetShaderPassEnabled(m.GetPassName(p))); + System.IO.File.WriteAllText("AgentScripts/WL816k_PROPS.txt", sb.ToString()); + Debug.Log("[816k props]\n" + sb); + } +} diff --git a/AgentScripts/WL816k_TUNE.txt b/AgentScripts/WL816k_TUNE.txt new file mode 100644 index 000000000..f64d39944 --- /dev/null +++ b/AgentScripts/WL816k_TUNE.txt @@ -0,0 +1,40 @@ +=== WL-816k ③ 데모 물 값 맞추기 (PD 구도 · 거리 15 m 강제) === +카메라 [전] pos=(0.00, 15.56, -15.56) 거리 22.0 m +카메라 [후] pos=(0.00, 15.56, -15.56) 각=(45, 0, 0) fov=60 · 거리 22.0 m +물 mat 지금 Farm_Water_WL_E q3000 · Demo q3000 + +0) 기준 + 지금(물 E · 띠 on) PD 바다 #5794C1 σ=0.0428 · 밝음 1.19% #F4F2FC + 물가 바다 #5F93BE σ=0.0495 · 밝음 2.07% #EBE8FD · 물가Δ 0.1170(물가 0.643 먼바다 0.526) + 지금(물 E · 띠 off)PD 바다 #5794C1 σ=0.0442 · 밝음 0.68% #FBFBFC + 물가 바다 #6093BE σ=0.0505 · 밝음 0% · 물가Δ 0.0343(물가 0.570 먼바다 0.536) + +A) _FoamScale (거품 노이즈 = UV 기반 · 섬 물 평면은 데모의 100배) · _Bands 78.52 고정 + _FoamScale 50 PD 바다 #0071E2 σ=0.0135 · 밝음 0.69% #FBFBFC + 물가 바다 #00B3F2 σ=0.0023 · 밝음 0% · 물가Δ 0.0194(물가 0.541 먼바다 0.522) + _FoamScale 250 PD 바다 #0071E2 σ=0.0135 · 밝음 0.96% #FCFCFC + 물가 바다 #00B3F2 σ=0.0023 · 밝음 1.44% #FEFEFE · 물가Δ 0.0195(물가 0.541 먼바다 0.522) + _FoamScale 800 PD 바다 #0272E3 σ=0.0552 · 밝음 1.04% #FAFAFC + 물가 바다 #00B3F2 σ=0.0023 · 밝음 0.19% #FEFEFE · 물가Δ 0.0266(물가 0.548 먼바다 0.522) + _FoamScale 2500 PD 바다 #0071E3 σ=0.0275 · 밝음 0.90% #FAFAFC + 물가 바다 #01B4F2 σ=0.0324 · 밝음 0.31% #FEFEFE · 물가Δ 0.0204(물가 0.543 먼바다 0.522) + +B) _Bands (깊이 밴딩 = 섬과 만나는 선의 반응) · _FoamScale 800 고정 + _Bands 78.52 PD 바다 #0172E3 σ=0.0478 · 밝음 1.02% #F7F7FC + 물가 바다 #01B4F2 σ=0.0333 · 밝음 0.18% #FEFEFE · 물가Δ 0.0194(물가 0.541 먼바다 0.522) + _Bands 400 PD 바다 #0071E3 σ=0.0261 · 밝음 0.85% #FAFAFC + 물가 바다 #01B4F2 σ=0.0375 · 밝음 0.12% #FEFEFE · 물가Δ 0.0194(물가 0.541 먼바다 0.522) + _Bands 1500 PD 바다 #0072E3 σ=0.0200 · 밝음 0.86% #FBFBFC + 물가 바다 #00B3F2 σ=0.0023 · 밝음 0.07% #FEFEFE · 물가Δ 0.0208(물가 0.542 먼바다 0.522) + _Bands 5000 PD 바다 #0072E4 σ=0.0265 · 밝음 0.99% #FAFAFC + 물가 바다 #00B3F2 σ=0.0023 · 밝음 0.36% #FEFEFE · 물가Δ 0.0338(물가 0.555 먼바다 0.522) + +C) _Color (814t 톤 · 쨍한 원색 금지) · _FoamScale 800 · _Bands 78.52 + _Color RGBA(0.298, 0.800, 1.000, 0.573) PD 바다 #0073E5 σ=0.0334 · 밝음 0.96% #FAFAFC + 물가 바다 #00B3F2 σ=0.0023 · 밝음 0.15% #FEFEFE · 물가Δ 0.0521(물가 0.574 먼바다 0.522) + _Color RGBA(0.360, 0.690, 0.820, 0.573) PD 바다 #000094 σ=0.0364 · 밝음 0.82% #FAF7FC + 물가 바다 #0072B8 σ=0.0021 · 밝음 0.19% #FEFEFE · 물가Δ 0.0792(물가 0.425 먼바다 0.346) + _Color RGBA(0.300, 0.600, 0.780, 0.700) PD 바다 #000078 σ=0.0286 · 밝음 0.78% #FAF7FB + 물가 바다 #002EA4 σ=0.0193 · 밝음 0.05% #FEEBFE · 물가Δ 0.1053(물가 0.273 먼바다 0.168) + _Color RGBA(0.420, 0.720, 0.845, 0.500) PD 바다 #012FA6 σ=0.0582 · 밝음 0.95% #F8F3FC + 물가 바다 #008CC5 σ=0.0189 · 밝음 0.05% #FEFEFE · 물가Δ 0.0711(물가 0.473 먼바다 0.402) diff --git a/AgentScripts/WL816k_Tune.cs b/AgentScripts/WL816k_Tune.cs new file mode 100644 index 000000000..eb0bc686b --- /dev/null +++ b/AgentScripts/WL816k_Tune.cs @@ -0,0 +1,259 @@ +// WL-816k — ③ 데모 물 셰이더 값 맞추기 (PD 구도 · 🔴 거리 15 m 강제) +// A) _FoamScale 스윕 (UV 기반 — 섬 물 평면이 데모의 100배) +// B) _Bands 스윕 (깊이 밴딩 = 섬과 만나는 선의 반응) +// C) _Color 스윕 (814t 톤) +// 측정: 바다색 · 무늬 σ · 밝은 픽셀 · 🔴 물가Δ(물가 밝기 − 먼 바다 밝기 = 섬에 반응하는가) +using System.Collections; +using System.Text; +using UnityEngine; +using UnityEngine.Rendering.Universal; +using UnityEngine.SceneManagement; +using WL.Look.Farm; + +public static class WL816k_Tune +{ + public const string D = "Screenshots_WL/WL816k/"; + public const int PW = 1280, PH = 720; + public const string MatDir = "Assets/WL/Look/Farm/Materials/"; + + public static void Open() + { + UnityEditor.SceneManagement.EditorSceneManager.OpenScene( + "Assets/Scenes/InGame.unity", UnityEditor.SceneManagement.OpenSceneMode.Single); + } + public static void Start() + { + var go = GameObject.Find("~WL816kT"); + if (go != null) Object.DestroyImmediate(go); + go = new GameObject("~WL816kT"); + go.AddComponent(); + } + + public static Texture2D Grab(Camera cam, int w, int h) + { + var rt = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + rt.antiAliasing = 1; rt.Create(); + var pT = cam.targetTexture; var pA = RenderTexture.active; + cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt; + var t = new Texture2D(w, h, TextureFormat.RGB24, false); + t.ReadPixels(new Rect(0, 0, w, h), 0, 0); t.Apply(); + RenderTexture.active = pA; cam.targetTexture = pT; rt.Release(); Object.DestroyImmediate(rt); + return t; + } + + static float Lum(Color32 c) { return (0.299f * c.r + 0.587f * c.g + 0.114f * c.b) / 255f; } + + /// PD 구도 캡처 + 지표. shoreRows != 0 이면 물가Δ 도 잰다(확대 카메라용). + public static string Shot(Camera cam, string path, int w, int h, bool shoreMetric) + { + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path)); + var t = Grab(cam, w, h); + System.IO.File.WriteAllBytes(path, t.EncodeToPNG()); + var px = t.GetPixels32(); + long r = 0, g = 0, b = 0; int n = 0; double sum = 0, sum2 = 0; + int xm = Mathf.Min(340, w), ym = Mathf.Min(320, h); + for (int y = 20; y < ym; y += 2) + for (int x = 20; x < xm; x += 2) + { + var c = px[y * w + x]; r += c.r; g += c.g; b += c.b; n++; + float l = Lum(c); sum += l; sum2 += l * l; + } + double mean = n > 0 ? sum / n : 0; + double sd = n > 0 ? System.Math.Sqrt(System.Math.Max(0, sum2 / n - mean * mean)) : 0; + int fn = 0, tot = 0; long fr = 0, fg = 0, fb = 0; + int y1 = (int)(h * 0.55f); + for (int y = 0; y < y1; y++) + for (int x = 0; x < w; x += 2) + { + var c = px[y * w + x]; tot++; + if (c.r > 200 && c.g > 195 && c.b > 195) { fr += c.r; fg += c.g; fb += c.b; fn++; } + } + string extra = ""; + if (shoreMetric) + { + // 🔴 물가Δ — 섬과 맞닿은 띠(위쪽 물)와 먼 바다(아래쪽 물)의 밝기 차 + double a = 0; int an = 0, bn2 = 0; double b2 = 0; + for (int y = 300; y < 350; y++) for (int x = 100; x < w - 100; x += 2) { a += Lum(px[y * w + x]); an++; } + for (int y = 20; y < 70; y++) for (int x = 100; x < w - 100; x += 2) { b2 += Lum(px[y * w + x]); bn2++; } + double na = an > 0 ? a / an : 0, nb = bn2 > 0 ? b2 / bn2 : 0; + extra = " · 물가Δ " + (na - nb).ToString("F4") + "(물가 " + na.ToString("F3") + " 먼바다 " + nb.ToString("F3") + ")"; + } + Object.DestroyImmediate(t); + string foam = fn == 0 ? "밝음 0%" : "밝음 " + (100f * fn / tot).ToString("F2") + "% #" + + ((int)(fr / fn)).ToString("X2") + ((int)(fg / fn)).ToString("X2") + ((int)(fb / fn)).ToString("X2"); + return "바다 #" + ((int)(r / n)).ToString("X2") + ((int)(g / n)).ToString("X2") + ((int)(b / n)).ToString("X2") + + " σ=" + sd.ToString("F4") + " · " + foam + extra; + } + + /// 세로 스트립 — div 로 축소해서 저장(읽기 비용 절감). + public static void Strip(string[] paths, string outPath, int div) + { + var ts = new Texture2D[paths.Length]; int w = 0, h = 0; + for (int i = 0; i < paths.Length; i++) + { + if (!System.IO.File.Exists(paths[i])) return; + ts[i] = new Texture2D(2, 2, TextureFormat.RGB24, false); + ts[i].LoadImage(System.IO.File.ReadAllBytes(paths[i])); + w = Mathf.Max(w, ts[i].width / div); h += ts[i].height / div; + } + var o = new Texture2D(w, h, TextureFormat.RGB24, false); + var f = new Color32[w * h]; + for (int i = 0; i < f.Length; i++) f[i] = new Color32(24, 24, 28, 255); + o.SetPixels32(f); + int yo = h; + for (int i = 0; i < ts.Length; i++) + { + int sw = ts[i].width / div, sh = ts[i].height / div; + var src = ts[i].GetPixels32(); int fw = ts[i].width; + var dst = new Color32[sw * sh]; + for (int y = 0; y < sh; y++) + for (int x = 0; x < sw; x++) + { + int rr = 0, gg = 0, bb = 0; + for (int dy = 0; dy < div; dy++) for (int dx = 0; dx < div; dx++) + { var c = src[(y * div + dy) * fw + (x * div + dx)]; rr += c.r; gg += c.g; bb += c.b; } + int q = div * div; + dst[y * sw + x] = new Color32((byte)(rr / q), (byte)(gg / q), (byte)(bb / q), 255); + } + yo -= sh; o.SetPixels32(0, yo, sw, sh, dst); + } + o.Apply(); + System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(outPath)); + System.IO.File.WriteAllBytes(outPath, o.EncodeToPNG()); + Object.DestroyImmediate(o); + for (int i = 0; i < ts.Length; i++) Object.DestroyImmediate(ts[i]); + } +} + +public class WL816k_TuneRunner : MonoBehaviour +{ + static StringBuilder sb; + static void L(string s) { sb.AppendLine(s); } + const string D = WL816k_Tune.D; + const string MatDir = WL816k_Tune.MatDir; + const int PW = WL816k_Tune.PW, PH = WL816k_Tune.PH; + + Camera live, zoom; + Renderer water; + MeshRenderer band; + Material Demo; + + void Start() { StartCoroutine(Co()); } + + IEnumerator Co() + { + sb = new StringBuilder(); + L("=== WL-816k ③ 데모 물 값 맞추기 (PD 구도 · 거리 15 m 강제) ==="); + var op = SceneManager.LoadSceneAsync("Level01", LoadSceneMode.Additive); + while (op != null && !op.isDone) yield return null; + for (int i = 0; i < 8; i++) yield return new WaitForSeconds(1f); + + foreach (var r in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + if (r != null && r.gameObject.scene.name == "Level01" && r.name == "Water") water = r; + foreach (var c in Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) + { + if (!c.gameObject.activeInHierarchy || !c.enabled || c.targetTexture != null) continue; + if (c.name.StartsWith("~WL816")) continue; + if (live == null || c.depth > live.depth) live = c; + } + var foam = Object.FindFirstObjectByType(FindObjectsInactive.Include); + band = foam != null ? foam.GetComponent() : null; + if (water == null || live == null) { L("🔴 물/카메라 없음"); Done(); yield break; } + + // 🔴 PD 구도 = 45° · fov 60 · 거리 15 m (Lead 가 오늘 당긴 값) + L("카메라 [전] pos=" + live.transform.position.ToString("F2") + " 거리 " + live.transform.position.magnitude.ToString("F1") + " m"); + float d = 15f, k = d * 0.70710678f; + live.transform.position = new Vector3(0f, k, -k); + live.transform.rotation = Quaternion.Euler(45f, 0f, 0f); + live.fieldOfView = 60f; + yield return null; + L("카메라 [후] pos=" + live.transform.position.ToString("F2") + " 각=" + live.transform.eulerAngles.ToString("F0") + + " fov=" + live.fieldOfView + " · 거리 " + live.transform.position.magnitude.ToString("F1") + " m"); + + var E = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_Water_WL_E.mat"); + Demo = UnityEditor.AssetDatabase.LoadAssetAtPath(MatDir + "Farm_Water_Demo.mat"); + L("물 mat 지금 " + water.sharedMaterial.name + " q" + water.sharedMaterial.renderQueue + + " · Demo q" + (Demo == null ? "?" : Demo.renderQueue.ToString())); + + var zgo = new GameObject("~WL816kTZ"); zgo.hideFlags = HideFlags.DontSave; + zoom = zgo.AddComponent(); + zoom.fieldOfView = 34f; zoom.nearClipPlane = 0.1f; zoom.farClipPlane = 2000f; + zoom.clearFlags = CameraClearFlags.Skybox; zoom.cullingMask = ~0; zoom.depth = -100f; + zgo.AddComponent().renderPostProcessing = true; + Bounds bb = band != null ? band.bounds : new Bounds(Vector3.zero, new Vector3(16, 1, 16)); + zgo.transform.position = new Vector3(bb.center.x, 3.2f, bb.min.z - 9f); + zgo.transform.LookAt(new Vector3(bb.center.x, -1f, bb.min.z + 2f)); + + // 기준 = 지금 물 E + 띠 on / off + L(""); + L("0) 기준"); + yield return One(E, true, "t0_now_band", " 지금(물 E · 띠 on) "); + yield return One(E, false, "t0_now_noband", " 지금(물 E · 띠 off)"); + + // ── A) _FoamScale 스윕 ──────────────────────────────── + L(""); + L("A) _FoamScale (거품 노이즈 = UV 기반 · 섬 물 평면은 데모의 100배) · _Bands 78.52 고정"); + float[] fsA = { 50f, 250f, 800f, 2500f }; + var pa = new string[fsA.Length]; + for (int i = 0; i < fsA.Length; i++) + { + var m = V(_ => { }); m.SetFloat("_FoamScale", fsA[i]); + pa[i] = D + "tA" + (i + 1) + "_zoom.png"; + yield return One(m, false, "tA" + (i + 1), " _FoamScale " + fsA[i] + " "); + } + WL816k_Tune.Strip(pa, D + "sA_foamscale.png", 2); + + // ── B) _Bands 스윕 ─────────────────────────────────── + L(""); + L("B) _Bands (깊이 밴딩 = 섬과 만나는 선의 반응) · _FoamScale 800 고정"); + float[] bsB = { 78.52f, 400f, 1500f, 5000f }; + var pb = new string[bsB.Length]; + for (int i = 0; i < bsB.Length; i++) + { + var m = V(_ => { }); m.SetFloat("_FoamScale", 800f); m.SetFloat("_Bands", bsB[i]); + pb[i] = D + "tB" + (i + 1) + "_zoom.png"; + yield return One(m, false, "tB" + (i + 1), " _Bands " + bsB[i] + " "); + } + WL816k_Tune.Strip(pb, D + "sB_bands.png", 2); + + // ── C) _Color 스윕 (814t 톤) ───────────────────────── + L(""); + L("C) _Color (814t 톤 · 쨍한 원색 금지) · _FoamScale 800 · _Bands 78.52"); + var cols = new[] { + new Color(0.298f, 0.800f, 1.000f, 0.573f), // 데모 원본 + new Color(0.360f, 0.690f, 0.820f, 0.573f), // 816h WaterColor + new Color(0.300f, 0.600f, 0.780f, 0.700f), // 더 짙게 + new Color(0.420f, 0.720f, 0.845f, 0.500f), // 더 밝게 + }; + var pc = new string[cols.Length]; var pcPD = new string[cols.Length]; + for (int i = 0; i < cols.Length; i++) + { + var m = V(_ => { }); m.SetFloat("_FoamScale", 800f); m.SetColor("_Color", cols[i]); + pc[i] = D + "tC" + (i + 1) + "_zoom.png"; pcPD[i] = D + "tC" + (i + 1) + ".png"; + yield return One(m, false, "tC" + (i + 1), " _Color " + cols[i].ToString("F3") + " "); + } + WL816k_Tune.Strip(pc, D + "sC_color_zoom.png", 2); + WL816k_Tune.Strip(pcPD, D + "sC_color_pd.png", 2); + + Object.DestroyImmediate(zgo); + water.sharedMaterial = E; if (band != null) band.enabled = true; + Done(); + } + + Material V(System.Action f) { var m = new Material(Demo); f(m); return m; } + + IEnumerator One(Material m, bool bandOn, string tag, string note) + { + water.sharedMaterial = m; + if (band != null) band.enabled = bandOn; + yield return null; yield return new WaitForSeconds(0.3f); + L(note + "PD " + WL816k_Tune.Shot(live, D + tag + ".png", PW, PH, false)); + L(new string(' ', note.Length) + "물가 " + WL816k_Tune.Shot(zoom, D + tag + "_zoom.png", PW, PH, true)); + } + + void Done() + { + System.IO.File.WriteAllText("AgentScripts/WL816k_TUNE.txt", sb.ToString()); + Debug.Log("[816k tune]\n" + sb); + } +} diff --git a/Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat b/Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat new file mode 100644 index 000000000..85670f37a --- /dev/null +++ b/Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat @@ -0,0 +1,196 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Farm_Water_Demo + m_Shader: {fileID: -6465566751694194690, guid: e5f8f434dc0fbdf42ae4fa014c80951e, + type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _MAIN_LIGHT_SHADOWS + - _SHADOWS_SOFT + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionTexture: + m_Texture: {fileID: 2800000, guid: 07612261b3ae0f94a9826a3175a9d605, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainCameraTexture: + m_Texture: {fileID: 8400000, guid: b341653440931de4ba25940d113f4375, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _WaterReflectionTexture: + m_Texture: {fileID: 2800000, guid: 1de68de6e59ccc84da15225563bd8300, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Bands: 78.52 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _Brightness: 0.25 + - _BumpScale: 1 + - _CHILLFOAM: 0 + - _CLOUDSENABLED: 0 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cloud_Change: 0.005 + - _Cloud_Cover: 0.5 + - _Cloud_Density: 0.01 + - _Cloud_Strength: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DepthStrength: 0.5 + - _DepthThreshold: 0.2 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DistortionSpeed: 0.06 + - _DistortionThreshold: 2 + - _DistortionTiling: 1 + - _DstBlend: 10 + - _DstBlendAlpha: 10 + - _EnvironmentReflections: 1 + - _Exposure: 1 + - _FoamAmount: 1 + - _FoamScale: 50 + - _FoamSpeed: 0.01 + - _FoamStrength: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _MAIN_LIGHT: 0 + - _Metallic: 0 + - _MinimumDarkness: 0.2 + - _MinimumTint: -0.1 + - _MinimumTransparency: 0.1 + - _OcclusionStrength: 1 + - _Opacity: 0.61 + - _OutlineThreshold: 4 + - _Parallax: 0.005 + - _ParticleThreshold: 0.01 + - _QueueControl: 0 + - _QueueOffset: 0 + - _REFLECTIONSON: 0 + - _Ramp: 4 + - _ReceiveShadows: 0 + - _ReflectionStrength: 0.7 + - _Rotation: 0 + - _SHADOWS_SOFT: 1 + - _Shades: 7 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 1 + - _TintBrightness: 1 + - _TintStrength: 0.13 + - _Transparency: 0.2 + - _WorkflowMode: 1 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Cloud_Movement: {r: 1, g: 1, b: 0, a: 0} + - _Cloud_Step: {r: 13, g: 17, b: 0, a: 0} + - _Color: {r: 0.2980392, g: 0.8000001, b: 1, a: 0.57254905} + - _DistortionDirection: {r: 0.25, g: 0, b: 0, a: 0} + - _DistortionStrength: {r: 0.05, g: 0.05, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 0.7264151, g: 0.7264151, b: 0.7264151, a: 1} + - _ReflectionDistortion: {r: 0.03, g: 0.03, b: 0, a: 0} + - _ReflectionTint: {r: 0.13333334, g: 0.5176471, b: 0.74509805, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _Tint: {r: 0.13333334, g: 0.5176471, b: 0.74509805, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &4823538533558174045 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 10 diff --git a/Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat.meta b/Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat.meta new file mode 100644 index 000000000..70b340500 --- /dev/null +++ b/Assets/WL/Look/Farm/Materials/Farm_Water_Demo.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9a7a80e3400eb04dbae4e07584e57fa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat b/Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat new file mode 100644 index 000000000..c41d1e831 --- /dev/null +++ b/Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Farm_Water_WL_F + m_Shader: {fileID: -6465566751694194690, guid: 85b142f88e4bec1488c6b275a0e5dc57, + type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - Texture2D_086cedcb1d864765840f9996e4b0002d: + m_Texture: {fileID: 2800000, guid: 945a5174b1a6da34ea1028ed2feeb1e9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - Texture2D_1d2b8f4484d74423a27218f18b962ade: + m_Texture: {fileID: 2800000, guid: d48aae5302069a94f9410b8d6b76fed1, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - Texture2D_4094dc7f19e94579ac3bbc9c811f51a4: + m_Texture: {fileID: 2800000, guid: 62100fbe73f198245b71c0a6eeeb94f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - Texture2D_685ca00e8e7c4cb2b45a9e11981bb64a: + m_Texture: {fileID: 2800000, guid: 5088aa2234cf5b24cad13def77f7da5f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - Vector1_07238257334b4a149e675e2451801030: 166.66667 + - Vector1_101dc4546b684d40bc2ff2fc59ab43d5: 2.2 + - Vector1_11671d7a4cdb4d059a6c69e39f3f7b3f: 1333.3334 + - Vector1_21ae4fce4585460386edec89c9895501: 0 + - Vector1_2b4963cef1de4859983ffcbae94c6f60: 0 + - Vector1_3089b6a325a44c1686907af4ee3b0776: 0.6666667 + - Vector1_34f757bec6b8422b9aef3b9d97117a6e: 3 + - Vector1_566e288f42864b8e9432d81fbdb83f38: 7 + - Vector1_68f0c21b684f4b7c9ebef8789113b107: 2 + - Vector1_7090c8ca8ea84e2d85858ae4beb5be38: 1 + - Vector1_85ea9246e72a44ed9e0482861767c826: 0.03 + - Vector1_8e22a98f75c94b218c49e6c4805e799d: 0.13333334 + - Vector1_99cc56b5c6fd474082f07f00a6df94f9: 0.0018509999 + - Vector1_ad7e0fcd37f44d68b68de6f06bb43b96: 0.13333334 + - Vector1_c6f2603b30534ec8b0039379573789e3: 1 + - Vector1_d813b569a4d541d1b2ac4ea9bc66a3b9: 0.09 + - Vector1_dd1e17693dc14b10b91828bdfd5adaa8: 0 + - Vector1_ff7a2780aaa94ddd86e156c4707e39a2: 0.4 + - _QueueControl: 0 + - _QueueOffset: 0 + - _XRMotionVectorsPass: 1 + m_Colors: + - Color_1ec6cccf8ead489ebb917674f7e8b3b1: {r: 0.42, g: 0.72, b: 0.845, a: 1} + - Color_2323d69962e04c499c5d5f0925432b55: {r: 1, g: 1, b: 1, a: 1} + - Color_9af4ad59934f40d1ae6565e6ab22c45e: {r: 0.36, g: 0.69, b: 0.82, a: 1} + - Color_ca031ae309ff42bdb95f777248fb961d: {r: 0.17, g: 0.42, b: 0.57, a: 1} + - Color_e1f155248d144786a62fc1585ca21e9a: {r: 0.62, g: 0.82, b: 0.9, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &7840779067325084833 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion + version: 10 diff --git a/Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat.meta b/Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat.meta new file mode 100644 index 000000000..1f6549b56 --- /dev/null +++ b/Assets/WL/Look/Farm/Materials/Farm_Water_WL_F.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3979675f9f9bd5d4b9191aad8f2091e1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset b/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset index e178818fe..8af4a13ed 100644 --- a/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset +++ b/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset @@ -64,8 +64,8 @@ MonoBehaviour: skyReleaseDelaySeconds: 1.5 waterMode: 1 waterFrom: {fileID: 2100000, guid: ce0f8fd131f36964dbc918b8c63f838b, type: 2} - waterTo: {fileID: 2100000, guid: 7432692635bf09d4eb5271f2b366839e, type: 2} - shoreFoamEnabled: 1 + waterTo: {fileID: 2100000, guid: 3979675f9f9bd5d4b9191aad8f2091e1, type: 2} + shoreFoamEnabled: 0 shoreFoamMaterial: {fileID: 2100000, guid: d24a4c5ce16646c409631c112b57f2cf, type: 2} shoreFoamWidth: 1.6 shoreFoamInner: 0.5