FME Version
Files
-
- 3 MB
- Download
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.
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
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.
If you run the workspace and inspect the output, you will see that the swing set is part number 7:
4. Prepare the data: Add a Tester
To filter out just the swingset, add a Tester transformer after the Deaggregator.
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
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.
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…
On the Feature Type dialog that pops up, set the LAS File Name to Swings. Click OK.
The resulting workspace should look as follows:
7. Run the workspace
Run the workspace and view the output.
Here is the output point cloud:
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.
Comments
0 comments
Please sign in to leave a comment.