POV-Ray : Newsgroups : povray.general : Look_at hates me : Re: Look_at hates me Server Time
29 Jul 2024 02:24:32 EDT (-0400)
  Re: Look_at hates me  
From: Alain
Date: 22 Aug 2013 16:59:06
Message: <52167b9a$1@news.povray.org>


>
> I have no idea what look_at does when you apply rotations and
> translations first. "Something unexpected" would be my first guess. (I'm
> actually quite surprised it doesn't give you an error message.)
>
> You may want to apply the rotation and translation to Camera_Loc rather
> than the whole camera, like so:
>
>    camera { ...
>      location vrotate(Camera_Loc,-y*45)+<XE1,72,ZE1>
>      look_at CenterE1
>    }
>

I've tested it.
Whenever you have any transform of the camera after the look_at, that 
transform will apply to the look_at as well as to the camera's location.
If the look_at point is anywhere but the origin and you rotate the 
camera, it will orbit the origin.
If you translate the camera after the point_at, it will travel while 
keeping it's orientation. It's the same as actualy moving a real word 
camera on some rails.


Post a reply to this message

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