Quantcast

Jump to content

» «
Photo

~! Ultimate GTAIV Performance Fix !~

1,157 replies to this topic
MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#1

Posted 15 December 2008 - 07:28 PM Edited by MonkeyMhz, 16 December 2008 - 05:44 PM.

The Idea:

You've heard this rant a million times, GTAIV was future proofed all reflections and shadows are scaled with the resolution. A stupid yet seemingly unfix-able problem that makes the game a mess. Playing a game in 1024x768 or lower is not acceptable. If I wanted to do that I would pull out my P2/P3 with its 32/64mb graphic card. From looking at GTAIV, it has a lot of new technology but nothing that should struggle to run on 8800's or even 8600's. Its that resolution scaling, im sure of it!.

The Plan:

There must be a way to correct this mess. Lets look at our checklist.

- Configs/Settings Profiles in game directory? /fail.
- Will R*'s patch will add more options in? /fail.

Not long ago I figured out you can run in windowed mode in 800x600 and then stretch the window larger and it gets around R*'s quality scaling that would increase the reflection maps.etc that would lag the game and make objects/textures disappear and horrid pop-ins. It made the game look good because you weren't dealing with such a low resolution and the game played extremely well.

I wanted to look into this and see if you can achieve the same thing without stretched the window manually every time.

The Support:

After browsing the net, I noticed others used commandline.txt to set the size of their window, and some people have achieved resolutions over their memory limit without using -norestrictions and only using the resolution from the command lines. This instantly helped me find the answer I wanted.

How To Do It:

Theory:
Now my theory was that, if you have a memory limit on, and you enter a resolution in the command line that is unable to be achieved with that memory limit, it will still put you in that resolution, but the quality scaling will not be implemented. Therefore no disappearing objects/textures, no long or noticeable pop-in's, and less/no lag.

The trick is implementing the higher resolutions with you preferred graphic settings, by limiting your memory to just barely include the options you want, and then you force the resolution.

Steps:

1. Get rid of -nomemrestrict or any current commandlines you have. Run the game and let it die. When you run the game, go to the graphic options, turn your resolution to 800x600 or 1024x768 or whatever you want the reflection maps/resolution based quality to be at, I did 800x600 mainly because it looks simular to the rest and will give you the most performance. Use the rest of your memory budget in draw distance.etc.

2. If you cannot acheive the graphical settings you want with your currently memory budget do this next step. If you can, then you can skip this step.

make commandline.txt or append -availablevidmem (multiplier):
This command works like this, say I have 256mb vram. -availablevidmem 2.0 would make it say I have 512mb vram, its a multiplier.

So for getting our settings as we want it lets make a budget of 512mb vram, so -availablevidmem 2.0.

Open GTAIV, set resolution in the ingame settings to 800x600, set rest of the options to whatever you want (be reasonable).

Now continue to the next step.

3. Now you have your game set as you want it, but in a f-ugly resoltion, but we will fix that. Next step is to trick GTAIV, even people with 512mb graphic cards or even 1gb, this is even useful for them.

One of my buddies with a 8800GTX loves this tweak because it allows him to get much higher frames with very little to no graphical loss.

So now lets say all our desired settings ingame @ 800x600, use 650Mb. Ok. But say were now using a 1GB card so it says 650/1024Mb. This is a problem now because if we force -height 1080 -width 1920. We will end up with our ingame options changing to 1920x1080 giving us way more slowdowns because R* starts using that dam scaling reflection maps.etc with resolution.

So what we need to do now is limit the memory GTAIV sees to exactly the amount to run our game in 800x600 (or whatever quality refection maps.etc you want) with our desired settings.

So lets go back to our dilemma, we have a 1GB graphic card and the game only takes up 650mb with the settings we want in 800x600.

We can figure this out by doing some simple math.
1GB Card (650mb desired settings): 650/1024 = 0.635 (its 0.634 but give a tiny bit extra, just like a couple megabytes).

