I recently created a tutorial for my office that describes how to use terrestrial scan data (captured using a Leica scanner) to create a 3D surface model. I thought I'd share it here in case it's helpful for someone. You will need the following software: Leica Cyclone, LASTools, 3dsMax, and Recap.
LASTools is not free, but available for trial use. Download LASTools here:
http://www.cs.unc.edu/~isenburg/lastools/
Extract the downloaded folder, open the bin folder and take a look at its contents. You will find numerous executables. Each .exe file runs a specific process for your scan data. You will be using several of these. LASTools’s GUI is not the most user friendly, but it works well. Put the LAStools folder somewhere easy to find. Every time you run the program you must go to the folder and open the .exe. You will be doing this often.
The process begins, not surprisingly, in Cyclone. Create a new Modelspace in Cyclone that will be used for topography only. Think about the precision and density you need for architectural details. Now completely disregard those habits. A good topo does not need nearly as much density density or precision. More importantly, there’s a serious limit on the number of points lasground_new will accept (lasground_new is the program that will classify the bare earth points). I don’t know the exact number of points lasground_new will take, but I had failures until I reduced the cloud I was working with to 28m points. Small right? But if all goes well that should be plenty for a good topo. I think I read somewhere that lasground_new would accept 150m, but I could not get it to process anywhere near that amount.
Work in Cyclone to start reducing the number of points you have. A good workflow for this is:
- Hide all clouds that do not contain topography or relevant information. For example, turn off architectural interiors.
- Delete bad points- sky shots, points way out of range
- Merge all relevant Clouds (obviously do not include the clouds you have hidden)
- Unify Clouds with 0.01m decimation. You may want to experiment with different settings, but I found 0.01m (1cm) to be a good amount. You will do a more aggressive decimation in LAStools, so do not thin the cloud too much in Cyclone. Note: Unify Clouds creates an ungridded pointcloud that can’t be exported as [ptx i think] and you will lose scan positions. This is perfectly fine for our purposes, but something to be aware of. The last Modelspace I exported I exported had 169,124,250 points. Yours can be larger as you will decimate it more in lasthin.
- Select all points and export as a .txt (I had errors in LAStools using .pts, .ptx, and e57. .txt works without issue). Set number of columns to 6. Use Red, Green, Blue (in that order) for columns 4, 5, 6. To do this click inside “Value Type” row and a drop down will appear. To avoid future errors and some complexity, I am intentionally leaving intensity out of the .txt file (intensity is represented a number of different ways depending on the file format, for example, -2048 to 2048, or 0 to 1, which causes errors if not properly scaled when creating a .las, and it isn’t needed to create a topo).
Open txt2las.exe
It may take a little while to get used to the LAStools GUI, but it’s pretty straightforward.
In txt2las:
- Open the browse tab. Change the directory to match where the .txt file you just created is located. Click “go” to go to the drive, navigate to your file and double click the file. It should now appear in the upper box.
- Under “output...” click the “...” button and choose a destination folder. You can select USE CURRENT and the output file will be saved in the same folder as the input file.
- Under “more attributes...” select “(R)ed color”, “(G)reen color”, and “(B)lue color”.
- Above the “RUN” button choose .las (Recap doesn’t recognize .laz, but it will import .las)
- Click “RUN”. If you cannot find the run button, close some tabs. It’s probably hidden.
- After clicking “RUN” a dialog should open that looks like the second image below.
- Click START. If there are no errors, you will have a newly created .las file in the folder you specified as the output directory.
Open lasthin.exe
- Browse to the .las you just made.
- Set output folder and add an appendix to your file. For this guide, let’s use “_thin”
- Set the grid size to .01 and make sure “remove points” is selected
- In the “keep” drop-down select “random”
- Change format to .las
- RUN and then START
Let’s take a look at what your thinned cloud looks like and get the number of points.
Open lasview.exe
- Browse to the .las you just made. It ends with the appendix “_thin”.
- Under “window size” select “1600 by 1200”
- Set “color by” to “rgb”
- VIEW and START
- The navigation control of the viewer is a bit clunky, but everything is there. Toggle the navigation method with the space bar. Left-click drag on the mouse to navigate.You should see a pointcloud with only a small fraction of the points you had, but one that still has a lot of definition and includes trees, vegetation, and buildings. This is the final decimation before finding the ground points.Note the number of points. This is shown as “# of points:” in the left tool pallette of lasview. If lasground_new.exe fails in the next step return to lasthin.exe and decimate more by increasing the grid size. Below is my thinned pointcloud of Bloede Dam, with 28,758,365 points (730,194 kb), shown in lasview. It’s ready for lasground_new.exe.
Open lasground_new.exe
- Open [your file name]_thin.las file, set output dir
- Add “_ground” as the appendix
- Use “wilderness” and “hyper” settings
- Output as .las
If the program fails, reduce the “hyper” setting to “ultra”. Lower this setting until it works. If it continues to fail you may have too many points in your cloud. If you had no errors, the program found all the ground points and created a new file with all ground points classified as “2”!
Take a look at how well the program did and if you are happy with the results. Open lasview again. This time, under “color by”, choose “classification.” You should see something that looks like the image below. The ground classification was orange when I looked at my pointcloud colored by classification.
You’re almost done with LAStools. Two modules to go. We need to export a pointcloud that contains only the ground points.
Open las2las.exe
- Select your latest file. [your file name]_thin_ground.las and set output dir; set output format to .las
- Create an appendix of “_only”
- Under “filter” > “by classification or return” choose “keep_classification”
- Type “2” in the “number or value” input box. This specifies ground as classification to keep.
- Click ADD
- RUN and START
You should now have a point cloud with only ground points! It’s time to begin creating a surface.
Open las2tin.exe
- Browse to [your file name]_thin_ground_only.las and set output dir
- In the “format” drop-down change the format to “.obj”
- Check “extra-pass”
- RUN and START
If that all went well, you are done with LAStools. It’s time for 3dsMax. You need 3dsMax because the tin you just created, although it contains good data, is likely a craggly mess. There may be ways to use las2tin to create a smoother tin, but 3dsMax gives you total control over the appearance and has numerous smoothing tools and the ability to add to, and manipulate the surface by hand.
Open 3dsMax
- Import > .OBJ > [your file name]_thin_ground_only.obj (uncheck flip yz axis). Below is a screenshot of what my TIN looked like. You can see there are a lot of errant spikes and is just generally pretty jagged. That's ok. We'll fix that.
- Import [your file name]_thin_ground_only.las in Recap. Save it as a .rcp file. Insert that .rcp in your 3dsMax scene. Make sure the pointcloud and your TIN are lined up and scaled correctly. I am not explaining this step very much, but there is a lot of online help on inserting a pointcloud into 3dsMax.
- Under the modify tab select the vertex tab. I start moving some of the worst outliers into line with the pointcloud.
- Working from the top view, create a plane with about 500-600 length and width segments. If you go higher, this will seriously affect how long the next step takes. In my experience, a 1000 X 1000 plane can take 24hrs to conform. 500 X 600 might take 10-30 minutes. Under the create tab select “Compound Objects”. Select the plane you just created and then select “Conform”. Make sure you are in top view. Under “Pick Wrap-To Object” select “Copy”. Click “Pick Wrap-To Object” and now select your topo. Wait.
- Once the conform process completes. You should be left with a much smoother and ordered surface. It likely varies from the pointcloud underlay in many spots though. Modify the surface by hand until it satisfactorily lines up with the pointcloud. My favorite tools are soft select combined with the move tool and the freeform modeling tools (relax brush, create). Walking you through 3dsMax is more than I can cover here, but there are many online tutorial that should get you started. Below is my final surface with 3D dam included. Good luck!