|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I'd like to use POV as a kind of 2d animator. In other words, I load some
image_maps and move them around the screen. But for this to work reasonably,
I need a way to calculate the exact step in POV units between each pixel on
screen. This should be possible since Z is always zero, and I use an
orthographic camera.
But how?
Thanks!
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hugo wrote:
>
> Hello,
>
> I'd like to use POV as a kind of 2d animator. In other words, I load some
> image_maps and move them around the screen. But for this to work reasonably,
> I need a way to calculate the exact step in POV units between each pixel on
> screen. This should be possible since Z is always zero, and I use an
> orthographic camera.
>
> But how?
You have the right and up vectors of the camera and the image_width and
image_height constants. This should be enough to calculate the position.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> You have the right and up vectors of the camera and the image_width
> and image_height constants. This should be enough to calculate the
> position.
Thanks! I solved it with the "right" vector and I had to try different
angles.
Apparently this works:
camera {
orthographic
right 1*x
location -1*z
look_at 0
angle 90
}
Thanks for the quick help.
Regards,
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Hugo" <hua### [at] post3teledk> wrote in message
news:3d735cba@news.povray.org...
> > You have the right and up vectors of the camera and the image_width
> > and image_height constants. This should be enough to calculate the
> > position.
>
> Thanks! I solved it with the "right" vector and I had to try different
> angles.
> Apparently this works:
>
> camera {
> orthographic
> right 1*x
> location -1*z
> look_at 0
> angle 90
> }
>
Wouldn't you be better off with :
camera {
orthographic
right image_width*x
up image_height*y
location -1*z
look_at 0
}
then, you'll get a constant mapping of 1povunit=1pixel no matter what
the resolution you render at ?
(I haven't tested this, btw, so I could be wrong...)
--
Pandora/Scott Hill/[::O:M:C::]Scorpion
Software Engineer.
http://www.pandora-software.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> then, you'll get a constant mapping of 1povunit=1pixel no matter
> what the resolution you render at ?
Hmm, I didn't think of that.. Here's what I got with my camera statement:
The size of the visible area goes from -1 to +1 always.. When I load an
image that has a size of <106,135> and I want to scale it, I use this
variable:
#declare Pixels=2/<image_width,image_height,0>;
scale <106,135,1>*Pixels
Similar if I want to move it, by so many pixels... It's very easy.. Now,
that I finally got it to work. ;o)
Thanks,
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |