Page MenuHome

Fix T96836: UV points missing with some modifiers
ClosedPublic

Authored by Kévin Dietrich (kevindietrich) on Apr 27 2022, 1:41 PM.

Details

Summary

When extracting UV point indices, only the vertex points coming from the
original geometry should be drawn. For this, the routines (for subdivision
and coarse meshes) would only consider a vertex to be real if the extraction
type is MAPPED, and that an origin index layer on the vertices exist
with a valid origin index for the current vertex.

However, if the extraction type is MESH, which can happen with for
example an empty Geometry Node modifier, or with deferred subdivision,
this would consider every vertex to not be "real" and therefore hidden from
the UV editor.

This reworks the condition for "realness" to also consider a vertex to be
real if there is no origin layer on the vertices. The check on the extraction
type is removed as it becomes redundant.


This only modifies the check in the UV data extraction for point indices,
however similar checks exist throughout the extraction code, maybe they
should also be updated?

Diff Detail

Repository
rB Blender

Event Timeline

Kévin Dietrich (kevindietrich) requested review of this revision.Apr 27 2022, 1:41 PM
Kévin Dietrich (kevindietrich) created this revision.
Kévin Dietrich (kevindietrich) retitled this revision from Fix T97330: UV points missing with some modifiers to Fix T96836: UV points missing with some modifiers.

I think it would be better to fix every checks at once. However I'm not super familiar with this area. @Jeroen Bakker (jbakker) might be more familiar.

This change makes sense. Mapping was nice when we had a controlled pipeline. But as mentioned geo nodes and deferred subdivision doesn't work in these situations.

In my understanding the other cases can also be removed. but that could be administrated as a task and only land in master.

Just noting that the original dots problem (for the WeightedNormal modifier at least) was caused by rBdeaff945d0b9: Mesh: skip conversion from edit-mesh to mesh in edit-mode -- not sure if this might have an influence on the solution?

CC @Campbell Barton (campbellbarton)

I think it would be better to fix every checks at once. However I'm not super familiar with this area. @Jeroen Bakker (jbakker) might be more familiar.

In fact face checks are needed, otherwise face-dots wont draw in the file from T96836 with face-select mode enabled.

This patch applies the changes to polygons too, edge checked don't need up updating as they didn't check for MR_EXTRACT_MAPPED, see: P2942

I accept this revision + the provided patch of campbell to land. I see this as a bug fix and should be included in 3.2

This revision is now accepted and ready to land.May 13 2022, 8:17 AM