Skip to content

xcupsilon/unreal-genshin-character-shader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

0. Context & Result of My Version of Genshin Character Materials

For this project, I looked to recreate the character toon-shading effect used in Genshin. I used Klee, an iconic character, as my base model to work from. Thanks to Rachel who allowed me to explore the project in Unreal Engine instead :)

Completed Viewport Screenshot in Unreal:

Final Result YouTube Demo

1. Original Concept Art

Found some nice in-game screenshots in Genshin: image image

2. Shader Creation

Base Color

HighresScreenshot_2023 11 06-00 52 57

Simple Dot with Sunlight Sampling

Dot image

CelShading: Color Lookup Using a Custom Color Curve

LUT image

Slight Self-Shadowing by Sampling a Simple Light/Shade Texture using Matcap UV

SelfShade image

Custom 1: Specular Rendering (Talked with Rachel to replace multiple lighting support)

ezgif com-video-to-gif (2) ezgif com-video-to-gif (1)

Achieved through reading PBR info from channels of the lightmap and compute using BlinnPhong

image image

Custom 2 Additional Light Feature: Metallic Rendering

Metallic image image

MetalMap used:

Avatar_Tex_MetalMap

Diffuse + Specular + Metallic Combined Result

ezgif com-video-to-gif (3)

Custom Shadow Texture

World-Aligned Shadow Texture Mapping

ezgif com-video-to-gif (5) ezgif com-video-to-gif (6)

Special Surface Shader: Custom SDF & Normal-Based Face Rendering

SDF Old:

ezgif com-video-to-gif (7)

New:

ezgif com-video-to-gif (8)

SDF-based Shadow Calculation

image

Lerping Artist-Controlled Light and Shadow Colors image

Outline

Base Outline Outline image

Using Noise to Offset Outline Based on Time For a Windy Effect on Hair ezgif com-video-to-gif (4) image

Pixel Art Screen Post Process Effect

Threshold at 1/10: Pixelated10 Threshold at 1/20: Pixelated20 Threshold at 1/29: Pixalted29 image

3. Game Scene & Interactivity

I used some marketplace assets that closely resembled Genshin Impact's modeling styles with the architecture mirroring the city where the character was from: "Mondstadt". Then I added my own lighting setup and post processes effect to it.

Here is one of my final hero render: Final Result

For the interactivity part, I wanted to showcase the shader performing at different lighting scenarios: another one at dawn, and another very stylized one. I implemented functions that would quick unload/load different lighting components & post process materials to achieve this. Here are the results on YouTube: YouTube Demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Batchfile 100.0%