Hi, I have an idea for motion blur. The idea is that it takes a few samples of frames (about 6) and fades them out one after the other on top of the current frame (each with a low alpha value which decreases to 0 after 6 frames). I have no idea how to do this, so does anyone know how this can be achieved?
Increase the fps of animation while keeping the animation timing at correct speed. Then in a video editor speed up the footage. speed up 6X should give you 6 layered frames in 1 frame. video editors vary though, some may just remove the frames and not layer then.
So if I wanted 4 layered frames I would set the fps to 120 frames per sec. then you need to slow down the timing of the animation 4X so the animation will appear in slow motion at 120 fps, or a 1/4th of a sec of animation per 1 sec in real time or per 120 fps. then speed up the footage in a video editor and set the frame rate to 30 fps. speed up 5X is using 24 fps. using 24 fps will give 5 layers.
This is the best method I can think of using open source software.
This is more or less what the full sample motion blur in blender does already, except the blurring is around the current frame, based on the shutter speed, like real film, rather than the fake cartoony ‘trailing’ kind of motion blur. If that’s what you’re after you’d have to do that like you’ve described probably.
Been doing this for 3 months. The built-in one doesn’t work with AMD/ATi graphics since the OpenGL is too new a version (or something like that). There aren’t any motion blurs like the built-in one in the resource section.
I made a motion blur using the bge.texture (VideoTexture then) module, which worked on my ATI card. It worked pretty well, but it was pretty complex to set up. Maybe I could do it again, simpler this time… It should still be in the resource section, if you’re interested. However, agoose’s probably correct - just find a motion blur shader and change it to use floats.
Not sure. I have the source, but the motion blur filter’s not listed in the source area, so maybe it uses a different method…? Someone like Moguri or Kupoman might know - they work with the source a lot more than I do.
That’s for a normal blur, isn’t it? Not a motion blur…? In any case, here’s that file:
* ***** BEGIN GPL LICENSE BLOCK *****
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
* The Original Code is: all of this file.
* Contributor(s): none yet.
* ***** END GPL LICENSE BLOCK *****
/** \file RAS_Blur2DFilter.h
* \ingroup bgerastoglfilters
const char * BlurFragmentShader=STRINGIFY(
uniform sampler2D bgl_RenderedTexture;
uniform vec2 bgl_TextureCoordinateOffset;
for (int i = 0; i < 9; i++)
sample[i] = texture2D(bgl_RenderedTexture,
gl_TexCoord.st + bgl_TextureCoordinateOffset[i]);
gl_FragColor = (sample + (2.0*sample) + sample +
(2.0*sample) + sample + (2.0*sample) +
sample + (2.0*sample) + sample) / 13.0;
EDIT: Everything from “STRINGIFY(” down to the ending “);” is the filter.