Question

Find the roofs of 3D buildings

  • 17 April 2018
  • 4 replies
  • 30 views

Hello :)
  • Goal: My goal is to find the roofs of buildings.
  • Data: I have 3D representations of buildings in the obj format.
  • My idea is the following:
    • 3D Objects to Point Cloud.
    • Point Cloud to individual points.
    • Find their neighbours (here is a significant problem, because as far as I know, there's no 3D neighbour finder).
      • To do this I already tried the 3DBoundingBoxReplacer from the FME Hub, but that's not working on my points.
      • Another idea I had, was to rasterize or rather to create cubes from my points. But I don't know how to do that in FME.
    • Any points with no neighbours below them are considered roof points.

Do you think this is a doable workflow to get to the roofs of my 3D buildings? And do you have a cool idea how to solve the problem with the 3D point neighbours?Cheers, Natalie

4 replies

Userlevel 2
Badge +17

Hi @afsbrt,

I find a useful way to separate walls from roofs in 3D objects is to compare which way the surfaces are facing, using the vertex normals.

I am attaching a workspace usenormals.fmw, that illustrates how to use the GeometryValidator to generate vertex normals on your surfaces. It then uses the MeasureExtractor to extract the z component of the first vertex normal. If this value is less than .1, the surface is mostly vertical, and can be considered a wall. Otherwise, it is somewhat horizontal, and could be considered a roof (or ground) surface.

The z component range is from -1 (face down) to 1 (face up), with 0 being vertical. You may wish to change the value for vertical in the Tester to better suit your data.

This workspace will only work in FME 2018, due to newly added functionality.

Userlevel 2
Badge +17

Hi @afsbrt,

I find a useful way to separate walls from roofs in 3D objects is to compare which way the surfaces are facing, using the vertex normals.

I am attaching a workspace usenormals.fmw, that illustrates how to use the GeometryValidator to generate vertex normals on your surfaces. It then uses the MeasureExtractor to extract the z component of the first vertex normal. If this value is less than .1, the surface is mostly vertical, and can be considered a wall. Otherwise, it is somewhat horizontal, and could be considered a roof (or ground) surface.

The z component range is from -1 (face down) to 1 (face up), with 0 being vertical. You may wish to change the value for vertical in the Tester to better suit your data.

This workspace will only work in FME 2018, due to newly added functionality.

the same approach but I would use the PlanarityFilter (Expose Surface Normal: Yes) to perform both check planarity and compute surface normal if necessary.

 

 

Hi @afsbrt,

I find a useful way to separate walls from roofs in 3D objects is to compare which way the surfaces are facing, using the vertex normals.

I am attaching a workspace usenormals.fmw, that illustrates how to use the GeometryValidator to generate vertex normals on your surfaces. It then uses the MeasureExtractor to extract the z component of the first vertex normal. If this value is less than .1, the surface is mostly vertical, and can be considered a wall. Otherwise, it is somewhat horizontal, and could be considered a roof (or ground) surface.

The z component range is from -1 (face down) to 1 (face up), with 0 being vertical. You may wish to change the value for vertical in the Tester to better suit your data.

This workspace will only work in FME 2018, due to newly added functionality.

Great! Thank you both very much.

 

I'll let you know how it worked out.

 

 

Edit: In the end, I used multipatch features which already had an attribute for roof and wall surfaces.

 

 

Userlevel 2
Badge +17
the same approach but I would use the PlanarityFilter (Expose Surface Normal: Yes) to perform both check planarity and compute surface normal if necessary.

 

 

Ooh, I like that better. Hadn't seen that transformer before.

 

 

Reply