Jump to content

Downsampling


Recommended Posts

Just wanted to note that this messes with shadow rendering on one of my test machines. If you're not seeing any problems, I'd say go for it, but be aware that it may cause issues, and try removing the tweak before filing help desk tickets / tech support forum posts. Thanks!

Link to comment
Share on other sites

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

I am running CMBN on Win 7 64 so the app can address 4GB, which should ameliorate the issue.

Do you mean 4GB system RAM PLUS 4GB VRAM - I doubt that's the case.

CM is a 32 bit application: game memory + used video memory must be < 4GBs regardless of OS.

Thus, I'd suggest your VRAM is max at 2GB regardless of the card actual max capacity.

Link to comment
Share on other sites

If you look at the third screenshot George MC posted on page 2 the shadows do indeed look very jaggy.

I've occasionally got shadows like that regularly on all my NVIDIA cards, in CMSF, CMBN and CMFI, without doing this nifty trick. Seems to depend on the camera angle w.r.t. the source of lighting, and I suspect is an issue with the NVIDIA OpenGL drivers.

EDIT: This is not a problem specific with CMx2, or OpenGL, I must also say. I get this kind of weird artifacts on other games, like Shogun 2: Total War and even Rome 2: Total War. But not on Unreal engine games like XCOM Enemy Unknown. Digging a bit in one of my favorite sites, I see that this is quite a common - and tricky - problem: http://stackoverflow.com/questions/9854416/how-to-improve-the-quality-of-my-shadows

Link to comment
Share on other sites

Jim, one of the options when you do the install is to do a Clean Install- have you tried that? I think the option becomes available if you choose Custom/Advanced

Also, when you install, have you got anything running - Precision X, for example - that is actively using the card's drivers?

Alternatively there is a tool called Driver Sweeper which can be used to get rid of drivers and allow you to do a clean install. I had to do this when I upgraded from a GTX580 to a GTX680. Similar to the old days when you had to do the driver upgrades in Safe Mode.

Hi Jock

Yes, I've tried pretty much everything, except driver sweeper, which I may have to resort to.

On a brighter note, your down sampling tip seems to have worked a treat. No problems so far. Well done for showcasing it.

Link to comment
Share on other sites

Do you mean 4GB system RAM PLUS 4GB VRAM - I doubt that's the case.

CM is a 32 bit application: game memory + used video memory must be < 4GBs regardless of OS.

Thus, I'd suggest your VRAM is max at 2GB regardless of the card actual max capacity.

32 Bit app on 32 Bit OS can address about 2GB, or 3GB if it is LAA flagged (which I presume CMBN is).

32 Bit app on 64 Bit OS can address the full 32 Bit address space ie approx 4GB.

All of these figures are the maximum that Process RAM and mapped VRAM can add up to.

Modern graphics drivers don't map the full used VRAM into the address space any more, they use an aperture. The 32 Bit address space is still a limitation, however the combination of 32 Bit app, apertured VRAM mapping, and a 64 Bit OS is the best combination until 64 Bit executables are the norm.

Link to comment
Share on other sites

I've occasionally got shadows like that regularly on all my NVIDIA cards, in CMSF, CMBN and CMFI, without doing this nifty trick. Seems to depend on the camera angle w.r.t. the source of lighting, and I suspect is an issue with the NVIDIA OpenGL drivers.

My specific issue appeared to be a corruption of the shadow matrix and/or partial failure of the shadow projection. Probably a driver-based issue, but something to keep an eye out for.

EDIT: This is not a problem specific with CMx2, or OpenGL, I must also say. I get this kind of weird artifacts on other games, like Shogun 2: Total War and even Rome 2: Total War. But not on Unreal engine games like XCOM Enemy Unknown. Digging a bit in one of my favorite sites, I see that this is quite a common - and tricky - problem: http://stackoverflow.com/questions/9854416/how-to-improve-the-quality-of-my-shadows

Basically, shadows (especially outdoor, free-camera shadows) are hugely problematic, both for game and driver developers. Yep.

Link to comment
Share on other sites

32 Bit app on 32 Bit OS can address about 2GB, or 3GB if it is LAA flagged (which I presume CMBN is).

32 Bit app on 64 Bit OS can address the full 32 Bit address space ie approx 4GB.

All of these figures are the maximum that Process RAM and mapped VRAM can add up to.

Which, to be fair, is what I stated

Modern graphics drivers don't map the full used VRAM into the address space any more, they use an aperture.

Which results in a 1/4 of the card memory displacing system RAM - equating to 1GB for a 4GB card?? Leaving 3GB for system memory?!?

The 32 Bit address space is still a limitation, however the combination of 32 Bit app, apertured VRAM mapping, and a 64 Bit OS is the best combination until 64 Bit executables are the norm.

Yes that makes sense, I understand your overall point - thanks for taking the time to clarify it.
Link to comment
Share on other sites

My specific issue appeared to be a corruption of the shadow matrix and/or partial failure of the shadow projection. Probably a driver-based issue, but something to keep an eye out for.

That's interesting. I wouldn't be surprised to learn that some corners have been cut to get the best performance on typical desktop resolutions, leaving less common resolutions hanging out to dry.

Link to comment
Share on other sites

Do you think the shadows will ever be entirely calculated by the GPU in CMx2, Phil?

What do you mean? "Entirely calculated by the GPU" is a phrase with many possible meanings, to put it mildly.

Link to comment
Share on other sites

What do you mean? "Entirely calculated by the GPU" is a phrase with many possible meanings, to put it mildly.

