Moderators: Nexuiz Moderators, Moderators
Samual wrote:Never mind, I got the glsl thing to work.... What you left out is that we have to use r_glsl_postprocess_uservec1 for setting the individual options.. Now, I use "1 1 0 0" and I think it makes a pretty decent depth of field - I like it.
I do have one question though, what are the other arguments? (Arg 3 and Arg 4?).. What do they do, I mean.
cl_cmd blurtest x y zr_glsl_postprocess 1
r_glsl_postprocess_uservec1 "3 5 0 0" // 1st arg: radius, 2nd: power
Lee_Stricklin wrote:d00d! those blur screens look pretty kick ass! I can imagine seeing something on the same level as the first one while tromping around at like 60MPH and something like the second one when you boost yourself at like 120MPH.
terencehill wrote:Lee_Stricklin wrote:d00d! those blur screens look pretty kick ass! I can imagine seeing something on the same level as the first one while tromping around at like 60MPH and something like the second one when you boost yourself at like 120MPH.
I don't like this blur effect, the effect that rly kicks ass is the MOTION blur. It blurs only the part of the screen moving, the faster the movement, the stronger the effect. An example is the wonderful video Octobre by Pavlvs (it's applied by a video editor, not by the game, obviously).
r_glsl_postprocess_uservec1 "1 1 0 0"
r_glsl_postprocess 1
r_glsl_postprocess_uservec1 "3 5 0 0" // 1st arg: radius, 2nd: power
The comment here isn't correct, since those values are the result of some operations on x y z, being y and z the real radius and power.
Samual wrote:I feel the same way. Love the video. But I do like the depth of field blur too. Where objects further away are blurred compared to closer objects.... I accomplish this with:
- Code: Select all
r_glsl_postprocess_uservec1 "1 1 0 0"
I think it looks nice, what's your opinion on it?
mand1nga wrote:r_glsl_postprocess 1
r_glsl_postprocess_uservec1 "3 5 0 0" // 1st arg: radius, 2nd: power
The comment here isn't correct, since those values are the result of some operations on x y z, being y and z the real radius and power.
No, I'am right, as the time parameter works only with the blurtest command and handled from qc.
if(cmd == "blurtest") {
blurtest_time0 = time;
blurtest_time1 = time + stof(argv(1)); // argv(1) is x
blurtest_radius = stof(argv(2)); // argv(2) is y
blurtest_power = stof(argv(3)); // argv(3) is z
} if(time > blurtest_time0 && time < blurtest_time1)
{
float r, t;
t = (time - blurtest_time0) / (blurtest_time1 - blurtest_time0);
r = t * blurtest_radius;
f = 1 / pow(t, blurtest_power) - 1;
cvar_set("r_glsl_postprocess", "1");
cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(r), " ", ftos(f), " 0 0"));
}
else
{
cvar_set("r_glsl_postprocess", "0");
cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");
}extern cvar_t r_motionblur;
extern cvar_t r_frametime
void DrawAccumBlur (void)
{
static int blurstate = 0;
float accblur;
static float damagetime = -1.0f;
if (!r_motionblur.value) return;
if (cl.stats[STAT_HEALTH] <= 0)
{
accblur = 0.75f;
}
else if (cl.cshifts[CSHIFT_DAMAGE].percent)
{
accblur = 0.75f;
damagetime = 0.5f;
}
else if (damagetime >= 0.0f)
{
damagetime -= r_frametime;
accblur = 0.75f;
}
else if (cl.cshifts[CSHIFT_CONTENTS].percent)
{
accblur = 0.666f;
}
else accblur = -1.0f;
if (accblur <= 0.0f)
{
blurstate = 0;
return;
}
if (!blurstate)
{
glAccum (GL_LOAD, 1.0f);
}
else
{
glAccum (GL_MULT, accblur);
glAccum (GL_ACCUM, 1.0f - accblur);
glAccum (GL_RETURN, 1.0f);
}
blurstate = 1;
}
DrawAccumBlur (); 
merlijn wrote:About the server rating thing: Let's not do this. It will only cause the already popular servers to become more and more popular leaving many other (new) servers empty. Not to mention that a system for this would generally be quite easy to abuse in many different ways. Sorting servers by means of the bookmarks, ping and empty/full switches is more than enough. Only thing I'd personally like is to have bookmarked servers always shown (full/empty don't affect them).
About the authentication thing: there is a long thread that has been moved to the trash for offtopic nonsense. Despite this setback there is a lot of good (implementation) discussion. Doing this the right way will be fairly heavy job, but I'd be happy to talk about the concepts of how this should work.


Samual wrote:Alright well I did something wrong here, I wrote a small AccumBuffer and something just isn't working. Halp!!!!!
mand1nga wrote:Samual wrote:Alright well I did something wrong here, I wrote a small AccumBuffer and something just isn't working. Halp!!!!!
What are you trying to do?
Why don't you use the existing blur effect from client qc?

tundramagi wrote:Isn't motion blur used on 24FPS movies to make fast action look more smooth?
How much gpu/cpu does it use... my intel card could use some of that smoothing (and probably can't do it)

Samual wrote:tundramagi wrote:Isn't motion blur used on 24FPS movies to make fast action look more smooth?
How much gpu/cpu does it use... my intel card could use some of that smoothing (and probably can't do it)
Well it would only make it slower for you, sorry. But good news everyone.. I GOT IT TO WORK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (I KNOW RIGHT?!)
Only supported platform currently is Windows (And this won't change unless I get a lot of help), and compiling this little fucker is a bitch.... Literally, it's almost impossible without hours of troubleshooting. So until I become a better coder, it's not viable.
As for performance, I noticed a 17% drop in framerate (From 170), so it was very usable to me. Blur amounts can't be adjusted quite yet, i'm sure in a release i'll implement settings for it.
Good job, Can you post some screenshots?
If it's window's only it might not get in. Linux is the main dev platform and crossplatform support is always aimed at from what I've seen. Why is it win only? Isn't OpenGL cross platform? You should beable to get it to work on both with OpenGL.
=========== Main Code, gl_rmain.c ============
Need this to compile: #include <gl\gl.h>
Code:
extern cvar_t r_motionblur;
void DrawAccumBlur (void)
{
static int blurstate = 0;
float accblur;
static float damagetime = -1.0f;
if (!r_motionblur.value) return;
// evaluate blur conditions
if (cl.stats[STAT_HEALTH] <= 0)
{
// being dead always overrides everything else
accblur = 0.75f;
}
else if (cl.cshifts[CSHIFT_DAMAGE].percent)
{
// initial damage blur
accblur = 0.75f;
damagetime = 0.5f;
}
else if (cl.cshifts[CSHIFT_CONTENTS].percent)
{
// blur less if underwater
accblur = 0.666f;
}
else accblur = -1.0f;
if (accblur <= 0.0f)
{
// reinit if we're not blurring so that the contents of the
// accumulation buffer are valid for the frame
blurstate = 0;
return;
}
if (!blurstate)
{
// load the scene into the accumulation buffer
qglAccum (GL_LOAD, 1.0f);
}
else
{
qglAccum (GL_MULT, accblur); // scale contents of accumulation buffer
qglAccum (GL_ACCUM, 1.0f - accblur); // add screen contents
qglAccum (GL_RETURN, 1.0f); // read result back
}
blurstate = 1;
}
=========== Variable setup, gl_rmain.c ============
At the top: cvar_t r_motionblur = {CVAR_SAVE, "r_motionblur", "0", "motion blur testing"};
Respectively with others: Cvar_RegisterVariable(&r_motionblur);
=========== Declaration stuff, glquake.h ============
Under GL_ARB_multitexture: extern void (GLAPIENTRY *qglAccum)(GLenum op, GLfloat value);
=========== Declaration stuff, vid_shared.c ===========
Under GL_ARB_multitexture: void (GLAPIENTRY *qglAccum)(GLenum op, GLfloat value);
In opengl110funcs array: {"glAccum", (void **) &qglAccum},

tundramagi wrote:This is awsome. I can't wait to try it on the nvidia box.
I'll use slomo + motion blur to get a real movie effect.


FruitieX wrote:Awesome! BTW for HUD, check my recent project out:
http://pics.nexuizninjaz.com/viewer.php ... ww5s3t.jpg
http://pics.nexuizninjaz.com/viewer.php ... dpjswi.jpg
http://pics.nexuizninjaz.com/viewer.php ... 2g2pg0.jpg
http://dev.alientrap.org/issues/show/274

Samual wrote:FruitieX wrote:Awesome! BTW for HUD, check my recent project out:
http://pics.nexuizninjaz.com/viewer.php ... ww5s3t.jpg
http://pics.nexuizninjaz.com/viewer.php ... dpjswi.jpg
http://pics.nexuizninjaz.com/viewer.php ... 2g2pg0.jpg
http://dev.alientrap.org/issues/show/274
Cool, but add a little more texture into there that matches the themes? I do like that though, fits.

FruitieX wrote:Weird, I don't get these artifacts with motion blur and HDR enabled. Seems to work fine (on Linux)



Return to Nexuiz - Development