pixiv / three-vrm

Use VRM on Three.js
MIT License
1.31k stars 110 forks source link

Default parameters for MToon in VRM 1.0 #1403

Closed tetraface closed 6 months ago

tetraface commented 6 months ago

If the non-required parameter for MToon is not set in the VRM 1.0 file, the default value defined in the VRM specification must be applied. However, at least for the following parameters, values ​​different from the default values ​​in the specification are applied.

0b5vr commented 6 months ago

It certainly seems to be. Thank you for the issue!

Spec: https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_materials_mtoon-1.0 Source: https://github.com/pixiv/three-vrm/blob/v2.1.1/packages/three-vrm-materials-mtoon/src/MToonMaterial.ts#L405

name default value in spec behavior in three-vrm
shadeColorFactor [0, 0, 0] [0.97, 0.81, 0.86]
parametricRimFresnelPowerFactor 5.0 1.0
outlineWidthFactor 0.0 0.5
0b5vr commented 6 months ago

matcapFactor, rimLightingMixFactor are also wrong.

name default value in spec behavior in three-vrm
matcapFactor [1, 1, 1] [0, 0, 0]
rimLightingMixFactor 1.0 0.0
0b5vr commented 6 months ago

@tetraface Released a patch release v2.1.2 just right now. Thank you again for the report!

https://github.com/pixiv/three-vrm/releases/tag/v2.1.2