Trimble Business Center

 View Only

 Heat Map - color map based on slope percent

Jeff Tourangeau's profile image
Jeff Tourangeau posted 01-11-2023 08:26
I'm looking for a way to create what we call heat maps - that is a color coded map based on the percent slope of a 3-D surface.  Can this be done in TBC, or other suggestions?

Thanks,
Jeff Tourangeau
Rob Davidson's profile image
Rob Davidson
Only feature I'm aware of 'Shade by slope range' property of a surface, but this is limited to one range.

As a work around for a one-off scenario (I wouldn't want to repeat often), you could create copies of the surface ('Offset surface' works well), one for each slope range. Define the 'Shade by slope range' and 'Shading' properties of each surface to achieve the overall Slope Heat Map.
Ronny Schneider's profile image
Ronny Schneider
I've been tinkering on a macro for this during the last few evenings.
As always unzip the attached file somewhere in "C:\ProgramData\Trimble\MacroCommands". The ZIP-File also contains a sample CSV and Surface Color Mapping file.

I found 4 ways to tackle this.

1. the worst solution to start with, create a new DTM with flat triangles, but their elevation representing the slope of the originals
    • Pro:
      • working just with DTM data, in theory no large overhead
      • you can use the normal Surface Color Mapping
    • Con:
      • visual representation makes mostly sense in 2D-Plan-View
      • since we need near vertical steps the original triangles need to be shrunk and the triangulation process will create extra, near vertical, ones; that leads to a lot more triangles in the resulting surface and maybe performance issues
      • biggest con is that TBC’s Color Mapping algorithm isn’t accurate, in the following example mapping is set to start with color blue at exactly 30.0, but the surface with less than that is already blue

2. recolor the DTM triangle itself, is done by applying a material to each triangle

    • Pro: low overhead and quick when only a few different materials are used, but that leads to hard color steps
    • Con: if smooth colors are needed then a lot of materials with different colors need to be created, MSI manager and drawing might become slow
3. create closed and filled Linestrings
    • Pro: overhead stays the same no matter of using hard steps or interpolated colors
    • Con:
      • Linestrings have a large overhead; double up linework where triangles touch each other
      • 3D view can get pretty slow when used on large surfaces
      • you can set transparency on the filling but not on the linestrings, in that case you’ll get a wireframe look
4. create IFC Faces
    • Pro: lower overhead than Linestrings; and it also stays the same no matter of using hard steps or interpolated colors
    • Con:
      • no real way to export those manually created IFC objects
      • 3D view can get pretty slow when used on large surfaces

 
general instructions

- when using a CSV as input the format needs to be as follows, the header line must be included (but is information only)
Slope[%],R,G,B
0,0,255,0
5,255,190,0
- in case you use a CSV for recoloring a DTM with materials a new category and materials will be created in the MSI Manager
- when using the MSI Manager you need a material category, with materials where the name is the slope value (numbers only), and the color must be set accordingly

- as soon as the triangle slope is greater than the slope value in the CSV/Material that color is set
- to get rid of the set materials from the surface the best way I have found so far is

     delete that new texture manually straight away again, if the surface rebuild is set to “By User” you’ll have to manually trigger it, otherwise this resetting of the texture won’t show on the screen