Jump to content
jarlow

Fixing slowness with hardware rendering

18 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hey everyone, I think I've stumbled across a fix for the slowness with hardware rendering. Open "Graphics Rules.sgr" in your SimCity 4 directory and add the highlighted line, and remember to turn hardware rendering back on:

 
   property useSecondStage       false  # Default, overridden below in most cases.
   property texBindMaxFree       4   # To stop thrashing, plus a little pad.
   property dirtyRectMergeFrames 6   # Default, for low-end card.
   property TextureBits          32  # mostly just for preview -- everything else
                                     # should be DXT
   property usevertexbuffers false
 
My hardware specs:
Intel Core 2 quad-core Q9300 @ 2.5 GHz
8 GB RAM
NVidia GeForce 8800 GT with 512 MB RAM
Running windowed at 1920x1080.
 
Before the fix, scrolling performance was about 1 FPS. After the fix it was significantly smoother, at least 20-30 FPS.
 
Can other people give this a try and see if it works? Hardware rendering looks slightly better since better texture filtering is used (whereas software rendering uses nearest filtering which gives noticeable aliasing artifacts).
  • Like 4

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Thanks.  There are two places this could go.  I put it in rule Standard Hardware and will give it a try.

You didn't happen to notice whether back buffer control is in that file, did you?  I am having a problem in that my present kernel layer (wine) doesn't support multiple back buffers.


Beware: Emancipated user.  No Windoze for me.
The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
If you always do what you've always done, you'll mostly get what you've always got.
JohnNewSig.gif
"We have met the enemy, and he is us" - Walt Kelly

