Downsampling: How to

wasteomind

Gawd
Joined
Aug 13, 2004
Messages
522
Hello all. I've decided to share my Downsampling guide with you all. I originally wrote this for the guru3d.com forums, and given the interest by some there I figured I would share in other places for those who might be interested. If so read on!
FOR NVIDIA USERS ONLY! I DO NOT KNOW HOW TO DO THIS FOR ATI.

DISCLAIMER:
This won't be a perfect guide. It is kind of long, but only because I like to go into a much detail as I can.
I can not be held responsible for any damage caused by this procedure if things don't work out as expected. I only claim this works for me, and offer it as a reference for others.

INTRODUCTION


If you are anything like me, you hate games that don't support Anti-Aliasing. Some games have flags that can be enabled using a tool like Nvidia Inspector, but the flags aren't always exactly perfect. Some might cause glitches, while others cause things like shadows to not work on certain setting (Dead Space 2), others are so performance robbing at even 2x AA that it isn't even worth it to try (Brute forcing AA in a lot of UE3 games).

So I turned my attention to downsampling. This is a method to basically render the game at a higher resolution and scale it down to fix your screen. You can think of it like super sampling. but it doesn't need a compatibility flag, and it isn't effected by post processing effects that can glitch out.

Problem was, all the info about how to set this up was in German. I can't read or speak German so this made things a little difficult for me. Since there are no decent English references for this that I could find, I'll share my process, and show off some results.

While I only ended up with about 1.78 times the resolution, it does make a noticeable difference in games that don't support AA. An extra 1,612,800 pixels does help to take off the rough edges while in motion. It is close to 2x supersampling in titles that don't support it. It is better than nothing, and performance wise not bad at all for what I get. Depending on your monitor you can get much better results then me, feel free to share if you get this to work.

A quick example of my results:
THERE ARE MORE PICTURES IN THE SECOND POST Scroll down to see more!

Borderlands: In these screen shots, notice how reduced the aliasing is on the power lines, and on the steel supports holding up the water tower. In the far back you can notice how much clearer the gate looks, and how reduced the black aliased border on the rocks is.

1920x1080


2560x1440 downsampled to 1920x1080



GTA 4: Episodes From Liberty City: In this shot it might be hard to notice in the still shot, but in motion it is a massive difference. Pay close attention to the amount of jagged edges on the ferris wheel and the power lines. They become hugely reduced. Also notice the fence in the lower right. The power lines and utility pole in the far background also benefit.

1920x1080


2560x1440 downsampled to 1920x1080




BEFORE WE BEGIN:


This will be demonstrated on Windows 7. I tried this on my Vista machine and met with some issues, which I will explain below. I do not know if this works on XP or Vista and for now will only be explaining it on Win7. If you try it on other OS's you do so at your own risk.

I recommend having a copy of video drivers downloaded and ready to install in case anything goes wrong. I had issues and had to reinstall on my Vista machine. On my Windows 7 machine I never had issues.

For this process I used the 275.33 Forceware Drivers. Others might work but the main necessity is to have working display scaling. I have had issues with scaling in the past. I use a 40inch Samsung LCD TV as a monitor, so the scaling is virtually non-existent in the display itself for most common resolutions. The last two drivers from Nivida, 275.27 and 275.33 have wonderful display scaling on the gpu working in them. I use it for this process, and you might want to as well depending on your display.



THE PROCESS:

So First things first, make sure your scaling options are set as so:



With that done we move on to creating the custom resolution. So go to your "Change Resolution" page in the Nvidia control panel. Press the Customize button highlighted in red in the picture below.



Next click "Create Custom Resolution" as shown in the picture below highlighted in red. NOTE: The resolutions listed in this box outlined in purple may be different on your computer. Don't worry about this it isn't important.



This opens the "Create Custom Resolution" window. The first thing you should do here is click the button to open up the timing options, as shown highlighted in red in the picture below.



The next step will be to change the Standard option from automatic to manual. It is important to do this first, before changing anything else. In the picture below, you will see the option you need to change highlighted in red.

