Collections visibility settings - Design Task
Open, NormalPublic

Description

Problem

There are few scenarios to consider when thinking about the collection options:

  1. Instanced group
    • We have an instanced group, but we want the duplicator (the empty) to be invisible, while the instanced object to be visible.
  2. Dupli vertices
    • We have dupli vertices, but we want only the duplicated object to be visible.
  3. Support simulation objects
    • Some elements need to be part of a simulation (e.g., collision boxes, or hair emitters), yet invisible in the final render.
  4. Reference objects
    • We have objects in the scene that should never be rendered in the final image, yet they are important as reference for modelling and animation.
  5. Invisible to the camera
    • Some objects must be invisible to camera rays (e.g., walls).
  6. Light that contributes to the scene but is not visible
    • We want lamps to lit the scene, however we don't want to see their own drawing and manipulators in the viewport.

Proposed solution

  1. Collection objects are either enable and visible or invisible altogether.
    1. No option to exclude from light pipeline (e.g., object that is invisible but still cast shadows or is in light probes). So if we hide an object, it is out of the pipeline. Even for lamps.
      1. Imagine an invisible collection with a lamp and an override to change the lamp energy. Should the override affect the lamp even if the collection is invisible? Better to keep things clear and no longer treat lamp as a special case.
    2. The distinction between "enabled/disabled" and "visible/invisible" is no longer relevant. So we unify them under the "enable".
      1. The reason for the original separation was:
        1. We wanted to allow users to hide objects if the last evaluated collection with that object was hidden (see D2878).
        2. Lamps and mesh objects could cast shadow/light to the scene even if hidden (see D2851)
      2. Without these patches (since they were not well received), there is little motivation for the separation.
    3. No different visibility flag for render and viewport.
      1. We can still have a separation between F12 and viewport, but unless we enforce hide_render in the object level, which I don't think we should. to have it in the collection level makes little sense.
  2. Hair emitters, duplicators, and similar will need a per-object option to be invisible.
    1. The option should be the same for all these dupli-parents, for consistency.

Groups

There is still one scenario where the visibility control for render and viewport may be required: group instancing.
When you instance a group and have a highpoly object to be used for the final render, but also a lowpoly to be used only for the viewport.
For this case (group collections) we will implement a viewport and render collection options.

Example of solution applied to the presented problems

See the scenarios above and their respective image for reference.

  1. Collection override for workspace "Only Render"
    • We add an override for the "Only Render" option, which will be moved to workspace.
  2. Use object duplicator visibility option to hide duplicator
    • Technically we could use this option for (1) as well.
  3. Separate simulation support objects from the rest of the simulation
    • Create a collection for the collision-only objects, and another one for the rest of the simulation. And control their visibility differently in the view layer used for the final render.
    • You can also have different collections, one with only the objects for the final render, and one with all the simulation objects. You then use a different collection (or same collections with different visibility options) for the simulation view layer and the view layer used for the final render.
  4. Different collections
    • Separate hidden collections for reference objects or if they are linked in, and instanced as a group, use static override to edit the group collections visibility.
  5. Disable camera ray visibility for the wall objects
    • For engines that support it only, however we can extend all the built-in engines to do so.
  6. Same as 1 (collection override for workspace "Only Render")

Details

Type
Design
Dalai Felinto (dfelinto) renamed this task from Collection Settings - Proposal to Collections visibility settings.
Dalai Felinto (dfelinto) renamed this task from Collections visibility settings to Collections visibility settings - Design Task.Dec 6 2017, 10:09 PM
This comment was removed by Campbell Barton (campbellbarton).

Overall looks sensible to me…

Some questions/remarks:

  • "Only Render" means the object participates to render result (be it cycles, eevee, etc.), but not the overlays in 3DViewport, right? So int the end, per object, we'd have an absolute ON/OFF status (from 'compilation' of enabled/disabled flags from all collections an object lays in), and an "Only Render" option that sort of amends the ON status, if I understood correctly?
  • So only #5 (the invisble-to-camera one) actually needs a custom, specific flag & handling?
  • About #3: Not sure we need two collections for the physics in fact… Wouldn’t that collection layout do the expected work? That way, we can still use a single collection for a whole simulation (as far as simulation code is concerned).
    • One collection gathering all objects involved in simulation, both visible and invisible ones, set to disabled. This is the collection you feed to simulator.
    • One collection gathering all visible objects involved in simulation, set to enabled.

@Bastien Montagne (mont29):

"Only Render" means the object participates to render result (be it cycles, eevee, etc.), but not the overlays in 3DViewport, right?

Correct. Exactly how we do in 2.79.

So in the end, per object, we'd have an absolute ON/OFF status (from 'compilation' of enabled/disabled flags from all collections an object lays in), and an "Only Render" option that sort of amends the ON status, if I understood correctly?

We will have no built-in "only render" option, but let users add a dynamic override for this if they need this granular control per collection.

So only the #5 (the invisible-to-camera one) actually needs a custom, specific flag & handling?

I'm not talking about a new flag here. Instead, talking about sticking to what we already have (per-object engine specific camera ray visibility control). Eevee can use that as well if we want.

  • About #3: Not sure we need two collections for the physics in fact… Wouldn’t that collection layout do the expected work? That way, we can still use a single collection for a whole simulation (as far as simulation code is concerned).
    • One collection gathering all objects involved in simulation, both visible and invisible ones, set to disabled. This is the collection you feed to simulator.
    • One collection gathering all visible objects involved in simulation, set to enabled.

There is more than one way to skin a cat. IF users want to have a single collection for the entire simulation, what you propose is perfectly sound. Otherwise they can go with what I suggest. But I will update the task to include your idea.