3D Mesh Plot for multiple objects from single Wavefront .obj file

Hi,

I have a single Wavefront .obj file and would like to generate a Plotly 3D Mesh Plot in R wherein all objects can be viewed together.
The Wavefront .obj file has multiple (i.e., 696) objects contained within it - this is reflected in the lines of the .obj file starting with o.

My ultimate goal is to generate a single 3D Mesh Plot wherein each separate object is uniquely colored and the hover text displays each object name. E.g., imagine a bike wherein the tires and frame are separate, uniquely colored objects in the same 3D Mesh Plot.

Perhaps I begin by creating a Mesh3D file for each object contained in the .obj file?

Any insight would be appreciated.

Thanks!

For anyone curious, I concluded that it takes too long to add more than 10 meshes to a single mesh 3d plot, i.e., this code chunk below was not computationally feasible due to my large (696) number of object shapes in the .obj file

library(plotly)
library(readobj)
objs <- read.obj("example.obj")

for (i in 1:length(objs$shapes)) {
  obj = objs$shapes[[i]];
  if (i==1) {
    p = plot_ly(type = "mesh3d",
    x = obj$positions[1,],
    y = obj$positions[2,],
    z = obj$positions[3,],
    i = obj$indices[1,],
    j = obj$indices[2,],
    k = obj$indices[3,])
    } else {
      p = add_mesh(p = p,
      x = obj$positions[1,],
      y = obj$positions[2,],
      z = obj$positions[3,],
      i = obj$indices[1,],
      j = obj$indices[2,],
      k = obj$indices[3,])
    }
  }
p

I ultimately opted to restructure the Wavefront .obj file such that it had only one object shape (i.e., the entire file) and such that each vertex also included RGB values. This allowed for the processing steps to more align with the work that @empet has demonstrated: b'Plotly Mesh3d from a Wavefront `obj` f | empet | Plotly'