Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 2.30
by Zheka. 08/11/20 15:49
avg spread every tick
by Grat. 08/11/20 10:34
strtok() returns temporary string
by Morris. 08/10/20 15:31
problem with adding new history
by jcl. 08/10/20 14:27
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/20 12:02
NeoDumont's open world treadmill project
by NeoDumont. 08/10/20 01:13
Why gamestudio USE Lite_C
by Emre. 08/09/20 16:40
AUM Magazine
Latest Screens
Untitled Walking Simulator
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
8 registered members (Quad, kvm, danatrader, Jerome8911, AndrewAMD, SBGuy, 3run, Zheka), 470 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Sovattha, DonSergio, bigimpactsound, tzw101, Al82
18491 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,109
NRW/Germany
alibaba Offline OP
Expert
alibaba  Offline OP
Expert

Joined: May 2008
Posts: 2,109
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,109
NRW/Germany
alibaba Offline OP
Expert
alibaba  Offline OP
Expert

Joined: May 2008
Posts: 2,109
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