Post effects in CableRacer: DoF and Thingie
-
- OGRE Expert User
- Posts: 1067
- Joined: Mon Mar 29, 2004 8:49 pm
- Location: the Netherlands
- x 43
- Contact:
Post effects in CableRacer: DoF and Thingie
For a long time now I have been working on a game with the working title Cableracer. There is no art yet and many things still need doing, but I do feel like I am actually getting somewhere. I am not putting an executable online yet, because I do not consider the game finished enough for playtesting.
What I think is fun to show right now, is the post effects that I have been implementing lately. The main problem with the game as it was, is that it is difficult to see how far you are from an object. Therefore I implemented depth of field-blur, but in an altered form: the closer, the sharper and the further, the blurrier, so there is no focal distance to set. It works quite fine and looks like this right now:
I tried some different techniques and in the end I settled with a mix of what I read in a presentation by Ati ("Advanced depth of field" by Thorsten Scheuermann), my own thoughts and some improvements by Thomas/Thamas (who rarely posts here). I have two versions now for different graphics settings, which are the first two images in the image below. On 1024*768 my Geforce 6600 GT pulled 43fps on high settings and 135 on medium setting. I also implemented the exact Ati-algorithm, but bombs, does that look ugly! Close objects smear out way too much on a far background.
I also had a very useless day experimenting with nice effects for the credits-screen. This is by far the most stupid feature in the game and the credits-screen now also has a worse framerate than the game on medium setting (70fps in the credits), but hey, I had good fun! The great benefit of hobby projects over professional projects is that I can actually waste my time on fun things without use.
I hope to have an executable available in a couple of weeks, but in the meanwhile I am also onto crowd AI programming for one school project and image retrieval for another, so I doubt I will get the time.
What I think is fun to show right now, is the post effects that I have been implementing lately. The main problem with the game as it was, is that it is difficult to see how far you are from an object. Therefore I implemented depth of field-blur, but in an altered form: the closer, the sharper and the further, the blurrier, so there is no focal distance to set. It works quite fine and looks like this right now:
I tried some different techniques and in the end I settled with a mix of what I read in a presentation by Ati ("Advanced depth of field" by Thorsten Scheuermann), my own thoughts and some improvements by Thomas/Thamas (who rarely posts here). I have two versions now for different graphics settings, which are the first two images in the image below. On 1024*768 my Geforce 6600 GT pulled 43fps on high settings and 135 on medium setting. I also implemented the exact Ati-algorithm, but bombs, does that look ugly! Close objects smear out way too much on a far background.
I also had a very useless day experimenting with nice effects for the credits-screen. This is by far the most stupid feature in the game and the credits-screen now also has a worse framerate than the game on medium setting (70fps in the credits), but hey, I had good fun! The great benefit of hobby projects over professional projects is that I can actually waste my time on fun things without use.
I hope to have an executable available in a couple of weeks, but in the meanwhile I am also onto crowd AI programming for one school project and image retrieval for another, so I doubt I will get the time.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
-
- OGRE Expert User
- Posts: 1067
- Joined: Mon Mar 29, 2004 8:49 pm
- Location: the Netherlands
- x 43
- Contact:
Uniracer? Never heard of that. Do you mean this game?
http://www.mobygames.com/game/snes/unir ... tId,46728/
http://www.mobygames.com/game/snes/unir ... tId,46727/
http://www.mobygames.com/game/snes/unir ... tId,46726/
How does it play? In only see straight road in the screenshots.
http://www.mobygames.com/game/snes/unir ... tId,46728/
http://www.mobygames.com/game/snes/unir ... tId,46727/
http://www.mobygames.com/game/snes/unir ... tId,46726/
How does it play? In only see straight road in the screenshots.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
- SuprChikn
- Bugbear
- Posts: 863
- Joined: Tue Apr 19, 2005 6:10 am
- Location: Melbourne, Aus
- Contact:
Yeah, that's the Uniracers game I know. It was a 2D game, so no flipping around the track like in yours
The track did do loops and jumps, etc, and there were hazards to avoid. You could also do a whole bunch of tricks (flips, spins, etc), and the more you did of these without screwing up, the faster you could go.
There were also levels were you basically had a half-pipe, and had to do a certain number of tricks in a given time limit.
Anyway, back to Cableracer: looking very nice so far. Keep up the good work.
The track did do loops and jumps, etc, and there were hazards to avoid. You could also do a whole bunch of tricks (flips, spins, etc), and the more you did of these without screwing up, the faster you could go.
There were also levels were you basically had a half-pipe, and had to do a certain number of tricks in a given time limit.
Anyway, back to Cableracer: looking very nice so far. Keep up the good work.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Nice, a pragmatic form of DoF is good - after all it's the effect we want, not necessarily scientific accuracy If you're willing to share the shaders / compositors, I'm sure the Wiki would love to host them
The concept reminds me a little of some of the FZero GX levels:
Great game, even though you did have to be on amphetemines to beat it on the hardest modes
The concept reminds me a little of some of the FZero GX levels:
Great game, even though you did have to be on amphetemines to beat it on the hardest modes
-
- OGRE Expert User
- Posts: 1067
- Joined: Mon Mar 29, 2004 8:49 pm
- Location: the Netherlands
- x 43
- Contact:
When things are a bit more final, I will have a look at the Wiki. In the meanwhile, two screenshots that look a lot less ugly than the ones above:
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Awesome, Oogst!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
-
- OGRE Expert User
- Posts: 1067
- Joined: Mon Mar 29, 2004 8:49 pm
- Location: the Netherlands
- x 43
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
Wow, it has really been a very long time since I worked on this project! I finally graduated recently, so now I finally have the time to work on this game again. Actually, I am aiming to have a nice version to send in for IGF (deadline end of October), but we'll see how far I get.
Anyway, since depth of field (DoF) blur is incredibly important for the gameplay of this game (it helps seeing distance), I want a more prominent role for it. So I increased the strength, but then I noticed that the DoF does not look good enough for that. So I have been experimenting with that:
Increasing the strength of the blur, new result to the right does not look smooth enough:
The main goal is not to get the ugly bleeding that most modern games have when they do DoF: sharp edges bleed over a blurry background, like here (notice the glow around the sharp objects at the bottom right corner of the image):
I tried getting a smoother image using noise in the DoF sampling. That is how most modern games solve anything that they cannot sample enough. But I think the noise interferes with the geometric style I want for the game, and it costs 20% performance with how I implemented it:
My latest results is that I found a number of bugs that made the sharp image too strong over the blur. Fixing these bugs results in this blur, which is already a lot smoother than the version before:
I am still experimenting with how to get this to look smoother, but I think this might be good enough for now. Especially since I am also going to implement motion blur, so when moving fast these two blurs together will, well, blur the image enough already, I hope.
Motion blur to come next week, if I am lucky!
Anyway, since depth of field (DoF) blur is incredibly important for the gameplay of this game (it helps seeing distance), I want a more prominent role for it. So I increased the strength, but then I noticed that the DoF does not look good enough for that. So I have been experimenting with that:
Increasing the strength of the blur, new result to the right does not look smooth enough:
The main goal is not to get the ugly bleeding that most modern games have when they do DoF: sharp edges bleed over a blurry background, like here (notice the glow around the sharp objects at the bottom right corner of the image):
I tried getting a smoother image using noise in the DoF sampling. That is how most modern games solve anything that they cannot sample enough. But I think the noise interferes with the geometric style I want for the game, and it costs 20% performance with how I implemented it:
My latest results is that I found a number of bugs that made the sharp image too strong over the blur. Fixing these bugs results in this blur, which is already a lot smoother than the version before:
I am still experimenting with how to get this to look smoother, but I think this might be good enough for now. Especially since I am also going to implement motion blur, so when moving fast these two blurs together will, well, blur the image enough already, I hope.
Motion blur to come next week, if I am lucky!
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
-
- Greenskin
- Posts: 127
- Joined: Mon Jan 19, 2009 5:34 pm
- Location: Murfreesboro, TN
- Contact:
- metaldev
- Orc Shaman
- Posts: 761
- Joined: Thu Mar 17, 2005 11:56 pm
- Location: Boston
- x 15
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
really really cool. cant wait to see how this develops.
- Danoli3
- Halfling
- Posts: 53
- Joined: Wed Jul 29, 2009 8:25 am
- Location: Sydney, Australia
- x 1
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
Very nice DOF!!
I would love to see this source posted of the DOF and Motion blur !
I tested out your new game.. works really well!
I would love to see this source posted of the DOF and Motion blur !
I tested out your new game.. works really well!
Studying BSc in Games Development @ the University of Technology of Sydney Australia
Ogre Projects so far: Mall Rush
Finished a Diploma in Games Development 2009
Ogre Projects so far: Mall Rush
Finished a Diploma in Games Development 2009
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
Look in the new topic 'Proun' :
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=52761
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=52761
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- OGRE Expert User
- Posts: 1067
- Joined: Mon Mar 29, 2004 8:49 pm
- Location: the Netherlands
- x 43
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
Indeed, the source for the DoF shaders comes with the download for the game, since it is just Cg files. You can find the download somewhere in this topic:
http://www.ogre3d.org/forums/viewtopic. ... 1&start=50
There is no motion blur there, though: I removed it after experimenting with the visual effect in 3dsmax, so I never even fully implemented motion blur in the game.
http://www.ogre3d.org/forums/viewtopic. ... 1&start=50
There is no motion blur there, though: I removed it after experimenting with the visual effect in 3dsmax, so I never even fully implemented motion blur in the game.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
- Danoli3
- Halfling
- Posts: 53
- Joined: Wed Jul 29, 2009 8:25 am
- Location: Sydney, Australia
- x 1
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
Awesome, I have the files.
Just wondering how I would actually implement this CG to the camera?
Love just a few lines of code example !
Thanks, so excited!
Just wondering how I would actually implement this CG to the camera?
Love just a few lines of code example !
Thanks, so excited!
Studying BSc in Games Development @ the University of Technology of Sydney Australia
Ogre Projects so far: Mall Rush
Finished a Diploma in Games Development 2009
Ogre Projects so far: Mall Rush
Finished a Diploma in Games Development 2009
-
- OGRE Expert User
- Posts: 1067
- Joined: Mon Mar 29, 2004 8:49 pm
- Location: the Netherlands
- x 43
- Contact:
Re: Post effects in CableRacer: DoF and Thingie
It's pretty complicated. You need to set up your materials so that every object stores its depth in the alpha. This means you cannot use alpha blending. The shaders called "Depth_" are for this.
Then you need to render the scene to a RenderTexture and then render a quad to the screen that has the depth of field blur pixel shader (DoF_SM3_50samples_FP) and that RenderTexture.
The usual way to do this in Ogre would be through the compositor framework, which I guess can do a lot of these steps for you. However, I did not use this, which means that you have to build this yourself.
Then you need to render the scene to a RenderTexture and then render a quad to the screen that has the depth of field blur pixel shader (DoF_SM3_50samples_FP) and that RenderTexture.
The usual way to do this in Ogre would be through the compositor framework, which I guess can do a lot of these steps for you. However, I did not use this, which means that you have to build this yourself.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album