POV-Ray : Newsgroups : povray.unofficial.patches : Why does motion blur behave like this? Server Time
1 Sep 2024 16:16:20 EDT (-0400)
  Why does motion blur behave like this? (Message 1 to 6 of 6)  
From: Batronyx
Subject: Why does motion blur behave like this?
Date: 10 Mar 2001 17:53:28
Message: <3aaab068$1@news.povray.org>
Hey all,

I was experimenting with motion blur in Win MegaPOV v0.7 this morning and
noticed a couple of unexpected things:
First, why does the motion blur oscillate? I can see it as useful in a
number of situations, but ordinarily, if I'm tranlating something from point
A to point B, I wouldn't expect copies of the object outside of the
translation space.

Second, If I put another regular object in the motion_blur object's space
one or the other won't render depending on their order of appearance in my
scene file.

Any thoughts?

Batronyx
^"^
bat### [at] cadronhsacom


Post a reply to this message

From: Warp
Subject: Re: Why does motion blur behave like this?
Date: 10 Mar 2001 18:53:21
Message: <3aaabe71@news.povray.org>
Batronyx <bat### [at] cadronhsacom> wrote:
: First, why does the motion blur oscillate? I can see it as useful in a
: number of situations, but ordinarily, if I'm tranlating something from point
: A to point B, I wouldn't expect copies of the object outside of the
: translation space.

  It may be that you have a bug in your code. Could you post a small example
so we can see for ourselves?

: Second, If I put another regular object in the motion_blur object's space
: one or the other won't render depending on their order of appearance in my
: scene file.

  Again, a small example would make things easier.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Batronyx
Subject: Re: Why does motion blur behave like this?
Date: 10 Mar 2001 21:10:55
Message: <3aaadeaf$1@news.povray.org>
Warp wrote in message <3aaabe71@news.povray.org>...
>Batronyx <bat### [at] cadronhsacom> wrote:
>: First, why does the motion blur oscillate? I can see it as useful in a
>: number of situations, but ordinarily, if I'm tranlating something from
point
>: A to point B, I wouldn't expect copies of the object outside of the
>: translation space.
>
>  It may be that you have a bug in your code. Could you post a small
example
>so we can see for ourselves?

Certainly, the sample is below with comments added. I don't think the
oscillation is a bug though, since the docs do say the effect is 'centered'
around the 'camera_delta'. It's just something I wouldn't expect.

>: Second, If I put another regular object in the motion_blur object's space
>: one or the other won't render depending on their order of appearance in
my
>: scene file.

This one could very well be a bug. . . somewhere.  :)
Any help, suggestions, etc. is certainly appreciated. If you uncomment the
scale and
rotate commands in the motion_blur object below you can see what I'm working
on.
Also 'do' comment out the translate statements for better results.

>  Again, a small example would make things easier.

Sample code begins:
***************************************
#version unofficial MegaPov 0.7

#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
  motion_blur 65,0.4   // change 'sample_count' to 2 and experiment
                                    //with varying values of
'camera_sample' to make the issue
                                    //easy to see.
}

