Creating Point Clouds from 3D Models

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

Converting 3D data into a point cloud can be useful for efficient data processing and transformations. Point cloud processing is optimized, and applying a data transformation to a point cloud often performs better than applying it to a large 3D model. Converting to a point cloud can also be useful if you wish to perform operations or create a model unsupported by the original format, or for use cases such as AR/VR, data visualization, modeling, and more.

This tutorial demonstrates how 3D models like SketchUp can be rendered into point clouds. In FME, the key transformer for this task is the PointCloudCombiner, which takes input geometries and combines them to output the data as a single point cloud.
 

Step-by-Step Instructions

In this scenario, we have a large 3D model of a house and yard in SketchUp format. We want to convert a section of the 3D model to a point cloud (LAS format) for quicker processing. We will use the PointCloudCombiner transformer to perform this conversion.

Download the files attached to this tutorial to follow along in the steps below. The workspace template, “Convert 3D Model to Point Cloud.fmwt”, shows the completed workspace. The SketchUp file, “3DHouse.skp”, is the source data.
 

sY4TsCQ7WQDExEkt5O83nXp48ORrPt_is0GjdZoPaH4l0XcMCOYGvXwFJX9CUnbGAY6kZqM_Jyh7iru57-yF1Jvr5X8e3-sax-It2Sy_7WkttR1KsHHJwtY68PhwjUd9XyZAw_Y
 

1. Start a new FME Workspace
Open FME Workbench and create a blank workspace.

2. Add a SketchUp reader
The first step is to read in the source data. Drag 3DHouse.skp onto the canvas or click Add Reader, and set the following parameters:

  • Format: Trimble SketchUp
  • Dataset: /<Path to data>/3DHouse.skp

Screenshot 2023-03-14 at 11.00.05 AM.png

3. Prepare the data: Add a Deaggregator
Next, we will prepare the data before sending it to the PointCloudCombiner. The data preparation steps will depend on the task you are trying to achieve; in this scenario, we want to extract a small part of the input dataset to convert to a point cloud—the swing set in the backyard.

Add a Deaggregator transformer after the reader feature type. This will break the 3D model into parts, distinguished by the unique _part_number attribute.

Screenshot 2023-03-23 at 10.54.31 AM.png

If you run the workspace and inspect the output, you will see that the swing set is part number 7:

Screenshot 2023-03-14 at 11.17.34 AM.png

4. Prepare the data: Add a Tester
To filter out just the swingset, add a Tester transformer after the Deaggregator.

Screenshot 2023-03-23 at 11.01.38 AM.png
Open the parameters and configure a Test Clause as follows to filter out part number 7:

  • Left Value: select the “_part_number” attribute
  • Operator: =
  • Right Value: 7

Screenshot 2023-03-14 at 11.19.55 AM.png



5. Add a PointCloudCombiner
Add a PointCloudCombiner transformer after the Tester. Leave the default parameters. This will accumulate similar attributes and space the output points at 1-unit intervals. You can change the Point Interval parameter to a larger number to speed up the processing time or a smaller number for fine-grained interpolation.

Screenshot 2023-03-23 at 11.06.25 AM.png


6. Add a LAS writer
Click Add Writer and set the following parameters:

  • Format: ASPRS Lidar Data Exchange Format (LAS)
  • Dataset: <Path to output folder>
  • LAS File Definition: Manual…


Screenshot 2023-03-14 at 11.25.29 AM.png

On the Feature Type dialog that pops up, set the LAS File Name to Swings. Click OK.

The resulting workspace should look as follows:

Screenshot 2023-03-23 at 11.12.01 AM.png

7. Run the workspace
Run the workspace and view the output.

Here is the output point cloud:
 

oAWkln76RLaEnI2tYkXDefa5T6K1lG8p0bpUpPKXQJm9X6Inl3RpE-cucXWw9mnclFXZNDt7MXC-NGt_VXJTvozPRu4U5Wbrds7Dji5KUyUMICEMJ9rAoY2VfWYdmt3biYVG8WA

We’ve successfully transformed an area of interest in a 3D SketchUp model into a point cloud for more efficient processing.
 

Troubleshooting

If the log window shows:

| WARN |Spacing parameter given for grid creation will produce a very large number
of points, consider increasing spacing


This warning is meant to alert you that your machine may take a while to run with your current settings. If you do find it taking too long, try adjusting the PointCloudCombiter’s Point Interval parameter to a larger number.
 

Additional Resources

[Tutorial] Working with 3D Data in FME
 

Data Attribution

The data used here originates from data made available by 3D Warehouse. It contains information licensed under the 3D Warehouse: General Model License Agreement.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.