「Dev:2.8/Source/Viewport/Overlays」の版間の差分

提供: wiki
移動先: 案内検索
(Example)
 
(1版 をインポートしました)
 
(相違点なし)

2018年6月29日 (金) 06:23時点における最新版

A Definition of Overlays is stuff that is drawn above your scene. We can categorize overlays in:

  • Overlays provided by the Workspace mode.
  • Overlays that user can turn on/off.
  • Overlays that support operations


These overlays are rendered on top of the Workbench/Eevee/Cycles render engine. The draw manager will first draw the image for the DrawingMode it is in. After that it will draw the Overlays that the user can switch on/off and supporting operations will be rendered. And as last the draw manager will render the workspace mode overlay.

Technically all overlays will be rendered by a DrawEngine called Overlay Engine. The reason for this is that it can share the code and drawing cycles of all enabled overlays.

Example

Example face orientation overlay

In the above image Eevee is used to render the image. On top of that the Overlay engine is used to render the face-orientation overlay. On top of that the objectmode render-engine is used.

Workspace mode overlays

Some overlays are really important for workspace modes to work. For example in the Object workspace mode an overlay for object outline will always be on. Blender decides what and when to draw these overlays. Examples of these overlays are:

  • Object mode overlay
  • Edit Armature overlay
  • Edit Curve overlay
  • Edit Lattice overlay
  • Edit Mesh overlay
  • Edit Metaball overlay
  • Edit Surface overlay
  • Edit Text overlay
  • Paint Texture overlay
  • Paint Vertex overlay
  • Paint Weight overlay
  • Particle edit overlay
  • Pose mode overlay
  • Sculpt mode overlay

These overlays can still be turned off when the master switch of Overlays are turned off. This master switch is the opposite of the Only Render.

Object Mode

The Object Mode overlay provides a lot of functionality that the user wants to control. For example in during sculpting the object cursor should be hidden. These options should be accessible for the user to be turned on/off.

  • Object center
  • Relationship lines
  • 3D Cursor
  • Grid rendering
  • and many others.


User configurable overlays

There are overlays that users want to activate when needed. There are 2 sub-categories based on the duration that they are needed. Basically the implementation will become the same, but the workflow of activating them can be optimized. You can think of

  • Wireframe overlay: draws an wireframe on top of your scene. This overlay has an option for rendering hidden wireframes.
  • Face Orientation overlay: draws an overlay that points out the orientation of each face, where colors presents the Inside, outside orientation of the face.
  • Onion skinning

Overlays that can be user activated will can be turned on/off per 3dview.


Supporting overlays

These overlays support operations to be more interactive. For example when you draw/drop a material there is an overlay that displays the dropping point where the material can be dropped. These are controlled by the active operation.


Implementation

  • All overlays are provided by draw engine. There will be a single draw engine that will render the overlays the user selects.
  • Workspace mode overlays are controlled by the workspace where the 3d view is part of (draw/modes).
  • For the user configurable overlays the active overlays are stored in the 3dview (as flags and options)
  • The supporting overlays can be drawn by evaluating the Blender Context in the overlay engine.