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: 1034
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
Contact:

Post effects in CableRacer: DoF and Thingie

Post by Oogst » Sun Oct 01, 2006 1:14 pm

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.
0 x
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance

User avatar
Kezzer
Orc
Posts: 444
Joined: Mon Aug 16, 2004 2:19 pm
Location: UK/CI

Post by Kezzer » Sun Oct 01, 2006 1:53 pm

Very, very nice! Awesome work
0 x
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
Contact:

Post by Kencho » Sun Oct 01, 2006 2:34 pm

Looks cool, reminds me to Uniracer. Definitely adds a nice depth feeling to it :)
0 x
Image

Oogst
OGRE Expert User
OGRE Expert User
Posts: 1034
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
Contact:

Post by Oogst » Sun Oct 01, 2006 2:51 pm

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.
0 x
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn » Sun Oct 01, 2006 3:07 pm

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.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Sun Oct 01, 2006 3:16 pm

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:
0 x

Oogst
OGRE Expert User
OGRE Expert User
Posts: 1034
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
Contact:

Post by Oogst » Sun Oct 01, 2006 9:11 pm

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
0 x
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance

User avatar
Kezzer
Orc
Posts: 444
Joined: Mon Aug 16, 2004 2:19 pm
Location: UK/CI

Post by Kezzer » Sun Oct 01, 2006 9:28 pm

The source is strong with this one :o
0 x
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
Contact:

Post by jacmoe » Sun Oct 01, 2006 9:33 pm

Awesome, Oogst! :)
0 x
/* 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 » Sun Oct 01, 2006 10:09 pm

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:
0 x

Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
Contact:

Post by Vectrex » Mon Oct 02, 2006 8:49 am

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 :)
0 x

Oogst
OGRE Expert User
OGRE Expert User
Posts: 1034
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by Oogst » Tue Sep 08, 2009 8:05 pm

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! :)
0 x
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance

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 » Tue Sep 08, 2009 8:52 pm

:shock: Looks really good. Keep at it :D
0 x
Image Image

User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by metaldev » Tue Sep 08, 2009 9:06 pm

really really cool. cant wait to see how this develops.
0 x

User avatar
Danoli3
Halfling
Posts: 53
Joined: Wed Jul 29, 2009 8:25 am
Location: Sydney, Australia
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by Danoli3 » Sun Nov 15, 2009 1:50 pm

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!
0 x
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
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by jacmoe » Sun Nov 15, 2009 2:22 pm

0 x
/* 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: 1034
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by Oogst » Sun Nov 15, 2009 3:31 pm

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.
0 x
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance

User avatar
Danoli3
Halfling
Posts: 53
Joined: Wed Jul 29, 2009 8:25 am
Location: Sydney, Australia
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by Danoli3 » Mon Nov 16, 2009 4:49 am

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!
0 x
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: 1034
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
Contact:

Re: Post effects in CableRacer: DoF and Thingie

Post by Oogst » Mon Nov 16, 2009 9:09 am

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.
0 x
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance

Post Reply