About IPointCloudAccess.ReadPoints method

By Augusto Goncalves (@augustomaia)

Forge DevCon

First of all, early bird registration is due to end on April 15th, so you don't have much time to buy your ticket at the low cost of $499. If you're a student, you can come for FREE- just sign up for a student ticket using a .edu email address.We're still working on the agenda. Visit this link for a list of the classes we currently have planned.

Forge_devcon

IPointCloudAccess.ReadPoints method

After some discussions for specific questions asked by some developers, this blog post summarizes what have being discussed.

When drawing point cloud, Revit calculates the total number of points that can read in the current view and camera, divide the number into several blocks and ask the IPointSetIterator to fill the block by calling ReadPoints(). Revit keep asking for the points until all the blocks as filed or there no points returned. This happens for every view change or camera change. The ReadPoints() method implementation needs to case about the points returned to each call with consideration of LOD.

Most engines implemented the LOD. The figure below shows the context of calling readPoints, and a typical implementation of this interface. The rule is simple:

  1. The filter can be used to identify the volume of point cloud to be read.
  2. For each call of readPoints, it returns the denser points compared to last call.

This pseudo code is the abstraction from a REAL engine and it works well in Revit.

Image1


Comments

2 responses to “About IPointCloudAccess.ReadPoints method”

  1. Peter Wu Avatar
    Peter Wu

    Our engine may prepare more points than that Revit is asking. Revit seems to ask the number of pixels and assume that is the maximum points needed. But if point cloud engine feeds also points blocked by other points in the view, the number may increase substantially. But, because Revit will stop asking, it becomes the case that a sparse (or even patchy or mosaic) point display results.
    Is it possible to make Revit fetch more points for rendering. Especially when it comes to printing or DWF exporting where we usually expect to increase detail, it won’t work at all, because the more points you prepare, the less you actually get.

  2. Peter Wu Avatar
    Peter Wu

    When an engine feeds points in sequence of LODs, it would still stop at any number and leaves the display patchy or mosaic.
    When an engine does not order points in LODs, it would end up with totally uneven display with missing blocks here and there.
    Also IPointCloudIterator.ReadPoints when calling, does not tell which view is requesting the points. This makes it impossible for external point cloud engine to update each view with the matching points.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading