Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Post by Pixel Eater »

Motion blur with adjustable quality:


Strength is how far the blur stretches
Recovery is how long it stays on screen
Samples are how smoothly it blurs

For best performance I recommend setting vid_vsync to false.
(I gained nearly 20fps on the VSync diet!)
MBlur1.04.pk3
Spoiler: Changes
Spoiler: Break open in case of emergency
You do not have the required permissions to view the files attached to this post.
Last edited by Pixel Eater on Fri May 03, 2019 8:21 am, edited 6 times in total.
User avatar
Caligari87
Admin
Posts: 6190
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Simple Motion Blur

Post by Caligari87 »

This looks really cool. Setting samples and recovery to max actually looks pretty good, even masking lower framerates a little.

Couple little niggles: If recovery is set to zero then the blur never goes away. It's a cool trippy effect but might be worth clamping that to some sane minimum. While turning is fine, pitch seems herky-jerky somehow.

I could see variations on this being useful for various status effects like stunning or something. Are you planning on adding movement blur (I imagine this could be done with a zoom blur, with the "center" point adjusted by the player's velocity vector)?

8-)
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Simple Motion Blur

Post by Nash »

Very cool! At its default settings, it's subtle enough to notice it's "just" there.

Would love to see movement blur too, or even object blur (though I'm not sure how that would be achieved).

Oh and by the way -

Might want to change all INPUT_PITCH/YAW to MODINPUT_PITCH/YAW because the latter takes into account if the player is frozen. I vaguely remember you said this was slightly based off my weapon sway mod (or was it Tilt++?) and all released versions of my mods currently don't have this fix yet (which obviously causes weirdness when the player is frozen).
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.01

Post by Pixel Eater »

Thanks for the great suggestions :)
I’ve set the minimum recovery to 10 and hopefully corrected the pitch jankiness. It's also now using MODINPUT_* instead.

And yeah Weapon Sway is where the ideas for how to treat the player input come from. I would have been trying to use the player angle and pitch otherwise :3:

Before I even attempt to introduce player-directional blur though I would like to figure out how to remove that clamp function from the 'for' loop in the shader. If I can predict and limit the repeats to when they encounter the screen boundaries instead, I'd be much happier :?
User avatar
Tormentor667
Posts: 13547
Joined: Wed Jul 16, 2003 3:52 am

Re: Simple Motion Blur 1.02 - Performance update

Post by Tormentor667 »

I tried it and it seems pretty good already but not perfect. I think at the end of the recovery, the movement isn't right, it feels if as soon as you stop moving the mouseview, the sight is still moving. It's hard to explain to be honest, but it doesn't feel right yet. Does anyone know what I mean? :-D

If it'd work perfect, I'd consider adding it to Blade of Agony.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Simple Motion Blur 1.02 - Performance update

Post by Nash »

There seems to be some nasty VM abort in multiplayer...
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.02 - Performance update

Post by Pixel Eater »

Oh dip- I was just about to upload 1.03 as well. Will check into that first...

I've been trying to PM you Nash but I'm getting blocked here and on Discord. Basically it was just to say 'affirmative' though :)
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Simple Motion Blur 1.02 - Performance update

Post by Nash »

Pixel Eater wrote:Oh dip- I was just about to upload 1.03 as well. Will check into that first...

I've been trying to PM you Nash but I'm getting blocked here and on Discord. Basically it was just to say 'affirmative' though :)
Woops! Looks like I accidentally went overboard with those privacy settings. I'll add you as a friend on Discord. :D
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Pixel Eater »

Ha ha, no worries and thanks Nash :thumb:
Tormentor667 wrote:Does anyone know what I mean? :-D
I think I do! Does the Auto stop help it for you?
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Nash »

Sorry I wasn't clear enough with my report on the VM abort in multiplayer -

Specifically, it happens when one of the players exit the game. The remaining player in the game will get the VM abort.
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Pixel Eater »

Still in 1.03? Damn, I'll keep brainstorming then :o
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Nash »

Oh my bad, 1.03 fixes the VM abort when a player quits in multiplayer. Thanks!
User avatar
Agitatio
Posts: 242
Joined: Mon Sep 05, 2011 10:07 am
Graphics Processor: nVidia with Vulkan support

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Agitatio »

Lighten gives blur directionality, but in the same direction as camera. Is it possible to "invert" that behaviour? Also maybe cap Strength to 8 - 512? :P
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Pixel Eater »

@Nash: Ah, thank the hells :D
Grigori wrote:Lighten gives blur directionality, but in the same direction as camera. Is it possible to "invert" that behaviour? Also maybe cap Strength to 8 - 512? :P
That should be the correct behaviour- it's brighter near to it's current position and fades to where it once was. I could try a darken mode for trippy effects possibly.

I was going to limit the bottom end of strength too until I realised you can get a "poisoned player" effect with a low strength and recovery and with auto stop turned off :mrgreen:
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Simple Motion Blur 1.03 - Faster recovery

Post by Nash »

Is it somehow possible to merge the functionality of both the "lighten" shader and the normal shader into 1 file? Perhaps pass in a uniform to the .fp file?

Return to “Shaders”