Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, monk12, TipmyPip, Quad, aliswee), 1,029 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
motion Blur #310431
02/14/10 19:49
02/14/10 19:49
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline OP
Expert
alibaba  Offline OP
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
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

Last edited by alibaba; 02/14/10 19:58.

Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: motion Blur [Re: alibaba] #310456
02/14/10 21:47
02/14/10 21:47
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Looks awesome in the video, gotta try it. Thanks anyway! grin
EDIT: It works! Many thanks! laugh

Last edited by Cowabanga; 02/14/10 22:01.
Re: motion Blur [Re: Cowabanga] #310656
02/16/10 11:36
02/16/10 11:36
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline
Expert
Rondidon  Offline
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
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



Re: motion Blur [Re: Rondidon] #310660
02/16/10 11:57
02/16/10 11:57
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline

User
adoado  Offline

User
A

Joined: Jul 2006
Posts: 503
Australia
Nice contribution, will try that out laugh


Visit our development blog: http://yellloh.com
Re: motion Blur [Re: adoado] #310664
02/16/10 12:21
02/16/10 12:21
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline
Senior Member
mikaldinho  Offline
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
that is a great code. could it be used effectively in a fps?

Re: motion Blur [Re: mikaldinho] #310669
02/16/10 13:34
02/16/10 13:34
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline OP
Expert
alibaba  Offline OP
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
yes its perfect for a fps wink


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1