Controlling ambient color of objects?

Is there a way to control the ambient color of objects? In this picture, for example, the shadowed areas on both spheres are the same color, which looks weird IMHO. How can I make the shadowed part of the red sphere dark red, and the shadowed part of the blue sphere dark blue? I’ve search the manual, the faq, and the forums and still haven’t found an answer.

http://zovirl.com/temp/ambient.jpg

for more accurate color diffusion you can use radiosity. take a little longer to render though. an icosphere makes a good emittor. just set the material to ‘emit’, make sure ‘radio’ is pressed in both material and render buttons, and you’re good to go. remember, the more polys your scene has, the longer it will take to render, but subdividing surfaces also produces a nicer outcome.

I was hoping for something that was friendlier to real-time rendering :slight_smile:

I would be interested to know what settings you are using btw, because your colors look a bit blanched. It really should not look dull like that.

It depends entirely on your lighting setup. I recreated your scene, used a spot as backlight and an area light as frontlight and I get different readings on the two spheres. You can see the RGB values by Leftclicking on the shadows in the render window.

%<

Don’t use the ambient settings in the world screen. just add some more lights

Oh I had the ambient cranked up. It looks better with more lights to provide better illumination…perhaps I should just go with that :slight_smile:

ah that would certainly explain the blanched look,…the ambient slider takes the color of the background, and adds it as light, so in your case, since your background is black, you were in effect subtracting color from your scene.

So just to confirm…

In some programs (Bryce, for example) materials have both a diffuse color and an ambient color. The ambient color can be seen in the shaded areas of an object. One would usually set the ambient color to a darker version of the diffuse color.

Blender does not have such a concept? Instead, extra lights are used to give a little light (and therefore diffuse color) in the shaded areas?

you can set how much ambient light the material recieves in the material buttons.

Alright, here is the effect I’m trying to achieve (slightly exagerated) See how the unlit areas are different colors?
http://zovirl.com/temp/ambient2.png

That scene has only a single point light and was rendered in the ogre 3d engine (http://www.ogre3d.org) Here are the material descriptions for the two spheres. Notice how the two materials have different ambient componenets. How do I do this in blender?


material red/SOLID/
{
  receive_shadows on
  technique
  {
    pass
    {
      ambient 0.473158 0.173158 0.158302
      diffuse 0.914957 0.234795 0.242981
      specular 0.500000 0.500000 0.500000 50.000000
      emissive 0.000000 0.000000 0.000000
    }
  }
}


material blue/SOLID/
{
  receive_shadows on
  technique
  {
    pass
    {
      ambient 0.173158 0.173158 0.455502
      diffuse 0.318546 0.328229 1.000000
      specular 0.500000 0.500000 0.500000 50.000000
      emissive 0.000000 0.000000 0.000000
    }
  }
}

As far as I know the ambient colour is set in the world buttons, therefore there would only be one ambient colour – the effect of which you have shown. Do do what you want you could use a ramp shader with the input set to shader or energy, then you can have full control of the colour in light and shadow. There was a video tutorial on ramp shaders if you do a search. Some examples are shown here.

http://www.blender3d.org/cms/Ramp_Shaders.348.0.html

GreyBeard

use different scenes ( and different world settings ) for different objects, and then link with ctrl L
<edit> never mind, tried it, doesn’t work.

I’m pretty sure the emit value of a material is the equivalent to the ambient colour. There are at least two ways to do what you want in Blender. One is simple 3 pt lighting, which I think was mentioned. Just a simple light in front and I used a hemi lamp behind:

http://www.geocities.com/ajr650/shadows.png

When you click the shadows, using left-click in the render window as someone mentioned, you find they are the colours associated with each sphere.

If you want to use a single light (not recommended), just use the emit value of the material set quite low. In this image, I have one light in front which casts a pitch black shadow on the red sphere as its emit value is zero but blue shadows appear on the blue sphere because its emit value is non-zero:

http://www.geocities.com/ajr650/shadows2.png

thanks for all the replies, that helps out quite a bit! :slight_smile: