Forum

DP Post Processing Effects

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

DP Post Processing Effects

Postby GiffE » Thu Oct 09, 2008 4:31 pm

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.
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby ceriux » Thu Oct 09, 2008 4:52 pm

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)
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Error » Thu Oct 09, 2008 7:47 pm

that radial blur looks awesome. yes, someone please help him.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby VorteX » Fri Oct 10, 2008 9:47 am

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.
VorteX
 
Posts: 12
Joined: Fri Jan 14, 2005 8:37 am

Postby GiffE » Fri Oct 10, 2008 11:33 am

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.
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby VorteX » Fri Oct 10, 2008 12:29 pm

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
VorteX
 
Posts: 12
Joined: Fri Jan 14, 2005 8:37 am

Postby GiffE » Fri Oct 10, 2008 12:41 pm

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.
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest