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
When loading a model with flat-shaded faces, outlines appear disjoint:
This matches the behavior in UniVRM and the Blender VRM add-on, however it's not always desirable for artists.
Blender's glTF exporter (and perhaps other exporters?) exports flat-shaded geometry with non-shared vertices. For example, exporting the default cube (8 vertices) yields a glTF model with 24 vertex position vectors. I'm not sure the exact reason, but I assume it's so that it can include normals data for these verts to ensure they appear flat in other renderers.
I would like the VRM loader to have an option to intelligently recalculate normals for the outline geometry so that these overlapping vertices appear connected.
I think this can be achieved with the help of THREE.BufferGeometryUtils.mergeVertices() and THREE.BufferGeometry.calculate.vertexNormals() inside the VRM loader, and perhaps tweaking the outline shader logic.
The text was updated successfully, but these errors were encountered:
The behavior is not well-defined on the spec side, and if we try to strictly define the spec this is going to be a spec as-is.
Until we define a platform-independent way to achieve smoother outlines for these cases, you probably should resolve these cases by model side (e.g. inserting a small bevel 😩).
When loading a model with flat-shaded faces, outlines appear disjoint:
This matches the behavior in UniVRM and the Blender VRM add-on, however it's not always desirable for artists.
Blender's glTF exporter (and perhaps other exporters?) exports flat-shaded geometry with non-shared vertices. For example, exporting the default cube (8 vertices) yields a glTF model with 24 vertex position vectors. I'm not sure the exact reason, but I assume it's so that it can include normals data for these verts to ensure they appear flat in other renderers.
I would like the VRM loader to have an option to intelligently recalculate normals for the outline geometry so that these overlapping vertices appear connected.
I think this can be achieved with the help of
THREE.BufferGeometryUtils.mergeVertices()
andTHREE.BufferGeometry.calculate.vertexNormals()
inside the VRM loader, and perhaps tweaking the outline shader logic.The text was updated successfully, but these errors were encountered: