Contour large meshes extremely slow compared to V6

Contour when used on large meshes is extremely slow in WIP V7 compared to V6. Creating 32 contours took 25 seconds in V6, only one third of the contours were created after 210 seconds in V7 which is around 20 times slower… The 16 meshes have millions of faces. Details of the meshes are below.

Work In Progress (7.0.20238.17095, 8/25/2020)
Version 6 SR30 (6.30.20238.13311, 8/25/2020)

Rhino 7 SR0 2020-8-25 (Public Build, 7.0.20238.17095, Git hash:master @ defebadb557c3bb1b151dfdc6e49d76a420b64de)
License type: Commercial, build 2020-08-25
License details: Cloud Zoo
Expires on: 2020-10-09

Windows 10.0 SR0.0 or greater (Physical RAM: 16Gb)

Non-hybrid graphics.
Primary display and OpenGL: AMD Radeon HD 7700 Series (AMD) Memory: 2GB, Driver date: 8-16-2019 (M-D-Y). OpenGL Ver: 4.6.13559 Compatibility Profile Context 26.20.12028.2

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: Height

Vendor Name: ATI Technologies Inc.
Render version: 4.6
Shading Language: 4.60
Driver Date: 8-16-2019
Driver Version: 26.20.12028.2
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 2 GB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino WIP\Plug-ins\Commands.rhp “Commands” 7.0.20238.17095
C:\Program Files\Rhino WIP\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino WIP\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.0.20238.17095
C:\Program Files\Rhino WIP\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.0.20238.17095
C:\Program Files\Rhino WIP\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino WIP\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino WIP\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.0.20238.17095
C:\Program Files\Rhino WIP\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.0.20238.17095
C:\Program Files\Rhino WIP\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino WIP\Plug-ins\Displacement.rhp “Displacement”

mesh

ID: 626e40fe-dab0-4edb-828e-bc025f983bcb (6490)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull F
Render Material:
source = from obj
index = 0
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 385703 vertices, 576509 faces
Bounding box: (-29.863,-74.042,-39.537) to (148.606,11.257,64.888)

mesh

ID: 9c374b46-d8e6-419b-8b71-f897f19e713e (6491)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull F
Render Material:
source = from obj
index = 1
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 441138 vertices, 687583 faces
Bounding box: (-29.814,-74.195,-39.428) to (148.640,11.056,64.365)

mesh

ID: 95c415c5-6361-4be8-815f-e9f479a53c19 (6492)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull F
Render Material:
source = from obj
index = 2
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 370902 vertices, 543676 faces
Bounding box: (-29.949,-74.113,-39.017) to (148.634,11.248,64.933)

mesh

ID: 113d4d68-5122-44be-8738-fefc4ab7d387 (6493)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull F
Render Material:
source = from obj
index = 3
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 491731 vertices, 771633 faces
Bounding box: (-29.765,-74.264,-39.127) to (148.634,11.204,64.157)

mesh

ID: 09c96dc1-ebde-489f-8e27-ac564f258578 (6494)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull M
Render Material:
source = from obj
index = 4
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 470080 vertices, 797230 faces
Bounding box: (146.585,-80.895,-47.009) to (301.385,4.104,47.661)

mesh

ID: 94ecc9c0-d359-4e63-b372-2c315aa26ee1 (6495)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull M
Render Material:
source = from obj
index = 5
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 344945 vertices, 543974 faces
Bounding box: (146.585,-80.897,-46.917) to (301.406,4.069,48.179)

mesh

ID: 0fecbd04-1215-4636-b8b6-e2d58c633772 (6496)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull M
Render Material:
source = from obj
index = 6
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 350147 vertices, 548833 faces
Bounding box: (146.585,-80.660,-47.023) to (301.345,4.351,47.726)

mesh

ID: d5d837fe-f9c2-497f-85e3-6ab369d47ce5 (6497)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull M
Render Material:
source = from obj
index = 7
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 273576 vertices, 396291 faces
Bounding box: (146.605,-80.895,-46.854) to (301.412,4.198,48.241)

mesh

ID: 1de274df-7cc2-4c06-ac48-1913d9b93485 (6498)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull A
Render Material:
source = from obj
index = 8
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 298766 vertices, 475793 faces
Bounding box: (298.207,-80.181,-53.188) to (422.150,7.425,38.966)

mesh

ID: c82ba3b3-5517-47f5-bda2-89926e7f72e7 (6499)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull A
Render Material:
source = from obj
index = 9
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 400519 vertices, 667199 faces
Bounding box: (298.211,-80.349,-53.605) to (422.152,6.790,38.992)

mesh

ID: 657df5a1-4070-4191-852e-bc4c2fb44adf (6500)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull A
Render Material:
source = from obj
index = 10
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 349001 vertices, 567147 faces
Bounding box: (298.223,-80.304,-53.656) to (422.143,7.206,38.461)

mesh

ID: 4c5ef181-b3b9-459e-9fd8-7f69f59d9809 (6501)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull A
Render Material:
source = from obj
index = 11
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 282686 vertices, 432082 faces
Bounding box: (298.416,-80.417,-53.059) to (422.161,4.997,38.894)

