POV-Ray : Newsgroups : povray.general : some confusions about pov Server Time
27 Dec 2024 17:34:37 EST (-0500)
  some confusions about pov (Message 1 to 7 of 7)  
From: CAS
Subject: some confusions about pov
Date: 21 Mar 2014 01:50:00
Message: <web.532bd21e3834290d6a92a3a00@news.povray.org>
Hey,my name is miaoyu, I am a student,and I am studying pov to do my graduation
project.I have confronted some confusions,please give me a help,expecting your
replying!Greate gratitudes!

1: how does pov calculate the value of each pixel of final image? My
understanding is :using the irradiance and surface properties to calculate the
value of each pixel of final image. Using the simplistic Phong lighting model to
calculate the color of each pixel of final image.I didnot set related "phong"
statements but also get a result.my codes are given below,I beg you have a check
whether it is true.Emphasisly,my reflection is BRDF(dependent on suning
angle、viewing angle 、wavelength).I use "specular X".Is it
right?

2: I know irradiance 1.08279W/(m2*nm).I have converted XYZ to the values of
color rgb using formula,my conversion formula is:
r=(3.2406*3.815429E-06)+(-1.5372*1.523114E-06)
g=(-0.9689*3.815429E-06)+(1.8758*3.815429E-06)
b=(0.0557*3.815429E-06)+(-0.2040*3.815429E-06)
but the value of b is negative,it must be something wrong in it.I only know the
solar irradiance is 1.08279W/(m2*nm),not know what color the light_source,so how
can I code with it? "color rgb 1.08279 "must be wrong?

3: HDR image is a image of scene,its dynamic range is generally more than 100:
l,and record each pixel which value is real scene brightness (CD/m^2).so I
regard it as radiance.is it right?

Below is my all code:
"#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

Beg a hot!
                                                                      miaoyu


Post a reply to this message

From: Warp
Subject: Re: some confusions about pov
Date: 21 Mar 2014 10:06:06
Message: <532c474d@news.povray.org>
CAS <sup### [at] cstnetcn> wrote:
> 1: how does pov calculate the value of each pixel of final image?

Via raytracing. Mathematical rays are "shot" from the "camera" towards
the (mathematically defined) scene geometry, and intersections between
this ray and the surfaces are calculated. Then the normal vector and
texture of the surface at that point are calculated, and its color from
them.

> My
> understanding is :using the irradiance and surface properties to calculate the
> value of each pixel of final image. Using the simplistic Phong lighting model to
> calculate the color of each pixel of final image.I didnot set related "phong"
> statements but also get a result.

The "phong lighting model" has nothing to do with "phong highlights".
The latter is one algorithm to calculate (simplistic) highlights, and
you can use it, or another, or none at all.

The "phong lighting model" means that the color of the surface at a given
point is calculated by taking the texture color at that point, adding a
possible (fixed) ambient color to it, multiplying it with a diffuse
component (which is calculated from the direction and intensity of light
sources), and adding a specular component to it (which is calculated
similarly, but with a different algorithm that also takes into account
the direction of the incoming ray.)

POV-Ray also supports a few alternative lighting models that can be
added to that.

-- 
                                                          - Warp


Post a reply to this message

From: CAS
Subject: Re: some confusions about pov
Date: 23 Mar 2014 08:55:01
Message: <web.532ed918c2a9a3f16a92a3a00@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> CAS <sup### [at] cstnetcn> wrote:
> > 1: how does pov calculate the value of each pixel of final image?
>
> Via raytracing. Mathematical rays are "shot" from the "camera" towards
> the (mathematically defined) scene geometry, and intersections between
> this ray and the surfaces are calculated. Then the normal vector and
> texture of the surface at that point are calculated, and its color from
> them.
>
> > My
> > understanding is :using the irradiance and surface properties to calculate the
> > value of each pixel of final image. Using the simplistic Phong lighting model to
> > calculate the color of each pixel of final image.I didnot set related "phong"
> > statements but also get a result.
>
> The "phong lighting model" has nothing to do with "phong highlights".
> The latter is one algorithm to calculate (simplistic) highlights, and
> you can use it, or another, or none at all.
>
> The "phong lighting model" means that the color of the surface at a given
> point is calculated by taking the texture color at that point, adding a
> possible (fixed) ambient color to it, multiplying it with a diffuse
> component (which is calculated from the direction and intensity of light
> sources), and adding a specular component to it (which is calculated
> similarly, but with a different algorithm that also takes into account
> the direction of the incoming ray.)
>
> POV-Ray also supports a few alternative lighting models that can be
> added to that.
>
> --
>                                                           - Warp

