7.1 KiB
Nahida Dependency Map
This document captures the Unity sample semantics that must survive the port.
Source roots:
- Unity reference project:
mvs/NahidaRender - Engine project staging area:
project/Assets/Characters/Nahida
Texture groups
Body and Dress1:
Textures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Body_Diffuse.pngTextures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Body_Lightmap.pngTextures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Body_Normalmap.pngTextures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Body_Shadow_Ramp.png
Hair and Dress2:
Textures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Hair_Diffuse.pngTextures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Hair_Lightmap.pngTextures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Hair_Normalmap.pngTextures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Hair_Shadow_Ramp.png
Face and shared:
Textures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Face_Diffuse.pngTextures/Shared/Avatar_Loli_Tex_FaceLightmap.pngTextures/Shared/Avatar_Tex_Face_Shadow.pngTextures/Shared/Avatar_Tex_MetalMap.png
Reference-only extra:
Textures/Nahida/Avatar_Loli_Catalyst_Nahida_Tex_Body_Specular_Ramp.png- Present in the sample resources.
- Not directly referenced by the seven Unity Nahida materials that were copied into
docs/reference/NahidaUnity/Materials.
Material graph
Shared base material:
docs/reference/NahidaUnity/Materials/Nahida_Base.mat- Uses
docs/reference/NahidaUnity/Shaders/Genshin.shader - Binds shared
_MetalMap = Textures/Shared/Avatar_Tex_MetalMap.png - Carries shared shadow, rim, outline, and specular defaults
- Uses
Body branch:
-
docs/reference/NahidaUnity/Materials/Nahida_Body.mat_BaseMap = Body_Diffuse_LightMap = Body_Lightmap_NormalMap = Body_Normalmap_ShadowRamp = Body_Shadow_Ramp- Enables emission, normal map, rim, specular, and smooth normal
-
docs/reference/NahidaUnity/Materials/Nahida_Dress1.mat- Reuses the same body texture group
- Double-sided
- Uses smooth normal
Hair branch:
-
docs/reference/NahidaUnity/Materials/Nahida_Hair.mat_BaseMap = Hair_Diffuse_LightMap = Hair_Lightmap_NormalMap = Hair_Normalmap_ShadowRamp = Hair_Shadow_Ramp- Enables emission, normal map, rim, specular, and smooth normal
-
docs/reference/NahidaUnity/Materials/Nahida_Dress2.mat- Reuses the same hair texture group
- Double-sided
Face branch:
-
docs/reference/NahidaUnity/Materials/Nahida_Face.mat_BaseMap = Face_Diffuse_FaceLightMap = Avatar_Loli_Tex_FaceLightmap_FaceShadow = Avatar_Tex_Face_Shadow_ShadowRamp = Body_Shadow_Ramp- Marks
_IsFace = 1 - Depends on runtime
_FaceDirection
-
docs/reference/NahidaUnity/Materials/Nahida_Brow.mat- Reuses the same face texture group
- Uses a tint override through
_BaseColor - Sets outline width to
0
Shader semantics
Core shader files:
docs/reference/NahidaUnity/Shaders/Genshin.shaderdocs/reference/NahidaUnity/Shaders/GenshinInput.hlsldocs/reference/NahidaUnity/Shaders/GenshinForwardPass.hlsldocs/reference/NahidaUnity/Shaders/GenshinOutlinePass.hlsl
Important shader features to preserve:
_LightMapdriven shadow partitioning_FaceLightMap + _FaceShadow + _FaceDirectionface shading path_MetalMapdriven specular/metal response- Rim light
- Separate outline pass
_UseSmoothNormalswitch for outline data path
Scene semantics from Unity sample
Reference scene:
docs/reference/NahidaUnity/Scenes/SampleScene.unity
Observed setup:
- Instantiates
Avatar_Loli_Catalyst_Nahida.fbxas a prefab instance - Renames the root object to
NahidaUnityModel - Uses
SkinnedMeshRenderer, not a staticMeshFilter + MeshRenderersetup - Overrides one renderer mesh with
Meshes/Nahida_Body_Smooth.mesh - Assigns body renderer material slots in this order:
- slot 0:
Nahida_Hair.mat - slot 1:
Nahida_Body.mat - slot 2:
Nahida_Dress1.mat - slot 3:
Nahida_Dress2.mat
- slot 0:
- Additional renderers use:
Nahida_Face.matNahida_Brow.mat
- One face-related renderer writes
BlendShapeWeights[0] = 100
Current static assembly baseline in XCEngine
Preview scene:
Assets/Scenes/NahidaPreview.xc
Current static assembly uses the existing imported FBX sub-meshes from:
Assets/Models/nahida/Avatar_Loli_Catalyst_Nahida.fbx
Scene-side material path mapping in Assets/Scenes/NahidaPreview.xc:
Nahida_Hair- mesh localID:
5268898388415806497 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Hair.mat
- mesh localID:
Nahida_Body- mesh localID:
5268897288904178286 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Body.mat
- mesh localID:
Nahida_Dress1- mesh localID:
5268896189392550075 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Dress1.mat
- mesh localID:
Nahida_Dress2- mesh localID:
5268895089880921864 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Dress2.mat
- mesh localID:
Nahida_Brow- mesh localID:
15841426242793151682 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Brow.mat
- mesh localID:
Nahida_EffectMesh- mesh localID:
692846506840157104 - temporary fallback material:
builtin://materials/default-primitive
- mesh localID:
Nahida_EyeStar- mesh localID:
8234240765526303311 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Face.mat
- mesh localID:
Nahida_Face- mesh localID:
1306782875462705981 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Face.mat
- mesh localID:
Nahida_FaceEye- mesh localID:
977130118610429631 - engine material:
Assets/Characters/Nahida/Materials/Nahida_Face.mat
- mesh localID:
Current engine-native shader and materials:
- Shader:
Assets/Shaders/XCCharacterToon.shader - Materials:
Assets/Characters/Nahida/Materials/Nahida_Hair.matAssets/Characters/Nahida/Materials/Nahida_Body.matAssets/Characters/Nahida/Materials/Nahida_Dress1.matAssets/Characters/Nahida/Materials/Nahida_Dress2.matAssets/Characters/Nahida/Materials/Nahida_Face.matAssets/Characters/Nahida/Materials/Nahida_Brow.mat
Current model material remap sidecars:
Assets/Models/nahida/Avatar_Loli_Catalyst_Nahida.fbx.materialmapAssets/Characters/Nahida/Model/Avatar_Loli_Catalyst_Nahida.fbx.materialmap
Format:
meshLocalID=Assets/.../Material.mat- Multiple material slots can be provided with
|
Current gaps:
- No dedicated outline pass yet.
- Face shading logic now matches the Unity-style forward path more closely, but
_FaceDirectionis still not driven at runtime.
Runtime driver semantics
Runtime driver:
docs/reference/NahidaUnity/Scripts/MaterialUpdater.cs
Behavior:
- Reads the head bone transform every frame
- Rotates the configured local head direction
- Writes
_FaceDirectioninto every material on the configured face renderers
This means face shading is not static material data. The engine port needs a runtime material-parameter driver.
Post-process reference
Reference files:
docs/reference/NahidaUnity/Shaders/URPGenshinPostProcess.shaderdocs/reference/NahidaUnity/Scripts/Rendering/docs/reference/NahidaUnity/URPSettings/
These are kept only as semantic reference for a later phase. They should not be treated as engine-native runtime assets.