|
|
> POV-Ray's camera code doesn't compute distance anywhere; and if it did, I'm
> sure it would use that equation anyway. What is it that you're trying to
> change?
>
> > I know fish eye lens appears gives something similar
>
> Similar to what?
>
> - Slime
> [ http://www.slimeland.com/ ]
I guess I mean the z value. I wrote a custom rendered for the winamp's AVS
(yes I know thats horrible) that divided by true distance instead of just
z... However that was very long ago and I cannot remember how to set up
the matrix the same. More or less, it would make things based on the x and
y off set smaller based on the fov.
Two cases:
1: point 3,3,3; camera is at 0,0,0; looking at 3,3,3. The x and y will be
at the center of the camera's fov, and will not be affected. (z = 3,
unless I'm not thinking clearly right now)
2: same point and camera point, but looking at 0,3,3 (assuming angle >=90)
will rendered differently if z is replaced. A traditional camera says the
distance to that point (based on z alone) would be something like 3/sqrt(2)
appox. 2.1. With the true distance calculation, it would be Sqrt((
3/sqrt(2) )^2 + 0^2 + ( 3/sqrt(2) )^2 ) = 3. (I drew a diagram quickly to
check my work, and I figure I should have used a scale of 1, not 3).
I am not sure if I made my self clear, but generally I want the depth to be
distance, not the fast linear approximation of distance (which works great
for lower fovs). When x and y are small (low fov or near center of fov),
the equation can be writen as Sqrt(z^2) = z, which is what the camera
divides by default. The fish eye lens generates something that looks like
it could be correct, but I don't know if it is correct
mathematically/physically.
Post a reply to this message
|
|