Back

VisualManagerSecondaryPass

sofa::gl::component::shader::VisualManagerSecondaryPass
VisualManagerPass
Doc (from source)

Chain different rendering pass, for compositing. Render pass element: render the relevant tagged objects in a FBO

Abstract (AI generated)

The `VisualManagerSecondaryPass` manages secondary rendering passes for compositing tagged objects into a Frame Buffer Object (FBO), enabling complex visualization effects in SOFA's rendering pipeline.

Metadata
module
Sofa.GL.Component.Shader
namespace
sofa::gl::component::shader
include
sofa/gl/component/shader/VisualManagerSecondaryPass.h
inherits
  • VisualManagerPass
description

The VisualManagerSecondaryPass component in the SOFA framework is primarily designed for advanced visualization tasks, specifically managing secondary rendering passes for compositing visual elements. This component does not directly contribute to any governing equations or operators related to the core mechanics and FEM simulation pipeline, such as mass matrix $M$, stiffness matrix $K$, internal force $f_{ ext{int}}$, residual $R$, etc. Instead, it operates in the rendering layer of SOFA's architecture.

Role in the Global FEM Pipeline:

  • Rendering Pass Management: VisualManagerSecondaryPass is responsible for managing secondary rendering passes, which are essential for compositing and integrating multiple visual layers or effects into a single final image. It handles specific aspects of the visualization process by enabling chaining different rendering stages.

Constitutive or Kinematic Laws Involved:

  • N/A: The component does not involve any constitutive laws or kinematic models that are relevant to FEM simulations or physical modeling. Its role is purely in visual rendering and compositing.

Numerical Methods or Discretization Choices:

  • Rendering Passes: It uses tagged objects to render into a Frame Buffer Object (FBO). The input_tags field specifies the previous passes that are used as source textures, while output_tags define how these outputs can be referenced in subsequent rendering stages.

Fitting into the Broader Variational / Lagrangian Mechanics Framework:

  • N/A: This component does not contribute to any variational or Lagrangian mechanics formulations. It operates at a different layer of the simulation architecture, focusing on visualization and compositing rather than physical modeling or numerical solution methods.

Summary:

VisualManagerSecondaryPass is specialized for advanced visual rendering tasks within SOFA's framework. It facilitates complex compositing effects by managing secondary rendering passes but does not directly involve any mathematical operators or models used in the core FEM simulation pipeline.