Notice the green box. These are your default settings. Write them down, memorize them, or screenshot them. Do whatever you need to just in case things go bad, or you need to start over.



Now on to the more complicated stuff. Notice the "Pixel Clock" reading highlighted in yellow in the picture below. This becomes very important. This setting is the key to all this. You must make sure this number remains lower than 165 Mhz. If that means you end up with 164.9999 MHz that is fine as long as it works. I believe the reason for this is down to either the capabilities of standard DVI cables, or a limitation of Windows 7. I think Dual link DVI can support higher, but it is outside the scope of my explanation.



Moving on, also notice the area in blue. This will be our first variable. Before we touch that we must raise the Vertical lines option highlighted in red by 1. We do this so Windows treats your custom resolution as a new one, and not spit back an error saying the resolution already exists. SO in the picture it says 1080, I would make this 1081. If you have 1920x1200 you should make it sat 1201, and so on.

Once that is done, press the test button to make sure it works. If it does work, the screen should flicker for a moment, then come back with a dialogue box that asks you if you want to save the settings in whatever resolution settings you entered. The test passed, so just say no, we don't want to save that yet, it was just a test. If it fails, the screen will go black and stay black. At this point just press escape to get back to a working resolution. DO NOT spam esc. Only press it once. If you press it twice, you will have to start all over again because it will close the window you are working in.

Please note the section in blue above!!!
This testing step will be repeated many many times as you try to find your settings. It is important to know that if the test passes, you must choose NOT to save. Saving at any point during this process will close the window and screw up the custom settings. You will have to delete it and start over if you save. Only save when told to.

Now of note, if this step fails, there isn't much more I can suggest at the moment because I haven't the experience to remedy it. As I mentioned at the beginning of the guide, I had issues on Vista trying this process. This was the step it failed. I would only get the top half of the screen, while the bottom was completely black.

On my windows 7 machine it worked fine.

So if the test passes, the next step is to lower the number in the blue field for vertical total pixels. You should do this very slowly. I recommend 1 increment at a time. Then press test and see if you still pass. If you pass DO NOT SAVE then repeat this step until you fail with a black screen. If you fail this from the start is probably already as low as it can possibly go.



WARNING: On my vista machine lowing this number caused the screen to lock up. Rebooting the machine would load to black screen I had to boot into safe mode and uninstall the video drivers then reinstall them to fix this issue.

Once you do this enough times, you should eventually get a black screen when testing. Press esc to get rid of the black screen then raise the number back up by one. On my machine my stock vertical total pixels was 1125. I was able to lower this to 1102 before I got a black screen on the test.

Notice that every time you lower the number in blue (total vertical pixels), the number in yellow (pixel clock) automatically lowers as well. This is a good thing. It will give you leeway to move the total horizontal pixels in the next step while maintaining a pixel clock lower the 165 MHz. More on that later.

One more thing to note here, every time you lower the vertical pixels labeled in blue, you might notice the screen getting blurrier, or brighter, or both when you press test. This is normal, as you as basically taking the monitor out of spec with timings. At this point we are just trying to find out how much room we have to work.

Now on to the next picture below. The next step is to raise the Horizontal total pixels (highlighted in red below) a little a at a time until the Pixel Clock (highlighted in green below) reads just under 165.000Mhz. I was able to go up to 2448 on mine. Your setting might vary. Once you have that set, you should be able to test it. If it passes you are in good shape. If it fails and goes black screen press esc, and try lowering it until you no longer get a black screen when testing.



Once that is all done, you should be able to set your Horizontal Pixels in the section of the top of the window under the "Display mode (as reported by Windows) heading to the same as the number below from the previous step. When you test this, if it is successful, you'll get a image that is stretched horizontally, and doesn't fill the height of the screen.



If it passes then good we now have some room to work. You have two choices here:

Go for the highest resolution you can that maintains aspect ratio (you'll need to do some math here, I'll explain some basic math at the end of the post to help)

Or

