ruyo / VRM4U

Runtime VRM loader for UnrealEngine5
Other
1.39k stars 181 forks source link

Material Instances: Visual discrepancies between VRM0 and VRM1 versions of the same avatar #438

Open andreiagmu opened 2 hours ago

andreiagmu commented 2 hours ago

Unreal Engine v5.4.4 VRM4U v20241007

Describe the bug After importing a VRM1 avatar, there are quite a few inconsistencies in the Material Instances, compared to when the same avatar is imported as VRM0.

Note: The avatar from my tests is exported from VRoid Studio (v1.29.55 - "Dress-up Feature" open beta), in both VRM0 and VRM1 format. Also, in both VRM0 and VRM1 imports to UE, I'm using the default VRM4U import options (e.g.: Force Opaque = false, Force TwoSided = false).

I noticed some values in the 10_Main parameter group differ between VRM0 and VRM1 (e.g.: mtoon_ShadeShift, mtoon_ShadeToony). I'm not sure if those are the intended parameter values for VRM1, or if the Material Instances should've been imported with the exact same values as VRM0. Anyway, in my case, this isn't the main issue (apparently). Changing those parameters to their VRM0 equivalents doesn't seem to change the visuals much.

The main issue I noticed is that many (most? all?) Material Instances that were originally TwoSided in VRM0, aren't TwoSided anymore in VRM1. See the Material Instances' Parent, at the bottom of my screenshots. Furthermore, some Material Instances that were Translucent and TwoSided in VRM0, are now simply Opaque in VRM1. The visual discrepancies are noticeable in the clothes (inner side) and, especially, in the Glasses accessory from VRoid Studio.

I'm aware I can modify the VRM1 Material Instances after importing the avatar, to achieve the same result as VRM0. But I'd like to avoid any kind of extra setup, that I'd potentially have to repeat with many imported avatars in my project. Especially as the VRM0 Material Instances are already correct and "just work" out of the box.

Note: I'm using VRM1 in my project, to make my avatars more "future-proof" (in theory), and to be able to use the new "Dress-up Feature" from VRoid Studio, that's only available for VRM1 avatars.

andreiagmu commented 2 hours ago

In the following screenshot pairs, the first image shows the VRM0 avatar, and the second image shows the VRM1 avatar.


VRM1 - Missing light/translucency effects in Glasses; Clothes not TwoSided by default anymore

capture_20241106_021402_055_edit

capture_20241106_021526_056_edit


VRM1 - Clothes not TwoSided by default anymore

capture_20241106_014733_052

capture_20241106_014737_053


Material Instances' visual discrepancies

capture_20241106_013652_043_edit

capture_20241106_013659_044_edit


Glasses Lens - Material Instance

VRM0 - Translucent, TwoSided VRM1 - Opaque

capture_20241106_013607_041

capture_20241106_013613_042


Glasses Frame - Material Instance

VRM0 - Opaque, TwoSided VRM1 - Opaque

capture_20241106_013719_045

capture_20241106_013725_046


Eye Highlight - Material Instance

VRM0 - Translucent, TwoSided VRM1 - Opaque

capture_20241106_025556_057

capture_20241106_025600_058


Clothes Top (Coat) - Material Instance

VRM0 - Opaque, TwoSided VRM1 - Opaque

capture_20241106_033717_059

capture_20241106_033721_060


Hair - Material Instance

VRM0 - Opaque, TwoSided VRM1 - Opaque

capture_20241106_014002_049

capture_20241106_014005_050


Cat Ear - Material Instance

VRM0 - Opaque, TwoSided VRM1 - Opaque

capture_20241106_013810_047

capture_20241106_013814_048

andreiagmu commented 1 hour ago

I guess the changed values I noticed in the 10_Main parameter group are intentional, as the VRM1 avatar has a stronger "cel/toon shading effect" by default, when compared to the VRM0 avatar. It would be nice to add an (optional) VRM1 import setting to use the old/legacy (?) VRM0 values for those parameters.

My issues with the (post-import default) VRM1 Material Instances are mainly: