POV-Ray : Newsgroups : povray.general : question about light_source : Re: question about light_source Server Time
6 Oct 2024 09:52:50 EDT (-0400)
  Re: question about light_source  
From: CAS
Date: 20 Mar 2014 04:00:01
Message: <web.532a9fab7ece86556a92a3a00@news.povray.org>
"CAS" <sup### [at] cstnetcn> wrote:
> scott <sco### [at] scottcom> wrote:
> > > It is my code.Real image is a photograph.the value of each pixel in real image
> > > are like these:
> > > 0.220900
> > > 0.375800
> > > 0.375800
> > > 0.346500
> > > 0.277700
> > > 0.355800
> > > 0.396900
> > > 0.441800
> > > 0.442800
> > > 0.382300
> > > I doublt this statement "pigment {color rgb spectral}"is wrong.spectral is
> > > responsible to  "pov-ref.txt" which save the value of each pixel of real image.
> >
> > In general, writing "pigment{color rgb X}" does not mean the output
> > image will have a pixel value of X. The value X tells POV how diffusely
> > reflective the surface is, POV then uses the brightness of any lights,
> > the relative position of the objects and surface normals to calculate
> > what the pixel colour should be.
> >
> > If your goal is to match the brightness of POV's output with your photo,
> > then I suggest you simply add a multiplier to your light source and
> > tweak it until they match:
> >
> > #local FACTOR = 10.0;
> > light_source {<sun_x,sun_y,sun_z>
> >              color rgb <1.00229e-005,3.46021e-006,-5.65828e-007>*FACTOR }
>
> I have modified my code:
> " #local FACTOR = 10.0;
> > light_source {<sun_x,sun_y,sun_z>
> >              color rgb <1.00229e-005,3.46021e-006,-5.65828e-007>*FACTOR }"
> I find the result is the same as "light_source {<sun_x,sun_y,sun_z>
> >              color rgb <1.00229e-005,3.46021e-006,-5.65828e-007>",nor I mutiply 10
or 100,the result is not change.
I
> am so confuse!



"#version 3.7;
//camera information:
camera
{
angle  7.54371
location <camera_x,camera_y,camera_z >
look_at <0,0,0>
rotate <0,-31,0>
right x
up y
}
//light information:
light_source {<sun_x,sun_y,sun_z>
            color rgb <1.00229e-005,3.46021e-006,-5.65828e-007>
             }
//scene information:
#declare geom_file_name = "pov-xyz.txt";
#declare spec_file_name = "pov-ref.txt";
#declare n=o;
#fopen   Input_geom_file geom_file_name read
#fopen   Input_spec_file spec_file_name read
#while(defined(Input_geom_file Input_spec_file))
    #read(Input_geom_file,x1,y1,z1)
    #read(Input_spec_file,ref)
        sphere
        {
        <x1-center_x,y1-center_y,z1-center_z>, //sphere location
         1.55     //sphere radius
        finish {specular ref}  //sphere specular
        }
    #declare n = n + 1;
#end
"
Above is all my code in pov,my aim is to use illumination model (phong light
model) to calculate the light intensity of each point.I want to know if I want
to use phong model to calculate ,whether need I to define phong to tell pov to
calculate.my code is all above,how can I to define phong model to calculate,I
need to use specular to calculate light intensity of each pixel. And  "finish
{specular ref}" Is my write  right? Beg a help!


Post a reply to this message

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