Thank you for your help.I am sorry to trouble you again! I want to use phong or
radiosity (such illumination model) to calculate,how can I set relation
statements? I have defined some paraments in global_settings {phong{}} but when
pov is running ,it points out "phong 0".What values are these specific
parameters should I set?


Post a reply to this message

From: FractRacer
Subject: Re: some confusions about pov
Date: 23 Mar 2014 11:13:15
Message: <532efa0b$1@news.povray.org>

>
> Thank you for your help.I am sorry to trouble you again! I want to use phong or
> radiosity (such illumination model) to calculate,how can I set relation
> statements? I have defined some paraments in global_settings {phong{}} but when
> pov is running ,it points out "phong 0".What values are these specific
> parameters should I set?
>

You cannot use phong in global_settings, this word is only defined for 
finish statement. I do not have many skills that Alain and I can't 
explain how work illumination.
In global_settings block you can defined the radiosity statement. Having 
a look at the examples (directory Povray/scenes/radiosity) can help you, 
and read the documentation for details.

Lionel.


-- 
Do not judge my words, judge my actions.

---

http://www.avast.com


Post a reply to this message

From: Alain
Subject: Re: some confusions about pov
Date: 23 Mar 2014 12:56:51
Message: <532f1253@news.povray.org>

> Warp <war### [at] tagpovrayorg> wrote:
>> CAS <sup### [at] cstnetcn> wrote:
>>> 1: how does pov calculate the value of each pixel of final image?
>>
>> Via raytracing. Mathematical rays are "shot" from the "camera" towards
>> the (mathematically defined) scene geometry, and intersections between
>> this ray and the surfaces are calculated. Then the normal vector and
>> texture of the surface at that point are calculated, and its color from
>> them.
>>
>>> My
>>> understanding is :using the irradiance and surface properties to calculate the
>>> value of each pixel of final image. Using the simplistic Phong lighting model to
>>> calculate the color of each pixel of final image.I didnot set related "phong"
>>> statements but also get a result.
>>
>> The "phong lighting model" has nothing to do with "phong highlights".
>> The latter is one algorithm to calculate (simplistic) highlights, and
>> you can use it, or another, or none at all.
>>
>> The "phong lighting model" means that the color of the surface at a given
>> point is calculated by taking the texture color at that point, adding a
>> possible (fixed) ambient color to it, multiplying it with a diffuse
>> component (which is calculated from the direction and intensity of light
>> sources), and adding a specular component to it (which is calculated
>> similarly, but with a different algorithm that also takes into account
>> the direction of the incoming ray.)
>>
>> POV-Ray also supports a few alternative lighting models that can be
>> added to that.
>>
>> --
>>                                                            - Warp
>
> Thank you for your help.I am sorry to trouble you again! I want to use phong or
> radiosity (such illumination model) to calculate,how can I set relation
> statements? I have defined some paraments in global_settings {phong{}} but when
> pov is running ,it points out "phong 0".What values are these specific
> parameters should I set?
>
>
>

The phong lighting model is the DEFAULT and ONLY model and can't be 
changed. It CAN'T be used in the global_settings section.

The phong key word is used to produce highlights that use the phong 
model. It belong in the finish block of your textures. it's used as follow:
finish{phong Phong_Intensity phong_size Value}

Alternatively, or at the same time, you can use specular to produce 
highlights. It's to be used as follow:
finish{specular Specular_Intensity roughness Value}

Both result in similar, but slightly different, highlights.

radiosity is a global seting feature that enable diffuse 
inter-reflection between the objects in your scene. It's purpose is to 
replace the ambient part of your finish. In version 3.7, enabling 
radiosity will disable the ambient component of all finishes. When using 
radiosity, if you want some glowing objects, you now add:
finish{emission Value}



Alain


Post a reply to this message

