Apply different colours to individual mesh facets

Hi,

I would like to know if it is possible to colour different facets of a mesh (STL) individually in ParaView?

The context is that I have an STL file with N (>1000s) facets and an associated text file complete with N RGB colour values. Is it possible to apply the RGB value to each corresponding facet?

Many thanks,
Patrick

Yes, uncheck “Map Scalars” in the representation properties.

Thank you Mathieu for your quick reply! Forgive my ignorance, but where would I find “Map Scalars”? I have attached a screenshot of my view for reference.

Many thanks,
Patrick

Its an advanced option, click on the cogwheel or search for it in the search field

Thanks Mathieu for your reply.

I unchecked map scalars, but am unsure about how exactly to apply the RGB values to the rendering. I have tried to add the RGB CSV to ParaView but an unsure about how to map it to the mesh (the files I am using are attached: test.stl and test_facecolors.csv)

Does ParaView support RGB values in the attribute bytes of every triangle? RE: https://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL
I have tried this approach according to the VisCam and SolidView spec (see attached test_rgb_binary.stl) but not had any luck so far. Any help would be appreciated!

Many thanks,
Patrick

test.stl (1.1 MB)
test_rgb_binary.stl (245.7 KB)
test_facecolors.csv (417.6 KB)

Is this what you are looking for, it is assuming your triangle order in the stl are the same as your data order in the csv ?

Since you are separating your stl form your color information, this is quite complex to do with standard ParaView filter:

a

You can also easily do that with a programmable filter instead if you want.

Thank you Mathieu, yes this is exactly the desired output, thank you for your help!

As you said, I am currently separating the colour information from the stl file, would there be a better or recommended way to store this data to combine the two?

Thanks again,
Patrick

I think stl can store data information, you may want to use that.