// ----------------------------------------
camera
{
  location  <0.0, 0.5, -3.0>
  direction 1.7*z
  right     4/3*x
  up y
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere
{
  pigment
  {
    gradient y
    color_map { [0.0 color SkyBlue] [1.0 color blue 0.6] }
  }
}

light_source
{
  0*x // light's position (translated below)
  color rgb 1  // light's color
  translate -60 * z
  rotate <45, 45, 0>
  parallel
  point_at <0,0,0>
}

light_source
{
  0*x // light's position (translated below)
  color rgb 0.5  // light's color
  translate -60 * z
  rotate <11,90,0>
  shadowless
}

// ----------------------------------------
plane { y, -1
     texture {
     pigment {checker color NavyBlue, color Gray80}
     scale 2
     }
}

#declare MySphere = sphere { <0, 0, 0>, 1 }
#declare ScaleFactor = 0.8;

object {  // This object is occluded in my renders
              // moving it below the motion_blur object causes
              // the motion blur object to disappear.
  MySphere
  texture {
    pigment { bozo color_map {[ 0.0 color DarkBrown]
                                                    [0.5 color Khaki ]
                                                    [1.0 color DarkTan ]
                                                    }
                     scale 0.2 }
         }
  scale ScaleFactor
  translate y * clock * .5
}


motion_blur{
object {
  MySphere
  texture {
    pigment { bozo color_map {[ 0.0 color DarkBrown*clock ]
                                                    [clock color Khaki *
(1-clock)]
                                                    [1.0 color DarkTan *
clock]
                                                    }
                     scale 0.2 }
    normal { granite 10 scale 0.05 }
    finish { specular 0.007 }
  }
  //scale (ScaleFactor + ( clock * (1 - ScaleFactor) ))
  //rotate -y * clock * 30
  translate (y * clock * .5)
  //translate -(y * clock * .5)  // oscillation  makes these two translate
statements
                                              //functionally equivalent. A
'sample_count' of 2 and larger
                                              // values of translation
and/or 'clock_delta' will push the
                                              // resultant blurred objects
further away.
}
} // end motion_blur


Post a reply to this message

From: Rune
Subject: Re: Why does motion blur behave like this?
Date: 11 Mar 2001 08:01:42
Message: <3aab7736@news.povray.org>
"Batronyx" wrote:
> First, why does the motion blur oscillate? I can see it
> as useful in a number of situations, but ordinarily, if
> I'm tranlating something from point A to point B, I
> wouldn't expect copies of the object outside of the
> translation space.

If you want to translate an object by the vector V from clock=0 to clock=1
but not have any movement outside the range of 0 to 1, you must do something
like the following:

#if ( clock<=0 )          translate <0,0,0> #end
#if ( clock>0 & clock<1 ) translate V*clock #end
#if ( clock>=1 )          translate V       #end

Hope that helps.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Batronyx
Subject: Re: Why does motion blur behave like this?
Date: 11 Mar 2001 12:53:35
Message: <3aabbb9f@news.povray.org>
Rune wrote in message <3aab7736@news.povray.org>...
>"Batronyx" wrote:
>> First, why does the motion blur oscillate . . . >

>If you want to translate an object by the vector V from clock=0 to clock=1
>but not have any movement outside the range of 0 to 1, you must do
something
>like the following:
>
>#if ( clock<=0 )          translate <0,0,0> #end
>#if ( clock>0 & clock<1 ) translate V*clock #end
>#if ( clock>=1 )          translate V       #end
>
>Hope that helps.


Well thanks Rune! I'm guessing you've offered this solution as a means to
control the translation in the event I have actual clock values higher than
1 right? Otherwise the tests are kind of redundant. :)  But it was
incredibly helpful because upon reading your reply it occurred to me I
hadn't tried a clock_delta value of 'exactly' 1 just yet and that seems to
work best so far.

In fact I'm getting wonderful results! So thanks again!

There are still some anomalies, but they're predictable enough I can
workaround them. For example, testing with a unit sphere blur object scaled
0.5 and tranlated y*0.5 and sample_count of 2 with clock_delta 1 should
create 1 large sphere and one small sphere at the top with coincident
surfaces at exactly <0,1,0>. Instead the small sphere is at the bottom, but
negating the translation vector corrects it.

So really I was mistaken earlier: objects aren't really being translated
'outside' the translation space, at least not from a mathematically absolute
standpoint, but rather they are being translated outside the 'expected'
translation space. A simple signing bug.

Batronyx ^"^


Post a reply to this message

From: Batronyx
Subject: Re: Why does motion blur behave like this?
Date: 12 Mar 2001 00:28:44
Message: <3aac5e8c@news.povray.org>
In case anyone's interested, I just posted an image file
to p.b.i and the scene file to p.b.s showing what all of my
fuss was about. Hopefully this will prove useful to someone
besides just me. Thanks for your help guys.

Batronyx ^"^
bat### [at] cadronhsacom


Post a reply to this message

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