# 着色器: simple_aces_detailed ## 概述 此着色器专为具有额外细节(包括法线贴图)的预制件和渲染实例而设计。 ## Textures 在 3ds Max 中,着色器的类名是 `simple_aces_detailed`。它使用以下纹理槽: - **Slot 1** – 基础纹理(颜色图) - **Slot 3** – 基础纹理的法线贴图 - **Slot 4** – 细节纹理的法线贴图 - **Slot 8** – 细节纹理,平铺由参数`detail_scale_u=8` 和 `detail_scale_v=8`控制 ## 参数 例如,在 `.dag` 文件中,材质配置如下所示: ``` material{ name:t="19 – Default" class:t="simple_aces_detailed" tex16support:b=yes twosided:i=0 amb:ip3=255, 255, 255 diff:ip3=255, 255, 255 spec:ip3=255, 255, 255 emis:ip3=0, 0, 0 power:r=32 script:t="real_two_sided=no" script:t="detail_scale_u=8" script:t="detail_scale_v=8" tex0:t="./karelia_cliff_a_b_tex_d.tif" tex2:t="./karelia_cliff_a_b_tex_n.tif" tex3:t="./rock_detail_a_tex_n.tif" tex7:t="./rock_detail_a_tex_d.tif" } ``` **关键参数说明:** - `name:t="19 – Default"` – 材质的名称。 - `class:t="simple_aces_detailed"` – 用于材质的 shader 类。 - `tex16support:b=yes` – 启用对 16 位纹理的支持。 - `twosided:i=0` – 确定材质是否双面渲染。在这种情况下,`0` 表示它是单面的。 - `amb:ip3=255, 255, 255` – Ambient color (RGB: 255, 255, 255). - `diff:ip3=255, 255, 255` – Diffuse color (RGB: 255, 255, 255). - `spec:ip3=255, 255, 255` – Specular color (RGB: 255, 255, 255). - `emis:ip3=0, 0, 0` – Emission color (RGB: 0, 0, 0), 意味着没有自发光。 - `power:r=32` – Specular power (shininess). - `script:t="real_two_sided=no"` – 显式禁用双面渲染。 - `script:t="detail_scale_u=8"` – 设置沿 U 轴(水平)的细节纹理的平铺比例。 - `script:t="detail_scale_v=8"` – 设置沿 V 轴(垂直)的细节纹理的平铺比例。 - `tex0:t="./karelia_cliff_a_b_tex_d.tif"` – 基础纹理的路径(颜色图)。 - `tex2:t="./karelia_cliff_a_b_tex_n.tif"` – 基础纹理的法线贴图的路径。 - `tex3:t="./rock_detail_a_tex_n.tif"` – 细节纹理的法线贴图路径。 - `tex7:t="./rock_detail_a_tex_d.tif"` – 细节纹理的路径。