So you would use -availablevidmem 0.635 that would make the game detect you only have 650mb ram which barely fits the features you want in 800x600.

So now once we have figured that out your commandline.txt or your shortcut appending should look like this (depending on what resolution you want/your vidmem.etc):

-height 1080 -width 1920 -availablevidmem 0.65

and maybe you add stuff like (-framelimit, or -noblank or whatever).

*BUT DO NOT USE ANY UN-RESTRICTION (this includes the nomemrestrict and norestrictions or anything like that)!

4. Now when we start up our game. We will be in our desired resolution, and when we look in the game options it will say 800x600, even though we are in a way higher resolution and all your settings will be how you want them and your memory budget will be exactly the right amount or similar like 650/650 or 742/746.etc

Funny thing here you wont be able to go back cuz it will detect your memory budget is to low and the game is forcing a higher res, so you might not be able to leave the options screen now, so alt tab, and close the game. If all your settings looked right and it said 800x600 but was clearly in a higher res. Then you did everything right, if not, go retry.

5. Now restart the game and play. Yay, good fps, cheated GTAIV to not up the reflection quality with the resolution.

Additional Speed:
If you happen to be running Vista x86/x64 and you have a directx10 capable graphic card. Do what elecg2 figured out. I tried creating empty/easy HLSL shaders and putting them in GTAIV to get rid of shadows and stuff but that didn't work.

However by doing what elecg2 tried, I got a huge performance increase,

Go to GTAIV folder, go into common, then shaders.

Backup everything in there <- !!!

Then copy the contents of win32_30_atidx10, and paste them into win32_30_nv8. Or just rename the folders, whatever makes you happy.

That gave me a significant performance boost and I have no graphical problems or abnormalities. Try it, if it causes you problems or decreased performance then just put it back to normal. With these steps you can get your game running beautifully in no time, or at least better than before.

Enjoy.
*Ill be adding screen shots tonight.

Please Sticky This, I'm tired of people complaining when the answer is right under their nose.

To do a test to actually see if you get any gain from this start your game with 800x600, rest settings how you want them, but start the game in windowed mode. Manually drag the window to your screen size. See if you have a performance increase there, if so. Then doing this big mess of text will help you achieve what you achieved there without having to start the game in windowed mode and manually resize it, thats all this thing does. If you don't get a gain from it then clearly this is no use to you. But it is use to a lot of people.


Now wheres my proof?
*Oh nice monkey, you showed us some screens but you have no proof!.
*Oh yes i do!.

Here the game is 800x600 in game options but tweaked to play at 1680x1050 (look at the highlights/sun reflection on the water):
http://img75.imagesh...0stretchye9.jpg

Here is the game at 1680x1050 in game, no tweak (notice the waters highlights/sun reflection is not as stretched, higher res, because in the first screen we are cheating the reflections to not up with the res, also notice in the distance everything disappears):
http://img254.images...1050normjv4.jpg

And to keep things fair, in those water screens, the game was maxed, high textures, high render, full distance, full detail, hence the FPS remained 10 in both!.

I rather play the game in a higher res with no disappearing objects and no pop-ins with lower reflection maps, than the game in a high res with better reflection maps but everything disappears.

This tweak shmozzle does something!, so its not a placebo. I'm happily running the game 1280x800 with medium tex, hi rend, always in the 20s. So I honestly can care less if you believe me, the evidence is here that it will help someone and if you don't believe me then don't. Ill go enjoy my game while you can sit there and sob.


If your settings constantly reset, please use what ircmaster wrote:
QUOTE

If your graphics settings reset every time you start it up again just follow this quick fix:

