POV-Ray : Newsgroups : povray.general : Camera confusion : Re: Camera confusion Server Time
2 Aug 2024 12:17:48 EDT (-0400)
  Re: Camera confusion  
From: Renderdog
Date: 25 Oct 2004 05:20:00
Message: <web.417cc4cce6ce824a7b871e2a0@news.povray.org>
It looks like you just didn't hit on the right combination;
also there are some default values that may be causing
problems.

Here's some code for four side views. There are several
different ways to get the same view so someone may
come up with a better combination, but I used "right" and
"direction" to aim the cameras here.

I'm no expert and I'm also confused by the camera.
I would expect the look_at vector to rotate the camera
about the sky vector without needing to change the
direction, but if I don't change the direction in the below
cameras the image is mirrored. The look_at vector
in my cameras does nothing?

/*
DEFAULT CAMERA: (If you don't declare these variables)

camera {
 perspective
 location <0,0,0>
 direction <0,0,1>
 right 1.33*x
 up y
 sky <0,1,0> }

direction:
It tells POV-Ray the initial direction to point the camera before
moving it with the look_at or rotate vectors

*/

#declare ViewDir = 2;   //  0 Front, 1 Rear, 2 Right, 3 Left

#if ( ViewDir = 0 )
 camera {
  location <0, .1, -25>
  right x*image_width/image_height
  angle 30
  look_at 0  //  always last
     }
#end

//  Rear view

#if ( ViewDir = 1 )
 camera {
  location <0, .1, 25>
  direction <0,0,-1>  //  Mirrored without this
  right -x*image_width/image_height
  angle 30
  look_at 0
     }
#end

//  Right

#if ( ViewDir = 2 )
 camera {
  location <25, .1, 0>
  direction <-1,0,0>  //  Mirrored without this
  right z*image_width/image_height
  angle 30
  look_at 0
     }
#end

//  Left

#if ( ViewDir = 3 )
 camera {
  location <-25, .1, 0>
  direction <1,0,0>  //  Mirrored without this
  right -z*image_width/image_height
  angle 30
  look_at 0
     }
#end


Post a reply to this message

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