Page MenuHome

Viewport: Armature Wireframe Rendering
Needs RevisionPublic

Authored by Jeroen Bakker (jbakker) on Tue, Jan 7, 2:37 PM.

Details

Summary

Viewport: Armature Wireframe Rendering

  • added back the wire frame rendering for armatures
  • force armatures to be drawn in solid mode next to the bounding box when in pose or edit mode.
  • disable culling for solid objects
  • removed concave edge detection for outlines

I couldn't figure out what the concave edge detection was trying to do, but it didn't work correctly for negative scaled ob-matrices. Solutions I tried would almost render all the wires all the time.

Diff Detail

Repository
rB Blender
Branch
T65114a (branched from master)
Build Status
Buildable 6193
Build 6193: arc lint + arc unit

Event Timeline

Disable culling when drawing the solid parts of the bones. This gets us back to what it was in B281. still need to fix the wireframe rendering

Updated the patch with comments from Met

To reiterate stuff I said just now:
When armature is in Object mode with Bounds display, I would expect to see just the bounds.
When armature is in Edit or Pose mode with Bounds display, I would expect to see the bounds + the bones displayed as they normally would (no fancy transparency or anything) - However, in Pose mode one could argue that the bounds should go away. I don't have strong feelings on pose mode.
Didn't see anything wrong happening with non-uniform scaling other than at negative scale, the outlines disappearing

Fixed the wire frame drawing. It was removed by the geom shader.

Clément Foucault (fclem) requested changes to this revision.Wed, Jan 15, 11:59 PM

The concave edge removes this case.

But if it fails for inverted bones I'm glad to remove it.

source/blender/draw/engines/overlay/overlay_armature.c
189

I don't like this. This is doing really bad thing in transparent bone mode.

This is why 2.79 was doing flat shaded solid color for transparent (wire) armature.

After exploring the possibilities we have limited options and the only thing I can think of that would fix all the issues while retaining the look we have and
that is not really costly, is to use the same OIT approach as workbench.

Memory usage would not be a concern since we would reuse the same buffers.

2270

Prefer early out return.

This revision now requires changes to proceed.Wed, Jan 15, 11:59 PM