3D 리플레이 실감 2단계: 게임 스킬 효과 추출(Abilities.cs: Cascade 파티클 · 메시 · 텍스처 → abilities.json) · 사이트 파티클 재생기(lib/vfx.ts: 시간만으로 계산 · 연막 돔 · 장판 칸 · 투사체 꼬리 · 설치물 메시) · maps3d json/png 제공 · update.sh/pack.py 연결

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-18 01:33:48 +09:00
parent c94edac147
commit 73e6173a59
11 changed files with 3512 additions and 10 deletions

View File

@@ -11,11 +11,15 @@ public sealed class MatParams
public readonly Dictionary<string, string> Textures = new(StringComparer.OrdinalIgnoreCase);
public readonly Dictionary<string, FLinearColor> Vectors = new(StringComparer.OrdinalIgnoreCase);
public readonly Dictionary<string, float> Scalars = new(StringComparer.OrdinalIgnoreCase);
public readonly Dictionary<string, bool> Switches = new(StringComparer.OrdinalIgnoreCase);
public string? BlendMode;
public bool TwoSided;
public string? ShadingModel;
public static MatParams Resolve(UMaterialInterface mat)
{
var r = new MatParams { Path = mat.GetPathName() };
bool? twoSided = null;
UMaterialInterface? cur = mat;
for (var d = 0; d < 12 && cur != null; d++)
{
@@ -28,8 +32,17 @@ public sealed class MatParams
if (v.ParameterValue is { } c && !r.Vectors.ContainsKey(v.Name)) r.Vectors[v.Name] = c;
foreach (var s in mi.ScalarParameterValues)
if (!r.Scalars.ContainsKey(s.Name)) r.Scalars[s.Name] = s.ParameterValue;
if (r.BlendMode == null && mi.TryGetValue(out CUE4Parse.UE4.Assets.Objects.FStructFallback bpo, "BasePropertyOverrides") && bpo.TryGetValue(out bool ov, "bOverride_BlendMode") && ov)
r.BlendMode = bpo.GetOrDefault<EBlendMode>("BlendMode").ToString();
if (mi.TryGetValue(out CUE4Parse.UE4.Assets.Objects.FStructFallback bpo, "BasePropertyOverrides"))
{
if (r.BlendMode == null && bpo.TryGetValue(out bool ov, "bOverride_BlendMode") && ov)
r.BlendMode = bpo.GetOrDefault<EBlendMode>("BlendMode").ToString();
if (twoSided == null && bpo.TryGetValue(out bool ots, "bOverride_TwoSided") && ots)
twoSided = bpo.GetOrDefault<bool>("TwoSided");
}
// 정적 스위치 (StaticParameters): 덮어쓴 것만, 자식 값이 먼저
if (mi.StaticParameters?.StaticSwitchParameters is { } sws)
foreach (var sp in sws)
if (sp.bOverride && !r.Switches.ContainsKey(sp.Name)) r.Switches[sp.Name] = sp.Value;
UMaterialInterface? parent = null;
try { parent = mi.Parent?.Load<UMaterialInterface>(); } catch { }
cur = parent;
@@ -37,10 +50,16 @@ public sealed class MatParams
else
{
r.Base = cur.GetPathName();
if (r.BlendMode == null && cur is UMaterial m) r.BlendMode = m.BlendMode.ToString();
if (cur is UMaterial m)
{
r.BlendMode ??= m.BlendMode.ToString();
twoSided ??= m.TwoSided;
r.ShadingModel = m.ShadingModel.ToString();
}
break;
}
}
r.TwoSided = twoSided ?? false;
return r;
}
}