Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Material colors

Please login with a confirmed email address before reporting spam

Hi,
how do can we add colors to materials? I would like the copper to be brown, epoxy green and so on. It makes things much easier to understand that I assigned the correct materials to each domain. Also I would like to have a "nice" image (i.e with colors) of the geometry to export in pdf.
I cannot find this feature in the material menu.

Thanks very much,
Sebastien Murphy

16 Replies Last Post Jan 16, 2018, 4:35 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 14, 2014, 1:22 a.m. EDT
Hi Sebastien,

Once a material was added to the model, you can go to the bottom of its properties and find the Appearance options (see the screenshot).

Best Regards,
Dima.

--
Dima Apter
www.a2z-consulting.com
Hi Sebastien, Once a material was added to the model, you can go to the bottom of its properties and find the Appearance options (see the screenshot). Best Regards, Dima. -- Dima Apter www.a2z-consulting.com


Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 14, 2014, 3:19 a.m. EDT
Hi,
thanks for you answer. ok this is done but I cannot have the objects displayed and filled with the colours when plotting eg streamlines or a result of a computation (actually I can never manage to display with colours). See screenshot.
Cheers,
Sebastien
Hi, thanks for you answer. ok this is done but I cannot have the objects displayed and filled with the colours when plotting eg streamlines or a result of a computation (actually I can never manage to display with colours). See screenshot. Cheers, Sebastien


Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 14, 2014, 3:43 a.m. EDT
Hi,

You can make the following steps:
1. Go to Results -> Data Sets -> Right click on the Solution -> Duplicate
2. Right click on the duplicated solution -> Add selection -> Select the domain/boundaries that you want to color
3. Plot Surface plot (any kind of surface plot), go to Data set of the Surface plot and select the duplicated solution from the list
4. Go to Coloring and Style tab, select Uniform color and choose the color
5. Go through the procedure for every material you want to color

Best Regards,
Dima.

--
Dima Apter
www.a2z-consulting.com
Hi, You can make the following steps: 1. Go to Results -> Data Sets -> Right click on the Solution -> Duplicate 2. Right click on the duplicated solution -> Add selection -> Select the domain/boundaries that you want to color 3. Plot Surface plot (any kind of surface plot), go to Data set of the Surface plot and select the duplicated solution from the list 4. Go to Coloring and Style tab, select Uniform color and choose the color 5. Go through the procedure for every material you want to color Best Regards, Dima. -- Dima Apter www.a2z-consulting.com

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 14, 2014, 4:11 a.m. EDT
Hi,
ok getting there (see screenshot). But I cannot superimpose with streamlines. When I click on streamline the colours disappear and it goes back to transparent.
Just another general question. This method is a kind of workaround, there is then no way to use the colours I assigned to the materials for the solutions. Is there a way to actually display the material with its assigned colours even without superimposing the solutions. In other words what is the use of having material colours?

Thanks,
Sebastien
Hi, ok getting there (see screenshot). But I cannot superimpose with streamlines. When I click on streamline the colours disappear and it goes back to transparent. Just another general question. This method is a kind of workaround, there is then no way to use the colours I assigned to the materials for the solutions. Is there a way to actually display the material with its assigned colours even without superimposing the solutions. In other words what is the use of having material colours? Thanks, Sebastien


Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 14, 2014, 4:20 a.m. EDT
This is the only method i know. Hopefully someone will show us another one.

Plot both the streamlines and the surface plot under the same 3D plot group. Probably it will solve the problem.

--
Dima Apter
www.a2z-consulting.com
This is the only method i know. Hopefully someone will show us another one. Plot both the streamlines and the surface plot under the same 3D plot group. Probably it will solve the problem. -- Dima Apter www.a2z-consulting.com

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 14, 2014, 4:35 a.m. EDT
yes ok thanks very much for you help this works.
But yes this is fine if you only have two objects to select but off course becomes impossible when the model will be more complicate. If someone knows a way to do this by simply using the assigned material colours it would be great (I mean there should be a way, otherwise what is the point in having material colours?).

Cheers,
Sebastien
yes ok thanks very much for you help this works. But yes this is fine if you only have two objects to select but off course becomes impossible when the model will be more complicate. If someone knows a way to do this by simply using the assigned material colours it would be great (I mean there should be a way, otherwise what is the point in having material colours?). Cheers, Sebastien


Please login with a confirmed email address before reporting spam

Posted: 9 years ago Jan 24, 2015, 5:40 p.m. EST
Here I am also puzzling how to make material colors appear. I draw a block. I make it copper. How can I make it copper colored? Can colors be seen BEFORE solving anything? I see some examples in the COMSOL docs where material color appears, but it's always done after a solution is calculated.

I mean, what's the point of material colors if you can't see them :)

[If I asked COMSOL support, I'd bet you a nickel they'd tell me its a problem with my video driver and my configuration is unsupported for some reason. That's there usual answer for every issue I raise. But seriously, how can I see material colors?]
Here I am also puzzling how to make material colors appear. I draw a block. I make it copper. How can I make it copper colored? Can colors be seen BEFORE solving anything? I see some examples in the COMSOL docs where material color appears, but it's always done after a solution is calculated. I mean, what's the point of material colors if you can't see them :) [If I asked COMSOL support, I'd bet you a nickel they'd tell me its a problem with my video driver and my configuration is unsupported for some reason. That's there usual answer for every issue I raise. But seriously, how can I see material colors?]

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Jan 24, 2015, 5:47 p.m. EST
I found it in the preferences. I cliked Options->Preferences->Graphics and Plot->Show Material Color and Texture (which seems to be unchecked by default) and Voila! Color! Another COMSOL mystery solved!
I found it in the preferences. I cliked Options->Preferences->Graphics and Plot->Show Material Color and Texture (which seems to be unchecked by default) and Voila! Color! Another COMSOL mystery solved!

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Nov 12, 2015, 6:08 p.m. EST