From: CAS
Subject: Re: some confusions about pov
Date: 24 Mar 2014 22:15:01
Message: <web.5330e67cc2a9a3f16a92a3a00@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > Warp <war### [at] tagpovrayorg> wrote:
> >> CAS <sup### [at] cstnetcn> wrote:
> >>> 1: how does pov calculate the value of each pixel of final image?
> >>
> >> Via raytracing. Mathematical rays are "shot" from the "camera" towards
> >> the (mathematically defined) scene geometry, and intersections between
> >> this ray and the surfaces are calculated. Then the normal vector and
> >> texture of the surface at that point are calculated, and its color from
> >> them.
> >>
> >>> My
> >>> understanding is :using the irradiance and surface properties to calculate the
> >>> value of each pixel of final image. Using the simplistic Phong lighting model to
> >>> calculate the color of each pixel of final image.I didnot set related "phong"
> >>> statements but also get a result.
> >>
> >> The "phong lighting model" has nothing to do with "phong highlights".
> >> The latter is one algorithm to calculate (simplistic) highlights, and
> >> you can use it, or another, or none at all.
> >>
> >> The "phong lighting model" means that the color of the surface at a given
> >> point is calculated by taking the texture color at that point, adding a
> >> possible (fixed) ambient color to it, multiplying it with a diffuse
> >> component (which is calculated from the direction and intensity of light
> >> sources), and adding a specular component to it (which is calculated
> >> similarly, but with a different algorithm that also takes into account
> >> the direction of the incoming ray.)
> >>
> >> POV-Ray also supports a few alternative lighting models that can be
> >> added to that.
> >>
> >> --
> >>                                                            - Warp
> >
> > Thank you for your help.I am sorry to trouble you again! I want to use phong or
> > radiosity (such illumination model) to calculate,how can I set relation
> > statements? I have defined some paraments in global_settings {phong{}} but when
> > pov is running ,it points out "phong 0".What values are these specific
> > parameters should I set?
> >
> >
> >
>
> The phong lighting model is the DEFAULT and ONLY model and can't be
> changed. It CAN'T be used in the global_settings section.
>
> The phong key word is used to produce highlights that use the phong
> model. It belong in the finish block of your textures. it's used as follow:
> finish{phong Phong_Intensity phong_size Value}
>
> Alternatively, or at the same time, you can use specular to produce
> highlights. It's to be used as follow:
> finish{specular Specular_Intensity roughness Value}
>
> Both result in similar, but slightly different, highlights.
>
> radiosity is a global seting feature that enable diffuse
> inter-reflection between the objects in your scene. It's purpose is to
> replace the ambient part of your finish. In version 3.7, enabling
> radiosity will disable the ambient component of all finishes. When using
> radiosity, if you want some glowing objects, you now add:
> finish{emission Value}
>
>
>
> Alain

I want to simulate the reflectance image or radiance image. My step is:
1,construct geometric model
2,render geometric model
Then I have defined  solar irradiance,  sun position, camera position,  real
location of each object and real material properties of each object, then  pov
use phong illumination model to calculate the light intensity of each object
(phong model can get the physical significance of the results?) , I have saved
the results in a HDR image,all is OK. But the result is not what I wanted ,the
value is smaller than what I need. I am so confusing.


Post a reply to this message

From: scott
Subject: Re: some confusions about pov
Date: 25 Mar 2014 04:31:43
Message: <53313eef$1@news.povray.org>
> I want to simulate the reflectance image or radiance image. My step is:
> 1,construct geometric model
> 2,render geometric model
> Then I have defined  solar irradiance,

The sun's light is a combination of all wavelengths, in your example in 
another thread it was only considering a single wavelength (817nm). You 
need to get the irradiance for all visible wavelengths and then sum up 
the resulting XYZ values before converting to sRGB. This will give you a 
much larger srgb value with a colour close to the middle of the srgb 
space. Not surprisingly, someone has done this before, lookup the colour 
coordinates of various white points like D50, D65 etc.

> the results in a HDR image,all is OK. But the result is not what I wanted ,the
> value is smaller than what I need. I am so confusing.

AFAIK the HDR file format has no units for the colour values, and POV 
certainly doesn't, so the size of the values is arbitrary. If I were you 
I'd do the following two steps:
1. Modify your light source colour to match the sun (start with <1,1,1> 
for a quick test)
2. Modify the scaling factor of the light source (eg FACTOR*<1,1,1>) 
until the output values match what you want.


Post a reply to this message

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