Lower your settings to the next closest common resolution that is the same aspect ratio of your monitor. This is a list of common resolutions:
[ame="http://en.wikipedia.org/wiki/List_of_common_resolutions"]List of common resolutions - Wikipedia, the free encyclopedia[/ame]

Now it is important to note the settings at the bottom of the window in the timing section. You don't want to change these once they are tested and you know they are working, because now we will be moving to the top of the window to choose our resolution for downsampling.

My Total pixel setting ended up being 2448. When choosing a resolution that works with it, you have a little wiggle room. I was able to adjust my downsampling resolution about 150 -200 pixels over the total horizontal pixels before testing it gave me a black screen. This ended up being about 2569 horizontal pixels. Rather than going as big as possible I decided to back off a bit to the next common resolution that was 16:9 which happened to be 2560x1440. So you change the resolution height in the other field (the one you raised by 1 earlier on) So I changed 1081 to 1440.

Once you have your downsample resolution, test it. If it passes, at this point save it. You are pretty much done. If it fails, try something lower until you get something that works.



You should then have a custom resolution list that has your new resolution as shown below. Make sure you leave your desktop resolution as your native. If all went well, from now on when you load up games you should have the new resolution available. When you select it, it will downscaled to fix your screen. Great for games that don't support AA, or for people using video cards vastly more powerful than the monitor native resolution they are using can take advantage of.





BLURRING AND OVERBRIGHT:


If your custom resolution appears very blurry or extremely washed out/overbright it is likely caused by your vertical total pixels being set too low. I noted before the lowest my monitor could go was 1103 from a starting point of 1125. I could lower it to 1118 before I started to notice the image getting effected badly. In the end, once I knew my target resolution, I ended up setting it to 1123. This is something you will really need to play around with to get to your liking. It took me a about 40 minutes of back and forth to get something I liked. You will need to raise the total verticle pixels, while lowering the total horizontal pixels little by little to maintain the 165MHz pixel clock limit. It is all trial and error here.


THE MATH:

I mentioned math above. The math is kinda simple. The first step is figuring out your aspect ratio. The most common are 4:3, 16:9, and 16:10.

You can find your aspect ratio easily by looking up your resolution on this list [ame="http://en.wikipedia.org/wiki/List_of_common_resolutions"]List of common resolutions - Wikipedia, the free encyclopedia[/ame] The columns listed SAR are your aspect ratio in two different formats. ratio and numeric.

4:3 is 1.33333
16:9 is 1.777778
16:10 is 1.6

This is important when finding the highest resolution you can use while maintaining aspect ratio. For example. 1920x1080 is 16:9 or 1.777778. Take the horizontal resolution 1920 and divide it by the numeric aspect ratio 1.77778. This will give you a very close approximation of the height you need to set.

1920/1.7777778 = 1079.99999865

Roughly 1080. Just round up. You can also do this backwards to double check your work. 1920 divided by 1080 = 1.777777777777778

So for instance, lets say your maximum horizontal resolution ends up being 2997. This is a very high, non-common resolution. You have a monitor that is native 1920x1200 so it is a 16:10 or 1.6 ratio. To keep this aspect we do the following math:

2997 divided by 1.6 = 1873.125

So round down we get 1873 for our vertical resolution. The resolution ends up being 2997x1873. Check this backwards by dividing horizontal by vertical and you get the following:

2997/1873 = 1.600106780565937

roughly 1.6 rounded so good work.

REFRESH RATE CAN HELP:

There is also another way to gain some wiggle room for higher resolutions. If your monitor supports lower refresh rates, you can lower the refresh rate to reduce the pixel clock and gain more horizontal total pixels. I was unable to do this with my monitor, but there is no reason it won't work on others. Refresh rate and a poor vertical total pixel adjustment room were my limiting factors.

While I only ended up with about 1.78 times the resolution, it does make a noticeable difference in games that don't support AA. An extra 1,612,800 pixels does help to take off the rough edges while in motion. It close to 2x supersampling in titles that don't support it. It is better than nothing, and performance wise not bad at all for what I get.
 
Last edited:
Post reserved if needed.

