Skip to content

Add mesh thumbnails in modal #22

@AnuKritiW

Description

@AnuKritiW

Currently, the mesh preset modal displays a simple list of .obj filenames. It would be a nice quality-of-life enhancement to show a visual preview (thumbnail) for each mesh, helping users quickly recognize the shape or structure of a preset.


Problem

macOS Finder for example shows thumbnails for .obj files.
Similarly, I would like to generate a thumbnail for the modal.


Possible Solutions

  1. Pre-rendered thumbnails

    • Use a tool like Blender, Three.js, or WebGL/WebGPU to render the .obj files and export thumbnails as PNG images.
    • Store them alongside the mesh files (e.g. /public/mesh/thumbs/sphere.png)
    • Match image to .obj filename in the modal UI.

    Pros: Fast rendering, no runtime performance cost
    Cons: Requires manual or scripted generation step

Note: Optional Automation
Consider writing a small CLI or script that:

  • Loads .obj files
  • Renders them with a basic camera and lighting setup
  • Saves PNG thumbnails to /public/mesh/thumbs
  1. Live WebGL/WebGPU rendering

    • Dynamically render the .obj in a <canvas> thumbnail using Three.js or WebGPU when the modal opens.
    • Could support rotation or basic shading.

    Pros: Dynamic and always up-to-date
    Cons: Adds runtime complexity and GPU load

  2. Fallback: Filename-only (current behavior)

    • Keep using a list of file names with download/view icons only.
    • Acceptable default for MVP.

Metadata

Metadata

Assignees

Labels

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions