POV-Ray : Newsgroups : povray.binaries.animations : Exit One Robot - mpg - 628kbu : Re: Exit One Robot - mpg - 628kbu Server Time
20 Jul 2024 11:18:36 EDT (-0400)
  Re: Exit One Robot - mpg - 628kbu  
From: Alan Holding
Date: 24 Jan 2001 14:15:59
Message: <3a6f29ef@news.povray.org>
Bob H.
<per### [at] aolcom?subject=PoV-News:%20&body=Relating%20to%20POV-Ray:>
wrote in message news:3a6ee857$1@news.povray.org...

> That was fun, good camera shaking I thought.

Ta.  Done by affecting the camera's location and look_at vectors by a random
amount 'sampled' from another variable - all done using Mr Colefax's Auto
Clock Modifier.  The code looked something like this (apologies for the
line-splitting), and keep in mind that the stone ball hits the floor (and
the robot) at clock=0.6:

#local camera_shake=(
  From      (0,0)
  To        (0.6,0)
  To        (0.61,2.5)
  To_Using  (0.7,0.1,"D")
  To_Using  (1,0,"S")
);

#local real_lookat=(
  From    (0.0,<-1,10,0>)
  To_Using(0.65,<0,10,-60>,"D")
  To_Using(0.7,<0,10,-50>,"A")
  To_Using(1.0,<0,10,-20>,"S")
);
#local
cam_lookat=<real_lookat.x+(rand(seeder)*camera_shake/2)-(camera_shake/4),rea
l_lookat.y+(rand(seeder)*(camera_shake*4)-(camera_shake*2)),real_lookat.z+(r
and(seeder)*(camera_shake*4))-(camera_shake*2)>;

#local real_campos=(
  From    (0.0,<0,6,-50>)
  To      (0.1,<0,6,-50>)
  To_Using(0.35,<0,6,-70>,"S")
  To      (0.6,<0,6,-70>)
  To_Using(0.65,<0,15,-70>,"W")
  To      (0.7,<2,6,-70>)
  To_Using(1.0,<2,6,-60>,"S")
);
#local
cam_campos=<real_campos.x+(rand(seeder)*camera_shake)-(camera_shake/2),real_
campos.y+(rand(seeder)*camera_shake*3)-(camera_shake*1.5),real_campos.z+(ran
d(seeder)*camera_shake)-(camera_shake/2)>;

//  Camera
camera {
  location cam_campos
  right x*image_width up y*image_height
  angle From (0,30) To_Using (0.35,70,"S") To (1,70)
  sky <(rand(seeder)*camera_shake/4)-(camera_shake/8),1,0>
  look_at cam_lookat
  perspective
}

The seeder variable used in the rand() statements above was set using Yvo
Smellenbergh's tick_count function which, though useful for the purposes of
geting a fresh bunch of random numbers for every frame, has the side effect
of making every render of the total animation different - I think!  Correct
me if I'm wrong...!

> The lamps floated as if underwater.

Hmmm, I know.  I'll have a fiddle.  And then edit the scene.  The trouble is
getting the timing right with these things - render and re-render.  It would
be easier if I could get used to doing things visually in something like
Moray - but I prefer the handwritten approach.

> Was the red one supposed to blink?

The red one *is* oscillating a bit, but I think it's too fast for the camera
to catch properly.

This whole anim was just an evening's hack, but it's triggered some ideas
and also given me the incentive to try something bigger.  IRTC - here I
come?!?!

See ya,
Alan.


Post a reply to this message

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