Element Override Color In View and Sort panels by color range

Hi Dynamo Rockstars,

I followed a couple of tutorials about mapping images onto surface, but encountered an issue. Element.OverrideColorInView is not working.

What I want to do ultimately is sort panels into three based on the color ranges and then apply three different curtain wall panels to each.

If you can share your insight, that will be greatly appreciated!

That node overrides revit elements. You’re currently feeding in Dynamo surfaces. If you’d like to color the surfaces in Dynamo, try the “Display.ByGeometryColor” node. Otherwise, you’ll need to create the elements in Revit first. You could use the “Wall.ByCurveAndHeight” node to generate some curtain walls. ( tho it seems it’s having some problems with the positioning of the walls)

 

2016-03-01_10-29-35

Dimitar, Thank you for feedback. I re-built it as you guided, but still can get it done. Can you review dyn file and its screenshot please? Thank you for big help in advance.

WALL TEST

The list structure of the colors and the elements must be identical for this to work. (i.e. 10 sub-lists of 4 items each). Note that I needed to shift the colors list a bit because the lunchbox node and the “Image.Pixels” node sort their divisions differently.

 

Once you figure out your list structure, you can start playing with the resolution of the panels:

 

Dimitar, Thank you so so much for reviewing! Listing faces and color are what I missed. Now I started to understand that logic based on your guide. Can I ask you for another advice if you don’t mind? What I want to do ultimately is to sort out divided faces out of a single surface per color range (for instance, 4 color ranges) and assign the 4 different panel types to each sorted color range. Each panel type is located to the specific location per color range. So originally I began with curtain wall and CW panel…, but it didn’t worked out as I wish… I am so sorry for keep asking questions. If you can suggest a novel way to figure this out, I learn precious lessons from an expert like you, which is greatly appreciated.

Hi Youngjin,

One red might seem like another to us but to a computer they are quite different. The main problem with grouping the panels by their color is that every single color ends up being a unique hue. The only way to group objects by a value is if they share some commonality. Therefore you’ll either need to use a simpler input image or roundup the color values (and loose some accuracy) to cut down the unique color types to just 4.

 

After some very aggressive rounding, the best that I could do was bring down the total unique values from 24 to 6. However, as you can see from the image below, this came at the cost of the overall accuracy. Our result is now quite different from the initial input:

 

Dimitar,

Thank you for help greatly! Your point that the only way to group objects by a value is through some commonality makes perfect sense.

In the second image above you mentioned that the total unique values were brought down from 24 to 6 after rounding. How (by which node) did you round them? and what is the input of node “List.UniqueItems” in the second images?

If accuracy doesn’t matter that much, your approach is very successful. Next step, however, is to assign the 6 different panel types to each sorted color range. Each panel type is located to the specific location per color range (here it is 6). I suspect that it may be impossible to do that in this model because it is done by “Display.ByGeometeryColor” node so the actual faces (panels) are not divided physically. I am wondering what your opinion and suggestion are…

Thank you so much for precious advice in advance.