Post effects in CableRacer: DoF and Thingie

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
Oogst
OGRE Expert User
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

Post by Oogst »

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:

Image

Image

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.

Image

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. :twisted:

Image

Image

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
User avatar
Kezzer
Orc
Posts: 444
Joined: Mon Aug 16, 2004 2:19 pm
Location: Silicon Valley

Post by Kezzer »

Very, very nice! Awesome work
code | blog
jacmoe wrote:MMORPG good. :o
Xavier bad. :x
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Looks cool, reminds me to Uniracer. Definitely adds a nice depth feeling to it :)
Image
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Post by Oogst »

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.
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
User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

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.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

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:
ImageImage

Great game, even though you did have to be on amphetemines to beat it on the hardest modes :shock:
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Post by Oogst »

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:

Image

Image
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
User avatar
Kezzer
Orc
Posts: 444
Joined: Mon Aug 16, 2004 2:19 pm
Location: Silicon Valley

Post by Kezzer »

The source is strong with this one :o
code | blog
jacmoe wrote:MMORPG good. :o
Xavier bad. :x
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Awesome, Oogst! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
B_Lizzard
Kobold
Posts: 28
Joined: Thu Apr 28, 2005 7:58 pm
Location: Greece

Post by B_Lizzard »

The last screen really gives me nausea... That means you're doing your job really well!

A nicely modelled vehicle, some pretty textures and you're done! :lol:
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

great! I think a highly geometric art style would suit this, as it looks good now, but fzero has way too much 'stuff' in it :)
Oogst
OGRE Expert User
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

Post by Oogst »

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:
Image

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):
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:
Image

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:
Image

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
trnrez
Greenskin
Posts: 127
Joined: Mon Jan 19, 2009 5:34 pm
Location: Murfreesboro, TN
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by trnrez »

:shock: Looks really good. Keep at it :D
Image Image
User avatar
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

Post by metaldev »

really really cool. cant wait to see how this develops.
User avatar
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

Post by Danoli3 »

Very nice DOF!!
I would love to see this source posted of the DOF and Motion blur :D!

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
User avatar
jacmoe
OGRE Retired Moderator
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

Post by jacmoe »

/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Oogst
OGRE Expert User
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

Post by Oogst »

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.
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
User avatar
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

Post by Danoli3 »

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 :D!
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
Oogst
OGRE Expert User
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

Post by Oogst »

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.
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
Post Reply