The above video goes away if you are a member and logged in, so log in now!

 Would you like to get all the newest Gaming News fromQJ.NET in your email each day? Want to learn more about the team who brings you the QJ news?

## Motion Blur - wil this method work?

This is a discussion on Motion Blur - wil this method work? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Im looking into Motion Blur without a 3D API. So, Ive thought whether or not a method such as this ...

 Tweet
1. ## Motion Blur - wil this method work?

Im looking into Motion Blur without a 3D API. So, Ive thought whether or not a method such as this would work:
1. draw the old scene (stored into a buffer/image with a lower alpha (<1)).
2. draw the current scene.
3. draw the old scene over the current scene.
I wouldnt be using this complete,y rather just for a time under a second, then maybe once for about 3-5 seconds...

So - I was wondering whether this plan would work or not. And if it would owrk, here is some lua code to see if it would work (probably wont - the code below - so thats why im posting it here) (also lua because Im restricted to it and for its relatively close syntax to pure puesdo code)
Code:
```oldscene = Image.createEmpty(480,272)

newcolor = {r=0,g=0,b=0,a=0}
finalcolor = Color.new(0,0,0)
screencolor = Color.new(0,0,0)

time = 0
pi = math.atan(1) * 4

while true do
for x=0,480 do
for y=0,272 do
screencolor = screen:pixel(x,y) -- get pixel color
newcolor = screencolor:colors() -- give it to new table
newcolor.a = 126 -- edit transparency value
finalcolor = Color.new(newcolor.r,newcolor.g,newcolor.b,newcolor.a)
oldscene:pixel(x,y,finalcolor) -- give that color to the old scene
end
end

screen:clear()

x = math.sin(pi * 2 / 360 * time) * 150 + 184.5
screen:print(x, 100, "This will blur", Color.new(0,255,0))
time = time + 1
if time >= 360 then		time = 0	end

screen:blit(0,0,oldscene)

screen.waitVblankStart()
screen.flip()
end```
In theory that should work - but Im most liely wrong.

Id test it myself, but i dont have a PSP and transparency isn't very nice with WLP... So ya - can someone through this into a lua script and test it?

This should work... I hope - test it?
-= Double Post =-
AHh... I guess ill wait til' morning for an answer :'(

2. Try it the following way:

- Render scene to buffer1
- blend buffer2 (black on start) over buffer1 with a good alpha (sth along 0.25-0.5)
- display contents of buffer1
- Copy buffer1 to buffer2
- repeat

It's basically what you're trying to do, but with least effort and also fast with hardware blending support (GU).

3. He only has windows luaplayer, he's gonna have a tough time using the Gu.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

All times are GMT -8. The time now is 03:05 AM.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY