Setting Up ‐ General - Melioli/HoyoToon GitHub Wiki
The shader requires that your unity project use the built-in render pipeline as well as setting the color space to linear rather than gamma. You can change the color space setting here: Edit > Project Settings > Player > Other Settings > Color Space
To ensure the shader works properly textures have specific import settings:
Texture | sRGB | Non-Power of 2 Scaling | Generate Mip Maps | Wrap Mode | Compression |
---|---|---|---|---|---|
Diffuse | On | Leave as is | Off | Repeat | Off |
Light Maps | Off | Leave as is | Off | Repeat | Off |
Stockings | Off | Leave as is | Off | Repeat | Off |
Shadow Ramps | On | Leave as is | Off | Clamp | Off |
Specular Ramps | Off | Leave as is | Off | Clamp | Off |
Normal Maps | Off | Leave as is | Off | Repeat | Off |
Metal Maps | On | Leave as is | Off | Repeat | Off |
MaterialIDValuesLUT | Off | None | Off | Repeat | Off |
Weapon Pattern (Eff_WeaponsTotem_Grain_00.png) |
Off | Leave as is | Off | Repeat | Off |
Weapon Dissolve (Eff_WeaponsTotem_Dissolve_00.png) |
Off | Leave as is | Off | Clamp | Off |
Scan Pattern (Eff_Gradient_Repeat_01.png) |
Off | Leave as is | Off | Repeat | Off |
Both Genshin and Star Rail often use a secondary set of normals as the outline factor. Along side the shader, there is a script for generating them and storing them inside the tangent data block.
HoyoToon_GeneratingTangents.mp4
To make sure that your model keeps their rim lights intact when entering all worlds in VRChat, you will need to attach a directional light to your character model. You can do this by dragging and dropping the AvatarLight
prefab onto your model. You can find this prefab in the Dependencies
folder.
This is only accurate for datamined assets.
Hoyoverse models require a simple setting changes to make sure the shading and everything is will work correctly. If you do not set the correct settings many things such as rimlights and outlines may not work correctly. Make sure to set the following settings on your FBX import settings:
- Scale Factor: 100
- Read/Write: Enabled This way you will have your generated tangents mesh inherit it.
- Legacy Blend Shape Normals: On Apply all changes.