Motion Blur

Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
edited July 2005 in Off-Topic
<div class="IPBDescription">from NS .dem file</div> So...

Since the point of having a very high framerate is that you're eye will act as an accumulation buffer(retina buffer™); I thought I'd try and simulate a very high framerate by using motion blur.

<a href='http://hem.bredband.net/congal/MTB_Test.bik' target='_blank'>MTB_Test.bik</a>

It's a bink file. Just a random very short snippet with a lot of movement. 20 source frames per motion blurred frame, 50 fps bink with relatively low compression. So it's intended to be roughly equivalent to 1000 FPS but there's still some problems here(mostly due to lack of vsync during .bik playback, timer quantization during demo playback causing movement to lurch forward sometimes which makes it not as smooth as it could have been and 50(real) FPS playback not being quite enough).

Nothing fancy for generating the motion blur, just startmovie <name> 1000. And then I wrote a very sloppy little program that just brute force loads frames, convert to floating point on the fly, multiply with a factor to preserve brightness and add to a floating point buffer, convert to 24-bit RGB and save as .BMPs(instead of a progress bar I just slapped the images into a texture(using rectangular texture extension) and rendered on the screen with a quad in openGL). Then just using rad video tools to bink it in very high quality settings.

Of course, in real life we tend to not see things this smoothly unless they move very fast because we "lock on" to things with our eyes for short periods at a time and it's allmost impossible not to do this. The point of this being to bring the object of interest into sharp focus. But this is of course nearly impossible to do in a game without some sort of specialized hardware for eye tracking and stuff.

None the less I think it looks a lot better with proper motion blur instead of a of a "choppy" <100 FPS.

