POV-Ray : Newsgroups : povray.bugreports : Possible bug with camera rotations Server Time
22 Dec 2024 12:58:55 EST (-0500)
  Possible bug with camera rotations (Message 1 to 2 of 2)  
From: posfan12
Subject: Possible bug with camera rotations
Date: 25 Jul 2011 12:07:42
Message: <4e2d94ce$1@news.povray.org>
I'm developing a scene with the following camera statement, and the 
output is different when I turn radiosity on or off. With radiosity on 
the camera doesn't rotate around its axis like it should.


Mike


#declare Camera_Mode		= 5;			// 0 to 8
#declare Camera_Diagonal	= cosd(45);
#declare Camera_Vertical	= -135 + 22.5;		// 135 + 22.5
#declare Camera_Horizontal	= 30;			// 30
#declare Camera_Scale		= 2.5;
#declare Camera_Aspect		= image_height/image_width;
#declare Camera_Distance	= Width * 64;
#declare Camera_Translate	= <0,Width*1,0>;	//<0,Width*3,0>
		#declare Camera_Up		= +y;
		#declare Camera_Right		= +x;
		#declare Camera_Location	= +y*400;
		#declare Camera_Direction	= +z/2;
		#declare Camera_LookAt		= Camera_Location + Camera_Direction;
		#switch (frame_number)
			#case (0)
				#declare Camera_Rotate	= <0,000,0,>;
			#break
			#case (1)
				#declare Camera_Rotate	= <0,090,0,>;
			#break
			#case (2)
				#declare Camera_Rotate	= <0,180,0,>;
			#break
			#case (3)
				#declare Camera_Rotate	= <0,270,0,>;
			#break
			#case (4)
				#declare Camera_Rotate	= <270,0,0,>;
			#break
			#case (5)
				#declare Camera_Rotate	= <090,0,0,>;
			#break
		#end
		#debug "\n"
		#debug concat("frame_number = ", str(frame_number, 0, -1), "\n")
		#debug concat("Camera_Rotate = <", vstr(3, Camera_Rotate, ",", 0, -1), 
">\n")
		#debug "\n"
		camera
		{
			up		Camera_Up
			right		Camera_Right
			location	0
			direction	Camera_Direction
			rotate		Camera_Rotate
			translate	Camera_Location
			translate	Camera_Translate
			scale		Camera_Scale
		}
		#declare Camera_Location	= Camera_Scale * (Camera_Translate + 
Camera_Location);
		#declare Camera_LookAt		= Camera_Scale * (Camera_Translate + 
Camera_LookAt);


-- 
http://isometricland.com


Post a reply to this message

From: posfan12
Subject: Re: Possible bug with camera rotations
Date: 25 Jul 2011 12:16:04
Message: <4e2d96c4$1@news.povray.org>
Scratch that. It was a bug in my code.


Mike


Post a reply to this message

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