(Note this is the Vista way, I'm not sure how to do it in XP)

1. Go into your C:\Users\YOURUSERNAME\AppData\Local\Rockstar Games\GTA IV\Settings folder
2. Delete everything that's in there
3. Start the game with your desired settings and settings shouldn't reset anymore

And I'm not lying or trying to ruin your game or anything. I got this off of the official GTA IV support website.


Btw, you know what pisses me off, R* could have added a single checkbox that says "Quality Resolution" and then you check it or uncheck it, checked it would up the reflections with the resolution unchecked it would just do what were doing by doing this whole frag feast of text. Lazy R* (do you wanna sell more games?). And a single check box would not make the options complicated!.

longboardskier
  • longboardskier

    Punk-ass Bitch

  • Members
  • Joined: 08 Nov 2008

#2

Posted 15 December 2008 - 07:39 PM

Wow man thanks for writing that all up. I'll be giving it a shot when I get home later!

What kind of fps gain did you get from doing this?

/sticky

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#3

Posted 15 December 2008 - 07:43 PM Edited by MonkeyMhz, 15 December 2008 - 07:50 PM.

Originally from the first start of the game with all sliders 0/1 800x600, all low. I got like mid 30's.

Then I eventually ran on 1024x768 with medium and high, sliders all 0/1 and got mid/high 20's. And it pissed me off cuz 1024x768 is unacceptable on a 1680x1050 laptop LCD screen. And if i turned resolution up stuff would disappear.

So after all this stuff, now I run what I have in my Sig =P.

I played the game all yesterday, just got the 2nd island.

I'm using 180.84 drivers (eh, sleep mode problem (wont wake up, some times like 1/5 times) + can't view PC on TV now, oh well, I never do that)

Oh also make sure you defrag the GTAIV folder.
And in Nvidia settings make it all high performance.

Vicetopia
  • Vicetopia

    Factory Overclocked

  • Members
  • Joined: 18 May 2003
  • United-States

#4

Posted 15 December 2008 - 07:47 PM

The vram on the graphics menu is shown in MB, so 1 GB would be 1024 MB.
Does getting the value slightly wrong cause a lot of texture popins? Have to mess around and see...

postem
  • postem

    Snitch

  • BUSTED!
  • Joined: 15 Dec 2008

#5

Posted 15 December 2008 - 07:49 PM Edited by postem, 15 December 2008 - 07:52 PM.

Epic topic. Now this is the kind of stuff im going into!!!!

Praise the comunity, always better than developers, that is gamer to gamers!

EDIT

Monkey did you managed to do anything about the ugly pixelated shadows? Its like hell to play with it at times like 11 AM, all game is pixelated.

oskarki
  • oskarki

    DOOVDE!!!!111111ONEONEONE

  • Members
  • Joined: 05 Dec 2008

#6

Posted 15 December 2008 - 07:52 PM

QUOTE (postem @ Dec 15 2008, 19:49)
Epic topic. Now this is the kind of stuff im going into!!!!

Praise the comunity, always better than developers, that is gamer to gamers!

Word.

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#7

Posted 15 December 2008 - 07:53 PM

QUOTE (Vicetopia @ Dec 15 2008, 19:47)
The vram on the graphics menu is shown in MB, so 1 GB would be 1024 MB.
Does getting the value slightly wrong cause a lot of texture popins? Have to mess around and see...

Sorry, my mistake.

Anyways, getting the value off a couple mb, doesent make a difference like 300/301 mb or 205/208mb is still sufficent for doing this, as long as theres not such a memory megabyte differences that it will pop up to the next res.

Oddly enough, before without doing all this going into 1280x800 I had constant missing textures that took a while to load and buildings would appear right infront of you. After doing all this, I see maybe 1-2 noticeable pop in's in about 3-4 hours of game play. So I barely see any. And it runs much much faster.

Vicetopia
  • Vicetopia

    Factory Overclocked

  • Members
  • Joined: 18 May 2003
  • United-States

#8

Posted 15 December 2008 - 07:54 PM

I'm getting a "D3D Reset Failed" error whenever I use custom width/height values in commandline.txt.
Anyone know what's causing that? Error occurs with any custom res setting.

DJ24966
  • DJ24966

    Rat

  • Members
  • Joined: 03 Dec 2008

#9

Posted 15 December 2008 - 07:55 PM

