{
  "schemaVersion": 1,
  "slug": "metallic-foil-material",
  "packageId": "makokara.official.metallic-foil-material",
  "name": "金属箔反射材质",
  "subtitle": "Metallic Foil Reflection Material",
  "summary": "融合媒体背景环境光感知与 3D 烫金浮雕拉丝的混合金属箔效果包，实时反射 MV 色调且透明通道完整运行。",
  "version": "1.0.0",
  "revision": "sha256:1233d985cffd07ba87eee68137eba77a89256c4c2b6c290093ff28194abea5cb",
  "packageVersion": 3,
  "sdkVersion": "2.0.0",
  "shaderProfile": "skia-ganesh-3.119.4-v2",
  "category": "hybrid",
  "tags": [
    "金属箔",
    "背景感知",
    "烫金镀铬",
    "混合双导出",
    "透明安全"
  ],
  "author": {
    "name": "MakoKara Official"
  },
  "license": "MIT",
  "featured": true,
  "featuredOrder": 11,
  "verified": true,
  "verifiedAt": "2026-12-06",
  "transparentSafe": true,
  "requires": [
    "style.fill",
    "style.glow",
    "material.uniform",
    "media.features"
  ],
  "exportKinds": [
    "controller",
    "material"
  ],
  "parameterCount": 10,
  "lineExitDurationUs": 0,
  "recommendedFor": [
    "华丽流行、史诗与古风鎏金曲目",
    "金属电音与液态镀铬视觉 MV",
    "需要与背景视频色调实时呼应的高级字幕"
  ],
  "media": {
    "coverUrl": "https://mkfx.talium.site/files/metallic-foil-material/cover.webp",
    "previewVideoUrl": "https://mkfx.talium.site/files/metallic-foil-material/preview.webm",
    "transparentPreviewVideoUrl": "https://mkfx.talium.site/files/metallic-foil-material/preview-transparent.webm"
  },
  "archive": {
    "fileName": "metallic-foil-material.mkfx",
    "url": "https://mkfx.talium.site/files/metallic-foil-material/metallic-foil-material.mkfx",
    "sizeBytes": 12390,
    "sha256": "c0f91dd5f0c126c1ebf4168cede1c4cef8a71c90136cb28dc06ed2bb6ea4d464"
  },
  "links": {
    "detailPageUrl": "https://mkfx.talium.site/effects/metallic-foil-material/",
    "detailApiUrl": "https://mkfx.talium.site/api/v1/packages/metallic-foil-material.json",
    "sourceUrl": "https://github.com/Zydr114/MakoKaraGenerator-OfficialMkfxSamples/tree/main/packages/MetallicFoilMaterial",
    "installUri": "makokara://market/install?catalog=https%3A%2F%2Fmkfx.talium.site%2Fapi%2Fv1%2Fcatalog.json&packageId=makokara.official.metallic-foil-material&slug=metallic-foil-material"
  },
  "description": "提供「背景感知控制器」与「独立金属箔纯材质」双导出的官方金属质感效果包。控制器通过 media.features 逐字采样背景天光与地面反光并联动扫字流光，着色器融合 3D 平滑浮雕法线、压花微皱与各向异性金属拉丝，轻松切换鎏金、镀铬与玫瑰金。",
  "previewNotes": "预览在霓虹舞台背景上展示金属箔随背景色调实时染彩的天地反射、浮雕倒角与扫字流光。",
  "emitters": [],
  "exports": [
    {
      "id": "metallic-foil-adaptive",
      "kind": "controller",
      "name": "背景感知金属箔反射",
      "entryType": "MetallicFoilAdaptiveController",
      "bindingKinds": [
        "project",
        "branch",
        "lines",
        "tokens",
        "clips",
        "node"
      ],
      "parameters": [
        "envSmoothUs",
        "envBlend",
        "metalTint",
        "foilWarp",
        "brushedGrain",
        "metallicContrast",
        "sheenSpeed",
        "adaptiveGlow",
        "fallbackSkyColor",
        "fallbackGroundColor"
      ],
      "outputs": [
        {
          "id": "foil-style",
          "kind": "StyleModulation",
          "target": "tokenFamily",
          "requires": []
        }
      ]
    },
    {
      "id": "metallic-foil-material",
      "kind": "material",
      "name": "金属箔反射纯材质",
      "graph": "graphs/metallic-foil.graph.json",
      "regions": [
        "fill",
        "stroke"
      ],
      "coverageMode": "Masked",
      "parameters": [
        "metalTint",
        "foilWarp",
        "brushedGrain",
        "metallicContrast",
        "sheenSpeed",
        "fallbackSkyColor",
        "fallbackGroundColor"
      ],
      "outputs": [
        {
          "id": "color",
          "kind": "ImageGraph",
          "target": "region",
          "requires": []
        }
      ]
    }
  ],
  "parameters": [
    {
      "default": 300000,
      "id": "envSmoothUs",
      "label": "环境采样平滑窗口",
      "max": 2000000,
      "min": 0,
      "type": "duration",
      "unit": "us"
    },
    {
      "default": 0.82,
      "id": "envBlend",
      "label": "背景环境色融合权重",
      "max": 1,
      "min": 0,
      "type": "number"
    },
    {
      "default": {
        "a": 1,
        "b": 0.56,
        "g": 0.86,
        "r": 0.98
      },
      "id": "metalTint",
      "label": "金属箔基底色",
      "type": "color"
    },
    {
      "default": 0.65,
      "id": "foilWarp",
      "label": "箔面起伏与微皱强度",
      "max": 2,
      "min": 0,
      "type": "number"
    },
    {
      "default": 0.36,
      "id": "brushedGrain",
      "label": "金属拉丝微纹强度",
      "max": 1,
      "min": 0,
      "type": "number"
    },
    {
      "default": 1.25,
      "id": "metallicContrast",
      "label": "金属反差锐度",
      "max": 2,
      "min": 0.5,
      "type": "number"
    },
    {
      "default": 1,
      "id": "sheenSpeed",
      "label": "扫掠流光速度",
      "max": 4,
      "min": 0,
      "type": "number"
    },
    {
      "default": true,
      "id": "adaptiveGlow",
      "label": "环境自适应金属辉光",
      "type": "boolean"
    },
    {
      "default": {
        "a": 1,
        "b": 1,
        "g": 0.86,
        "r": 0.62
      },
      "id": "fallbackSkyColor",
      "label": "备用天光反射色",
      "type": "color"
    },
    {
      "default": {
        "a": 1,
        "b": 0.3,
        "g": 0.58,
        "r": 0.96
      },
      "id": "fallbackGroundColor",
      "label": "备用地面反光色",
      "type": "color"
    }
  ],
  "files": [
    {
      "path": "README.md",
      "role": "asset",
      "sizeBytes": 2724,
      "sha256": "91079ed3a1cba314316d4cd287c7e9c9b9dcc3f2070d628805b57132d4fbbec0"
    },
    {
      "path": "graphs/metallic-foil.graph.json",
      "role": "graph",
      "sizeBytes": 2425,
      "sha256": "dceb8dff8cad19fb0b02df6950ea1fc81cf5f8bd7a21f2c17a7f27ecb071231e"
    },
    {
      "path": "shaders/cov-to-color.program.json",
      "role": "shaderProgram",
      "sizeBytes": 192,
      "sha256": "a4b5a66c8a0470e1bfddcf8453844e6eb7765d764bf6c6b76ad085f80e196d50"
    },
    {
      "path": "shaders/cov-to-color.sksl",
      "role": "shader",
      "sizeBytes": 143,
      "sha256": "ae3d506fa75c2a6bf41310c909589f990df77f315a2099452cae5966252d8d8f"
    },
    {
      "path": "shaders/metallic-foil.program.json",
      "role": "shaderProgram",
      "sizeBytes": 728,
      "sha256": "6232c419425f79bf48a22ea1146ea73f2dfcbb88f74ecdbd2093ad17e51a3b08"
    },
    {
      "path": "shaders/metallic-foil.sksl",
      "role": "shader",
      "sizeBytes": 7199,
      "sha256": "0134429e723642bc34ac34ddbebb745e2340f84da8c947c0007069a8929783e8"
    },
    {
      "path": "src/MetallicFoilMaterial.cs",
      "role": "csharp",
      "sizeBytes": 14050,
      "sha256": "52680e8e5a7e44c28058e57021ef3882869bb5da32c76faa7450836f27bb898a"
    }
  ],
  "readmeMarkdown": "# 金属箔反射材质（Metallic Foil Reflection Material）\n\n一款融合**背景媒体环境光感知**与 **3D 浮雕金属箔着色器** 的官方混合双导出效果包，同时提供「背景感知控制器」与「独立金属箔纯材质」，兼顾真实环境反射与透明通道完整渲染。\n\n## 双导出说明\n\n- **`metallic-foil-adaptive`（控制器，默认推荐）**：通过 SDK v2 `media.features` 时域统计采样每个字族上方天光与下方地面区域的真实媒体颜色、亮度与纹理反差，实时注入金属箔着色器；同时联动卡拉 OK 扫字进度增强流光反射，并提供可选的环境自适应金属辉光（同时完整保留用户原有字体描边）。无媒体或透明输出时无缝切换至备用天光/地面色，**透明导出依然完整运行金属箔着色器**。\n- **`metallic-foil-material`（纯材质）**：可直接挂载到任意歌词样式的未唱填充、已唱填充或描边槽位，支持自由调配香槟金、液态银铬、玫瑰金或钛合金蓝等金属质感。\n\n## 效果特点\n\n- **3D 烫金浮雕斜角**：利用多尺度平滑覆盖场生成丰满的立体倒角法线，每个笔画均呈现真实压花金属厚度。\n- **物理金属地平反差与拉丝微纹**：内置高对比金属地平暗带、影棚双反射灯带与斜向各向异性金属拉丝微纹理，避免塑料感。\n- **环境色彩融合**：随着背景视频色调变化，金属箔表面的天光与地面反射实时随之染彩，与 MV 画面浑然一体。\n\n## 参数说明\n\n| 参数 | 默认值 | 说明 |\n| :--- | :--- | :--- |\n| 环境采样平滑窗口 (`envSmoothUs`) | `300,000 us` | 背景媒体时域平滑统计窗口，避免闪切画面闪烁 |\n| 背景环境色融合权重 (`envBlend`) | `0.82` | 采样背景色与备用反射色的融合比例 |\n| 金属箔基底色 (`metalTint`) | 香槟鎏金 | 导体金属本色（改为纯白偏蓝即液态镀铬，偏粉即玫瑰金） |\n| 箔面起伏与微皱强度 (`foilWarp`) | `0.65` | 金属箔表面的有机压皱与液态起伏幅度 |\n| 金属拉丝微纹强度 (`brushedGrain`) | `0.36` | 斜向各向异性拉丝微纹可见度 |\n| 金属反差锐度 (`metallicContrast`) | `1.25` | 地平反射暗带与高光对比度 |\n| 扫掠流光速度 (`sheenSpeed`) | `1.0` | 金属表面高光流转速率 |\n| 环境自适应金属辉光 (`adaptiveGlow`) | `true` | 开启后随背景明暗与演唱状态自适应调节金属边缘辉光 |\n| 备用天光反射色 (`fallbackSkyColor`) | 清冷天青 | 无媒体或透明通道下的顶部环境反射色 |\n| 备用地面反光色 (`fallbackGroundColor`) | 暖阳琥珀 | 无媒体或透明通道下的底部地面反光色 |\n"
}