I found it in the preferences. I cliked Options->Preferences->Graphics and Plot->Show Material Color and Texture (which seems to be unchecked by default) and Voila! Color! Another COMSOL mystery solved!


Unfortunately, this does not work for me. I've toggled the "Show Material Color and Texture" option, and I've toggled the appearance settings of various materials in several of my models, and none of it has any effect. The objects in my graphics window simply remain default grey color.

I've always worked around this issue with annoying convoluted approaches like those described earlier in this thread, but I'd really like to have the materials appearances actually behave as I assume they should.

If anyone else has attempted to make COMSOL display material appearances in the graphics window, please share your experiences.
[QUOTE] I found it in the preferences. I cliked Options->Preferences->Graphics and Plot->Show Material Color and Texture (which seems to be unchecked by default) and Voila! Color! Another COMSOL mystery solved! [/QUOTE] Unfortunately, this does not work for me. I've toggled the "Show Material Color and Texture" option, and I've toggled the appearance settings of various materials in several of my models, and none of it has any effect. The objects in my graphics window simply remain default grey color. I've always worked around this issue with annoying convoluted approaches like those described earlier in this thread, but I'd really like to have the materials appearances actually behave as I assume they should. If anyone else has attempted to make COMSOL display material appearances in the graphics window, please share your experiences.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Nov 13, 2015, 10:59 a.m. EST
Hello KG et al. ,
I will admit that this befuddled me for a while too, until I noticed that the documentation (Reference Manual, version 5.1, page 549) says
"APPEARANCE
The settings in this section make it possible to control or change the default appearance of a material in the Graphics window when working in the materials or physics parts of the model tree."

In other words, you will not see the material colors and textures displayed in the Graphics window unless you have selected a node from the Physics branch or Materials branch of the model tree.
I hope this helps.
Best,
Jeff
Hello KG et al. , I will admit that this befuddled me for a while too, until I noticed that the documentation (Reference Manual, version 5.1, page 549) says "APPEARANCE The settings in this section make it possible to control or change the default appearance of a material in the Graphics window when working in the materials or physics parts of the model tree." In other words, you will not see the material colors and textures displayed in the Graphics window unless you have selected a node from the Physics branch or Materials branch of the model tree. I hope this helps. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jan 4, 2016, 6:29 p.m. EST
Is there also a way to just color certain boundaries in a plot?
I would like to highlight the boundaries where i applied a boundary condition but they are rom the same material as the rest of the geometry.

Thanks in advance!

Rafael
Is there also a way to just color certain boundaries in a plot? I would like to highlight the boundaries where i applied a boundary condition but they are rom the same material as the rest of the geometry. Thanks in advance! Rafael

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jan 5, 2016, 11:30 a.m. EST
Yes, you can do that by creating suitable datasets (and selections). See www.comsol.com/blogs/include-geometry-surfaces-solution-plots/ for instance for step by step instructions.
Jeff
Yes, you can do that by creating suitable datasets (and selections). See http://www.comsol.com/blogs/include-geometry-surfaces-solution-plots/ for instance for step by step instructions. Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jul 19, 2017, 6:23 a.m. EDT
Jeff, can you answer me about how to colour device in application builder?

1. I have colored in materals branch my device.
2. Before, i used code for showing model like:
useView(model.view("view1"), "geometry/graphics1");
there is "geometry/graphics1" - my form and graphic name in Application builder.

Question:
How to change properly it's string for ability to show colourfull picture?

P.S. Variant like:
useView(model.materials, "geometry/graphics1");
and similar dosen't work.

Thanks.
Jeff, can you answer me about how to colour device in application builder? 1. I have colored in materals branch my device. 2. Before, i used code for showing model like: useView(model.view("view1"), "geometry/graphics1"); there is "geometry/graphics1" - my form and graphic name in Application builder. Question: How to change properly it's string for ability to show colourfull picture? P.S. Variant like: useView(model.materials, "geometry/graphics1"); and similar dosen't work. Thanks.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jul 19, 2017, 7:52 a.m. EDT
Hello Andrey,
I don't know the answer to that one off hand. Please contact COMSOL's support team for assistance: support@comsol.com .
Best regards,
Jeff
Hello Andrey, I don't know the answer to that one off hand. Please contact COMSOL's support team for assistance: support@comsol.com . Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jul 20, 2017, 7:09 a.m. EDT
It doesn't matter already.
I have solved it. I did use method from your previous post and simple pasted 3D plot group into graphic form in application builder. www.comsol.com/blogs/include-geometry-surfaces-solution-plots/
Thefore thanks.
It doesn't matter already. I have solved it. I did use method from your previous post and simple pasted 3D plot group into graphic form in application builder. https://www.comsol.com/blogs/include-geometry-surfaces-solution-plots/ Thefore thanks.

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Jan 16, 2018, 4:35 a.m. EST

Hi, This should solve your problem 3D Plot Group > Add Volume > in the volume Expression: material.domain

Hi, This should solve your problem 3D Plot Group > Add Volume > in the volume Expression: material.domain

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.