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 16 gen 2018, 04:35 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 ago 2014, 01:22 GMT-4
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: 1 decade ago 14 ago 2014, 03:19 GMT-4
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: 1 decade ago 14 ago 2014, 03:43 GMT-4
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: 1 decade ago 14 ago 2014, 04:11 GMT-4
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: 1 decade ago 14 ago 2014, 04:20 GMT-4
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: 1 decade ago 14 ago 2014, 04:35 GMT-4
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: 10 years ago 24 gen 2015, 17:40 GMT-5
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: 10 years ago 24 gen 2015, 17:47 GMT-5
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: 9 years ago 12 nov 2015, 18:08 GMT-5

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: 9 years ago 13 nov 2015, 10:59 GMT-5
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: 9 years ago 4 gen 2016, 18:29 GMT-5
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: 9 years ago 5 gen 2016, 11:30 GMT-5
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 19 lug 2017, 06:23 GMT-4
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 19 lug 2017, 07:52 GMT-4
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 20 lug 2017, 07:09 GMT-4
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: 7 years ago 16 gen 2018, 04:35 GMT-5

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.