mesh

ID: e6473ff6-e869-4355-993b-d0c5bb438229 (6502)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull S
Render Material:
source = from obj
index = 12
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 273051 vertices, 364527 faces
Bounding box: (416.992,-77.755,-54.812) to (514.822,8.895,36.893)

mesh

ID: 84686f5e-3b21-4b98-b49b-402a43e45e4e (6503)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull S
Render Material:
source = from obj
index = 13
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 280809 vertices, 367168 faces
Bounding box: (416.989,-77.906,-55.003) to (513.683,9.035,36.803)

mesh

ID: 1efdff27-421e-41fd-b7e6-c560aa7f1e38 (6504)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull S
Render Material:
source = from obj
index = 14
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 312749 vertices, 442259 faces
Bounding box: (417.005,-77.609,-54.793) to (514.556,9.268,36.889)

mesh

ID: 70667c11-7d6f-4a6c-8461-0e903ab114fe (6505)
Object name: (not named)
Layer name: SSMesh2.3dm::Mesh::Hull::Hull S
Render Material:
source = from obj
index = 15
Groups:
SSMesh2.3dm : Group05

Geometry:
Valid mesh.
Open double precision polygon mesh: 309012 vertices, 426691 faces
Bounding box: (417.016,-77.941,-54.826) to (514.046,9.234,36.788)

Mesh totals: 16 meshes, 5634815 vertices, 8608595 polygons

I updated the video driver before someone told me that it was old:
Vendor Name: ATI Technologies Inc.
Render version: 4.6
Shading Language: 4.60
Driver Date: 5-15-2020
Driver Version: 26.20.15029.27017
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 2 GB

I tested with the updated driver and it did not make any difference which is what I expected. Time to complete the Contour command in WIP in V7 was 470 seconds compared to 25 seconds in V6 - 18 times longer. This signficantly impacts my workflow.

Hi David @davidcockey

I’m very interested in knowing more about this.
The mesh intersector is new, and might need some tweaks in order to make the intersection computation faster for this case.

Can you give me some info?
I’m trying to setup a similar scene but to know for sure, I’d need to have your case.

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

@piac The collection of meshes I am intersecting have over 80 million faces. I can provide a sample but the file with the meshes is close to 1GB so too big to upload. The meshes are large but no larger than what I’ve been using for seven or eight years.

A difference in speed of almost 20 times iindicates something needs to be fixed.

@piac Attached is a file with a small version of the meshes I use. MeshExample.3dm (6.5 MB)
.
To simulate a larger mesh I used Array to create 10 copies in the x direction. I then used Contour selecting all the copies of the mesh. The speed difference between V6 and V7 was large though I did not time it.

If I use Contour on a single instance of the mesh the speed difference between V6 and V7 is noticeable but not as significant as with larger meshes

This is a significant regression and needs to be added to YouTrack. An almost twenty times increase in execution time from the current version for a command like Contour indicates a problem with the new code. 25 seconds to contour a very large mesh is acceptable. Over 10 minutes is unacceptable.

@piac mentioned a new mesh intersector. I seemed to see a similar problem with MeshSplit but did not spend time verifying it.

I downloaded and tested yesterday’s WIP download. The problem remains the same.

Hi David @davidcockey

this is a very important issue for me, rest assured that it’s being looked at. Luckily, it appears to be the case that the particular case that you mention (array of several of these triangulated meshes) can be sped up significantly, actually making it the same as the Contour, but with more precision.

I will create a YT item before the fix is released. I haven’t added a YT because I needed to investigate alternative possible fixes.

One thing is important for me to know. In your sample mesh, you have a small mesh (that gets arrayed). Is this the typical case, where you have several “smaller” patches spread in several directions, rather than a single big patch?

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

@piac Thanks for the update. I’m used to seeing YT items created when a problem is reported and before the fix is identified.

The sample mesh I uploaded is a small portion of one of the larger meshes I’m currently working with. A file with the larger meshes would be several hundred MB, too large for me to upload. The source of the meshes is .obj files created by Metasape. Typically the meshes consist of several patches. The output from the List command for the large meshes is attached. ListMeshes.txt (104.6 KB)

Let me know if you need any other information or if I can otherwise assist.

You can send files that are quite big to me via PM and a Dropbox/Google Drive link, and also using this tool here: https://www.rhino3d.com/upload

A YT issue is reported usually when different people work on the same thing. Here you have the advantage (or disadvantage? :smiley: ) of directly speaking to the developer.

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

@piac I am attempting to upload an example mesh .3dm file using the link you provided. It is over 100 MB so it will probably take close to an hour to upload.

1 Like

Hi David @davidcockey. I’ve mentioned this in our PM thread, but I’m also writing it here.

RH-60340 should be fixed in the new WIP. The new WIP should now use less memory than any previous version, and should also be faster at constructing Contours. There is also significant improvement using MeshSplit directly with a plane or curve.

Thank you for your report; I would be grateful if you could state any comments when you get around to trying this.

Giulio


giulio@mcneel.com

Looks good now. Thanks!

1 Like