Ooops
November 28, 2020, 02:33:21 AM

Author Topic: [bb] Motion Blur by daaan [ 1+ years ago ]  (Read 714 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Motion Blur by daaan [ 1+ years ago ]
« on: June 29, 2017, 12:28:41 AM »
Title : Motion Blur
Author : daaan
Posted : 1+ years ago

Description : This is a very small lib that with tweaking can do some really neat things. I have a demo that you can download which has complete source and a simple example.

<a href="http://www.hi-toro.com/blitz/MotionBlur.rar" target="_blank">http://www.hi-toro.com/blitz/MotionBlur.rar[/url]
<a href="http://www.hi-toro.com/blitz/MotionBlur.zip" target="_blank">http://www.hi-toro.com/blitz/MotionBlur.zip[/url]

Also, please vote for my gallery screenshot at

<a href="http://blitzbasic.com/gallery/view_pic.php?id=1193&gallery=&page=1" target="_blank">http://blitzbasic.com/gallery/view_pic.php?id=1193&gallery=&page=1[/url]


Code :
Code: BlitzBasic
  1. ; l_surface by Daniel Wooden
  2. ; Created : 10/25/2005
  3.  
  4. Global l_surface = CreateSprite( camera )
  5.  
  6. SpriteViewMode l_surface, 2
  7. PositionEntity l_surface, 0, 0, 0.00638
  8. ScaleSprite l_surface, 0.0064, 0.0048
  9. EntityAlpha l_surface, 0.5
  10.  
  11. Global l_texture = CreateTexture( 640, 480, 1+256 )
  12. ScaleTexture l_texture, 1.598, 1.066
  13. TextureBlend l_texture, 2
  14.  
  15. EntityTexture l_surface, l_texture
  16.  
  17. Function l_update()
  18.        
  19.         RenderWorld
  20.         CopyRect 0, 0, 640, 480, 0, 0, BackBuffer(), TextureBuffer( l_texture )
  21.        
  22. End Function
  23.  
  24. Function l_setAlpha( a# )
  25.        
  26.         EntityAlpha l_surface, a#
  27.        
  28. End Function


Comments :


Alienforce(Posted 1+ years ago)

 Thanks, This was really good..


Barliesque(Posted 1+ years ago)

 Excellent effect, very nicely presented.  I'd already given the gallery image a 5/5.   ...and thanks for the preview!  :)


doctorskully(Posted 1+ years ago)

 Cool effect!I was experimenting a bit and got it to work with other width/height values than 640x480, and the sprite is now 1 unit away from the camera so you don't have to make the CameraRange near# value as small:Global l_surface=CreateSprite(camera)Global width=GraphicsWidth(),height=GraphicsHeight()SpriteViewMode l_surface,2PositionEntity l_surface,0,0,1EntityOrder l_surface,-100ScaleSprite l_surface, 1, 0.75Global l_texture=CreateTexture(width,Height,1+256)TextureBlend l_texture,2ScaleTexture l_texture, (Float TextureWidth(l_texture)/Float width),(Float TextureHeight(l_texture)/Float Height)EntityTexture l_surface,l_textureEntityAlpha l_surface,.3Function l_setAlpha(alpha#)      EntityAlpha l_surface,alpha#End FunctionFunction l_update()   RenderWorld   CopyRect 0,0,width,Height,0,0,BackBuffer(),TextureBuffer(l_texture)   End Function


Realm Master(Posted 1+ years ago)

 Simple, but effective, great job! The Screenshot it awesome!


Trader3564(Posted 1+ years ago)

 very awesome!


LamptonWorm(Posted 1+ years ago)

 Cool :)Has anyone tried adjusting this for multiple cameras by the way? e.g. 2 player split screen. Guess its a case of having x2 sprites one per cam etc.


n8r2k(Posted 1+ years ago)

 um does anyone have the demo for this


Play(Posted 1+ years ago)

 can someone refresh the link ?


Ked(Posted 1+ years ago)

 Does anyone have the demo for this?


n8r2k(Posted 1+ years ago)

 link?


Ked(Posted 1+ years ago)

 ...Obviously, there is no and will never be a link.


daaan(Posted 1+ years ago)

 Hey all!I still have the code for this somewhere in my gmail account. if you would like, Send an email to dan.wooden@... and I will reply with the demo/code.


BlitzSupport(Posted 1+ years ago)

 I just noticed I was hosting this at one point, but a lot of links died when I changed web host. I'd be happy to put it back on the original link if you want to email it to me, daaan.


daaan(Posted 1+ years ago)

 Sent :D


BlitzSupport(Posted 1+ years ago)

 Thanks, daaan -- both links at the top are now working again. It's a really cool effect too!


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal