Skip to content

Propagation for RenderLayers #22601

@Sigma-dev

Description

@Sigma-dev

What problem does this solve or what need does it fill?

Visibility propagation is:

  • The norm across software
  • Intuitive
  • Practical

Which is why we have it, and it's great.

But when you need something more complicated than global visibility, you end up using RenderLayers, and in my case being confused that they don't propagate.

This lack of propagation is in my opinion both unintuitive and impractical.

For example if you want to make a gltf model hidden from a specific camera, you now need to somehow insert the RenderLayers across the whole gltf tree.

What solution would you like?

My solution is to implement propagation very similar to the existing Visibility propagation.

So RenderLayers would probably become an enum like:

  • Inherited
  • Layers(layers)

What alternative(s) have you considered?

For my GLTF problem, I could do some iter_descendants stuff but it would be pretty clunky in my opinion.

Additional context

I'm up to implement this into a PR if the design is validated 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-DocsAn addition or correction to our documentationC-FeatureA new feature, making something new possibleS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-ContentiousThere are nontrivial implications that should be thought through

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions