motion Blur

Posted By: alibaba

motion Blur - 02/14/10 19:49

Hi @ all,
i wanted to share a really easy code to make motion blur. i mean for fast rotating and so on.
here:

pp_set(camera,mtl_blur);
while(1)
{
mtl_blur.skill1 = floatv(mouse_force.x*50);
wait(1);
}
you have to copy it into the main function.
you have to include "mtlView.c".
little code, big effect grin
thats it !
now rotate around with the camera and see the result.

here a video:

http://www.youtube.com/watch?v=UhTfHeNvCdw

EDIT: you can also change the 50 to 100 to make more blur wink
Posted By: Cowabanga

Re: motion Blur - 02/14/10 21:47

Looks awesome in the video, gotta try it. Thanks anyway! grin
EDIT: It works! Many thanks! laugh
Posted By: Rondidon

Re: motion Blur - 02/16/10 11:36

It`s looking great, thanks very much! Nevetheless I optimized it for shooters so that it`s blurring in x and y direction:

Code:
function post_motionblur(on)
{
	if(on == 1)
	{
		pp_set(camera,mtl_blur);
		while(1)
		{
			mtl_blur.skill1 = floatv(mouse_force.x*25+mouse_force.y*25);
			wait(1);
		}
	}
	else
	{
		proc_kill(4);
		pp_set(camera,NULL);
	}
}

[...]

post_motionblur(1); //turn the effect on

[...]

post_motionblur(0); //turn it off


Posted By: adoado

Re: motion Blur - 02/16/10 11:57

Nice contribution, will try that out laugh
Posted By: mikaldinho

Re: motion Blur - 02/16/10 12:21

that is a great code. could it be used effectively in a fps?
Posted By: alibaba

Re: motion Blur - 02/16/10 13:34

yes its perfect for a fps wink
© 2024 lite-C Forums