Question

Modify existing appearance on geometry

  • 19 March 2020
  • 3 replies
  • 10 views

Hello,

 

 

I am having problems modifying existing appearances on geometry.

 

 

I have an FBX file (no textures, only mesh colors) that i want to get the appearance from, do some changes on the diffuse, emissive, ambient and so on. This I have managed with an AppearanceExtractor node then do the changes in from a pythonCaller.

 

 

Now the problem I have is I don´t know how to append the newly modified appearances to the geometry again. I guess i should use the AppearenceSetter node, but I don´t know how to get an attribute from the geometry to join on.

 

 

 

Does anyone know the solution to this problem?

3 replies

Badge +2

Hi @cool-guy-samuel,

Are the appearances that you want to set currently stored as attributes on the features? If so, you may want to use the AppearanceStyler.

You may also want to consider setting the Group By parameter in the AppearanceSetter if you want to apply the appearance to certain groups. In the screenshot above, I had 320 features that were being separated into 5 color groups based on the CLASS attribute which gave me an output like this:

Hi @cool-guy-samuel,

Are the appearances that you want to set currently stored as attributes on the features? If so, you may want to use the AppearanceStyler.

You may also want to consider setting the Group By parameter in the AppearanceSetter if you want to apply the appearance to certain groups. In the screenshot above, I had 320 features that were being separated into 5 color groups based on the CLASS attribute which gave me an output like this:

Hi, Thanks for the reply.

 

 

The appearances is not stored as attributes on the features. Is it possible to expose the appearance to an attribut? I cant find a node for it. Or even get the appearance name would be enough, then I could follow your example.

 

 

Or is there another way so solve my problem.

 

What i want to do is to change all the appearances values for all features. So that the values is changed to its former value power of 2.19 (this is what I do in the python node now).

 

 

Example:

 

A feature has an appearance with the diffuse appearance value of 1, 0.3, 0.5 before modification.

 

1^2.19 = 1

 

0.3^2.19 = 0.07

 

0.5^^2.19 = 0.22

 

So the end result for the modified appearance would be 1, 0.07, 0.22.

 

 

Badge +2

Hi, Thanks for the reply.

 

 

The appearances is not stored as attributes on the features. Is it possible to expose the appearance to an attribut? I cant find a node for it. Or even get the appearance name would be enough, then I could follow your example.

 

 

Or is there another way so solve my problem.

 

What i want to do is to change all the appearances values for all features. So that the values is changed to its former value power of 2.19 (this is what I do in the python node now).

 

 

Example:

 

A feature has an appearance with the diffuse appearance value of 1, 0.3, 0.5 before modification.

 

1^2.19 = 1

 

0.3^2.19 = 0.07

 

0.5^^2.19 = 0.22

 

So the end result for the modified appearance would be 1, 0.07, 0.22.

 

 

It looks like you should have them exposed as attributes as you are already using the AppearanceExtractor so perhaps it is just the join on piece that is missing. You should be able to join on an attribute that is common between the appearance and the geometry.

Reply