POV-Ray : Newsgroups : povray.general : Problem with small-angle camera and radiosity Server Time
1 Nov 2024 13:20:30 EDT (-0400)
  Problem with small-angle camera and radiosity (Message 1 to 7 of 7)  
From: Rafal 'Raf256' Maj
Subject: Problem with small-angle camera and radiosity
Date: 7 Oct 2004 14:01:11
Message: <Xns957BCB950ADBAraf256com@203.29.75.35>
Radiosity seems to work wrong when used with very-small-angle perspective 
camera.

Such camera can be used to simulated ortographics one, like

camera { angle 45/X  location 10*X }  with X = 10000;
  instread of
camera { ortographics angle 45 location 10 }

When using such camera radiosity gets very strongly distored.
Only using extremly low minimum_reuse can partialy prevent that from 
happening.

IMHO that could indicate that either there is a lost-precission problem, 
or, despite what documentation states, minimum_reuse is based on angle 
(like - each sample per 1 degree) not on pixels.

Rendered images and minimal code is on
http://www.raf256.com/povray/bug/radiosity-orthographic/


And below + on p.b.i

Change SHOW_BUG to see good version, bug, and partial fix.


// bug (problem) while immitating orthographic camera by 
// standard-perspectiver camera with very narrow angle
// suggested:  +w640 +h480 +a0.03 +am2 +r2 +fn

#declare SHOW_BUG = 1; // 0=normal 1=show bug  2=show bug + partialy fix

union {
  box { -100, +100 pigment { rgb 1 }  }
  box { <-80,-80,+150> <+80,+80,0> pigment { rgb <1,0,0> } }
  finish { ambient 0 }
}  

camera {
  #local FlatPerspective = 1.0;
  #if (SHOW_BUG)
    #local FlatPerspective = 5000.0;
  #else
    orthographic
  #end 
  up y  right x*(image_width/image_height)
  angle 60/FlatPerspective
  location 250*FlatPerspective
  look_at 0
}  

light_source { <500,2000,1000> rgb 1 }
                                                                          
global_settings { radiosity { 
    count 1600 error_bound 0.3 nearest_count 15  // very-high quality
    //count  800 error_bound 0.6 nearest_count 12 // high quality
    #if (SHOW_BUG=2)
      minimum_reuse 0.000001 
    #end
} }    





-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Ross
Subject: Re: Problem with small-angle camera and radiosity
Date: 7 Oct 2004 15:32:03
Message: <416599b3$1@news.povray.org>
"Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote in message
news:Xns957BCB950ADBAraf256com@203.29.75.35...
> Radiosity seems to work wrong when used with very-small-angle perspective
> camera.
>
> Such camera can be used to simulated ortographics one, like
>
> camera { angle 45/X  location 10*X }  with X = 10000;
>   instread of
> camera { ortographics angle 45 location 10 }
>
> When using such camera radiosity gets very strongly distored.
> Only using extremly low minimum_reuse can partialy prevent that from
> happening.
>
> IMHO that could indicate that either there is a lost-precission problem,
> or, despite what documentation states, minimum_reuse is based on angle
> (like - each sample per 1 degree) not on pixels.
>
> Rendered images and minimal code is on
> http://www.raf256.com/povray/bug/radiosity-orthographic/
>
>
> And below + on p.b.i
>
> Change SHOW_BUG to see good version, bug, and partial fix.
>
>
> // bug (problem) while immitating orthographic camera by
> // standard-perspectiver camera with very narrow angle
> // suggested:  +w640 +h480 +a0.03 +am2 +r2 +fn
>
> #declare SHOW_BUG = 1; // 0=normal 1=show bug  2=show bug + partialy fix
>
> union {
>   box { -100, +100 pigment { rgb 1 }  }
>   box { <-80,-80,+150> <+80,+80,0> pigment { rgb <1,0,0> } }
>   finish { ambient 0 }
> }
>
> camera {
>   #local FlatPerspective = 1.0;
>   #if (SHOW_BUG)
>     #local FlatPerspective = 5000.0;
>   #else
>     orthographic
>   #end
>   up y  right x*(image_width/image_height)
>   angle 60/FlatPerspective
>   location 250*FlatPerspective
>   look_at 0
> }
>
> light_source { <500,2000,1000> rgb 1 }
>
> global_settings { radiosity {
>     count 1600 error_bound 0.3 nearest_count 15  // very-high quality
>     //count  800 error_bound 0.6 nearest_count 12 // high quality
>     #if (SHOW_BUG=2)
>       minimum_reuse 0.000001
>     #end
> } }
>
>

