Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Very simple Motion Blur

Author
Message
Kuper
17
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 17th Jun 2015 01:24 Edited at: 17th Jun 2015 01:24
Hi guys!
I try to find very old small demo with simple motion blur.It was maybe in "Learning to write shaders" board.Anyway I cant get it
The main Idea is : you don't use second camera to render objects velosity but use matrix calculations to transfer to shader current
camera rotation and movement.So it is cheap way to have motion blur ( when you don't need any individual blur on each object ).
So maybe someone have this snippet?

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th Jun 2015 19:03 Edited at: 17th Jun 2015 19:04
This snippet looks very simple to me.

http://forum.thegamecreators.com/?m=forum_view&t=84365&b=1

Aside: I didn't know you could use set camera to image that way.

Never too old to learn I suppose.

Edit: but two old to spell correctly I suppose.



Powered by Free Banners
Kuper
17
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 17th Jun 2015 22:37 Edited at: 18th Jun 2015 00:48
Thanks GG)) But I mean not the easiest way.
I mean somethting like this:
http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html

My main Idea is to blur final image basing on the camera movement-rotation only.

So I try to convert it:



Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 18th Jun 2015 01:09
Here's a great article for Per-Object Motion Blur that explains it better than the Gems example (plus video) and is what I used: Per-Object Motion Blur

"Get in the Van!" - Van B
Kuper
17
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 18th Jun 2015 01:31
@Sasuke
Yep its good tutorial)) But it is using Velocity render.I trying to create blur without it.

Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 18th Jun 2015 10:01
Quote: "But it is using Velocity render.I trying to create blur without it."


You can't without it, the velocity render or in fact vectors is required to define blur direction, which btw, the article you put up and mine are pretty much same thing. Either way you need the velocity vector for both methods to define direction and then you sample the main buffer multiple times with the velocity offset to achieve the blur

"Get in the Van!" - Van B
Kuper
17
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 19th Jun 2015 10:24
OK i made it. Demo attached. There is only one additional cam which simply render the scene into single image.Result image is blurred only by camera movement-rotation.
It is good idea to add depth option - so far objects will blurred less then near.Anyway this way is cheapiest espicially when you use deferred lighting with multiple cameras.

PS. I ve got strange jitter when camera moves but it only appears with V sync off - at fps ~ 1800



Login to post a reply

Server time is: 2025-08-09 02:29:50
Your offset time is: 2025-08-09 02:29:50