Surface Heatmap Based on location of Objects

I was able to create a heat map based on the location of a single object. Essentially I created a UV map which measures the distance between each point and the object, drops it in a range and then color it accordingly. Works great!

The problem is that I am now trying to do the same for multiple types of the same object. In my example I chose a number of chairs by their category but it appears as it is only running the calculations for “Item 0.”

1 Like

Look into your list lacing and levels on the Geometry.DistanceTo node.

I have no experience in this but i find this really interesting!
Could you maybe share what you are trying to achieve with this script? (Just out of curiosity)

Thanks for the tip, I think I realized the what the issue was. Each node had 10 values (one for each piece of furniture. Therefore the color range node was incorrectly allocating a color to values. I think I need to parse the list so that each node finds the closest piece of furniture and the color range assigns a value based on that. I will experiment more this evening.

With COVID19 heavily impacting how offices are going to be laid out in the future I am helping our teams produce a way to graphically show highly dense areas that would promote gathering. Right now we are manually putting dots on a page in illustrator, which is effective but it ultimately is taking away from the time our designers spend designing new layouts. I’m hoping to put together some graphics that Revit/Dynamo can quickly spit out so our teams can iterate and present those iterations.

Interesting stuff for sure. I was playing around with the Path of Travel API to check how far things are from each other.

(And for those people out there who say, "people will just “sit farther from each other on their own”. This is still a cool exercise and use-case for computation).

3 Likes

Interesting concept! I could see how this is valuable for all sorts of things outside of COVID studies. I’m just getting started with Dynamo, but seeing things like this is very exciting!

I could still use some help on this… Maybe I’m not entirely understanding how the color range works… I’ve extracted the minimum values from the distance from point to geometry in an effort to assign it a color range based on how close each individual UV point is relative to the closest furniture object, but it still is only drawing the heatmap based on a single object. What am I missing here? Any help would be greatly appreciated.

heatmap test file.rvt (488 KB)
Heatmap_best guess.dyn (40.1 KB)

Out of interest what’s the figure circled when you only select 1 chair?

image

I’ve done something similar using a combination of Dynamo & QGIS
Mainly because the cluster heatmap graphics and colour ramps are built into QGIS- so it is very quick/easy

for some reason, the Autodesk screencast link might just give you a spinning wheel. The URL is https://autode.sk/2X6HN8A

1 Like

This number drops to 100, or more specifically the (# of points on the UV grid) * (# of furniture elements). I was hoping pulling the minimum of the list would give each UV point 1 value that could then be applied to a range and then have colors applied.

This looks interesting and potentially doable. I do not have any QGIS knowledge, would I be able to show this heatmap overlaid on a floor plan or would that have to be imaged and then composted?

Would be easier to tell what’s going on if you could show node previews after Geometry.DistanceTo. You should be pretty close though.

Here is all the node previews! Good to hear I’m getting close! Definition also attached.

Heatmap_best guess.dyn (40.1 KB)

Your list structure is still a little messy at Surface.PointAtParameter. I think the surface you’re using is a list so you have an extra level which may or may not be causing some problems. You also have to keep in mind that cross-product is going to give you a list of sublists, which is going to give you another level when checking DistanceTo.

Geometry.DistanceTo is giving you the wrong list structure for your surface UVs. Use list levels instead. You’re also using the values from all your locations rather than the minimums when you map your values and get the colors.


It’s not perfect yet, but it’s a lot closer.

And just FYI, I usually find it easier to use the points themselves rather than trying to map to a surface because you can just flatten the list of points and ignore any list structure or order.

2 Likes

Yes! This looks great… but for some reason I’m only getting the range in 1 direction… Trying to figure out what I’m doing wrong.

Make sure you check the box to keep the list structure as well.

1 Like

Yes, I think it is doable.
It’s a similar issue to generating it in Dynamo- the choice is basically vector information (such as coloured geometry) or raster (an image). It could be a numberic representation like this: