Questioon about Motion Blur effect

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
fatcat46
Posts: 23
Joined: Fri Apr 22, 2005 10:34 pm
Contact:

Questioon about Motion Blur effect

Post by fatcat46 »

Hi,
In Irrlicht 0.10, is it possible to make a Motion Blur effect? If yes show me some code....
Thanks
:: Double K ::
Web Site Under Construction
(http://k.domaindlx.com/fatcat46)
Guest

Post 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
MasterD
Posts: 153
Joined: Sun Feb 15, 2004 4:17 pm
Location: Lübeck, Germany
Contact:

Post 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.
YASS - Yet another Space Shooter
under Devolpment, see http://yass-engine.de
Post Reply