Hi there,
Bug Report: When doing an export via RC of a Model as a pointcloud to a las file, checking the Export vertex normals
does not behave as expected. The resulting las file should include normals as an extra dimension (or extra byte in las terms), but instead it stores only XYZ, RGB, and no signs of normals per point.
Normals can be stored per point for a las
file using extra dimensions (or Extra Bytes) - different naming conventions exist, see this thread. The standard naming convention (and that used by PDAL) seem to be NormalX
- while other include nx, normal_x, normalx, normal x
.
Reading/Writing such fields can be done using PDAL
. Example PDAL for writing normals within a las file is based on adding the property "extra_dims": "all"
to the writers.las
filter. All variations of "extra_dims": "nx=float, NormalY=double, normal_Z=float"
also do work, and they end up in the las file having fields nx, NormalY, normal_Z
- but preferred way would probably be NormalX
.
[
{
"type": "readers.ply",
"filename": "ply-with-normals.ply"
},
{
"type": "writers.las",
"filename": "las-pdal-with-normals.las",
"extra_dims": "all",
"extra_dims_also_working": "nx=float, NormalY=double, normal_Z=float"
}
]
The above PDAL pipeline result in the following extra bytes.
C:> LASTools\bin\lasinfo.exe las-pdal-with-normals.las
lasinfo (221128) report for 'las-pdal-with-normals.las'
reporting all LAS header entries:
file signature: 'LASF'
version major.minor: 1.2
system identifier: 'PDAL'
generating software: 'PDAL 2.5.6 (Releas)'
header size: 227
offset to point data: 857
number of point records: 3269820
scale factor x y z: 0.01 0.01 0.01
offset x y z: 0 0 0
min x y z: -120.03 -107.38 -2.27
max x y z: 83.05 81.43 66.85
variable length header record 1 of 1:
user ID 'LASF_Spec'
length after header 576
description 'Extra Bytes Record'
Extra Byte Descriptions
data type: 9 (float), name "NormalX", description: "X component of a vector normal t", scale: 1 (not set), offset: 0 (not set)
data type: 9 (float), name "NormalY", description: "Y component of a vector normal t", scale: 1 (not set), offset: 0 (not set)
data type: 9 (float), name "NormalZ", description: "Z component of a vector normal t", scale: 1 (not set), offset: 0 (not set)