Possible Bug - My material color won't change

This is in Material Preview shading mode. As you can see the colors chosen in the nodes do not correspond the one showing in the viewport for the sphere. Same thing for the Object Properties/Viewport Display. If I apply a 2 nodes material then it’s ok. But there is something with these set of nodes that won’t pass the color chosen in the nodes to the object. It did belong to a more complex set of nodes. This one is a simplified iteration (for troubleshooting).
Screenshot from 2020-04-11 14-59-58

This is in Solid shading mode:
Screenshot from 2020-04-11 15-09-40

Can someone pls inspect the .blend file?
Thanks guys!
badmaterial.blend (833.8 KB)

I also noticed that if I slide the left Gradient tick to the right, THEN I can see that tick color in the object (which is what I needed). I really don’t need a gradient, I just wanted a means to have a solid color here, but I didn’t find any other way.
I would mark this as a Solution, but I would not be surprised if someone else had a better solution, so I’ll leave it like this for now…

I don’t really understand what you are wanting to achieve. What colour are you expecting the object to be? If you don’t need a gradient then unplug the ColorRamp node. If you have a colour in mind then you could also just unplug the MixRGB node and set whatever colour you want directly in the Diffuse material node itself.

So sorry for the lack of information John, you are totally right in feeling this way.
What I did not say is that originally this set of nodes had an Image Texture shader with Alpha, it was plugged to Color 2 in the Mix RGB node. It’s a small image, like a decal. I needed Color 1 to be a solid color that changes from object to object.
I hope it makes more sense now.

What was plugged into the Factor of the Colour Ramp? Something like Object Info Random to pick a slightly different colour for each object? It’s late, but I still can’t even work out where the browny yellow ochre type colour comes from in Solid shading mode

Nothing was plugged there. That yellow ocher I picked it manually, it was one of many different colors I tried while I was troubleshooting the issue.

I think I don’t understand your question.
First screenshot corresponds to Material nodes, which you will see in Material Preview and Rendered modes. The second screenshot where the yellow sphere is shown is the color you chose to viewport color on Viewport Display item under Material tab. You will only see that color in Solid mode, not in Material Preview and not in Rendered mode.

Ah… it took me a while to even work out where to find that. Under Viewport Display in the Materials tab. It has absolutely no influence on how an object is rendered in Material Preview shading mode or Rendered mode. That’s simply a way of colour coding things for Solid mode. If you want to use that colour you have to specify it in the node editor.

In this example, the red colour chosen for Viewport Display will never have any influence on the actual material or how it is rendered. It’s just to make things easier in Solid mode if you want to colour code things to find them easier

Thank you guys! I do understand the difference and purpose of the Viewport Display and the other colors. My mistake was to expect to see the color of my obj changing even while I was using the Preview mode.
So just to bring this to a closure, assuming there is an Image Texture node on Color 2 of the Mix RGB node, can we say that the solution was to move the left color tick in the Color ramp node to the right? Or is there a better way?

If you want colour 1 to change from object to object, but you want it to be from a select number of colours, then just set up those colours in the Color Ramp but change the Color Ramp to Constant. Then you will get one of the colours rather than something from a gradient between colours


So, in my example, you’d get either red, green or blue but never something inbetween them

It would be good to better understand you if you show a clear example of what you want to achieve.
Meanwhile you can read some of these results:

Yes, I like your solution better. I like the idea of narrowing the choices down to a few colors.
Thank you John :slight_smile:

1 Like

I will have a look, thank you YAFU :slight_smile: