Closed avaer closed 1 year ago
Thank you for your advice.
I will organize and rewrite it from now on. The following chapters are planned.
LookAt space definition.
The LookAt space is defined from the head bone and the initial posture.
Evaluate the gaze point relatively in this space.
Convert the gaze point to yaw, pitch. pseudocode
EulerAngle definition, rotation orientation as rightHanded.
Apply Yaw, Pitch.
a. bone type pseudocode
=> EulerAngle definition
b. morph target type pseudocode
c. uv offset type pseudocode
Range adjustment.
fixed
description automatically closes github
The lookat documentation has been updated.
If you have any questions, please point them out.
@avaer
You can close this, we have this implemented in Webaverse :)
As far as I can tell, there is no way to cleanroom implement
lookAt
part of this specification because it doesn't fully specify the details.For example, the types in https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/lookAt.md#lookat are not known (could be
Array
orfloat
or{x, y, z}
).I found a schema elsewhere: https://github.com/vrm-c/vrm-specification/blob/43cfae56a0a1ba570e088bfe217f1c96a6a05ce0/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.lookAt.schema.json but it should probably be inline with the explanations.
I also find the algorithm specification to be too vague to implement correctly: https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/lookAt.md#lookat-algorithm
Lines like:
apply(x, y)
,The eye gazes are applied to the Yaw/Pitch angle formed by the HeadBone forward vector
, andApply rangeMapHorizontalOuter and reflect as Expression LookLeft value
have multiple reasonable geometric interpretations, but probably only one of them is correct and it's not clear which. Euler angles are used but the Euler order doesn't seem to be specified.
I suspect that two developers with two engines would implement this math quite differently, which is not a desirable property. This could be corrected with full pseudocode of the algorithm that is not tied to any engine.