POV-Ray : Newsgroups : povray.general : How to change ambient RGB of a material within Blender (for POV-ray)?? : How to change ambient RGB of a material within Blender (for POV-ray)?? Server Time
25 Apr 2024 14:51:34 EDT (-0400)
  How to change ambient RGB of a material within Blender (for POV-ray)??  
From: tmelram
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

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