Skip to content

Conversation

@joelreymont
Copy link
Contributor

Python implementation:

  • Replaced GLTF/trimesh loading with procedural primitive generation
  • Added functions to generate: cube, pyramid, sphere, icosahedron, grid
  • Removed trimesh and requests dependencies
  • Removed download_dataset.py (no longer needed)
  • Updated README to reflect procedural generation approach
  • Added command-line options for sphere subdivisions and grid size

Rust implementation:

  • Replaced GLTF parsing with procedural primitive generation
  • Added MeshPrimitive struct with Clone derive
  • Implemented same geometric primitives as Python version
  • Removed gltf and bytes dependencies
  • Updated README with new usage instructions
  • Added command-line options matching Python version

Geometric primitives demonstrate:

  • Colored Cube: per-vertex colors
  • Textured Pyramid: UV coordinates with checkerboard texture
  • Smooth Sphere: vertex normals for smooth shading
  • Icosahedron: flat shading (no normals)
  • Grid instances: transform hierarchy with translation, rotation, scale

Closes #1957

Copy link
Member

@grtlr grtlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think these changes are valuable, because they make the example more self-contained, so thank you very much for opening a PR!

There are a couple of things I think need to change though:

  • Create a single mesh and then re-use that with a different subsets of parameters (albedo_factor, albedo_texture, …) to reduce the amount of geometry code in the example.
  • I'm not really sure what the benefits of the Grid Meshes are, they use the same Transform3D archetype as the other logging calls. That being said, I don't think we need to cram instancing into this example.

Replaces GLTF file loading with procedurally generated geometric
primitives (cube, pyramid, sphere, icosahedron, grid) to better
demonstrate the Mesh3D archetype capabilities and clearly distinguish
it from Asset3D.
@joelreymont joelreymont force-pushed the 1957-raw-mesh-example branch from 2561c24 to 1449457 Compare November 11, 2025 10:40
@joelreymont
Copy link
Contributor Author

Please check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

raw_mesh example is misleading in that it loads gltf files

2 participants