RC bug: Exporting las with normals, resulting file misses normals

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)

Hi jochemla,
thank you for noticing this. The bug was created.

1 Like

Thanks @OndrejTrhan for getting back so quickly, hope the bug-fix will get into a next RC release!

Note the official convention for storing Normals within LAS files is to use NormalX as shown on this reply

Hi there, is there any news regarding this las-export-with-normals bug? Thanks!

Hi, unfortunately there are no any news regarding this.

1 Like