Come join us at the Moose Factory

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Yes, it should go in the Standard Hardware section.

    I didn't notice anything about back buffers in that file. However, when you run SimCity it'll generate a log in the executable directory (at least with the Steam version), and in that log is a dump of all its options and properties. That's how I found usevertexbuffers, so you may give the log a try to see if there's anything else useful to you.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Good point.  Your fix makes scrolling a little jerky, but nicer on my machine, but it also makes zoom very fast.

    Athlon II X2 with an ATI 3000 chip set 512MB.  Running on Linux under wine.  Because of the back buffering problem, I have crap outs with graphics on my biggest cities in hardare mode.  If I can fix this buffering problem, things may bet better.  Meanwhile, I'll have to run in software rendering.  wine converts everything from DX to OpenGL.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Thanks. That eliminates the slow down caused by the shadows. However there is still a slowdown caused by the option "city details".

    Where did you get that command/setting from?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Originally posted by: Le Dragon Noir

    Thanks. That eliminates the slow down caused by the shadows. However there is still a slowdown caused by the option "city details".

    Where did you get that command/setting from?quote>

    I found usevertexbuffers by digging through a log that SimCity generated. On my machine the log lives in C:\Program Files\Steam\steamapps\common\simcity 4 deluxe\apps.

    The setting isn't a miracle setting that makes SimCity perform perfectly, but it does significantly improve scrolling performance to where I can actually play the game. I still get slowdowns when zooming and scrolling, although I believe this is due to it having to reload resources at the new zoom levels.


    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    this line shoud in this block:

    rule "Standard hardware"

    option $VisualEffects $Low

    option $CarsSims $Low

    option $Shadows $Low

    option $CloudsFog $Off

    option $Waves $On

    option $Translucency $On

    option $Cursor $CursorColor

    option $Driver $Hardware

    option $ScreenSize $Screen_800x600

    option $ScreenDepth $Depth_16

    property useSecondStage false # Default, overridden below in most cases.

    property texBindMaxFree 4 # To stop thrashing, plus a little pad.

    property dirtyRectMergeFrames 6 # Default, for low-end card.

    property TextureBits 32 # mostly just for preview -- everything else

    # should be DXT

    property usevertexbuffers false

    partialRule

    # Enable more cars and sims if user has decent computing power.

    atLeast memory 256

    atLeast cpuSpeed 1600

    option $CarsSims $Medium

    end

     

    Am I right?

    And I still cant understand how its posiible to freezing at my i7 870 with radeon 5870... and why its only happend with up-down scrolling, and its OK with left-right one..

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    When you say the game freezes, I assume you can get out of it by killing the task from the task manager.  You should not have to reboot unless the kernel is ignorning your keyboard.

    Check your graphics settings.  All, and I mean all, options need to be on "application selected" or equivalent because of the legacy nature of this game.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    My poor english)) I mean when i scrolling map up or down its a bit laggy. Left-right - normal FPS rate... 

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Originally posted by: Stalker88

    My poor english)) I mean when i scrolling map up or down its a bit laggy. Left-right - normal FPS rate... quote>

    What screen resolution are you using?  If your vertical dimension is more than 1200, you may be having a problem.  I run at a strange resolution because of a problem with my graphics drivers (1280 x 940), but don't have a problem with scrolling.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Originally posted by: slash_hudson

    My zooming is much better when I set #of Sims/Cars on low.quote>

    Of course, because there are fewer objects to redraw when you zoom.  Each zoom requires a redraw, and if you use the mouse wheel for this, you may over run the command buffer and crash.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    when I open the file am i doing it right because I am opening it in notepad, and when I try to save it and overwrite the old sgr file it says access denied? Do I just save it as a .txt file?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    when I open the file am i doing it right because I am opening it in notepad, and when I try to save it and overwrite the old sgr file it says access denied? Do I just save it as a .txt file?

    You have to right click and go onto properties as it is read only...

    I have tired it, it does improve performance with shadows on a bit, but its still not as fast as it should be so I still keep them off.


    14+ Million sims! Things are even nicer in Sunset County!

    Sunset County - Check it out!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Tested it on 2 large tiles, one with little development, one fully developped with loads of sprawl style singly family all over the place.

    Result: WAY better scrolling/zooming performance. Even much smoother gameplay in UDI mode. Well done investigation here.

    My specs: core2quad @ 2,5ghz, nvidia gtx260 integrated @4gb, 8gb ddr2 ram, 12gb swap, max details at windowed full-hd resolution


    k1v7e2y.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Strange, I thought vertex buffers is suppose to improve GPU performance, perhaps its the way how Maxis implemented caused laggy scrolling/zooming. I'm going to give it a try and run a temperature test as well to see what happens if usevertexbuffers is disabled.

    EDIT: How do I open up Graphics Rules.sgr? Windows 7 said it can't open the file. Do I go into "Apps" folder and click on name-PC-config-log and disable usevertexbuffers from there?

    2nd EDIT: I attempted to set usevertexbuffers as false and it refused to let me save even as an administrator. Is there a work around?


      Edited by Loney  

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Strange, I thought vertex buffers is suppose to improve GPU performance, perhaps its the way how Maxis implemented caused laggy scrolling/zooming. I'm going to give it a try and run a temperature test as well to see what happens if usevertexbuffers is disabled.

    EDIT: How do I open up Graphics Rules.sgr? Windows 7 said it can't open the file. Do I go into "Apps" folder and click on name-PC-config-log and disable usevertexbuffers from there?

    2nd EDIT: I attempted to set usevertexbuffers as false and it refused to let me save even as an administrator. Is there a work around?

    A .sgr file is just text in SC4. Some other extension item in your registry is causing trouble. You need to fix it. If you look at the file type that windows thinks it is, you'll know what to fix. You should be able to edit this file with Notepad. Do not use a word processor.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hey everyone, I think I've stumbled across a fix for the slowness with hardware rendering. Open "Graphics Rules.sgr" in your SimCity 4 directory and add the <span style="background-color: yellow; ">highlighted line</span>, and remember to turn hardware rendering back on:

    <div> </div>

    <div><code> property useSecondStage       false  # Default, overridden below in most cases.</code></div>

    <div><code> property texBindMaxFree       4   # To stop thrashing, plus a little pad.</code></div>

    <div><code> property dirtyRectMergeFrames 6   # Default, for low-end card.</code></div>

    <div><code> property TextureBits          32  # mostly just for preview -- everything else</code></div>

    <div><code>                                   # should be DXT</code></div>

    <div><span style="background-color: yellow; "><code> property usevertexbuffers false</code></span></div>

    <div> </div>

    <div>My hardware specs:</div>

    <div style="margin-left: 40px; ">Intel Core 2 quad-core Q9300 @ 2.5 GHz</div>

    <div style="margin-left: 40px; ">8 GB RAM</div>

    <div style="margin-left: 40px; ">NVidia GeForce 8800 GT with 512 MB RAM</div>

    <div style="margin-left: 40px; ">Running windowed at 1920x1080.</div>

    <div style="margin-left: 40px; "> </div>

    <div>Before the fix, scrolling performance was about 1 FPS. After the fix it was significantly smoother, at least 20-30 FPS.</div>

    <div> </div>

    <div>Can other people give this a try and see if it works? Hardware rendering looks slightly better since better texture filtering is used (whereas software rendering uses nearest filtering which gives noticeable aliasing artifacts).</div>

    You're a lifesaver!

    For the first time, I can play SC4 in hardware mode.

    Thank you.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections