You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MToon 1.0, if I set "Double Sided" to On, the back faces are using the normals of the front face. (So a skirt appears as if lit from below.)
MToon should add code to use VFACE or SV_IsFrontFace to display backface normals properly.
This bug is new to MToon 1.0, because the old MToon shader had a hack to flip normals which was incorrect. See also: Santarh/MToon#56
To Reproduce
Open a project with UniVRM installed.
Edit Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon.shader and remove Hidden/ from the shader name, so it can be selected on a VRM 0.0 model.
Add AliciaSolid to the scene.
Rotate the Directional Light to X=90 so the light comes directly from above. Turn Shadows Off on the light.
Disable the cloth1 and cloth2 objects inside mesh in the hierarchy. (Alicia has both layers of the skirt as separate objects: disabling these objects allows us to simulate a single sided mesh)
Open AliciaSolid_vrm-0.51.Materials folder, and shift click all the materials. Change the shader to VRM10/vrmc_materials_mtoon
Select the alicia_wear material. Change Double Sided to On, and set Shade Color to black.
It will show the same shade of lighting on both the topside and the underside of the character's skirt.
Expected behavior
Ideally, the underside of the clothing will be darkened, and the topside will be lit, because the light comes from up.
Screenshots
If you follow the process above:
Here is a custom version of Alicia I made in Blender, to illustrate the problem more clearly:
Environments (please complete the following information):
Yes, I know this issue because MToon1.0 is now WIP and has not been released.
At this stage, I prioritize the implementation of ideal specifications over Unity-specific behavior.
Describe the bug
In MToon 1.0, if I set "Double Sided" to On, the back faces are using the normals of the front face. (So a skirt appears as if lit from below.)
MToon should add code to use VFACE or SV_IsFrontFace to display backface normals properly.
This bug is new to MToon 1.0, because the old MToon shader had a hack to flip normals which was incorrect. See also: Santarh/MToon#56
To Reproduce
Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon.shader
and removeHidden/
from the shader name, so it can be selected on a VRM 0.0 model.cloth1
andcloth2
objects inside mesh in the hierarchy. (Alicia has both layers of the skirt as separate objects: disabling these objects allows us to simulate a single sided mesh)VRM10/vrmc_materials_mtoon
It will show the same shade of lighting on both the topside and the underside of the character's skirt.
Expected behavior
Ideally, the underside of the clothing will be darkened, and the topside will be lit, because the light comes from up.
Screenshots
If you follow the process above:
![image](https://user-images.githubusercontent.com/39946030/121632712-4fc09d00-ca36-11eb-9e20-ab5dd77709e4.png)
Here is a custom version of Alicia I made in Blender, to illustrate the problem more clearly:
![MToon 1.0 - Cull Off has wrong normals](https://user-images.githubusercontent.com/39946030/121631048-3407c780-ca33-11eb-83c2-fe21da8cdb87.png)
Environments (please complete the following information):
Additional context
See my comment on the original MToon issue here: Santarh/MToon#56 (comment)
The text was updated successfully, but these errors were encountered: