Motion Blur

Blitz3D Forums/Blitz3D Programming/Motion Blur

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graphics3D 640,480,16,2
camera=CreateCamera()
CameraClsMode camera,0,1
sprite=CreateSprite(camera)
EntityColor sprite,0,0,0
PositionEntity sprite,0,0,1
pivot=CreatePivot()
For i=0 To 100
	temp=CreateSphere(4,pivot)
	PositionEntity temp,Rnd(-200,200),Rnd(-200,200),Rnd(-200,200)
	EntityColor temp,Rand(127)+128,Rand(127)+128,Rand(127)+128
	ScaleEntity temp,2,2,2
	EntityFX temp,1
Next
blur#=0.1
While Not KeyHit(1)
	If kbdelay<1
		kbdelay=10
		If KeyDown(44) blur=blur-0.01: If blur<0 blur=0
		If KeyDown(45) blur=blur+0.01 If blur>1 blur=1
		EntityAlpha sprite,blur#
	Else 
		kbdelay=kbdelay-1
	EndIf
	TurnEntity pivot,.1,.1,-.2
	RenderWorld
	Text 0,0,"Use Z and X to change blur. Current Blur:"+blur#
	Flip
Wend
End


And THATS how it's done! :)