POV-Ray : Newsgroups : povray.binaries.animations : motion blur test Server Time
1 Jun 2024 11:21:05 EDT (-0400)
  motion blur test (Message 21 to 21 of 21)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: motion blur test
Date: 19 Nov 2010 00:15:01
Message: <web.4ce607327450cbb2196b08580@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote:

> And regarding the shutter time, I'd probably write the code like this:
>
> #declare NumSubFrames = 10;
> #declare ShutterProportion = .5;
> #declare ActualFrame = int(frame_number/NumSubframes);
> #declare SubFrame = mod(frame_number,NumSubframes);
> #declare Time = (ActualFrame + SubFrame*ShutterProportion)/FramesPerSecond;
>
> Typo! That should have been in a [0,1) range like so:
>
> #declare SubFrame = mod(frame_number,NumSubframes)/NumSubframes;

Sorry for the delay in responding; wanted to thank you for this re-worked code.
Haven't used it as yet, but it certainly looks more elegant than mine! I rarely
(if ever?) use mod; I need to add that to my 'permanent mental toolbox' of
POV-Ray tricks.

Ken


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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