PointSplatModel
Visualization for a cloud of points using splatting.
The PointSplatModel visualizes a cloud of points using splatting techniques, enhancing the display through customizable parameters such as radius, texture size, opacity, and color.
- module
- Sofa.GL.Component.Rendering3D
- namespace
- sofa::gl::component::rendering3d
- include
- sofa/gl/component/rendering3d/PointSplatModel.h
- inherits
-
- VisualModel
- description
The PointSplatModel is a visualization component in the SOFA framework, specifically designed for rendering a cloud of points using splatting techniques. It inherits from VisualModel, indicating its role as a visual representation in 3D scenes.
Mathematical and Physical Description
Role in the Global FEM Pipeline
The PointSplatModel does not contribute to any governing equations or operators within the core Finite Element Method (FEM) simulation pipeline. It is purely a visualization component, responsible for rendering a cloud of points using splatting techniques.
- No Contribution to Governing Equations: The PointSplatModel does not implement or contribute to mass matrices, stiffness matrices, internal forces, residuals, or any other FEM-related operators.
- No Constitutive Laws: It does not involve strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, or other constitutive laws related to material behavior.
Numerical Methods and Discretization Choices
The component relies on splatting techniques for visualization. Splatting involves projecting small textures (billboards) onto points in a scene to enhance visual fidelity and performance. The key numerical choices include:
-
Radius: Controls the size of each point in the visualization.
\$$ \text{radius} \in \\mathbb{R}_{>0} \$$
-
Texture Size: Adjusts the resolution of the billboard texture. A higher texture size can improve visual quality but may also impact performance.
\$$ \text{textureSize} \in \\mathbb{N}_{>0} \$$
-
Opacity Control: The
alphaparameter controls the transparency of billboards, allowing for effects such as blending or partial occlusion.\$$ \alpha \in [0, 1] \$$
-
Color Customization: The
colorfield defines the color of each point using an RGBA (Red, Green, Blue, Alpha) color value. This allows for full customization of the appearance of the points.\$$ \text{color} = (r, g, b, a) \\in [0, 1]^4 \$$
Interaction with the Visualization Pipeline
The PointSplatModel interacts with other visual components and the overall rendering pipeline to ensure correct and efficient display within the scene. It implements virtual methods such as init, reinit, isTransparent, and drawTransparent to integrate seamlessly into the SOFA visualization framework.
- Initialization: The
initmethod initializes the component's state, ensuring that it is ready for rendering. - Reinitialization: The
reinitmethod allows the component to be reinitialized if necessary. - Transparency Check: The
isTransparentmethod determines whether the billboards are transparent, which affects how they are rendered in conjunction with other visual elements. - Draw Transparent Method: The
drawTransparentmethod handles the rendering of transparent billboards, ensuring correct blending and occlusion effects.
Conclusion
The PointSplatModel is a visualization component that enhances the display of point clouds through splatting techniques. It does not contribute to any mathematical or physical aspects of FEM simulations but provides an efficient and visually appealing way to render large datasets.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
radius |
float | |
Radius of the spheres. |
textureSize |
int | |
Size of the billboard texture. |
alpha |
float | |
Opacity of the billboards. 1.0 is 100% opaque. |
color |
sofa::type::RGBAColor | |
Billboard color.(default=[1.0,1.0,1.0,1.0]) |
Methods
void
init
()
virtual
void
reinit
()
virtual
bool
isTransparent
()
virtual
void
drawTransparent
(const core::visual::VisualParams * vparams)
virtual
{
"name": "PointSplatModel",
"namespace": "sofa::gl::component::rendering3d",
"module": "Sofa.GL.Component.Rendering3D",
"include": "sofa/gl/component/rendering3d/PointSplatModel.h",
"doc": "Visualization for a cloud of points using splatting.",
"inherits": [
"VisualModel"
],
"templates": [],
"data_fields": [
{
"name": "radius",
"type": "float",
"xmlname": "radius",
"help": "Radius of the spheres."
},
{
"name": "textureSize",
"type": "int",
"xmlname": "textureSize",
"help": "Size of the billboard texture."
},
{
"name": "alpha",
"type": "float",
"xmlname": "alpha",
"help": "Opacity of the billboards. 1.0 is 100% opaque."
},
{
"name": "color",
"type": "sofa::type::RGBAColor",
"xmlname": "color",
"help": "Billboard color.(default=[1.0,1.0,1.0,1.0])"
}
],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "reinit",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "isTransparent",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "drawTransparent",
"return_type": "void",
"params": [
{
"name": "vparams",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The **PointSplatModel** is a visualization component in the SOFA framework, specifically designed for rendering a cloud of points using splatting techniques. It inherits from `VisualModel`, indicating its role as a visual representation in 3D scenes.\n\n### Role and Purpose\nThis component provides an efficient way to visualize large point clouds by applying texture splats to each point, enhancing the visual fidelity and performance for interactive simulations or rendering tasks.\n\n### Interactions with Other Components\n- **Visualization Pipeline**: As part of the SOFA visualization hierarchy (`VisualModel`), `PointSplatModel` interacts with other visual components and the overall rendering pipeline to ensure correct and efficient display within the scene. \n- **Data Fields**: The component exposes several data fields that control its appearance, including `radius`, `textureSize`, `alpha`, and `color`. These can be configured via XML or programmatically.\n\n### Practical Usage Guidance\n1. **Radius**: Set the desired radius for each point to define their size in the visualization.\n2. **Texture Size**: Adjust the texture size (`textureSize`) to balance between visual quality and performance.\n3. **Opacity Control**: Use `alpha` to control the transparency of billboards, allowing for effects like blending or partial occlusion.\n4. **Color Customization**: Define the color of the points using an RGBA color value.\n\n### Data Fields\n- **radius (float)**: Radius of the spheres.\n- **textureSize (int)**: Size of the billboard texture.\n- **alpha (float)**: Opacity of the billboards; 1.0 is fully opaque.\n- **color (RGBAColor)**: Color of the billboards, with a default value of `[1.0,1.0,1.0,1.0]` (white and opaque).\n\n### Methods\nThe component implements virtual methods like `init`, `reinit`, `isTransparent`, and `drawTransparent`, which are part of its integration into the SOFA visualization framework.",
"maths": "The **PointSplatModel** is a visualization component in the SOFA framework, specifically designed for rendering a cloud of points using splatting techniques. It inherits from `VisualModel`, indicating its role as a visual representation in 3D scenes.\n\n### Mathematical and Physical Description\n\n#### Role in the Global FEM Pipeline\nThe **PointSplatModel** does not contribute to any governing equations or operators within the core Finite Element Method (FEM) simulation pipeline. It is purely a visualization component, responsible for rendering a cloud of points using splatting techniques.\n\n- **No Contribution to Governing Equations**: The PointSplatModel does not implement or contribute to mass matrices, stiffness matrices, internal forces, residuals, or any other FEM-related operators.\n- **No Constitutive Laws**: It does not involve strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, or other constitutive laws related to material behavior.\n\n#### Numerical Methods and Discretization Choices\nThe component relies on splatting techniques for visualization. Splatting involves projecting small textures (billboards) onto points in a scene to enhance visual fidelity and performance. The key numerical choices include:\n\n- **Radius**: Controls the size of each point in the visualization.\n \n \\\\[ \\text{radius} \\in \\\\mathbb{R}_{>0} \\\\]\n\n- **Texture Size**: Adjusts the resolution of the billboard texture. A higher texture size can improve visual quality but may also impact performance.\n \n \\\\[ \\text{textureSize} \\in \\\\mathbb{N}_{>0} \\\\]\n\n- **Opacity Control**: The `alpha` parameter controls the transparency of billboards, allowing for effects such as blending or partial occlusion.\n \n \\\\[ \\alpha \\in [0, 1] \\\\]\n\n- **Color Customization**: The `color` field defines the color of each point using an RGBA (Red, Green, Blue, Alpha) color value. This allows for full customization of the appearance of the points.\n \n \\\\[ \\text{color} = (r, g, b, a) \\\\in [0, 1]^4 \\\\]\n\n#### Interaction with the Visualization Pipeline\nThe PointSplatModel interacts with other visual components and the overall rendering pipeline to ensure correct and efficient display within the scene. It implements virtual methods such as `init`, `reinit`, `isTransparent`, and `drawTransparent` to integrate seamlessly into the SOFA visualization framework.\n\n- **Initialization**: The `init` method initializes the component's state, ensuring that it is ready for rendering.\n- **Reinitialization**: The `reinit` method allows the component to be reinitialized if necessary.\n- **Transparency Check**: The `isTransparent` method determines whether the billboards are transparent, which affects how they are rendered in conjunction with other visual elements.\n- **Draw Transparent Method**: The `drawTransparent` method handles the rendering of transparent billboards, ensuring correct blending and occlusion effects.\n\n### Conclusion\nThe PointSplatModel is a visualization component that enhances the display of point clouds through splatting techniques. It does not contribute to any mathematical or physical aspects of FEM simulations but provides an efficient and visually appealing way to render large datasets.",
"abstract": "The PointSplatModel visualizes a cloud of points using splatting techniques, enhancing the display through customizable parameters such as radius, texture size, opacity, and color.",
"sheet": "\n# PointSplatModel\n\n## Overview\n\nPointSplatModel is a visualization component in SOFA that renders a cloud of points using splatting techniques. It inherits from `VisualModel` and integrates into the SOFA visualization pipeline to ensure efficient and visually appealing display.\n\n## Parameters and Data\n\nThe PointSplatModel exposes several data fields for customization:\n\n- **radius (float)**: Radius of the spheres representing each point in the cloud.\n \\[ \text{radius} \\\n \\in \\mathbb{R}_{>0} \\]\n- **textureSize (int)**: Size of the billboard texture, balancing visual quality and performance.\n \\[ \text{textureSize} \\\n \\in \\mathbb{N}_{>0} \\]\n- **alpha (float)**: Opacity of the billboards. A value of 1.0 is fully opaque.\n \\[ \\alpha \\\n \\in [0, 1] \\]\n- **color (RGBAColor)**: Color of the billboards, with a default value of `[1.0, 1.0, 1.0, 1.0]` (white and opaque).\n \\[ \\text{color} = (r, g, b, a) \\\n \\in [0, 1]^4 \\]\n\n## Dependencies and Connections\n\nPointSplatModel is part of the SOFA visualization hierarchy (`VisualModel`) and interacts with other visual components within the rendering pipeline to ensure correct display. It does not have specific dependencies on other components but relies on the overall scene graph for its operation.\n"
}