Ok, lets say my card is 512MB, but the game only recognizes 502. I can get it to use all of that under 800 * 600. What commands would I need to just run it at 1024 * 768?

And can it be added to commandline.txt, or just to the shorcut?


Thanks

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#10

Posted 15 December 2008 - 07:57 PM Edited by MonkeyMhz, 15 December 2008 - 08:01 PM.

QUOTE (Vicetopia @ Dec 15 2008, 19:54)
I'm getting a "D3D Reset Failed" error whenever I use custom width/height values in commandline.txt.
Anyone know what's causing that?  Error occurs with any custom res setting.

try with commandline.txt if your not already. If the problem persists, check your DX settings, I belive you can do that by,

Start->Run->type in dxdiag

Oh also try running windowed mode, -windowed
this error might have something to do with direct play.

If -windowed fixes it, its possibly a interference with direct play.

If everything looks fine, and problem still happens, reinstall the newest DirectX. If you still have problems, PM me and ill help you get to the bottom of it.

*And yes GTAIV always recognizes a tiny bit less than your actual GPU. Kinda like how when you view your CPU in your computer propertys it says 2.99ghz instead of 3.0 stuff like that.

deepnx
  • deepnx

    Player Hater

  • Members
  • Joined: 03 Dec 2008

#11

Posted 15 December 2008 - 07:59 PM

hmm lets try

DJ24966
  • DJ24966

    Rat

  • Members
  • Joined: 03 Dec 2008

#12

Posted 15 December 2008 - 08:02 PM

I can't get it to work right for some reason. The game options always changes the resolution as well.

Vicetopia
  • Vicetopia

    Factory Overclocked

  • Members
  • Joined: 18 May 2003
  • United-States

#13

Posted 15 December 2008 - 08:02 PM

It was a refresh rate error (in the graphics menu).
Rate selected with 800x600 wasn't compatible with the resolutions being used in commandline.txt
tounge.gif

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#14

Posted 15 December 2008 - 08:04 PM

QUOTE (DJ24966 @ Dec 15 2008, 20:02)
I can't get it to work right for some reason. The game options always changes the resolution as well.

Are you limiting your VRAM with the multiplier? Because you have to do that so the game detects that it doesn't have enough memory to change the resolution, make sure your not using any un-restriction commandlines, norestrict and nomemrestrict are NO NO's!

Vasil
  • Vasil

    Rat

  • Members
  • Joined: 17 Nov 2008

#15

Posted 15 December 2008 - 08:06 PM

I lose about 2/3 fps going from 1680x1050 to 800x600. I canŽt see how would this help here...but IŽll give this a try anyway. Thx for the effort.

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#16

Posted 15 December 2008 - 08:09 PM

QUOTE (Vasil @ Dec 15 2008, 20:06)
I lose about 2/3 fps going from 1680x1050 to 800x600. I canŽt see how would this help here...but IŽll give this a try anyway. Thx for the effort.

It might, running the res lower shouldn't hurt the performance. Because lower res ingame settings = lower reflection map/shadow map/environment map. But give it a go!...


DJ24966
  • DJ24966

    Rat

  • Members
  • Joined: 03 Dec 2008

#17

Posted 15 December 2008 - 08:11 PM

QUOTE (MonkeyMhz @ Dec 15 2008, 20:04)
QUOTE (DJ24966 @ Dec 15 2008, 20:02)
I can't get it to work right for some reason. The game options always changes the resolution as well.

Are you limiting your VRAM with the multiplier? Because you have to do that so the game detects that it doesn't have enough memory to change the resolution, make sure your not using any un-restriction commandlines, norestrict and nomemrestrict are NO NO's!

What should I limit to? Like what number? Sorry for all the trouble, Just want to enjoy the game like everybody else.

villin
  • villin

    Square Civilian

  • Members
  • Joined: 04 Dec 2008

#18

Posted 15 December 2008 - 08:12 PM

this actually sounds promising.. will try it when i get home.

it sucks though that we have to make the game look worse..

