I want to know how to colour the exported models

Hello everyone,
I find that the exported models have no color(STL format).How can I make exported models have colors,because I find many people can make colorful models.
Thanks to you all.

So, the STL standard format does not support colors. If you want to preserve color information when exporting, try exporting in another format such as OBJ.

Thank you for your answer,but when I export obj format, it still has no color.What is wrong with my operation?

Perhaps something like this will work: Script repository — 3D Slicer documentation

When you export to OBJ, you get two files, a .obj file which has the mesh information, and a .mtl file with the same base name which has the “material” information, which includes color. When you want to load into another program which can handle OBJ files, you need to load both the .obj and .mtl files. Depending on the program, the color may automatically be applied to the mesh in this case, or you may need to apply the loaded material to the loaded object.

I would recommend the SlicerOpenAnatomy extension for this. It can export models with color, transparency, hierarchy, and names preserved, to OBJ and glTF format.

Thank you, I have downloaded the extension, but I can’t click “export” after choosing model and format.

You need to select a segmentation or a folder that contains model(s).

Exporting a single model is not really meaningful (you can then simply save it instead of using OpenAnatomy exporter module), but if you want to do that anyway then go to Data module, create a folder, and drag-and-drop your model into that.

1 Like

THANK YOU! I have spent a lot of time on this :sob:

But I still have a small question, when the Tr in MTL is 1, I can’t see my model.Only when I manually change Tr to 0 can the color be displayed normally.Is there a solution to this problem?

Just a guess, but it would not be surprising if Tr stood for transparency, with 1.0 fully transparent (invisible), and 0.0 fully opaque. In that case, it would be the correct behavior if objects with Tr 1.0 were not visible at all.