Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Question on Motion Blur

Author
Message
MASTER OF PUPPETS
20
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 31st Dec 2004 15:40
Motion blur is cool! Yet i cant seem to do it right. My Idea was to load a character attack animation three times and animate each model as follows: the first model I animate at the frame it should be at (real time) and the second model I also animated but I animated it at one frame behind the first model, and the third animation was set one frame behind the second model. I know that it sounds like it should work but it doesn't.
Can somebody please show me a code example using no media(You know, just use - Make object sphere - and do the blur behind its movement)
Thank You in advance.

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
BenDstraw
20
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Arizona
Posted: 31st Dec 2004 15:53
I'm sorry I cant help you but
your name
your signature
and Metallica ROCK
oh yeah sorry I cant help just thought I should shout out to a fellow Metallica fan!

¤§Ben§¤
Free is good price eh then visit
http://www.geocities.com/blacklab_studios
MASTER OF PUPPETS
20
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 31st Dec 2004 23:57
METALLICA!!!!!!!!!!!!!!!! ... oh yeah um ... uh hem ...

MOTION BLUR!!!!!!!!!!!!!!

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Jan 2005 18:54
Try this mate;



Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 2nd Jan 2005 19:49
Wasn't there a motion blur snippet that involved turning off the backdrop?


I spelled "disappointment" wrong. Pahintulutan ang di-inaasahang nakakahiyang pagkakamaling dulot ng kamangmangan. Have at you.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Jan 2005 21:21
There may have been, because without the backdrop, the screen is not updated with old information ( such as a static landscape ), but only draws what is new on that rendering pass.

But, that would mean that you would have trails everywhere, and they wont be faded ( they'd look identical to the original ) unless you have some way of changing it?... I don't see how though

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
MASTER OF PUPPETS
20
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 4th Jan 2005 12:58
Thank you JessTicular
I appreciate the help but you know... THAT IS SO SIMPLE..I cant believe that I couldnt figure it out...I need some person to reach through the monitor and smack me in the face!!!
Thanks again and now I will wait here for someone to give me that smack.

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 4th Jan 2005 22:44 Edited at: 4th Jan 2005 22:45
Sorry, but I got to do this.....METALLICA!!!

ok, I'm much better now...
Nosnevel Xela
20
Years of Service
User Offline
Joined: 14th Dec 2004
Location: MA, USA
Posted: 5th Jan 2005 04:44 Edited at: 5th Jan 2005 04:45

Ok, that looks pretty good, but why not try this:



I noticed that because all the boxes were the same size, they overlapped in kind of a weird way. So all I did was make the two ghosted boxes smaller, and I hid them when the box was not rotating.
MASTER OF PUPPETS
20
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 5th Jan 2005 07:57
Nosnevel Xela!!!
That makes it look Better!!!
but there seems to be a problem...
when leftkey()=1 and the motion blur begins, the blur doesn't seem to work right.
the "blur" goes back where the original object never was in the first place.
The rectangle rolls to the left but it flashes a bit to the right of the unblurred object.
Take a good look at it and you will know what I mean
I appreciate the fact that you're willing to help but if you could fix that I think that would be a good post in the snippets forum!!!

My Pre-Signature Signature
ME!!!!!!!FREAKIN'!!!!!!TALLICA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Im pullin' your strings in my world sucker

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
Nosnevel Xela
20
Years of Service
User Offline
Joined: 14th Dec 2004
Location: MA, USA
Posted: 5th Jan 2005 08:56 Edited at: 5th Jan 2005 08:57
Ok, I think the problem is basically that there is a line that deals with how blurry the box is. (the 15)



Originally this was set to 5, but I thought it looked better at 15. Try setting it to around 9 or 10, it looks pretty good that way. I also tweaked it a little bit to make the blurriness adjustable by using the up and down keys.



Hope this helps
I will put this in the snippets section, but it was JessTicular who came up with the idea. (Just giving credit where credit is due)

I am who I am
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 5th Jan 2005 14:49
lol, thanks mate.

It's not much, but if you want to put it in the Snippets, or Codebase, go for it

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
MASTER OF PUPPETS
20
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 6th Jan 2005 00:20
JessTicular I have a favor to ask...
Here is your mission if you choose to accept it...
Make the red rectagle move around on a matrix with the arrow controls, and make the camera follow it like a 3rd person game where your guy runs extremely fast.
This post will self destruct in
5........4........3...........2.........1...........BOOOOOOOOOOOM!!!!

You would be dead right now but I haven't finished the computer monitor explosion game Ive had in the works for a while.

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 6th Jan 2005 09:05
I assume that you want a motion blur example?

Well, I don't want to just write all the code for you. It's better if you take a description, and turn that into code.

How I would go about doing it is, I would first set up an arrar or somesuch to hold previous position/rotation values of the 'character'.

Next, I would set a timestamp variable, so that every xMilliseconds, you store the values so that you can do the tricky blur stuff.

Basically, by using the time variable, as the player goes faster, the gap between the player and the first blur etc gets further, but as the player is going slower, the gap is less.

You should be able to figure out how to go about doing it.

For animated models, you should also store the current animation frame along with the position/rotation values, so you can set the 'blur' objects to the previous frames ( if you want it to do that, that is ).

Hope that helps

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Nosnevel Xela
20
Years of Service
User Offline
Joined: 14th Dec 2004
Location: MA, USA
Posted: 6th Jan 2005 10:01 Edited at: 6th Jan 2005 10:37
Ok, I quickly patched together a few old programs of mine and made you the box on a matrix example. You can find it here. Also make sure you download the "floor1.bmp" from this post, and put it in the same folder as your project.



Arrow keys move you
Return and Shift raise and lower the camera (so you can see better)

Here's the exe:
http://home.comcast.net/~27Levenson/Blur.zip

I hope this works!

I am who I am

Attachments

Login to view attachments

Login to post a reply

Server time is: 2025-05-24 19:51:57
Your offset time is: 2025-05-24 19:51:57