andree
  • andree

    PIMP

  • Members
  • Joined: 11 Apr 2007

#19

Posted 15 December 2008 - 08:16 PM

user posted image

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#20

Posted 15 December 2008 - 08:16 PM

QUOTE (postem @ Dec 15 2008, 19:49)
Epic topic. Now this is the kind of stuff im going into!!!!

Praise the comunity, always better than developers, that is gamer to gamers!

EDIT

Monkey did you managed to do anything about the ugly pixelated shadows? Its like hell to play with it at times like 11 AM, all game is pixelated.

Still experimenting. I got the shadows to have a quick cutoff, but that looked weird. They all cut off like 1 meter infront of your character. Ill keep you all updated. After I figure out all the stuff I can Ill add it in my app. Im also a bit busy right now, work, game engine, GTAIV program + i wanna play gtaiv too, lol.

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#21

Posted 15 December 2008 - 08:18 PM Edited by MonkeyMhz, 15 December 2008 - 08:21 PM.

QUOTE (DJ24966 @ Dec 15 2008, 20:11)
QUOTE (MonkeyMhz @ Dec 15 2008, 20:04)
QUOTE (DJ24966 @ Dec 15 2008, 20:02)
I can't get it to work right for some reason. The game options always changes the resolution as well.

Are you limiting your VRAM with the multiplier? Because you have to do that so the game detects that it doesn't have enough memory to change the resolution, make sure your not using any un-restriction commandlines, norestrict and nomemrestrict are NO NO's!

What should I limit to? Like what number? Sorry for all the trouble, Just want to enjoy the game like everybody else.

What video card do you have whats its VRAM?, ill tell you specifically what to do.

QUOTE
it sucks though that we have to make the game look worse..

No, its a very very small difference. Barely noticeable, only way I noticed it is when I was in the water. The sun reflection was a bit more stretched. Ill post screens later.

DJ24966
  • DJ24966

    Rat

  • Members
  • Joined: 03 Dec 2008

#22

Posted 15 December 2008 - 08:21 PM

After I add the file to the command line and start the game, it reverts back to default settings and still runs like sh*t. I could be doing something wrong, since your instructions are a bit confusing.


HIS Radeon HD 3850 512MB

Delacroix
  • Delacroix

    Rat

  • Members
  • Joined: 05 Dec 2008

#23

Posted 15 December 2008 - 08:22 PM

Very nice walkthrough, gotta try this shortly, being a FPS Junkie biggrin.gif Kudos!

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#24

Posted 15 December 2008 - 08:22 PM Edited by MonkeyMhz, 15 December 2008 - 08:24 PM.

QUOTE (DJ24966 @ Dec 15 2008, 20:21)
After I add the file to the command line and start the game, it reverts back to default settings and still runs like sh*t. I could be doing something wrong, since your instructions are a bit confusing.

Whats your vram, and whats your specs?. Ill tell you exactly what to do.

First thing is to get rid of your commandlines completely. Start the game, make your res 800x600 in the game options. Move everything else to how you want it, accept changes, look at the vram usage. See how much it takes up.

Then exit the game use -availablevidmem to limit your VRAM to exactly or simular to the amount being used ingame. Then add the line for your res, -height , -width, run the game. Make sure the options still say 800x600, and your settings r right. It wont let you exit, ctrl alt delete out. Restart game, play!. Done.

DJ24966
  • DJ24966

    Rat

  • Members
  • Joined: 03 Dec 2008

#25

Posted 15 December 2008 - 08:22 PM

QUOTE (MonkeyMhz @ Dec 15 2008, 20:22)
QUOTE (DJ24966 @ Dec 15 2008, 20:21)
After I add the file to the command line and start the game, it reverts back to default settings and still runs like sh*t. I could be doing something wrong, since your instructions are a bit confusing.

Whats your vram, and whats your specs?. Ill tell you exactly what to do.

HIS Radeon HD 3850 512MB

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#26

Posted 15 December 2008 - 08:25 PM

