The Style Of Nexuiz (Updates you want)

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

What do you think?

I support all your ideas
11
41%
I support most of your ideas
7
26%
I support some of your ideas
6
22%
I support none of your ideas
3
11%
 
Total votes : 27

Postby Samual » Thu May 28, 2009 2:20 pm

Bump ^_^
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

Postby mand1nga » Thu May 28, 2009 7:40 pm

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?
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby Samual » Thu May 28, 2009 10:39 pm

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?


That isn't motion blur. It's just a static blur.
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

Postby tundramagi » Fri May 29, 2009 8:23 am

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 :P)
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby Samual » Fri May 29, 2009 2:50 pm

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 :P)


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 :P), 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.
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

Postby tundramagi » Fri May 29, 2009 5:27 pm

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 :P)


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 :P), 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.
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby Samual » Fri May 29, 2009 7:38 pm

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.


It's Windows only because I don't know how to add the GL attributes on Linux or OS X. I'm consulting this with div0 and some other people right now. The code which is not dependent on OS is here:

Code: Select all

=========== 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},
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

Postby tundramagi » Sat May 30, 2009 6:03 am

This is awsome. I can't wait to try it on the nvidia box :D.
I'll use slomo + motion blur to get a real movie effect :P.
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby Samual » Sat May 30, 2009 7:53 am

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

I still need moar help! SDL doesn't work so far, and now the WGL version doesn't work. Don't know what I broke, but it's broken. Meh. I need to work on declaring the GL attributes for each OS.

So I will need testers for OS X and Linux when the time comes.
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

Postby Samual » Mon Jun 01, 2009 8:03 pm

Good news: We're redesigning the method to a texture blur like with bloom... This method will work on all platforms, and should be pretty light on resources.. I'll post a patch when complete.
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

PreviousNext

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron