Solved

I am working with a Revit model, I am trying to colour the model before creating a tileset. When I check the model in the FME Data Inspector I can see the colours in 2D but they are missing in 3D. And that's why I am not getting coloured tileset.

  • 27 October 2022
  • 9 replies
  • 8 views

Badge +4

imageHere is my colour setter. I also tried GeometryColorSetter and it worked, but the coloured output is too bad. Random colours are spread so badly. image @chrisatsafe​ @Hans van der Maarel​ @safesoftware safesoftware​ 

icon

Best answer by virtualcitymatt 28 October 2022, 14:09

View original

9 replies

Userlevel 4
Badge +26

Try using the AppearanceSetter instead. For 3D/Surfaces it tends to work better if you have an Appearance rather than a feature color. Feature colors tend to be more for vector features like lines and polygons

Badge +4

Try using the AppearanceSetter instead. For 3D/Surfaces it tends to work better if you have an Appearance rather than a feature color. Feature colors tend to be more for vector features like lines and polygons

@virtualcitymatt​  I tried AppearanceSetter but unfortunately, it is also applying colours only in 2D, not in 3D. In the data inspector visual preview, I can see colours only in 2D. The 3D one is still colourless. I have only surface geometries.

Userlevel 4
Badge +26

@virtualcitymatt​  I tried AppearanceSetter but unfortunately, it is also applying colours only in 2D, not in 3D. In the data inspector visual preview, I can see colours only in 2D. The 3D one is still colourless. I have only surface geometries.

Hmm, by default the AppearenceSetter applies geometry to those only in the 'Root Node' position. Maybe the structure of the geometries is a bit complex.

 

You can try changing the 'Geometry XQuery' parameter so that is matches what I have below. This should match all geometries going through the transformer

image

Badge +4

@virtualcitymatt​  I tried AppearanceSetter but unfortunately, it is also applying colours only in 2D, not in 3D. In the data inspector visual preview, I can see colours only in 2D. The 3D one is still colourless. I have only surface geometries.

@virtualcitymatt​ This query made some difference. I got it coloured this time in 3D as well. The only issue is it's generating it with a single colour, can I get 3-4 random colours?

image

Userlevel 4
Badge +26

@virtualcitymatt​  I tried AppearanceSetter but unfortunately, it is also applying colours only in 2D, not in 3D. In the data inspector visual preview, I can see colours only in 2D. The 3D one is still colourless. I have only surface geometries.

I see you are grouping by "UinqueID" - you could use an AppearenceStyler to define a custom style for each UniqueId. Or alternatively you can create groups with more features and use this. If you are using the AppearenceStyler you wont need to put anything into the AppearnceSetter - just pass the Appearence to the Appearence port.

image

Badge +4

Actually,imageimageimage I am using AppearanceStyler. I removed colours from AppearnceSetter. Getting the same result. It contains only one colour. image

Userlevel 4
Badge +26

Actually,imageimageimage I am using AppearanceStyler. I removed colours from AppearnceSetter. Getting the same result. It contains only one colour. image

Right - you will need to create your groups and colors in FME before running through the appearenceStyler. If you want to use random numbers you'll have to use a random number generator to create the RGB values.

image

Badge +4

@virtualcitymatt​ It worked. Thank you so much. I don't know why I didn't think of generating random colours using a AttributeCreator😂 . I learned something new. Thank you.

Userlevel 4
Badge +26

@virtualcitymatt​ It worked. Thank you so much. I don't know why I didn't think of generating random colours using a AttributeCreator😂 . I learned something new. Thank you.

Yeah - unfortunately for some reason you can't attribute values in the AppearenceSetter only the AttributeStyler which is a bit of a pain but this method works at least

Reply