I tested out Tripo who can generate a 3D model from an image and ig gave me a GLB file.
So I opened it in Rhino 8 and it is a 200K mesh. All good, but a bit slow to open. Then I saved the file as a Rhino 7 file to test in my project. But it is so slow to move! Moving the object took 20 seconds in Rhino 7 and 3 seconds in Rhino 8.
I tried turning off the material textures, added a new material and assigned that, extracting the render mesh to see if that would help, but no matter what it still took that long.
So I wrote a script to see if there were any issues with the mesh, and it isn’t.
import rhinoscriptsyntax as rs
import scriptcontext as sc
mesh_id = rs.GetObject()
mesh = rs.coercemesh(mesh_id)
sc.doc.Objects.AddMesh(mesh)
This new mesh is fast, and I can assign the material to it, but now it has some strange seams going around here and there.
tripo_pbr_model.zip (7.1 MB)
Feel free to take a look.
I did notice that if I look at the mesh details in Rhino 8 it shows this:
mesh
ID: fd918a3b-5ed8-40b0-ad73-4d6cb9da1e17 (44)
Object name: tripo_mesh_3739e210-e09f-49a9-8347-b87c261ffc77
Layer name: Default
Render Material:
source = from obj
index = 0
Geometry:
Valid mesh.
Closed double precision polygon mesh: 152249 vertices, 278288 faces
Bounding box: (-0.251,-0.321,-0.474) to (0.246,0.323,0.468)
And if I do that in Rhino 7 then it shows this:
mesh
ID: fd918a3b-5ed8-40b0-ad73-4d6cb9da1e17 (54)
Object name: tripo_mesh_3739e210-e09f-49a9-8347-b87c261ffc77
Layer name: Default
Render Material:
source = from obj
index = 0
Geometry:
Valid mesh.
Closed double precision polygon mesh: 152249 vertices, 278288 faces
Bounding box: (-0.250643,-0.321343,-0.474207) to (0.245893,0.322961,0.467805)
Geometry UserData:
UserData ID: 480BCCF7-2887-4871-8385-B68894D4D9B8
description: Tibidabo Geometry Runtime Data
saved in file: no
copy count: 0
So Rhino 7 shows more data since I have Lands installed I guess. Maybe it would speed up the move thing, but it still doesn’t explain why my script duplicated mesh is so much faster…