QUOTE (DJ24966 @ Dec 15 2008, 20:22)
QUOTE (MonkeyMhz @ Dec 15 2008, 20:22)
QUOTE (DJ24966 @ Dec 15 2008, 20:21)
After I add the file to the command line and start the game, it reverts back to default settings and still runs like sh*t. I could be doing something wrong, since your instructions are a bit confusing.

Whats your vram, and whats your specs?. Ill tell you exactly what to do.

HIS Radeon HD 3850 512MB

Ok, go ingame, set your res to 800x600 ingame. Set everythign else to how you want it, then tell me the mem usage.

ex. 500/506 or whatever. After you post that ill post what you should have in commandline.txt.

DJ24966
  • DJ24966

    Rat

  • Members
  • Joined: 03 Dec 2008

#27

Posted 15 December 2008 - 08:29 PM

QUOTE (MonkeyMhz @ Dec 15 2008, 20:25)
QUOTE (DJ24966 @ Dec 15 2008, 20:22)
QUOTE (MonkeyMhz @ Dec 15 2008, 20:22)
QUOTE (DJ24966 @ Dec 15 2008, 20:21)
After I add the file to the command line and start the game, it reverts back to default settings and still runs like sh*t. I could be doing something wrong, since your instructions are a bit confusing.

Whats your vram, and whats your specs?. Ill tell you exactly what to do.

HIS Radeon HD 3850 512MB

Ok, go ingame, set your res to 800x600 ingame. Set everythign else to how you want it, then tell me the mem usage.

ex. 500/506 or whatever. After you post that ill post what you should have in commandline.txt.

487/490

MonkeyMhz
  • MonkeyMhz

    Trick

  • Members
  • Joined: 09 Dec 2008

#28

Posted 15 December 2008 - 08:32 PM Edited by MonkeyMhz, 15 December 2008 - 08:35 PM.

Ok thats close enough so in your commandline.txt you should have

-height 900 -width 1400 -availablevidmem 1.0

or put whatever res you want with the -height and -width, do height first.

Now after you save that in the commandline.txt start the game up, check the graphic options, and it should have the same settings as before and the res should say 800x600 but you will be running in a higher res.

And please make sure you dont have -nomemrestrict or -norestrict bound to your shortcut. Or else that will ruin this, and it wont work.

*To test to make sure you don't have any un restrictions go in game without anything in the commandline.txt, and make sure it doesn't let you go over your memory limit.

postem
  • postem

    Snitch

  • BUSTED!
  • Joined: 15 Dec 2008

#29

Posted 15 December 2008 - 08:34 PM

QUOTE (MonkeyMhz @ Dec 15 2008, 20:16)
QUOTE (postem @ Dec 15 2008, 19:49)
Epic topic. Now this is the kind of stuff im going into!!!!

Praise the comunity, always better than developers, that is gamer to gamers!

EDIT

Monkey did you managed to do anything about the ugly pixelated shadows? Its like hell to play with it at times like 11 AM, all game is pixelated.

Still experimenting. I got the shadows to have a quick cutoff, but that looked weird. They all cut off like 1 meter infront of your character. Ill keep you all updated. After I figure out all the stuff I can Ill add it in my app. Im also a bit busy right now, work, game engine, GTAIV program + i wanna play gtaiv too, lol.

So you are the guy woking on the tweak app? Nice to hear.

Wish i could do something, but unfortunally im only programming now at business code on .net.

Thanks for the effort.

Vicetopia
  • Vicetopia

    Factory Overclocked

  • Members
  • Joined: 18 May 2003
  • United-States

#30

Posted 15 December 2008 - 08:36 PM

I had to do some manual tweaking with the multiplier to get the right value for vram.
For example using my direct vram value (512 MB) in the ratio was sending my graphics settings into the red (It was something like 347 MB out of 330 MB).

I'm worried this will cause some texture pop-in problems, so I just manually tweaked the multiplier until it was slightly above the value on the graphics menu (Now shows 347 MB out of 352 MB).




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users