-
Notifications
You must be signed in to change notification settings - Fork 18
3.) Editing the material values
This will go section by section according to how I have it laid out in material_default.fx
Almost all of these values can be copy pasted from the unity materials
Some models use a 2nd set of UVs to map a different part of a texture to its back-facing side. This should be toggled off if your model doesnt have a 2nd set of UVs. Either from not being exported properly with minmode's pmx script or simply because that part doesn't use it.
Genshin diffuse textures have, at first glance, weird transparency but it has multiple uses.
Setting this value to 0 will disable to alpha channel completely
Setting this value to 1 will enable the alpha channel and use it as a standard opacity texture except with the alpha values clipped below a certain threshold.
Setting this value to 2 will enable the alpha channel and use it as an emission mask. This will mask off certain parts of the model so they arent affected by either MMD or MMMs internal lighting colors. It will still be affected by the lighting changes from the model or controller morphs.
Setting this value to 3 will enable the alpha channel and use it as a blush expression mask. This will apply a blushed color to the cheeks of the model.
This is to be used in conjunction with#define MATERIAL_ALPHA_USE 2
as it is the value that the alpha channel will be clipped.
This is the color the cheeks will be painted when#define MATERIAL_ALPHA_USE
is set to 3.
This is the blush mask strength and shouldn't be set very high.
The jp name of the pmx morph linked to the blush. While it being the jp name, it doesn't necessarily need to be named in japanese. It just depends on what is animating your blush normally.
This line both functions as a toggle as well an input path for the normal map texture.
if your model doesn't use a normal map simply comment this line out and it will be skipped.
Normal map detail scale, the lower the less powerful the normal map is
These are two debug states you can use to check your normals no matter if the normal map is enabled or not.
The first of the two is just simply the normals in their range: -1 to 1.
The second is the same as the above but the normals have been encoded in a 0 to 1 range.
This only works if there is a normal map loaded and if the blue channel contains a SDF detail texture
This turns the detail lines on and off
Lines colors. The darker the color the darker the lines.
Smoothness of the lines.
Thickness of the lines.
Debug state to output just the detail lines. Useful for trying to get
These are not all the values related to the shadows as some are per material region
Turns on and off the use of the blue channel from the _Lightmap texture for the Ambient Occlusion shadow calculation.
Turns on and off the use of the red channel from the vertex colors for the Ambient Occlusion shadow calculation.
Turns on and off the use of the blue channel from the vertex colors for the shadow ramp width.
Toggles the ramp textures on and off. If this is turned off the shader will use the SHADOW_WARM_COLOR && SHADOW_COOL_COLOR colors from the material regions instead. This is useful for the faces since genshin's face materials actually use 3 different colors for the skin, eyes, and inside the mouths.
This is used in tandem with the vertex color blue channel if it is toggled to control the overall width of the ramps.
This is the overall shadow area.
Softness or "blur" level of the face shadow. At softer values, there will be some noticeable banding. Currently looking into ways I can reduce that.
This is the input for the local path to the _FaceLightmap texture.
This is necessary to turn on if you want to enable the use of the above lightmap. This value also sets the shader to use the face shading instead of the regular shading. This should generally mean automatically turning off the specular and metal mats but in some cases that doesn't happen(?).
Debug state outputs just the shadows. Useful if you're not sure somethings shadow ramps are working correctly.
Genshin Impact uses the alpha texture from the _Lightmap texture to test and get sub material regions. This is why the shadow ramps have multiple gradients instead of just one. There are 5 but other Hoyoverse games are known to use more than just those. Star rail for example uses 8 in total...
This one is on at all times and cannot be toggled off.
This is the object color for this material region
This is the warm or default shadow color for this material region. It is the color used if the shadow ramps are turned off.
This is the cool or nighttime shadow color for this material region. It is used if the shadow ramps are turned off.
Controller.pmx
controls the blend rate between the warm and cool shadows for both shadow ramps and these.
This controls the toggle for the whole model's specular, not just the current material region's.
This controls the color for the whole model's specular, not just the current material region's.
This is the current material region's specular intensity.
This is the current material region's specular power. Think of it like the size of the shine.
This controls the toggle for the whole model's outline, not just the current material region's.
This controls the outline size for the whole model, not just the current material region's.
This is the current material region's outline color.
Turn this off to skip the material at this range.
This is the object color for this material region
This is the warm or default shadow color for this material region. It is the color used if the shadow ramps are turned off.
This is the cool or nighttime shadow color for this material region. It is used if the shadow ramps are turned off.
Controller.pmx
controls the blend rate between the warm and cool shadows for both shadow ramps and these.
This is the current material region's specular intensity.
This is the current material region's specular power. Think of it like the size of the shine.
This is the current material region's outline color.
Turn this off to skip the material at this range.
This is the object color for this material region
This is the warm or default shadow color for this material region. It is the color used if the shadow ramps are turned off.
This is the cool or nighttime shadow color for this material region. It is used if the shadow ramps are turned off.
Controller.pmx
controls the blend rate between the warm and cool shadows for both shadow ramps and these.
This is the current material region's specular intensity.
This is the current material region's specular power. Think of it like the size of the shine.
This is the current material region's outline color.
Turn this off to skip the material at this range.
This is the object color for this material region
This is the warm or default shadow color for this material region. It is the color used if the shadow ramps are turned off.
This is the cool or nighttime shadow color for this material region. It is used if the shadow ramps are turned off.
Controller.pmx
controls the blend rate between the warm and cool shadows for both shadow ramps and these.
This is the current material region's specular intensity.
This is the current material region's specular power. Think of it like the size of the shine.
This is the current material region's outline color.
Turn this off to skip the material at this range.
This is the object color for this material region
This is the warm or default shadow color for this material region. It is the color used if the shadow ramps are turned off.
This is the cool or nighttime shadow color for this material region. It is used if the shadow ramps are turned off.
Controller.pmx
controls the blend rate between the warm and cool shadows for both shadow ramps and these.
This is the current material region's specular intensity.
This is the current material region's specular power. Think of it like the size of the shine.
This is the current material region's outline color.
This doubles as both a toggle for the metal shading on the whole model as well as the input path for the metal matcap texture.
This doubles as both a toggle for using the specular ramp in the metal shading as well as the input path for the specular ramp texture.
The general brightness of the metal matcap
The tiling count for each axis of the sphere mapping.
Metal highlight sharpness offset.
Metal specular power.
Metal specular intensity in shadowed areas.
Metal specular intensity in general areas.
Color to be blended into the light areas of the metal matcap texture.
Color to be blended into the dark areas of the metal matcap texture.
Color to be used in places where the highlight is sharp.
Color of the metal's specular highlight.
Color of the metal in a shadowed area.