cc-archive/cccatalog-frontend

[Meta] 3D Model Support

zackkrida opened this issue · 2 comments

To bring 3d to cc search, there a few points to consider:

  • storing/reading model data
  • new api structure for different data types (will also apply to audio, video, etc.)
  • choosing a model viewer(s)

Storing Data

[needs ticket work]

To render 3d models we would need an endpoint similar to our image proxy which provides the file of each 3d model.

New API Structure

[needs ticket work]

Model Viewers

The main thing for us to determine is if we want to use a standard 3d rendering solution for all 3d models, or use one for every non-sketchfab model and the Sketchfab viewer for sketchfab models? would we rather be consistient, or offer enhanced functionality for Sketchfab models.

Vue 3D Model

  • Built on three.js and WebGL
  • Supports many formats:
    • JSON Model (.json)
    • OBJ Model (.obj)
    • OBJ + MTL (.obj + .mtl)
    • FBX Model (.fbx)
    • STL Model (.stl)
    • Collada Model (.dae)
    • PLY Model (.ply)
    • glTF Model (.gltf)
  • Easily extended/customized if needed (simple enough codebase to fork / copy)

SketchFab Viewer

The main con, as far as I can understand, is that only models hosted on Sketchfab can be shown in their viewer.

  • Very high quality viewer
  • API-based (less overhead for us)
  • " All major 3D file formats are supported"
  • Lots of advanced features:
    • AR support
    • PBR

@annatuma key takeaways are:

  • to use the sketchfab viewer, a model has to be saved on sketchfab. it can't be used with any arbitrary 3d model data.
  • the sketchfab viewer + api lets us show 3d models for sketchfab-hosted models without any changes to the catalog api.
  • we have to make api changes to show 3d models for non sketchfab models and/or to use the 'Vue 3D Model' library for some or all models.

Great, thanks for the preliminary research. Let's see what comes from our call with Sketchfab, and we can go from there.