Skip to main content
Question

Adding colour to 3D Geometries where the colour code is stored as an attribute value


Forum|alt.badge.img

Screenshot 2021-06-02 103136I am trying to add solid colours to elements in a 3D model. Each element in the 3D model has an attribute where I have stored the hex code for the colour of that given element.

 

I can't seem to get the colour to work - I have tried using the the apearance Styler followed by the appearance setter but it quite often says that the colour codes are invalid - or if they are valid nothing changes

5 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • June 2, 2021

AppearanceStyler uses RGB values ranging from 0 to 1.

For this reason White ffffff 255,255,255 has to be converted to 1,1,1 or Blue-ish 00aaff 0,170,255 to 0,0.666667,1.

When you set the color manually, AppearanceStyler auto-converts it to the right value after you click OK but if you set it via attribute you have to normalize the RGB values.


Forum|alt.badge.img
  • Author
  • June 2, 2021
caracadrian wrote:

AppearanceStyler uses RGB values ranging from 0 to 1.

For this reason White ffffff 255,255,255 has to be converted to 1,1,1 or Blue-ish 00aaff 0,170,255 to 0,0.666667,1.

When you set the color manually, AppearanceStyler auto-converts it to the right value after you click OK but if you set it via attribute you have to normalize the RGB values.

Hi @caracadrian​ 

 

Thank you for the quick response!

 

I have since converted my hex values to RGB values and normalised these so that they are between 0 & 1 - however all features are still being rejected by the AppearanceSetter with the fme_rejection_code: EXTRA_APPEARANCE_FEATURE.

 

Do you know what this menas and how I can fix it?

 

Thanks!


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • June 2, 2021
izz88 wrote:

Hi @caracadrian​ 

 

Thank you for the quick response!

 

I have since converted my hex values to RGB values and normalised these so that they are between 0 & 1 - however all features are still being rejected by the AppearanceSetter with the fme_rejection_code: EXTRA_APPEARANCE_FEATURE.

 

Do you know what this menas and how I can fix it?

 

Thanks!

As in the screenshot of your workspace, AppearenceStyler is not fully configured (note the red cog on the transformer).

Can you supply a sample of your data and/or your workspace?


Forum|alt.badge.img
  • Author
  • June 4, 2021
izz88 wrote:

Hi @caracadrian​ 

 

Thank you for the quick response!

 

I have since converted my hex values to RGB values and normalised these so that they are between 0 & 1 - however all features are still being rejected by the AppearanceSetter with the fme_rejection_code: EXTRA_APPEARANCE_FEATURE.

 

Do you know what this menas and how I can fix it?

 

Thanks!

Hi @caracadrian​ 

I have attached a sample of my data and workbench.

 

Thanks for your help!


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • June 7, 2021
izz88 wrote:

Hi @caracadrian​ 

 

Thank you for the quick response!

 

I have since converted my hex values to RGB values and normalised these so that they are between 0 & 1 - however all features are still being rejected by the AppearanceSetter with the fme_rejection_code: EXTRA_APPEARANCE_FEATURE. 

 

Do you know what this menas and how I can fix it? 

 

Thanks!

I can't read your gdb sample with the GDB OPEN API. 

FileGDB Reader: Feature class 'Beams' has shape type 'esriGeometryMultiPatch' which is unknown to FME. Skipping feature class

Try setting Appearance Name in AppearanceStyler to ObjectType attribute, then do the same in AppearanceSetter.

Also, Appearance Join Attribute and Geometry Join Trait are important in most cases.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings