DP Post Processing Effects

Discuss programming in the QuakeC language.
Post Reply
GiffE
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT
Contact:

DP Post Processing Effects

Post by GiffE »

I was just messing around in darkplaces to get some cool glsl post processing effects.
I was editting glsl/default.glsl to get a few effects which I may or may not use.

Blur:
Image
Radial Blur:
Image
While these are simple to make it is difficult for them to be used in a mod. (or I just do not know how to). The effects would be permanently enabled and only have static parameters.

I feel as though you should be able to call upon screen effects such as those blurs in qc, giving them parameters (amount of blur, or radius). Similar to the effectinfo.txt, capable of adding effects and calling them in qc.
Quite frankly I am unsure of how the code for that might work. I do think it should be something looked at to give modders the ability to create screen effects and such into their mods without getting into engine editing.

If I am mistaken and there is a way let me know :oops:,
Last edited by GiffE on Thu Oct 09, 2008 6:15 pm, edited 1 time in total.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

Those definitely could be cool effects in a mod/game and could be used for multiple things i hope someone helps you with this topic.
(oh and btw you mod looks amazing)
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Post by Error »

that radial blur looks awesome. yes, someone please help him.
VorteX
Posts: 12
Joined: Fri Jan 14, 2005 8:37 am
Contact:

Post by VorteX »

DP's postprocess effects HAS dynamic parms - it's the r_glsl_postprocess_uservecX cvars, there is 4 vectors, totally holding 16 parms. This cvars can be set dynamically by CSQC, or stuffcmd'ed with SVQC.

In Deluxe Quake i just set all r_glsl_postprocess_uservec every frame in CSQC

To enable this parms in default.glsl - uncomment certain
// uniform vec4 UserVecX

BTW proper blur requires several passes to look smooth, DP currently has only one. So it has to be a bit harsh.
GiffE
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT
Contact:

Post by GiffE »

VorteX wrote:DP's postprocess effects HAS dynamic parms - it's the r_glsl_postprocess_uservecX cvars, there is 4 vectors, totally holding 16 parms. This cvars can be set dynamically by CSQC, or stuffcmd'ed with SVQC.

In Deluxe Quake i just set all r_glsl_postprocess_uservec every frame in CSQC

To enable this parms in default.glsl - uncomment certain
// uniform vec4 UserVecX

BTW proper blur requires several passes to look smooth, DP currently has only one. So it has to be a bit harsh.
I did see that its a very "cheap hack" way of making it work.
I also don't trust the client very much by using cvars for that info.

That blur IS done in dp and looks good enough for me, more passes would make it better looking but with single pass you can get ok results.
VorteX
Posts: 12
Joined: Fri Jan 14, 2005 8:37 am
Contact:

Post by VorteX »

GiffE wrote:
I did see that its a very "cheap hack" way of making it work.I also don't trust the client very much by using cvars for that info.
All you need is to make Client Side QC (or CSQC) update this cvars every frame (even if this will be static value) - then it can't be changed in console.

If you don't know many about CSQC, you need to learn it's basics (since it is main hub to add new client-related features without engine coding). There should be some topics about it on coding board. And i remember Urre has posted some CSQC tutorials on QExpo.
That blur IS done in dp and looks good enough for me, more passes would make it better looking but with single pass you can get ok results.
Yeah, but blur is one of easiest to implement postprocess shaders. Some advanced ones (like screen space ambient occlusion or bloom) requires more passes. LordHavoc says that adding other passes is not hard.

Anyway - it is great to see how useful this feature could be, with working examples there can be standarts and then we can ask for new enhancements of this feature :)

Here is my lame examples of underwater blur:
Image

And tone mapping/eye adaptation:
tone off:
Image

tone on:
Image
GiffE
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT
Contact:

Post by GiffE »

VorteX wrote:GiffE wrote:
I did see that its a very "cheap hack" way of making it work.I also don't trust the client very much by using cvars for that info.
All you need is to make Client Side QC (or CSQC) update this cvars every frame (even if this will be static value) - then it can't be changed in console.
I can work my way around csqc just fine :wink: and was planning on doing just as you said. (in the mean time)
I'm just recommending a feature is all, something a little less cheap.
Yeah, but blur is one of easiest to implement postprocess shaders. Some advanced ones (like screen space ambient occlusion or bloom) requires more passes. LordHavoc says that adding other passes is not hard.
I am aware others take more passes, you did not say others. I was talking about blur.
BTW proper blur requires several passes to look smooth, DP currently has only one. So it has to be a bit harsh.
Post Reply