Data Fields
NameTypeDefaultHelp
input_tags sofa::core::objectmodel::TagSet list of input passes used as source textures
output_tags sofa::core::objectmodel::TagSet output reference tag (use it if the resulting fbo is used as a source for another secondary pass)
Links
NameTypeHelp
l_shader Shader to apply for compositing
Methods
void traceFullScreenQuad () virtual
void init () virtual
void doInitVisual (const core::visual::VisualParams * ) virtual
void preDrawScene (core::visual::VisualParams * vp) virtual
bool drawScene (core::visual::VisualParams * vp) virtual
void bindInput (core::visual::VisualParams * )
void unbindInput ()
sofa::gl::FrameBufferObject & getFBO () virtual
const sofa::core::objectmodel::TagSet & getOutputTags ()
{
  "name": "VisualManagerSecondaryPass",
  "namespace": "sofa::gl::component::shader",
  "module": "Sofa.GL.Component.Shader",
  "include": "sofa/gl/component/shader/VisualManagerSecondaryPass.h",
  "doc": "Chain different rendering pass, for compositing.\n\nRender pass element: render the relevant tagged objects in a FBO",
  "inherits": [
    "VisualManagerPass"
  ],
  "templates": [],
  "data_fields": [
    {
      "name": "input_tags",
      "type": "sofa::core::objectmodel::TagSet",
      "xmlname": "input_tags",
      "help": "list of input passes used as source textures"
    },
    {
      "name": "output_tags",
      "type": "sofa::core::objectmodel::TagSet",
      "xmlname": "output_tags",
      "help": "output reference tag (use it if the resulting fbo is used as a source for another secondary pass)"
    }
  ],
  "links": [
    {
      "name": "l_shader",
      "target": "OglShader",
      "kind": "single",
      "xmlname": "shader",
      "help": "Shader to apply for compositing"
    }
  ],
  "methods": [
    {
      "name": "traceFullScreenQuad",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "init",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "doInitVisual",
      "return_type": "void",
      "params": [
        {
          "name": "",
          "type": "const core::visual::VisualParams *"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "preDrawScene",
      "return_type": "void",
      "params": [
        {
          "name": "vp",
          "type": "core::visual::VisualParams *"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "drawScene",
      "return_type": "bool",
      "params": [
        {
          "name": "vp",
          "type": "core::visual::VisualParams *"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "bindInput",
      "return_type": "void",
      "params": [
        {
          "name": "",
          "type": "core::visual::VisualParams *"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "unbindInput",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getFBO",
      "return_type": "sofa::gl::FrameBufferObject &",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getOutputTags",
      "return_type": "const sofa::core::objectmodel::TagSet &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `VisualManagerSecondaryPass` is part of the rendering pipeline in SOFA, designed to handle secondary rendering passes for compositing different visual elements together. It inherits from `VisualManagerPass`, which suggests it manages specific aspects of rendering that require multiple passes or layers.\n\n### Role and Purpose:\nThe primary role of `VisualManagerSecondaryPass` is to render tagged objects into a Frame Buffer Object (FBO) during secondary passes, enabling complex compositing effects. It facilitates the chaining of different rendering passes by managing input tags and output references, which are used for subsequent rendering stages.\n\n### Interactions with Other Components:\nThe component interacts with other visual components through its API methods like `init`, `doInitVisual`, `preDrawScene`, and `drawScene`. These methods ensure proper initialization and execution of the secondary pass. The `l_shader` link indicates that it uses an OpenGL shader (`OglShader`) for compositing.\n\n### Practical Usage Guidance:\nThe `input_tags` field allows specifying which previous rendering passes should be used as source textures, while `output_tags` define how the resulting FBO can be referenced in further passes. The component’s methods enable precise control over when and how these secondary renderings occur, ensuring seamless integration with other visual components.\n\nOverall, `VisualManagerSecondaryPass` is a specialized tool for advanced visualization tasks within SOFA's rendering framework.",
  "maths": "The `VisualManagerSecondaryPass` component in the SOFA framework is primarily designed for advanced visualization tasks, specifically managing secondary rendering passes for compositing visual elements. This component does not directly contribute to any governing equations or operators related to the core mechanics and FEM simulation pipeline, such as mass matrix $M$, stiffness matrix $K$, internal force $f_{\text{int}}$, residual $R$, etc. Instead, it operates in the rendering layer of SOFA's architecture.\n\n### Role in the Global FEM Pipeline:\n- **Rendering Pass Management:** `VisualManagerSecondaryPass` is responsible for managing secondary rendering passes, which are essential for compositing and integrating multiple visual layers or effects into a single final image. It handles specific aspects of the visualization process by enabling chaining different rendering stages.\n\n### Constitutive or Kinematic Laws Involved:\n- **N/A:** The component does not involve any constitutive laws or kinematic models that are relevant to FEM simulations or physical modeling. Its role is purely in visual rendering and compositing.\n\n### Numerical Methods or Discretization Choices:\n- **Rendering Passes:** It uses tagged objects to render into a Frame Buffer Object (FBO). The `input_tags` field specifies the previous passes that are used as source textures, while `output_tags` define how these outputs can be referenced in subsequent rendering stages.\n\n### Fitting into the Broader Variational / Lagrangian Mechanics Framework:\n- **N/A:** This component does not contribute to any variational or Lagrangian mechanics formulations. It operates at a different layer of the simulation architecture, focusing on visualization and compositing rather than physical modeling or numerical solution methods.\n\n### Summary:\n`VisualManagerSecondaryPass` is specialized for advanced visual rendering tasks within SOFA's framework. It facilitates complex compositing effects by managing secondary rendering passes but does not directly involve any mathematical operators or models used in the core FEM simulation pipeline.",
  "abstract": "The `VisualManagerSecondaryPass` manages secondary rendering passes for compositing tagged objects into a Frame Buffer Object (FBO), enabling complex visualization effects in SOFA's rendering pipeline.",
  "sheet": "# VisualManagerSecondaryPass\n\n**Overview:**\nThe `VisualManagerSecondaryPass` is part of the rendering pipeline in SOFA, designed to handle secondary rendering passes for compositing different visual elements together. It inherits from `VisualManagerPass`, which suggests it manages specific aspects of rendering that require multiple passes or layers.\n\n**Parameters and Data:*\n- **input_tags:** A list of input passes used as source textures (type: `sofa::core::objectmodel::TagSet`).\n- **output_tags:** Output reference tag, used if the resulting FBO is referenced in another secondary pass (type: `sofa::core::objectmodel::TagSet`).\n- **l_shader:** A link to an OpenGL shader (`OglShader`) for compositing.\n\n**Dependencies and Connections:**\nThe component interacts with other visual components through its API methods like `init`, `doInitVisual`, `preDrawScene`, and `drawScene`. These methods ensure proper initialization and execution of the secondary pass. The `l_shader` link indicates that it uses an OpenGL shader (`OglShader`) for compositing."
}