New Reflections Effect Blew My Mind! (Got one issue with them, though)

-WildCat--WildCat- Cape Town, South Africa Join Date: 2008-07-19 Member: 64664Members, Reinforced - Shadow
Having previously seen Max's tweet regarding Screen Space Reflections, I was excited to find out whether they would find there way into NS2. When I watched the Gorgeous Release Trailer, I was convinced that I was looking at Screen Space Reflections at 1:32 because they appeared to be changing based on the perspective of the moving camera.

Once Steam had finished updating NS2, I eagerly started up a local game on Descent to have a look around at the delicious new level design and, in particular, the reflections effect. This was approximately my train of thought as I began looking around:

"Oh, look at these glorious Screen Space Reflections. Ahh, what a joy! ... Hmm, wait a sec. These are not behaving quite like I'd expect... How is it reflecting stuff that's not being rendered on the screen already? And what's with the curious distortion in places? These look like cube maps... but they're moving around! WHAT SORCERY IS THIS?!?"

Upon further inspection, I got a sense of how they work. On large areas of the floor, it looks like the reflections are rendered on a sphere under the ground (although I realize it's probably not that simple).

My mind was blown by the genius of this implementation and I'm truly astonished at how effective it is. I've never seen a cube map implementation like this in any other game, which surprises me because this is just so much better than the regular way of doing cube maps. The infinity far away perspective of typical implementations is quite horrid, in my opinion.



I have, however, come across a problem with the reflections effect. On my computer, the cube maps don't appear to be rendered with the same level of quality as was shown in the Gorgeous Release Trailer. Below are some comparison screenshots. On the left, is a screenshot from the HD version of the trailer and, on the right, is my in-game screenshot.

reflections-comparison_zps4af31f43.png

It seems like the cube maps are either being generated at a lower resolution or they are not being anti-aliased properly. Here are a couple more example screenshots:

reflections-01_zps89cc2d23.png

reflections-02_zpsb5b78841.png

It would be great to get a solution to this issue so that I can get image quality like in the trailer. Here are my systems specs:
  • MSI Big Bang MPower Z77 Motherboard
  • Intel Core i7-3770K @ 4.5GHz
  • Corsair Dominator Platinum 8GB DDR3 1866Mhz RAM
  • nVidia Geforce GTX 690
  • nVidia driver version 314.07
  • Windows 7 Professional 64-bit
  • In NS2: 1920 x 1080 @ 120 Hz fullscreen, v-sync off, all graphics settings maxed



Keep up the awesome work, UWE!
«1

Comments

  • fourgorgestwoskulksfourgorgestwoskulks Join Date: 2013-03-02 Member: 183568Members
    I have a similar issue although what I have looks more like the reflection is composed of a checkerboard pattern of squares. GTX 480.
  • buhehebuhehe Join Date: 2012-05-15 Member: 152140Members
    edited March 2013
    Same here, they look kinda ugly upclose (AMD GPU user here)
  • tarquinbbtarquinbb Join Date: 2012-11-03 Member: 166314Members
    maybe a hidden console setting to make the reflection more smooth?
  • WheeeeWheeee Join Date: 2003-02-18 Member: 13713Members, Reinforced - Shadow
    It actually looks more real IMO. Go into any place with a tiled or semireflective floor surface and the reflections are a lot blurrier than that. They could make a high resolution one for mirrors though.
  • MagnetoMagneto Join Date: 2010-12-22 Member: 75856Members
    Shadows and reflections are way too blocky, an option for high quality would be nice, also what's up with ambient occlusion? it looks pretty ugly and causes quite a performance drop, on certain textures like snow it adds a dirty soot effect, aa could also be improved.
  • Squeal_Like_A_PigSqueal_Like_A_Pig Janitor Join Date: 2002-01-25 Member: 66Members, Super Administrators, NS1 Playtester, NS2 Developer, Reinforced - Supporter, WC 2013 - Silver, Subnautica Developer
    Hmm. Wildcat, are you running on high texture settings? It looks like it, based on your screenshots, but just making sure. Maybe Max has a better idea of what is going on with how reflections are showing up for you, since that does look pretty odd.

    As far as the checkerboard patter of squares that was mentioned by other posters in this thread, that is a known issue. The problem there is related to the normal map compression. We had done an experiment with not compressing the normal maps as much, and it smoothed that square artifacting out quite a bit, however it really increased the memory requirements a lot, with the much larger normal map sizes. Texture streaming should theoretically allow us to reduce the amount of compression, however, so we'll probably try out some more experiments to see if we can live with the higher quality normal maps.
  • -WildCat--WildCat- Cape Town, South Africa Join Date: 2008-07-19 Member: 64664Members, Reinforced - Shadow
    Hmm. Wildcat, are you running on high texture settings? It looks like it, based on your screenshots, but just making sure. Maybe Max has a better idea of what is going on with how reflections are showing up for you, since that does look pretty odd.

    Yup. Definitely on High. These are my current settings:

    settings_zpsab2554d3.png

    I tested it out with Texture Quality on Low but it didn't appear to make any difference to the reflections. I also tried with and without Texture Streaming but that didn't have any effect. I haven't changed the setting for Decal Lifetime from its default value (yet) but I don't imagine that would be related.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Thanks, and nice observation!
  • Sharp-ShooterSharp-Shooter Join Date: 2011-05-11 Member: 98364Members
    sorry to hijack this thread but i also wanted to point out to everyone that in my experience under mutliple play sessions i get better frame rates using infestation on RICH then low,

    thats right RICH is better for performance on my pc
    GTX680
    i5 3870

    about 5 frames increase in certain situations

    some of you who are having performance issues in certain infested areas should try to change it to rich, i was playing a comp game the other day in viel and i had poor performance when i had infestation set to minimal, but when i play it on rich not bad at all
  • -WildCat--WildCat- Cape Town, South Africa Join Date: 2008-07-19 Member: 64664Members, Reinforced - Shadow
    edited March 2013
    I was playing a game on Mineshaft last night when I noticed a startlingly horrid reflection on the floor just outside Operations, in Pilot Drill. I went back today to take a screenshot of it:

    reflections-03_zps757eb30f.png

    I think that a great deal of what makes the reflections look so good in Descent is clever placement and configuration of the reflection_probe entities. It seems to me like the Max Distance property should be set so that the reflections appear to line up with as many of the walls and detailed objects as possible.

    In the case of my screenshot of Pilot Drill, there are about 3 reflections overlapping each other and they don't appear to line up with anything. Additionally, the surface itself is quite grungy and doesn't look like it should have such a mirror-like reflection. And, of course, it also doesn't help that the cube maps look so blocky.

    So, aside from the issue I posted about in my OP, it looks like some of the other maps could use some tender loving care with regards to the reflection_probe placement and configuration.



    Oh, by the way, please also have a look at my other graphics-related thread in the Ideas and Suggestions area.
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    edited March 2013
    I have got the same problem too :(

    specs:

    nvidia 670
    intel i7 2600k
    16gb ram
    asus mobo

    I currently have the 306.97 driver but ill get the latest 314.07 and see if it helps.

    Apart from that, the Decent map and Gorgeous update is beyond fantastic. :)

    ns2%202013-03-03%2015-07-32-51.jpg

    All settings are maxed by the way, and i have double checked.
  • JonacrabJonacrab Join Date: 2003-08-02 Member: 18705Members, NS2 Playtester, NS2 Map Tester
    I think that a great deal of what makes the reflections look so good in Descent is clever placement and configuration of the reflection_probe entities. It seems to me like the Max Distance property should be set so that the reflections appear to line up with as many of the walls and detailed objects as possible.

    It's nice to know someone noticed that :) I put alot of effort into trying to create realistic looking reflections, still knowing that it wasnt possible in all cases, but if you can pick out what reflections should be prominent, coming from any angle that a person should be expected to see the room at, you can get some quite surprisingly good results. The goal for using the reflection probes should not be "fill the reflection probe to the extents of the room", but to aim for keeping single probes from A. not creating conflicting reflections of the same thing, and B. making sure that probes are placed at probable viewpoints that the player will usually be coming from.
  • SteveRockSteveRock Join Date: 2012-10-01 Member: 161215Members, NS2 Developer, Subnautica Developer
    Hmm I think I have an idea of what's going on here...lemme email Max :)
  • YMICrazyYMICrazy Join Date: 2012-11-02 Member: 165986Members
    edited March 2013
  • sushifxsushifx Join Date: 2013-03-03 Member: 183637Members, Reinforced - Shadow
    hey guys,

    awesome effect, but doesnt work somehow could you take a look at my post maybe you got an idea
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    Can you try overwriting the file RenderDeferred.fx in your steamapps\common\Natural Selection 2\core\renderer directory with this one (make sure you back up the file first so you can restore after testing):

    https://dl.dropbox.com/u/386361/RenderDeferred.fx
  • rook2pawnrook2pawn Join Date: 2008-07-03 Member: 64552Members
    Omg, this fixed ALL my problems. I was lagging, skipping, freezing, ping was going up randomly, game was virtually unplayable.

    I just overwrote my renderDeferred.fx after just about giving up and it fixed everything.
  • DustehDusteh Join Date: 2011-07-25 Member: 112142Members, NS2 Map Tester, Reinforced - Shadow
    rook2pawn wrote: »
    Omg, this fixed ALL my problems. I was lagging, skipping, freezing, ping was going up randomly, game was virtually unplayable.

    I just overwrote my renderDeferred.fx after just about giving up and it fixed everything.
    Troll or serious? :/
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    I replaced the RenderDeferred.fx file Max, but it had no effect :/

    ns2%202013-03-04%2001-08-37-16.jpg
  • YMICrazyYMICrazy Join Date: 2012-11-02 Member: 165986Members
    Dusteh wrote: »
    rook2pawn wrote: »
    Omg, this fixed ALL my problems. I was lagging, skipping, freezing, ping was going up randomly, game was virtually unplayable.

    I just overwrote my renderDeferred.fx after just about giving up and it fixed everything.
    Troll or serious? :/

    Did not do anything to my game. Reflections still look the same as above.

  • Sharp-ShooterSharp-Shooter Join Date: 2011-05-11 Member: 98364Members
    i think it did something for me, i notice more of a white haze on infestation in mineshaft cave, looked nice although i got massive performance impact for some odd reason in docking, and mineshaft max, can you please paste the stock one, i accidently over wrote mine
  • fourgorgestwoskulksfourgorgestwoskulks Join Date: 2013-03-02 Member: 183568Members
    VonDoom wrote: »
    I replaced the RenderDeferred.fx file Max, but it had no effect :/

    ns2%202013-03-04%2001-08-37-16.jpg

    I think I see a game of minecraft going on there in the bottom section. What is this new sorcery?

  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    Here's a link to the original file: https://dl.dropbox.com/u/386361/original/RenderDeferred.fx

    Thanks for testing this out. That helps eliminate one variable.
  • rook2pawnrook2pawn Join Date: 2008-07-03 Member: 64552Members
    By the way, what i meant when i said it fixed EVERYTHING i meant that it fixed all my stutters and lags and 999 pings with the strange exception of this NOT working on ns_veil.

    However, I haven't done enough testing to know if this file fixes the gameplay on the first map load, and then fails on the second map load, in which case, ns_veil just merely happened to be the next map.

    I do know, that the gorgeous update basically killed my gameplay, and that im sure im not the only one out there. I have an AMD APU. NS2 worked perfectly till this.
  • DarkATiDarkATi Revelation 22:17 Join Date: 2003-06-20 Member: 17532Members, Reinforced - Shadow
    edited March 2013
    I am wondering if this is how it looks for everyone. I have an nVidia GTX 480. I am getting the same thing.

    All settings maxed out. Latest Drivers (EDIT: Almost... Oops! Updating drivers now). Windows 8 Pro.
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    @Dark Ati, Me and Wildcat are running on two different nvidia drivers and get the same results. But its smart to update the drivers once in a while anyway..
  • SnXSnX Join Date: 2013-01-17 Member: 180145Members, Reinforced - Gold
    I have the same specs as Wildcat except for the GTX690. I have a Radeon 7950 and have no problems at all. Maybe that could be usefull...
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    I looked into this a bit more and I don't think it's graphics card specific at all. I think it's the result of me being a little overzealous with memory optimization for the cube maps. I'll improve the appearance for the next patch.
  • -WildCat--WildCat- Cape Town, South Africa Join Date: 2008-07-19 Member: 64664Members, Reinforced - Shadow
    Jonacrab wrote: »
    I think that a great deal of what makes the reflections look so good in Descent is clever placement and configuration of the reflection_probe entities. It seems to me like the Max Distance property should be set so that the reflections appear to line up with as many of the walls and detailed objects as possible.

    It's nice to know someone noticed that :) I put alot of effort into trying to create realistic looking reflections, still knowing that it wasnt possible in all cases, but if you can pick out what reflections should be prominent, coming from any angle that a person should be expected to see the room at, you can get some quite surprisingly good results. The goal for using the reflection probes should not be "fill the reflection probe to the extents of the room", but to aim for keeping single probes from A. not creating conflicting reflections of the same thing, and B. making sure that probes are placed at probable viewpoints that the player will usually be coming from.
    So you're the author of Descent? Nice work, man. :)

    Am I correct in saying that it's been in the works since mid-2011 and was previously called ns2_lockdown? I ask because I came across one of your old threads about ns2_descent. Based on what I saw from the screenshots, it looked totally different back then. I'd be interested to hear about the history of ns2_descent some time.

    Max wrote: »
    Can you try overwriting the file RenderDeferred.fx in your steamapps\common\Natural Selection 2\core\renderer directory with this one (make sure you back up the file first so you can restore after testing):

    https://dl.dropbox.com/u/386361/RenderDeferred.fx
    I can confirm what others have already indicated: This replacement file doesn't do anything for the reflection quality. I even tried deleting the cache so that the shaders would recompile and it didn't help. (Dunno if doing that would actually make a difference but I thought I'd test it anyway.)

    SnX wrote: »
    I have the same specs as Wildcat except for the GTX690. I have a Radeon 7950 and have no problems at all. Maybe that could be usefull...
    Could you post a screenshot from the same perspective as my initial screenshot so that we can compare?

    Max wrote: »
    I looked into this a bit more and I don't think it's graphics card specific at all. I think it's the result of me being a little overzealous with memory optimization for the cube maps. I'll improve the appearance for the next patch.
    Sweet! Looking forward to it.
  • -WildCat--WildCat- Cape Town, South Africa Join Date: 2008-07-19 Member: 64664Members, Reinforced - Shadow
    Improvement

    Added super-sampling when generating reflection cube maps to improve quality.

    Here are some screenshots comparing build 240 with 241:

    comp-new-01_zps285a9bfb.png
    comp-new-02_zps9fd25008.png
    comp-new-03_zps9d7adb70.png

    And now a comparison between the screenshot of the Gorgeous Trailer and build 241:

    comp-new-04_zpsefee65b5.png

    Much better! Thanks! :)




    Earlier today, I came up with a concept for a method to potentially filter out artifacts in the reflections caused by bright sources of light that are far away from a reflection_probe entity and also well outside the boundary set by it's "Maximum Distance" parameter. But before I get into the details, here are a couple of screenshots that show what sort of artifacts I'm talking about:

    offset-reflections-01_zps5654a52b.png
    offset-reflections-02_zpsa06ad1c1.png

    I refer these as artifacts because they are almost always misaligned. This appears to be caused by the fact that those sources of light are far beyond the imaginary sphere created by the reflection_probe and controlled by its Max Distance property. To filter these parts of the reflection out, I propose one of the following potential solutions:
    1. While generating the cube maps, render a thick black fog that starts just after the Max Distance and quickly fades to opaque.
    2. While generating the cube maps, generate an alpha channel for the cube maps based on the depth (distance) of each pixel.
    Because reflections are blended with the environment additively, black areas appear invisible. By rendering a black fog that hides distant objects, you can filter those objects out of the reflection.

    The idea that uses the alpha channel is basically the same concept as the one that uses the fog except that it has the added potential of being able to also filter out objects that are too close to the reflection_probe center, although this is likely to be less useful.

    A couple of parameters could be added to the reflection_probe to allow map authors to control this system. Assuming we're using the black fog method, they'd be something like this:
    • Fog Begin - Distance at which the black fog is fully transparent. (Value should be somewhat greater than Max Distance for best results.)
    • Fog End - Distance at which black fog is fully opaque. (Set to 0 to disable fog.)
    What do you think, @Max?
Sign In or Register to comment.