Skip to content

Commit 2718727

Browse files
authored
Support basic transparency for Mesh3D/Asset3D/Boxes3D/Ellipsoids3D/Capsules3D/Cylinders3D (#11132)
1 parent 3b756d9 commit 2718727

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1000
-192
lines changed

crates/store/re_types/definitions/rerun/archetypes/boxes3d.fbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ table Boxes3D (
4040
quaternions: [rerun.components.PoseRotationQuat] ("attr.rerun.component_optional", nullable, order: 2200);
4141

4242
/// Optional colors for the boxes.
43+
///
44+
/// Alpha channel is used for transparency for solid fill-mode.
4345
colors: [rerun.components.Color] ("attr.rerun.component_recommended", nullable, order: 2300);
4446

4547
// --- Optional ---

crates/store/re_types/definitions/rerun/archetypes/capsules3d.fbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ table Capsules3D (
4747
quaternions: [rerun.components.PoseRotationQuat] ("attr.rerun.component_optional", nullable, order: 2200);
4848

4949
/// Optional colors for the capsules.
50+
///
51+
/// Alpha channel is used for transparency for solid fill-mode.
5052
colors: [rerun.components.Color] ("attr.rerun.component_recommended", nullable, order: 2300);
5153

5254
// --- Optional ---

crates/store/re_types/definitions/rerun/archetypes/cylinders3d.fbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ table Cylinders3D (
4444
quaternions: [rerun.components.PoseRotationQuat] ("attr.rerun.component_optional", nullable, order: 2200);
4545

4646
/// Optional colors for the cylinders.
47+
///
48+
/// Alpha channel is used for transparency for solid fill-mode.
4749
colors: [rerun.components.Color] ("attr.rerun.component_recommended", nullable, order: 2300);
4850

4951
// --- Optional ---

crates/store/re_types/definitions/rerun/archetypes/ellipsoids3d.fbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ table Ellipsoids3D (
4545
quaternions: [rerun.components.PoseRotationQuat] ("attr.rerun.component_optional", nullable, order: 2200);
4646

4747
/// Optional colors for the ellipsoids.
48+
///
49+
/// Alpha channel is used for transparency for solid fill-mode.
4850
colors: [rerun.components.Color] ("attr.rerun.component_recommended", nullable, order: 2300);
4951

5052
// --- Optional ---

crates/store/re_types/definitions/rerun/archetypes/mesh3d.fbs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ namespace rerun.archetypes;
99
/// If there are multiple [archetypes.InstancePoses3D] instances logged to the same entity as a mesh,
1010
/// an instance of the mesh will be drawn for each transform.
1111
///
12+
/// The viewer draws meshes always two-sided. However, for transparency ordering
13+
/// front faces are assumed to those with counter clockwise triangle winding order (this is the same as in the GLTF specification).
14+
///
1215
/// \example archetypes/mesh3d_indexed title="Simple indexed 3D mesh" image="https://static.rerun.io/mesh3d_indexed/57c70dc992e6dc0bd9c5222ca084f5b6240cea75/1200w.png"
1316
/// \example archetypes/mesh3d_instancing title="3D mesh with instancing" image="https://static.rerun.io/mesh3d_leaf_transforms3d/c2d0ee033129da53168f5705625a9b033f3a3d61/1200w.png"
1417
/// \example archetypes/mesh3d_partial_updates !api title="Update specific parts of a 3D mesh over time" image="https://static.rerun.io/mesh3d_partial_updates/79b8a83294ef2c1eb7f9ae7dea7267a17da464ae/1200w.png"
@@ -36,12 +39,16 @@ table Mesh3D (
3639
// --- Optional ---
3740

3841
/// An optional color for each vertex.
42+
///
43+
/// The alpha channel is ignored.
3944
vertex_colors: [rerun.components.Color] ("attr.rerun.component_optional", nullable, order: 3100);
4045

4146
/// An optional uv texture coordinate for each vertex.
4247
vertex_texcoords: [rerun.components.Texcoord2D] ("attr.rerun.component_optional", nullable, order: 3200);
4348

4449
/// A color multiplier applied to the whole mesh.
50+
///
51+
/// Alpha channel governs the overall mesh transparency.
4552
albedo_factor: rerun.components.AlbedoFactor ("attr.rerun.component_optional", nullable, order: 3300);
4653

4754
/// Optional albedo texture.
@@ -50,6 +57,8 @@ table Mesh3D (
5057
///
5158
/// Currently supports only sRGB(A) textures, ignoring alpha.
5259
/// (meaning that the tensor must have 3 or 4 channels and use the `u8` format)
60+
///
61+
/// The alpha channel is ignored.
5362
albedo_texture_buffer: rerun.components.ImageBuffer ("attr.rerun.component_optional", nullable, order: 3400);
5463

5564
/// The format of the `albedo_texture_buffer`, if any.

crates/store/re_types/src/archetypes/boxes3d.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/store/re_types/src/archetypes/capsules3d.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/store/re_types/src/archetypes/cylinders3d.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/store/re_types/src/archetypes/ellipsoids3d.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/store/re_types/src/archetypes/mesh3d.rs

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)