Meshing And Saving To Disk Using The Hacksaw Feature

What Is Hacksaw?

  • The regular Meshing A Point Cloud and Saving Mesh To Disk workflows only work if the point and mesh data can fit comfortably in the working memory.
  • However, the point counts that SEQUOIA has to deal with can often go into the billions and meshing them all at once would require prohibitive amounts of RAM to hold the resulting geometry.
  • Hacksaw solves this problem by subdividing the point cloud’s bounding box into smaller spatial chunks (“cells”).
  • A Point Region Of Interest’s bounding box can also be taken into account when defining the Cells, so it is possible to process a subset of points using Hacksaw.
  • Each Meshing process creates its own Task in the Task Manager.
    • These Tasks can run in parallel depending on the number of cores and the Task Limit defined in the Main Menu > Options > Configuration > Advanced Level > CPU Normal Priority setting (default is 4).
    • Each Task on itself is multi-threaded. However, even a heavily multi-threaded Task cannot always saturate all cores to 100%, esp. on modern machines with dozens of cores. So running multiple Tasks in parallel ensures the CPUs are always busy!
    • The Tasks can also be distributable to multiple machines using Deadline.
  • All Meshing tasks write directly to mesh “Partitions” on disk - multiple mesh files sharing the same base name, but with a suffix _XXofYY where XX is the current partition number, and YY is the total number of partitions.
  • The partial Meshes are written in such a way that, if loaded together using a single Mesh Loader, or multiple Mesh Loaders, they can produce a continuous Mesh that looks the same as one generated in a single meshing process.
  • This includes taking into account smoothing information, and the Simplify Mesh settings.

Saving A Mesh From All Points Using Hacksaw

  • Create a Point Loader object and pick a valid point source file (.SPRT)
  • With the Point Loader object still selected, create a Mesher - it will be connected to the Point Loader automatically.
  • Expand the Hacksaw Settings rollout.
  • Enter the number of cells you would like to produce along each axis.
    • The default is 4x4x4 (64 cells in total), but this depends on the size of the point source’s bounding box, the density of the resulting mesh etc.
    • Let’s assume you want to mesh 2x2x2 - set all three sliders to 2.
  • You can check Use Custom Range if you want to save only a continuous subset of cells.
    • This can be useful if you need to continue meshing from a specific cell after cancelling a previous Hacksaw meshing task, or just to test a few cells before deciding on the necessary settings like mesh resolution, radius etc.
  • Press the [Save Object Space] or [Save World Space] button to start the Hacksaw Meshing
    • [Save Object Space] will save the Mesher data while ignoring the Mesher’s transformations - in order to load the Object Space results in the same location, the Mesh Loader would have to be transformed the same as the Mesher.
    • [Save World Space] will bake the Mesher’s transforms into the resulting output - to load World Space data in the same location as the source, the Mesh Loader only needs to be at the World Origin!
  • Enter the base name of the sequence in the save dialog.
  • All supported Mesh formats can be used to perform Hacksaw meshing, but .XMESH is the recommended format.
    • You can re-export the resulting combined Hacksaw mesh to a different format later, including welding the Cells to a continuous mesh in the process.
  • Once you confirm the file dialog, multiple Hacksaw Meshing Tasks will be added to the Task Manager
  • They will be combined in a rollout that is collapsed by default - you can expand it to monitor the progress of the sub-tasks.
    • Each Task will have its own [Cancel] button and can be cancelled individually.
    • There will be also a main [Cancel] button for the complete Hacksaw group of Tasks that can be used to cancel them all with one click.
    • If any Loading tasks are added to the Task Manager (for example if you create a Mesh Loader in the same or a different Document and pick an XMesh Partition from the ones currently being saved by Hacksaw!), it will be processed with higher priority than Hacksaw Meshing tasks! This way, you don’t have to wait for all Saving tasks to finish before you can explore the output.

Saving A Mesh Of A Fraction Of Points Using Hacksaw

  • You can use a Point Region Of Interest object to define the region to be meshed.
  • If a Point Region Of Interest object does not exist between the Point Loader and the Mesher, one can be easily inserted by pressing the [Insert Region Node] button.
  • Once the bounding box is adjusted, the Hacksaw processing can be launched as described above - only the points defined by the Point Region Of Interest will be considered by the Mesher and the Cells will subdivide the custom Bounding Box instead.

General Information About Loading Hacksaw Partitions

  • The Mesh Loader has an option to load one, all, or a user-defined range of Partitions and handle them as a single source.
  • The Mesh Loader will automatically degrade the viewport display by reducing some of the cells to vertex cloud, partial vertex cloud, or bounding box when viewport navigation is performed and the Frame Rate falls below a threshold (default is 30 fps).
  • The Mesh Loader can also degrade the static display of the mesh in the viewport even when no navigation is performed - a dedicated value/slider lets the user specify the maximum number of faces allowed to be displayed by all objects in the viewport.
  • Alternatively, you could select all mesh files stored in the Hacksaw output folder, and drag them into the Viewport to create an individual Mesh Loader for each partition. (In the case of XMESH, drag only the .XMESH files and ignore the .XMDAT files). However, this is not recommended as it is not possible to export a single mesh (if needed), the individual cells cannot be welded (if needed), and it is much harder to control the loading and display of the cells.

Loading A Hacksaw Mesh Using Mesh Loader

  • Create a Mesh Loader - you can do this in the same Document where the Hacksaw Meshing was performed, or in a different Document.
  • Pick any file from the Partition set.
    • Note that the file you pick will be loaded individually when loading of Partitions is disabled, so you can pick a cell that you feel would give you the most visual information without loading the rest.
    • In most cases though, you would pick the _01oYY_ Partition because it would be the first one to be saved.
  • Check the Multiple Partitions | Load checkbutton.
  • Optionally, if the resulting mesh is very heavy and/or your RAM of graphics card memory would be a limitation, you can change the Number To Load value to a lower value than the maximum number of Partitions.
    • For example, you can load the first 4 cells of 8 by entering 4 in the Number To Load.
  • You can also load a different subset by starting from a different cell.
    • For example, you can enter 3 as Start Index to load cells 3,4,5,6 if the Number To Load is still 4.
  • If the sequence requested is out of range, for example Start Index is 6, Number To Load is 4 and total count is 8, only 6,7 and 8 will be loaded as there is no cell 9. In other words, the range will be clamped internally.
  • Press the [Update Mesh] button to start loading data - you should see the multiple cells populating over time until the whole mesh is loaded.
  • If the Hacksaw Meshing Tasks are still running, you can keep on hitting F5 or [Update Mesh] from time to time to further load the incoming Partitions.