POV-Ray : Newsgroups : povray.general : How to change ambient RGB of a material within Blender (for POV-ray)?? Server Time
22 Dec 2024 12:13:05 EST (-0500)
  How to change ambient RGB of a material within Blender (for POV-ray)?? (Message 1 to 4 of 4)  
From: tmelram
Subject: How to change ambient RGB of a material within Blender (for POV-ray)??
Date: 5 Jul 2020 05:30:00
Message: <web.5f019cb0565cae5882a53c400@news.povray.org>
Hi. I'm working on an animation project and I'd to use Blender in conjunction
with POV-Ray (as the renderer ). Blender's POV Ray plugin is generally very
accurate but there is one thing that I'd like to be able to change within
Blender for POV Ray: The ambient rgb(ambient color)

 Blender uses a single number between 0 and 1 for the ambient rgb which means it
can only use grayscale values as the ambient color/ambient rgb values. So, if
wanted to say, create an orange sphere with blue-tinted shaded areas+shadows
(both self and ones cast by other objects) I could not. I could always manually
edit the ambient rgb values in the .pov file Blender generates, but for an
animation(what I'm doing) some form of automation is pretty much imperative( for
the sake of time if nothing else).

 Now, there is the Custom-POV code option in but it has serious problem: The
"Custom POV Code" supposedly replaces with properties of the material with your
own POV-Ray code. This works well enough for normal materials, but when image
maps/UV mapping is used, the custom POV-Ray code essentially makes whatever
changes made in the "Texture tab" of Blender  null and void and this reflects in
the texture section of the .pov file Blender generates.

How the texture section normally looks:

#declare MAT_Material_001 =
texture{
        pigment {
            pigment_pattern {
            uv_mapping image_map{png "C:/Users/MYPC/Documents/alpha_map.png"
map_type 0  interpolate 2 }scale <1,1,1> translate <0,0,0>}
            pigment_map {
                [0 color rgbft<0,0,0,1,1>]
                [1 uv_mapping image_map {png
"C:/Users/MYPC/Documents/diffuse_map.png" map_type 0  interpolate 2 } scale
<1,1,1> translate <0,0,0>]
            }
        }
        finish {shader_Material_001}
        pigment {pigment_pattern {uv_mapping image_map{png
"C:/Users/MYPC/Documents/alpha_map.png" map_type 0  interpolate 2 }scale <1,1,1>
translate <0,0,0>}
            pigment_map {
                [0 color rgbft<0,0,0,1,1>]
                [1 uv_mapping image_map {png
"C:/Users/MYPC/Documents/diffuse_map.png" map_type 0  interpolate 2 } scale
<1,1,1> translate <0,0,0>]
            }
        }
        finish {shader_Material_001}
    }
    texture_list {
        1
 texture{MAT_Material_001}
    }


But when using "Custom POV-Ray code" in the materials tab of Blender
it becomes... this:



#declare MAT_Material_001 =
texture{
        finish { brilliance 1.8 phong 0.5 phong_size 25.2 diffuse 0.8 0 ambient
rgb <3,0.2,0.2> emission 0 conserve_energy }
    }
    texture_list {
        1
 texture{finish { brilliance 1.8 phong 0.5 phong_size 25.2 diffuse 0.8 0 ambient
rgb <3,0.2,0.2> emission 0 conserve_energy }}
    }
    face_indices {

....So that's out.

What do you think I should do to allow Blender to edit the three ambient rgb
values of material without affecting thee texture map section? Would this
involve modifying Blender's material editor to have three "sliders" for ambient
RGB colors?

Thanks in advance.


Post a reply to this message

From: William F Pokorny
Subject: Re: How to change ambient RGB of a material within Blender (for POV-ray)??
Date: 5 Jul 2020 08:23:30
Message: <5f01c642$1@news.povray.org>
On 7/5/20 5:26 AM, tmelram wrote:
> Hi. I'm working on an animation project and I'd to use Blender in conjunction
> with POV-Ray (as the renderer ). Blender's POV Ray plugin is generally very
> accurate but there is one thing that I'd like to be able to change within
> Blender for POV Ray: The ambient rgb(ambient color)
> 
> 
You perhaps need one of the blender guys, but there is in 
global_settings {} an option called ambient_light which you can set. 
Say, ambient_light color rgb <0.7,0,0> such that the all ambient colors
in a scene get multiplied by that value.

If you are not using radiosity and the emission finish components have 
the rgb sliders/settings you need, perhaps using emission over ambient 
and option.

You could also add a low intensity shadowless light of the color tint 
you want, but it would be applied to all surfaces. Everything would be 
tinted. Negative shadowless lights an option too which - depending - 
might give you better control.

Note ambient >0 is applied as an adder to the resultant color everywhere 
in much the way a shadowless light is. Meaning, you'll get a less 
visible tint in lit areas too with the ambient_light option. This can be 
compensated for somewhat by tweaking your normal light source colors.

Bill P.


Post a reply to this message

From: tmelram
Subject: Re: How to change ambient RGB of a material within Blender (for POV-ray)??
Date: 5 Jul 2020 11:10:00
Message: <web.5f01ec835e5ead4382a53c400@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> You perhaps need one of the blender guys, but there is in
> global_settings {} an option called ambient_light which you can set.
> Say, ambient_light color rgb <0.7,0,0> such that the all ambient colors
> in a scene get multiplied by that value.
>
> If you are not using radiosity and the emission finish components have
> the rgb sliders/settings you need, perhaps using emission over ambient
> and option.
>
> You could also add a low intensity shadowless light of the color tint
> you want, but it would be applied to all surfaces. Everything would be
> tinted. Negative shadowless lights an option too which - depending -
> might give you better control.
>
> Note ambient >0 is applied as an adder to the resultant color everywhere
> in much the way a shadowless light is. Meaning, you'll get a less
> visible tint in lit areas too with the ambient_light option. This can be
> compensated for somewhat by tweaking your normal light source colors.
>
> Bill P.

No, you misunderstand.  I mean the ambient rgb for the "finish" of an object,
not the scene's overall ambient_light rgb.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: How to change ambient RGB of a material within Blender (for POV-ray)??
Date: 6 Jul 2020 07:10:00
Message: <web.5f03056f5e5ead43301204190@news.povray.org>
"tmelram" <taj### [at] yahoocom> wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
> > You perhaps need one of the blender guys, but there is in
> > global_settings {} an option called ambient_light which you can set.
> > Say, ambient_light color rgb <0.7,0,0> such that the all ambient colors
> > in a scene get multiplied by that value.
> >
> > If you are not using radiosity and the emission finish components have
> > the rgb sliders/settings you need, perhaps using emission over ambient
> > and option.
> >
> > You could also add a low intensity shadowless light of the color tint
> > you want, but it would be applied to all surfaces. Everything would be
> > tinted. Negative shadowless lights an option too which - depending -
> > might give you better control.
> >
> > Note ambient >0 is applied as an adder to the resultant color everywhere
> > in much the way a shadowless light is. Meaning, you'll get a less
> > visible tint in lit areas too with the ambient_light option. This can be
> > compensated for somewhat by tweaking your normal light source colors.
> >
> > Bill P.
>
> No, you misunderstand.  I mean the ambient rgb for the "finish" of an object,
> not the scene's overall ambient_light rgb.

There is also a "default" keyword:

default {
    finish {
        ambient color rgb <0.7, 0.0, 0.0>
    }
}

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.