three-vrm icon indicating copy to clipboard operation
three-vrm copied to clipboard

MToon: Artifact on VRoid models

Open 0b5vr opened this issue 5 years ago • 3 comments

image

髪の断面にアーティファクト。MatCapを見るとわかりやすい。 たしかUVのdeltaが無いなどで前にも苦しんだ箇所。

0b5vr avatar Aug 28 '19 05:08 0b5vr

やっぱりtangent space normal mapをobject spaceにする際にアーティファクトが出ている模様。 ちなみに、Three.jsのPBRマテリアル等でも同様の問題は発生するはずです。

0b5vr avatar Aug 28 '19 07:08 0b5vr

Example(dnd)にVroid073-Sendagaya_Shinoで再現しないように見えるのですが、該当モデルは短冊断面のUVのYが1揃えに押しつぶされているのでUVの縦差分がなくて、従法線(tangent)が決まらない…とかではないでしょうか https://github.com/pixiv/three-vrm/blob/52de0597bb8a814aca24107505060aaee9846bac/src/vrm/material/shaders/mtoon.frag#L105-L112 のst.t成分が0になって(?)scaleが0になってL111で回避されているように見えますが…。

iCyP avatar Sep 12 '19 05:09 iCyP

はい、そんな感じだと僕も予想しています……

0b5vr avatar Sep 12 '19 05:09 0b5vr