just to nitpick before everyone else, is this pov 3.6 or 3.6.1? official
release or custom compile? what operating system?

not that I would know if it is or isn't a bug... just getting the obligatory
system setup questions out of the way.


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Problem with small-angle camera and radiosity
Date: 7 Oct 2004 16:08:20
Message: <Xns957BE1294CBBAraf256com@203.29.75.35>
rli### [at] everestkcnet news:416599b3$1@news.povray.org

> just to nitpick before everyone else, is this pov 3.6 or 3.6.1?
> official release or custom compile? what operating system?
> not that I would know if it is or isn't a bug... just getting the
> obligatory system setup questions out of the way.

Uuups, sorry, I knew I forgot something.

3.6.1 ofcourse, 
3.6.1.icl8.win32 running on WinXP 2 Ghz Athlon to be precise.


-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Problem with small-angle camera and radiosity
Date: 7 Oct 2004 16:12:56
Message: <Xns957BE1F0A928Fraf256com@203.29.75.35>
spa### [at] raf256com news:Xns957BE1294CBBAraf256com@203.29.75.35

> 3.6.1 ofcourse, 
> 3.6.1.icl8.win32 running on WinXP 2 Ghz Athlon to be precise.

MegaPov 1.1 / based on 3.6.1.mingw-3.1(gcc-3.2.3).unofficial.win32
MegaPov 1.1 / based on 3.6.1.MetroWerks.unofficial-win32

Give same result. Shape of shadow was *identical* to a pixel, only one-two 
small parts of a shadow was a bit (like 5%) brighter then the 3.6.1 
official version, and MegaPov is exacly identical to MegaPov-MW output by 
the way.

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Warp
Subject: Re: Problem with small-angle camera and radiosity
Date: 8 Oct 2004 05:14:02
Message: <41665a5a@news.povray.org>
Rafal 'Raf256' Maj <spa### [at] raf256com> wrote:
> Radiosity seems to work wrong when used with very-small-angle perspective 
> camera.

  If you use very small camera angles, all kinds of floating point errors
are prone to happen. These errors are usually not bugs, but simply
limitations in the accuracy of the floating point numbers and the
rendering engine.
  There's a good example of this at:

http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Problem with small-angle camera and radiosity
Date: 8 Oct 2004 05:31:32
Message: <Xns957C752F8C122raf256com@203.29.75.35>
war### [at] tagpovrayorg news:41665a5a@news.povray.org

> If you use very small camera angles, all kinds of floating point
> errors are prone to happen. These errors are usually not bugs, but simply

> There's a good example of this at:
> http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems

Yes, almost same problem :) 

How about issuing a warning in such situation (angle < 0.1)?

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with small-angle camera and radiosity
Date: 8 Oct 2004 06:02:34
Message: <416665ba@news.povray.org>
In article <Xns957BCB950ADBAraf256com@203.29.75.35>, "Rafal 'Raf256' Maj" 
<spa### [at] raf256com> wrote:

> global_settings { radiosity {
>     count 1600 error_bound 0.3 nearest_count 15  // very-high quality
>     //count  800 error_bound 0.6 nearest_count 12 // high quality
>     #if (SHOW_BUG=2)
>       minimum_reuse 0.000001
>     #end
> } }

There is no bug here at all. You are simply exceeding the maximum resolution
radiosity can offer.  That is also why setting higher quality improves
quality while reducing radiosity quality settings makes the resolution
limits more visible.  You will see pretty much the same effect if you just
render your image at 5000 times the resolution with a normal camera angle
(well, if you could render such a huge image anyway).

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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