POV-Ray : Newsgroups : povray.general : generating an image_map name: string syntax problem : Re: generating an image_map name: string syntax problem Server Time
30 Jul 2024 12:27:18 EDT (-0400)
  Re: generating an image_map name: string syntax problem  
From: Zeger Knaepen
Date: 19 Feb 2009 04:33:14
Message: <499d275a$1@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote in message 
news:web.499cf56640230f63f50167bc0@news.povray.org...
> Does MegaPOV actually blur the motion *during* a single-frame render?

if you ask it to :)
in MegaPOV you have a camera_view pigment, which gives you, with some 
scripting, the possibility to have multiple camera's in your scene and 
average the result of all of them.  There are two ways of doing this.  The 
first is simply using an average pattern:
--- START CODE ---
#local Samples=50;
#local Clock=0;
#local Clock_Delta=.1;

#macro CameraLocation(Clock)
 #local R=<1,6,-6+Clock*10>;
 R
#end
#macro CameraLookAt(Clock)
 #local R=<0,1.5,Clock*10>;
 R
#end
#local CameraAngle=80;

#declare Camera_motion_blur=
texture {
 pigment {
  average
  pigment_map {
   #declare I=0;
   #while(I<Samples)
   #declare CurrentClock=Clock+Clock_Delta*I/Samples;
   #declare Location=CameraLocation(CurrentClock);
   #declare Look_at=CameraLookAt(CurrentClock);

    [1
    camera_view{ location Location angle CameraAngle look_at Look_at }
    ]
    #declare I=I+1;
   #end
  }
 }
 finish {ambient 1 diffuse 0}
}


#include "screen.inc"

//make sure your real camera is out of the way of the scene
Set_Camera_Location(<500,5000,500>)
Set_Camera_Look_At(y*10000)
Screen_Plane (Camera_motion_blur, 1, 0, 1)
--- END CODE ---

And the second way is by using MegaPOV's noise_pigment.  It renders faster, 
but I use this method more for testing-purposes only as it doesn't give 
really accurate results:

--- START CODE ---
#declare Camera_motion_blur=
texture {
 pigment {
  pigment_pattern {noise_pigment {1 rgb 0 rgb 1}}
  pigment_map {
   #declare I=0;
   #while(I<Samples)
   #declare CurrentClock=Clock+Clock_Delta*I/Samples;
   #declare Location=CameraLocation(CurrentClock);
   #declare Look_at=CameraLookAt(CurrentClock);

    [I/Samples
    camera_view{ location Location angle CameraAngle look_at Look_at }
    ]
    #declare I=I+1;
   #end
  }
 }
 finish {ambient 1 diffuse 0}
}
--- END CODE ---

hope this helps :)

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

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