If anything in the guide is unclear, or doesn't work let me know. I'll double check and try to make things clearer.

Let me know if this helps any of you.

Some more screen shots: To really see the effect this process has in the screenshots below, you must look at these images full size so make sure to click them and look closely. If you just look at them sized to your browser window, you lose the finer details due to the resizing.

The Last Remnant: UE3 game that suffers terrible FPS drop when forcing AA. Maintains 60 fps solid using this, with much cleaner edges. Note Rush's hair, the trees behind him, and the Remnant in the background. The edges are much cleaner using downsampling.

1920x1080


2560x1440 downsampled to 1920x1080



Dead Space 2: No great AA option exists for this game without compromise. Downsampling this game allows you to keep the shadows and not have weird white outlines. Notice in these shots the reduced aliasing on all edges. The first set of shots it is apparent on the debris hanging in front of Issac.

1920x1080



2560x1440 downsampled to 1920x1080



In the shots below, notice how reduced the aliasing is on all the hand rails, on the walls below, on the power lines hanging overhead, even the outlines of the big square greenish lights on the platform across from Issac.

1920x1080



2560x1440 downsampled to 1920x1080




Crysis 2 While it is possible to force certain AA modes for this game, I figured I would show off what downsampling can do in conjunction with the extreme mode AA available in the game. In these first shots, notice how clean the wall to the left becomes. More importantly, notice how much more defined the fencing on the two upper levels becomes. In motion it is much more noticeable.

1920x1080


2560x1440 downsampled to 1920x1080



Main thing to notice in the follow shots is the little fence on top of the brick wall, and the fence on the ground near the garden behind it. They both become a lot more defined. Also the street lamps in the background.

1920x1080



2560x1440 downsampled to 1920x1080



Borderlands

Note how much cleaner the power lines become. Also the guardrail in front near the npc sitting on the bench. Look how clean that fencing on the far left of the building becomes.

1920x1080




2560x1440 downsampled to 1920x1080



In these shots, all the outlines of the buildings, steps, power lines, antennas, all clear up nicely.

1920x1080


2560x1440 downsampled to 1920x1080


 
Last edited:
All image links in both posts lead to extremely low resolution thumbnails.

Click the images in the link to zoom in. Though I did notice they are resized to 1,793px × 1,008px for some reason. They should be full 1920x1080.

I'll look into finding a different host for the images, Thanks for pointing it out.
 
You're linking to thumbnails, the only way to see them in full resolution is to manually take out the 'th_' from the url. I noticed way too many people on this forum do that, especially build logs.

As for the guide, recently I've been looking into super sampling options for crysis, since I'm sick and tired of the terrible, ugly vegetation and no transparency AA support, to me crysis looks ugly without proper AA. But looks indepth but I might be forced to eventually try it.

Thanks for the guide.
 
ugly vegetation and no transparency AA support, to me crysis looks ugly without proper AA. But looks indepth but I might be forced to eventually try it.

