Picking: can't click sculpts that use back faces for a cel-shade outline #172
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sculpties built as a cel-shade / toon outline can't be clicked (touch, select, edit). These use a slightly larger, inside-out (inverted-normal / mirrored) shell around the object, so from outside you only ever see its back faces, which draw as the dark outline.
Likely cause (to confirm)
LLOctreeTriangleRayIntersect::visit(llmath/llvolumeoctree.cpp:134) and the volume path (llmath/llvolume.cpp:4421) both callLLTriangleRayIntersect, which rejects triangles facing away from the ray (llvolume.cpp:226-245).LLTriangleRayIntersectTwoSidedexists (llvolume.h:1160) but isn't used for picking.Fix direction
Use a two-sided test for picking, or at least for faces whose front side is never visible (inverted sculpts, double-sided glTF). Keep the closest hit. For parity, don't make genuinely invisible back faces of ordinary prims clickable from behind unless LL does too.
Repro
Related: #120 (only part of a mesh is clickable).
Fixed in
ceff65953c(verified in-world): the VK pick broadphase used only the first-captured LOD bounds; pick boxes now union every resident LOD (as the cull does) and refresh when mesh LODs land. The cel-shade outline mesh (sculpt type 5 = mesh) is clickable from outside. Diagnostic RenderVKPickDiag (9183932eff) stays for future pick bugs.