(July 2014) Monthly WIP Screenshot Thread

My experiments with screen space reflections. Unfortunately, there are some inherent tradeoffs and it is very hard to get proper heuristic to work with all kind of scenes.

And backup link

18 Likes

@abies

No Screen Shot =(

Nope not now, did you upload to imgur? maybee post the link as backup.

@abies
I, personally think it looks awesome (well… that’s a given). What are the tradeoffs? If it isn’t FPS, I’d be all about using this!

I remember reading an article about this being used in some AAA First-person Shooter… it looked awesome there and this doesn’t seem any less quality than that.

Great work!

There are multiple issues at hand:
a) It doesn’t reflect what is not on the screen. It sounds obvious, but it looks really bad in open-world case, when you for have for example a reflective sphere - it reflects things from the ground, but no sky. For this particular case I have used a sky cubemap as fallback to fill out the gaps - which looks fine in many case, but sometime you suddenly will get sky reflection shining on the sphere through a piece of floor which got occluded
b) To achieve reasonable performance you need to do raytrace with big steps and only then lookup exact reflection. Unfortunately, for non-wall objects it means it is quite easy to overshoot them. Depending on exact settings and how much artifacts do you want to reject, you end up with either unexplainable holes (like right red curtain around brazier) or cloned objects where edges of object are used for multiple reflections (cubes in the front).

Gaps are especially annoying, because they depend on where big step iteration will happen and when you move around, they jump there and back very visibily. Solution I have seen in other implementations is to blur everything beyond recognition and use some kind of temporal blur as well to mask movement artifacts.

There might be some heuristic to do raytracing better - probably step length should be more dependent on screen space rather than view space, but so far my experiments here failed (screen space in perspective projection is not something which interpolates nicely).

Hmmm…

Have you considered filling missing data with the usable SS info… just in an unexpected way…?

Example… reflection point A to B… there is nothing past B, so start using the SS in reverse B back to A. I guess blurring could help at this point.

There is nothing accurate about this, but it is using elements that are

  1. colored properly
  2. in the general vicinity of what would be reflected
  3. only used in circumstances where the needed data is missing

It’s all about illusion anyways… and as long as the closest reflected objects are there, the brain would likely fill in the blanks (as long as the illusion remained constant… color, shape, etc) I’d personally be happy with being able to define reflective flat surfaces in this way.

Pretty cool! Also it’s pretty rare to have an uniformly reflective surface like this. Usually you would only have sparse puddles here and there and that would make the artifacts you’re talking about less obvious.
like in this picture

1 Like

This is pretty awesome. Would really like to play a bit around with this.

Man, I’ve thought about implementing some kind of screen space reflection for a while now. Realistically, it’s the only way I could even have reflection on water in Mythruna. I also planned to fill in the gaps with env map if I ever did it.

Good job. It looks very nice.

In the case of water + block world, I’ve also been considering if there is some way I can use some invisible geometry or additional rendering pass to make the problem simpler. It just feels like for a screen-column of water, knowing where it started and ended could help index into the map. But I can’t come up with anything concrete along those lines. Just a feeling.

@abies btw how is performance compared to “classic reflection”? I guess it depends on the complexity of the scene…

It is not yet super-optimized regarding computations (I’m doing everything in pixel shader), but it takes up to 10-15ms overhead per frame if every single pixel on the screen is reflective. For use case like above, where 1/3 to 1/4 of pixels are reflective, it is more around 2ms overhead or so. In any case, it is not dependent on geometry/scene complexity, but rather on amount of reflective pixels and average distance they have to cover to find the reflection. But this is on Geforce 560. Plus, it is running on top of my deferred renderer, so I already got normals/depths and scene color for free.

@pspeed said: Man, I've thought about implementing some kind of screen space reflection for a while now. Realistically, it's the only way I could even have reflection on water in Mythruna. I also planned to fill in the gaps with env map if I ever did it.

Good job. It looks very nice.

In the case of water + block world, I’ve also been considering if there is some way I can use some invisible geometry or additional rendering pass to make the problem simpler. It just feels like for a screen-column of water, knowing where it started and ended could help index into the map. But I can’t come up with anything concrete along those lines. Just a feeling.

An alternative for your game might be to generate a cubemap with 2 180° cams every X blocks around water surface (when near the user), and just use the closest.
-> It can be done map by map, with a good controllable framerate impact (eg if framerate to low reduce update speed of maps)
The sourc engine uses a similar concept, (except you place the cubemap locations by hand) for weapon and water reflections.


@Empire Phoenix said: An alternative for your game might be to generate a cubemap with 2 180° cams every X blocks around water surface (when near the user), and just use the closest. -> It can be done map by map, with a good controllable framerate impact (eg if framerate to low reduce update speed of maps) The sourc engine uses a similar concept, (except you place the cubemap locations by hand) for weapon and water reflections.

I unspammed your other message… the odd thing is that supposedly @Erlend has turned the spam filters off now. :confused:

@Empire Phoenix said: An alternative for your game might be to generate a cubemap with 2 180° cams every X blocks around water surface (when near the user), and just use the closest. -> It can be done map by map, with a good controllable framerate impact (eg if framerate to low reduce update speed of maps) The sourc engine uses a similar concept, (except you place the cubemap locations by hand) for weapon and water reflections.

I think it is hard to make this work for a long coastline. The thing about a sandbox game is that you can’t predict what weird stuff that a user will build. The limitations of SS reflection are much more manageable, I think.

You can play it here.

This is the puzzle game I’ve been working on. Level two is going to be finished in the next couple of hours.

5 Likes

@abies, very nice work!

btw, regarding the deferred stuff. If you have something to share I’m very interested since I have been fiddling around with my old implementation lately =)

Nothing too impressive in terms of graphics. But I’ve recently been getting the hang of android on my latest project, Crazy Jacks. And I just got the AI working pretty close to how I want it to. My next goal is to properly integrate the game with google play services so it can have google achievements and online multiplayer etc etc.

download link to the game if you want to try it out: https://play.google.com/store/apps/details?id=asneakyfox.oneeyedjack

6 Likes

In this update of the game Save The Eggs! I added several levels as well as new game mechanics. Moreover, I added the Mac and Linux distribution.

Furthermore, I polished the game all around.

2 Likes

Hi guys! :smiley:

Got a couple more days to work on my project this month.

  1. I added the full inventory with a crafting grid and made the crafting work, server and client side, so that even if you decompile the client, you can’t sniff the crafting recipes from the source, since it only happens on server side… haha! >.< (totally useless but I thought it was funny)

  2. Added a couple more weapons, such as a stone blade and a tomahawk as shown on this first screenshot.

  3. Added craftable items such as big stone nails that you can craft using stone pieces and the tomahawk. I also added wood fences and walls like exposed on the second screenshot.

  4. Added the possibility to place items on the ground.

  5. Everything works in multiplayer and single player mode.

Far from being done, but at least progress is being made and it’s very encouraging to see it work on many different hardware now! Thanks all for your support throughout the last 3-4 months.

11 Likes