Actually if you have nvidia inspector and you force the game to run in dx9 mode you can use TRSSAA. Which eliminates aliasing on vegetation with a pretty minimal performance impact (I'd say about a 15% drop on average for me for 4xTRSSAA).
 
I've made some revisions to the pictures and fixed the issue with the resizes. Image comparisons should all now be in 1920x1080 and link to full images. Hope that is helpful. Keep in mind, still images don't tell the whole story. Seeing the games in motion using this method is key.

Also does anyone know why posting a link to wikipedia in this forum causes that box with two links inside? I've never seen that on other forums.
 
They are still all super low resolution thumbnails. 150 x 85 to be exact.

Would viewers on this forum rather have the fullsize images linked throughout the thread and need to scroll through them rather than clicking on a thumbnail?

I'm not really sure what you expect here. I used the thumbnails provided by the image hosting service I used. The thumbnails are small, but that is the point of the thumbnails, to keep the thread relatively clean and allow viewers to expand which images they want?.

You aren't going to see any major differences in the image from viewing any thumbnail reasonably sized for a forum. I'm not really sure what the point in increasing the size of the thumbnails is going to do for you? I fixed the issue with the links going to other thumbnails, and also made sure they linked directly to full size images. Click the thumbnail to view it in full size in the tab or window that pops up.

I'm not trying to be rude, but please explain to me what the problem is here or what isn't working as expected to get the point of the thread across.
 
I'm guessing he doesn't want to bother clicking each thumbnail to see the small amount of difference. On topic however, very interesting post and definitely an option for some games.
 
Interesting idea to add supersampling to Nvidia cards. I can't see the pictures until I get home, but I will take a look at them later :D
 
This is cool. I will have to try it out with StarCraft II which has all sorts of glitchiness with AA.

Another side benefit of this is increased desktop real-estate if you can put up with the pixel blurring. I actually do this all the time with GoToMyPC for showing my two work PC monitors on my one 1080p monitor, but being able to do this natively with my own desktop is pretty cool! Everything is perfectly readable and I can put up more stuff on the screen.

The only slight issue is the left 8 or so pixels are cut off because the whole screen is slightly shifted to the left.

What is really interesting is how good it looks in motion compared to still -- its like the subsampling algorithm and subpixels work much better in motion. Just scrolling down this forum thread slowly it actually feels like I have a 1440p monitor instead of a 1080p monitor. Sweet!
 
Unfortunately, I don't think this will work for me because I have a CRT. The "Adjust Desktop Size and Position" menu does not contain any scaling options. Unless someone knows a way to force this to be enabled, I'm out of luck :(

I guess I have to wait until Nvidia implements real supersampling, or I buy an LCD, or I go back to AMD.
 
Are you using a dual link DVI cable?

1. Are you asking me?

2. Are you serious?

CRT = analog only. This is the reason I have no scaling options.

But I figured since this thread attracts the types who hack their drivers on a daily basis, someone could tell me how I could get around this lockout and enable the scaling features anyway.

I would never need scaling help for my CRT, but I DO need scaling turned-on if I want to use this for hacked supersample AA.
 
Would viewers on this forum rather have the fullsize images linked throughout the thread and need to scroll through them rather than clicking on a thumbnail?

Clicking the thumbnail doesn't do anything. You linked to the thumbnail image. All the link does is bring you to a super low resolution image, you have to remove the .th to get the fullsize image. Just link to the fullsize image instead, the forum won't actually display the image unless you include the
tags. It's annoying having to take out the .th in all of them.
 
Clicking the thumbnail doesn't do anything. You linked to the thumbnail image. All the link does is bring you to a super low resolution image, you have to remove the .th to get the fullsize image. Just link to the fullsize image instead, the forum won't actually display the image unless you include the
tags. It's annoying having to take out the .th in all of them.

Perhaps you need to refresh the page or clear your cookies because the thumbnails do link to full size images.

This image
borderlands3.th.jpg

http://img805.imageshack.us/img805/7862/borderlands3.th.jpg

Links to this address: http://img805.imageshack.us/img805/7862/borderlands3.jpg

Which is this when you click the thumb nail:
borderlands3.jpg


So again, if there is an issue, I'm pretty sure it is on your end. I've checked on 4 computers running different browsers.

One running XP using IE.
One running Vista using IE and Firefox.
One running Win7 using IE and Firefox.
My brothers Apple laptop using Safari.

Here it is again, Try it, tell me it still isn't working:



So unless your using another browser that has issues with thumbnails for some reason, I don't understand what the continued problem is. Seeing as how you are the only one complaining since I fixed the original problem.
 
Last edited:
Clicking the thumbnail doesn't do anything. You linked to the thumbnail image. All the link does is bring you to a super low resolution image, you have to remove the .th to get the fullsize image. Just link to the fullsize image instead, the forum won't actually display the image unless you include the
tags. It's annoying having to take out the .th in all of them.


all the images work fine for me, so it has to be something on your end.
 
Odd. Works fine with IE7 but not with firefox 4.0.....

Sorry for the trouble, I'll see if it works on chrome.
 
Back
Top