Page 1 of 1

Questioon about Motion Blur effect

Posted: Fri Aug 05, 2005 1:08 pm
by fatcat46
Hi,
In Irrlicht 0.10, is it possible to make a Motion Blur effect? If yes show me some code....
Thanks

Posted: Mon Aug 08, 2005 2:55 am
by Guest
yeh, but it would take a lot of work from you, not irrlicht. I dont really have any code, but I can tell u some advice. try it so that everyframe, u save the position of the object to carry over to the next frame. then, make a duplicate of the object at the old position, apply a shader thats slightly transparent (as done in the shaders tutorial). however, that would make more of a trail.
another way u could probably do this is to do a real time render (again, another tutorial) and blur the image, and position it just behind the object.do it by saving the position to transfer over from the first frame to the next, and using getScreenCoordinatesFrom3DPosition(). blurring the image could probably be done very slowly however by taking the saved image, and every different pixel should take a little bit of color from the pixels to the side of it, starting at the top right pixel (pixel 1 color red 25, pixel 2 color red 50. do pxl1 r+(pxl1 r-px2 r)/3 or something. this would make it 25+(25-50)/3=25+8=33.. pxl 1 red would be 33, and do this for every pixel to bleed into the next with red blue and green)
the problem with this way is that it could lower ur FPS by about 20* its normal speed. try both, see which u like. remember, no matter what motion blur is tolling on the performance

Posted: Tue Aug 09, 2005 8:40 pm
by MasterD
An other technique of a motion blur effect I've seen is an example which shippes with RenderMonkey from ATI.
They use different passes + render to texture to do this blur effect on the hole scene. (imho this is a very nice method in tricking a computer + creating nice effect)
I've heared in an other topic that irrlicht does not support several passes, but maybe future releases of irrlicht will support this. But don't blame me on that.