:) ok, I guess I mean - might the outdoor shadows be calculated and rendered by a more GPU based process than currently appears to be the case, in the future? Based on the heavy hit that they currently have on the frame rate, I assumed that the CPU was doing a lot of the work.

Link to comment
Share on other sites

:) ok, I guess I mean - might the outdoor shadows be calculated and rendered by a more GPU based process than currently appears to be the case, in the future? Based on the heavy hit that they currently have on the frame rate, I assumed that the CPU was doing a lot of the work.

Here I'm assuming a lot, and Phil will probably correct me, but my guess is that BFC engine is implementing some variation of the technique called Cascading Shadow Mapping, which is entirely executed and implemented as little routines (shaders) which are loaded on the GPU very much like one loads geometry and textures, and implemented in the OpenGL 'shader' language. Note that 'shaders' do much more than just 'shadows', they basically allow to control procedurally (i.e. to control programatically) how your hardware rasterizes a 3D scene (i.e. translates geometry, textures and lighting into pixels in your screen). You can also understand them as 'procedural textures'.

Before that, i.e. before 2005 or so, soft shadows used to be precomputed as textures (i.e. into image files that one loaded from the filesystem) and a substantial amount of perspiration was required in order to get the good old Texture & Lightning pipeline to do what one wanted with them. The CPU was involved when transferring the textures from your hard disk (or main memory) to the video memory.

And even before that, and here I'm talking 20th century, shadow rendering was something only professional rendering environments (such as RenderMan, or 3D Studio) could do, and not in real-time. Entirely in your CPU.

EDIT: For a wargame like CMx2, I tend to consider shadows to be a luxury. But man, I do love the immersion they provide.

Link to comment
Share on other sites

:) ok, I guess I mean - might the outdoor shadows be calculated and rendered by a more GPU based process than currently appears to be the case, in the future? Based on the heavy hit that they currently have on the frame rate, I assumed that the CPU was doing a lot of the work.

Ahh. No, that's not the case. Without getting into too much detail, it's quite the opposite for most cards.

Unfortunately shadow mapping is expensive due to the information that needs to be gathered, not the hardware that does the calculations (though those aren't free either of course). More unfortunate, though, is the fact that no other robust shadow generation method - that would work for our purposes - would be cheaper. They all use more expensive information than shadow mapping.

There are certain new-fangled bits on newer cards to help make the whole process cheaper, and we use those where possible, but in general shadows are always going to be expensive.

Link to comment
Share on other sites

Just tried 2560x1600 on my usual 1920x1200... Worked a treat, everything looked extremely crisp. Menus and the info bar at the bottom of the screen are a bit hard to read... Would need to drop it down a bit long term I reckon, can't say I'd use the scenario editor at this res, can barely read it.

Otherwise very interesting, I'll definitely be trying this with some other titles.

Thanks

-F

Link to comment
Share on other sites

I've gone and done the same thing (downsample) with my copy of CMMG. Res is 2880x1620 @60Hz.

I think with CMMG the shadows are very much improved. My earlier shots were taken with CMBN patched to 2.01 - compare these with shots taken in CMMG. Shadows on and shaders on. I think a huge improvement.

You'll notice the shadows are smoother and less jaggy. Also I don't get the weird flickering effect that I used to get during poor vis/nighttime action.

lnbx.jpg

Link to comment
Share on other sites

Thanks for the info Phil.

Sure!

I think with CMMG the shadows are very much improved. My earlier shots were taken with CMBN patched to 2.01 - compare these with shots taken in CMMG. Shadows on and shaders on. I think a huge improvement.

You'll notice the shadows are smoother and less jaggy. Also I don't get the weird flickering effect that I used to get during poor vis/nighttime action.

Hmm, that's interesting. Thanks.

Link to comment
Share on other sites

Re: "My desktop is 1920 x 1080. This is the maximum my monitor supports.

The GPU is rendering the scene at 2880x1620, set in the display size.txt by using the values 2880 1620 60

The GPU then downscales this to 1920x1080, which results in crisper textures and improved anti aliasing."

My NVidia tells me my monitor is capable of 2560x1600. But, if I set the display size.txt to that the UI becomes so small it's almost impossible to read. So, I use 1920x1200. Is it possible to make this downsizing trick work on my system and still end up with a readable 1920x1200?

Link to comment
Share on other sites

I am puzzled at your screenshot as I thought many of us have noted that the UI and text can't be increased in size when using a very high resolution monitor at its max capacity.

If you are setting your display size.txt file to max resolution, are you sure you are not reducing it by changing the in-game setting?

I checked the game at my max 2560 1600 60 and I agree it looks a LOT better (regardless whether I have shaders on or off). Edge shimmering is gone and the image/graphics are MUCH better. But, all the briefings and UI are smaller and harder to read. Barely ok while I am using my 30" monitor. So, I will leave it at max resolution from now on. But, almost impossible with a smaller screen.

So, I don't understand how you have kept a large UI. How is the briefing text size on your system?

Link to comment
Share on other sites

I've just gone through it again - so unless I've made a mistake along the way I did not change the actual native monitor res but made available (i.e. create the new res) the customised new res. I then went into the CMBN/CMMG display.txt file and changed the values. Fired it up and get the sharper image but without the UI text being downsized.

I could be wrong through but I followed the instructions as laid out in the link Jock posted. As you can see from my screenshots I get clearer images but no UI downsizing. Editor is the same - clear as and readable.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...