POV-Ray : Newsgroups : povray.general : question about light_source Server Time
6 Oct 2024 09:45:42 EDT (-0400)
  question about light_source (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: scott
Subject: Re: question about light_source
Date: 20 Mar 2014 05:00:54
Message: <532aae46@news.povray.org>
> 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!

You will probably need to make FACTOR very large to see a difference, 
like 1000000 as your rgb components are very small.

Also POV adds ambient light by default to every shape, which is I think 
what you are seeing in the output. You can turn it off by adding this 
line at the top of your code:

#default{ finish{ ambient 0 }}


Post a reply to this message

From: CAS
Subject: Re: question about light_source
Date: 20 Mar 2014 11:35:01
Message: <web.532b09cf7ece86556a92a3a00@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> CAS <sup### [at] cstnetcn> wrote:
> > I have known the value of solar irradiance in 817nm band is 1.08279
> > W/(m2*nm).How can I define it?  "light_source {<sun_x,sun_y,sun_z> color rgb
> > 1.08279 } "I set statement as above in pov,but I doublt it is wrong,because
> > 1.08279 is a solar irradiance,color rgb is color ,but I donnot know how
> > to convert them or how to define solar irradiance.beg a hot to help me !thank
> > you!
>
> Note that for the most part POV-Ray uses a quite simplistic Phong
> lighting model with RGB values. It does not model light at different
> wavelengths, nor is it able to process colors in any more complicated
> ways than manipulating RGB values, nor are most of its lighting
> calculations any more complex than the simple Phong lighting model.
>
> (Note that "Phong lighting model", or "Phong reflection model", should
> not be confused with "phong highlights". The lighting model is an
> illumination model that simply adds three components to the color of
> a surface: ambient (a constant), diffuse (a lighting component that's
> independent of the viewing angle) and specular (a lighting component
> that's dependent on the viewing angle).)
>
> Far from me to disparage POV-Ray, but to be completely honest, the
> Phong lighting model is quite poor and simplistic. (It's *major*
> advantage is that it's very fast and can produce, when properly used,
> acceptable results.)
>
> If you want to convert a unit of irradiance into RGB, you'll have to
> figure out the conversion formula. This is probably not a trivial task,
> nor is it probably very productive because of the limitations of the
> lighting model described above.
>
> (There are many problems in getting an "accurate" conversion from some
> standard irradiance unit to RGB. One of them is that the relation between
> irradiance and the apparent brightness of what ends up on your monitor
> screen is subject to rather complex gamma curve functions, which are not
> only dependent on the gamma used by POV-Ray and the image file, but also
> the gamma correction performed by your display hardware and the screen.)
>
> --
>                                                           - Warp

Thanks for your help.I am so sorry to trouble you again. I still have some
confusions:
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.08279(W/(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.08279(W/(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?
                                                                       miaoyu


Post a reply to this message

From: scott
Subject: Re: question about light_source
Date: 20 Mar 2014 11:47:40
Message: <532b0d9c$1@news.povray.org>
> 2:I know irradiance 1.08279(W/(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.

As I said in another post, if b is negative this indicates that the 
colour of your light source is outside the sRGB colour space. There is 
nothing physically wrong with that, sRGB only represents a portion of 
the colours we can see. Your light source is 817nm which is well into 
infra-red, a camera will see it but humans will struggle - that's why 
your calculated rgb values are so tiny and negative.


Post a reply to this message

From: Alain
Subject: Re: question about light_source
Date: 21 Mar 2014 14:28:22
Message: <532c84c6@news.povray.org>

> 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!
>
>
By default, every textures have this:
finish{diffuse 0.7 ambient 0.1}

Your red component, the largest one, is 10000 times smaller than the 
ambient value.
With such a disproportion, it's normal that you don't see any 
difference. By multiplying your light intensity by 10 to 100, you bring 
the light's intensity from 1/10000 to 1/1000 up to 1/100 of the ambient 
level.


Alain


Post a reply to this message

From: Alain
Subject: Re: question about light_source
Date: 21 Mar 2014 14:32:05
Message: <532c85a5@news.povray.org>

>> 2:I know irradiance 1.08279(W/(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.
>
> As I said in another post, if b is negative this indicates that the
> colour of your light source is outside the sRGB colour space. There is
> nothing physically wrong with that, sRGB only represents a portion of
> the colours we can see. Your light source is 817nm which is well into
> infra-red, a camera will see it but humans will struggle - that's why
> your calculated rgb values are so tiny and negative.
>

In this case, it may advisable to work on so called "false colours" 
where the actual spectrum is shifted and stretched or compressed to make 
it fit within the visible range.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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