Comments

  • NumbersNotFoundNumbersNotFound Join Date: 2002-11-07 Member: 7556Members
    That looks... really really cool. Was that done in post-processing?
  • AlienCowAlienCow Join Date: 2003-09-20 Member: 21040Members
    What plays a bink? Swear I used to have something that did it...
  • ChronoChrono Local flyboy Join Date: 2003-08-05 Member: 18989Members
    edited July 2005
    yeah how do i play the file?

    edit ok i got it working seems very impressive nice and smooth for only 20FPS
  • AlienCowAlienCow Join Date: 2003-09-20 Member: 21040Members
    <!--QuoteBegin-Chrono+Jul 18 2005, 08:54 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Chrono @ Jul 18 2005, 08:54 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> yeah how do i play the file?

    edit ok i got it working seems very impressive nice and smooth for only 20FPS <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Thanks for sharing the secret man <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused-fix.gif' border='0' style='vertical-align:middle' alt='confused-fix.gif' /><!--endemo-->
  • DepotDepot The ModFather Join Date: 2002-11-09 Member: 7956Members
    <!--QuoteBegin-Chrono+Jul 18 2005, 04:54 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Chrono @ Jul 18 2005, 04:54 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> yeah how do i play the file?

    edit ok i got it working seems very impressive nice and smooth for only 20FPS <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Talk to us Chrono! <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused-fix.gif' border='0' style='vertical-align:middle' alt='confused-fix.gif' /><!--endemo-->
  • AlienCowAlienCow Join Date: 2003-09-20 Member: 21040Members
    <!--QuoteBegin-Depot+Jul 18 2005, 08:57 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Depot @ Jul 18 2005, 08:57 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin-Chrono+Jul 18 2005, 04:54 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Chrono @ Jul 18 2005, 04:54 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> yeah how do i play the file?

    edit ok i got it working seems very impressive nice and smooth for only 20FPS <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    Talk to us Chrono! <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused-fix.gif' border='0' style='vertical-align:middle' alt='confused-fix.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    I got it working! Neh neh neh neh nyeh! <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

    Ahem. So I actually used the "Look on the web" or whatever it is that pops up on unrecognised file types, for the first time ever. Quite handy that.

    Use this for binks:
    <a href='http://www.radgametools.com/down/Bink/RADTools.exe' target='_blank'>RAD Tools</a>
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    Really, I just googled how to play bink movies

    Google > all of you!

    To play all I have to do is open up a terminal and type BinkPlayer <nameoffile>
  • JimmehJimmeh Join Date: 2003-08-24 Member: 20173Members, Constellation
    edited July 2005
    EDIT - NM, AlienCow beat me.
  • NumbersNotFoundNumbersNotFound Join Date: 2002-11-07 Member: 7556Members
    *sniff sniff* so beautiful.

    If only there was a way to make it actually look like that in game.
  • MulletMullet Join Date: 2003-04-28 Member: 15910Members, Constellation
    Wow that's pretty cool...
  • raz0rraz0r Join Date: 2003-07-24 Member: 18395Members
    :o

    It's so.... <i>smooth</i> <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
  • BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
  • JediYoshiJediYoshi The Cupcake Boss Join Date: 2002-05-27 Member: 674Members
    My eyes are melting!
  • MantridMantrid Lockpick Join Date: 2003-12-07 Member: 24109Members
    So, wait... can we do this real-time? If so, do you have any plans to release the program?
  • NumbersNotFoundNumbersNotFound Join Date: 2002-11-07 Member: 7556Members
    <!--QuoteBegin-Mantrid+Jul 18 2005, 09:42 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Mantrid @ Jul 18 2005, 09:42 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> So, wait... can we do this real-time? If so, do you have any plans to release the program? <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    If we had enough computational speed to do this, the problem lies in this..

    To be able to "blur" a movement in software, we either have to track the movement of every object beyond each frame, or we have to mesh frames together. So what you see would always be one frame behind.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    edited July 2005
    In HL we don't have access to the engine. In NS not the MOD code either.

    Brute force motion blur in real time isn't really practical since the idea is to just render tens of times more frames then you really need and blending them togheter.

    HL is very CPU bound for a variety of reasons but the GPU should be able to handle the load with the exception of rendering smoke many times quite easily.

    There's a variety of ways to cheat though(real time 3d rendering is ALL about cheating, or it wouldn't be real time). You could make a partial motion blur in post processing(because you know how the player's view has spun around since the last frame and how the player has moved, you can apply a radial blur and a linear blur in real time to fake it). Some mod for HL actually did this, I think it was called VRE(it was a tech demo more than a complete mod)

    You can render the velocity of each object into a separate buffer and use shaders in post to kinda fake it but this is a limited approach in that it breaks some other effects. I don't know how expensive it is to setup.

    3dfx wanted to introduce motion blur with specialized hardware and gl extensions shortly before their demise:
    <!--QuoteBegin-Brian Burke of 3dfx+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Brian Burke of 3dfx)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Well that is a lot to address, but I will do my best to hit each point.

    We have been evangelizing motion blur with developers and end users for several months. Like a lot of hardware features, it will simply take time before games support it. We have completed the OPENGL extension for the T-Buffer, which then allows developers to implement motion blur in their titles. We also are confident that the T-Buffer capabilities will be included in a future version of Direct3D. As a side note, we were very pleased to see Microsoft discuss FSAA and motion blur as features of the X box, as this reaffirms our belief that these are critical features for real-time 3D in the future.

    The appearance of motion blur as mouse trails is due to the fact that we exaggerated the effects in our Quake 3 demo to show how the technology works. It was clearly pointed out that it was a technology demo, not an artistic rendering. Lots of things can be done to make the effect more realistic, like adjusting the intensity of the blur or the distance for each rendering of the object. Quake 3 is probably not the best place for motion blur anyway. A Racing sim would be a more appropriate use. The reason the demo was for Quake 3 is because the folks at id gave us the source code and said, in a effect You say motion blur is useful, then show us.

    As for the difference between a camera lens and a computer display, we go into that in detail in the T-buffer white paper that can be found here <a href='http://www.3dfx.com/3dfxTechnology/motionblur.html' target='_blank'>http://www.3dfx.com/3dfxTechnology/motionblur.html</a>.
    We also covered it in detail in our press meetings.

    As for your description of how we implement motion blur using the T-Buffer it is simply incorrect - we are definitely not simply taking the average of the last 3 frames. Within a given frame, we render each moving object (where a moving object is an object which is moving relative to the camera position and its own movement) up to 4 times and temporally stagger the images slightly to generate motion blur. There are other methods to accomplish a similar effect, but the above is the method we use.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
  • AlienCowAlienCow Join Date: 2003-09-20 Member: 21040Members
    Oh yeh I forgot to say how cool it looked. It'd be murder on the eyes though.
  • InjuryInjury Mahou Shoujo Join Date: 2002-11-10 Member: 7992Banned
    I know, guys. It's bad.
  • StarchyStarchy Join Date: 2003-04-21 Member: 15727Members, Constellation
  • DragonMechDragonMech Join Date: 2003-09-19 Member: 21023Members, Constellation, Reinforced - Shadow
    Gentlemen, we have HOLY FLEEPING CRAP!




    Awesomesauce in a can.
Sign In or Register to comment.