Jump to content

Skyrim Shadows: Technically Speaking


Recommended Posts

I've never heard the reason behind this, whether its common knowledge or not.

 

But I'm curious as to why Interior Shadows in Skyrim are so superior to the shadows cast on your character (and around them) when outside.

 

I play a lot of games, and I haven't run into any other game that has such a massive difference in Interior/Exterior lighting, as Skyrim... Not in any recent years that I can remember at least.

 

As such, I'm curious..... whats the technical reasons behind this difference?

Link to comment

Shadows are calculated by the CPU in Skyrim, and those calculations are heavy and limited in amount. You can set short shadow drawing distance and they will look amazing, but disappear a couple of meters away from your character. If you set this distance too long, they will be blocky. The best way is to find the middle settings.

 

Also, ENB helps with shadows too.

Link to comment

Yeah. I used the Launcher and set them to as High as they can go. Which I suppose sets the distance super far.

 

I never use ENB because I can't stand how they look at night or in dark places, how torchlight doesn't go 5 feet beyond your Face with an ENB.  That stuff really bothers me.

Link to comment

For me, I use the Skyrim_config program to edit the .ini file. With this tool, you can change the shadow resolution manually and actually get shadows to look better than the ultra setting. However, the better the resolution, the slower your game will perform unless you shrink the distance. Personally, I set the shadows resolution to 1024 with level 3 blurring. My computer isn't too good, so that's the best I can have before it starts slowing down. I know Gopher sometimes gets it up to 4096 with blur level 2 and his shadows look fantastic.

 

As for ENB's I can't use them since ENB is optimized for NVidia and I have an AMD card. So no matter how good it's suppose to be (Even performance-enhancing ENBs) my game comes to an FPS crawl.

Link to comment

Yeah. My good computer died back at the beginning of June and I had to get a Best Buy computer...... sigh.

 

Needless to say my graphics power has gone down.

 

I'll check out that tool, what really bothers me is just horribly splotchy shadows on my character.

That sucks about your PC dying. I had a best buy computer before i finally built my first one (the one I'm using now). I had so many problems with the bestbuy one. The harddrive would fail, the sound card would fail, two gfx cards died inside it. It was finally killed during a storm. Apparently it went through the modem, to the router, through the ethernet cable and then to the PC frying the motherboard. No idea that could happen until it happened to me. anyway, zero problems with the PC I built. Someone helped me pick out which parts to buy. According to a lot of people that build PCs any storebought or online bought (dell, gateway, etc etc) use super cheap parts to build PCs so they never last longer than 4 years and never go more than a year or 2 without some kind of problem where a part needs to be replaced. So in the long run it's usually best to just build one

Link to comment

Yeah. I used the Launcher and set them to as High as they can go. Which I suppose sets the distance super far.

 

I never use ENB because I can't stand how they look at night or in dark places, how torchlight doesn't go 5 feet beyond your Face with an ENB.  That stuff really bothers me.

First of all, you really cant see a damn thing with a torch. It's not a flashlight. It's a torch. With a flashlight you can see stuff in a cone in certain direction. With a torch you can see 360 degrees around you, but not far away.

Also, ENB is all about configuration. You just configure things to you liking, or search through 100500 presets on Nexus and find the one you like the most. Then you tune it again so it looks perfect for your monitor/color profile/calibration/individual eyesight characteristics/your liking/whatever else there is - combination.

ENB is not optimised for Nvidia, and you really should start to use ENB simply because it can now break that 3.1gb barrier for you. Look for ENBoost on teh Nexus.

Link to comment

My opinion on shadows in pretty much every game, is that the performance hit and the rather ugly implementation does not justify having them. I disable 'em, and my performance shoots up. I'd recommend you do the same and then modify the lights in Skyrim (I can give you a mod (which i edited) that does this, if ya want). I vastly prefer it, and things do look alot more vibrant. Moreso with an ENB on top.

Link to comment

ENB is not optimised for Nvidia.

I beg your pardon but Boris Vorontsov, the creator of ENB, said so himself that since he has an NVIDIA computer, his program is naturally optimized for NVIDIA. Granted this was months ago, he could have found someone with an AMD machine that could optimize it for AMD too. However, this was never claimed and so until he says otherwise, ENB therefore is NVIDIA-optimized only. I verified this too. As someone with the same stats as my computer with an NVIDIA card had better performance with the ENB performance boost mod whereas when I tried it, it brought my computer's FPS to a crawl.

 

you really should start to use ENB simply because it can now break that 3.1gb barrier for you. Look for ENBoost on teh Nexus.

 

Actually, it doesn't break the 3.1gb barrier, it merely reduces the RAM you use. So if you're close to 3.1gb, then sure it will help, but I'm not near that mark. It won't help me.

Link to comment

First, ENBdev is full of AMD users, and they are participating in tests.

Second, the latest ENB includes special enbhost.exe process, that launches with your Skyrim and virtually adds 4Gb of RAM to 3.1Gb limit. Until bethesda fixes Skyrim(not gonna happen i believe), that's the best solution on the scene.

Link to comment

I have a shitty graphics card in this Best Buy computer. I've no interest in using ENB. Its an fps hog and... well, the 3.1 mod limit is a big concern for me these days... I try to be very sparing on what mods I use.

 

@MajinCry - Which mod are you referring to to use without shadows even on?
Link to comment

 

I have a shitty graphics card in this Best Buy computer. I've no interest in using ENB. Its an fps hog and... well, the 3.1 mod limit is a big concern for me these days... I try to be very sparing on what mods I use.

 

@MajinCry - Which mod are you referring to to use without shadows even on?

 

 

I use a self-modified version of Realistic Lighting Overhaul and Colorful Lights No Shadows. I also added support for the DLC in the CLNS mod.

 

Attached my modified versions.

Data.7z

Link to comment

So you shut off your shadows and use those plugins instead?

 

Does it require any other files from those mods that you modified?

 

Nope. They're just .esp changes.

 

To disable, go in your skyrimprefs.ini and skyrim.ini files. Change anything that says "ishadowmapresolution" to 1, change all the shadow distance settings to 0.

 

Also, I uploaded one of the wrong .esp files :P

 

Get this pack.

DataCorrect.7z

Link to comment
  • 3 weeks later...

To be honest, Bethesda, along with many other companies, have always has a lot of trouble with character shadows. Oblivion was just as bad as Skyrim, but in a different way. They looked like bad camouflage in Ob. The issue really boils down to what was previously mentioned, CPU usage. To have quality real time R word (for Raytrace... bad like how the liberals made "the N word") shadows is impossible with current technology. So we are stuck with area shadows.

Link to comment

This info is taken from around the web:

 

Keep your iShadowMapResolutionSecondary at 1024 to avoid some performance loss. These are the far shadows and it's not really as noticeable. Try to keep the primary at 4096 if possible though.

The real issue here is that Skyrim isn't using a lot of cascades. There are two cascades, the primary and the secondary. The entire shadow map is stretched over the distance set by fShadowDistance. Note that when you switch to medium this gets set to 2500. When at ultra it's set to 8000. Whatever the distance is, the shadow map is getting stretched. The higher the distance, the more stretching, the more pixelation. In the ideal world you'd have more cascades to minimize any stretching, but that isn't the case in Skyrim (yet anyway).

Lowering the distance remedies that problem, at the cost of not seeing shadows at the cut off distance. Thankfully shadows "fade" in instead of popping, so it's not completely jarring if you use a setting of 2500.

 

iShadowSplitCount=2 (How many times shadows are split. ie how many shadows one object can cast.)

 

fShadowLODStartFade=400 (Lod shadows fade time. ie do the shadows fade out slowly or faster the further away you get from them.)

 

iShadowMode=3 (Not really sure. I always thought this was the shader mode used. ie 1.0, 2.0, 3.0. Though I've seen some "tweaks" set this to 4 I can't really tell what it does.)

 

iShadowMaskQuarter=4 (This controls the interior lights shadow mask, spolights, hemis and shadow onmis all have shadow masks.  Adjusts shadow crispness. Lower values make shadows less detailed. Performance impact can be major.)

 

iShadowFilter=3 (Filters out the shadows. ie abit like anisotropic filtering for shadows.  Adjust shadow filtering or smoothness. Affects all shadows. low=1, medium=2, high=3, ultra=4 )

 

fShadowBiasScale=0.2500 (Afects exterior shadows look and position depending on the respective angle the pc is looking.  determines the degree to which a surface is shadowed. Determined by angle to light source. higher values reduce shadows. lower values increase shadowing.)

 

iBlurDeferredShadowMask=2 // Valid values range from 0 - 7. Lower values will sharpen shadows (not the resolution), making vegetation more "vibrant." It gives a subtle increase in performance, but also gives more pixelated and striping effects to shadows. Higher values will make shadows softer and more blurred. Consider a value of two if using ENB.

 

fInteriorShadowDistance=3000.0000 // Distance interior shadowmap is stretched.  Increasing the value has no noticeable effect beyond reducing the quality of indoor shadows, and decreasing the value causes unsightly fade-in.

 

fShadowDistance=3000.0000 // Distance outdoor shadowmap is stretched.  Determines the distance at which shadows appear outside, as referred to earlier. 8000  to avoid shadow pop-in. Lowering the number increases shadow detail by a significant degree,  experiment with this setting until you find a balance between quality and view distance that you are happy with.

 

iShadowMapResolutionSecondary=2048 // Increases the detail level of shadows. The max setting, 8192, massively improves shadow quality, but in our testing we discovered a few objects and areas that absolutely crippled performance on even our beefiest machines when using 8192, but not 4096. As such we recommend sticking with this lower setting. Other possible values are 2048 and 1024.

 

iShadowMapResolutionPrimary=4096 // As above.

 

iShadowMapResolution=4096 // Directly controls shadow resolution. Values larger than 4096 are possible such as 8192 for a substantial fps hit.

 

 

The performance impact of Primary and Secondary is linked directly to the ShadowMapResolution settings. The defaults for Ultra are 1024 and 2048, respectively, which means that the performance ‘cost’ of Secondary shadowing will quadruple, and the cost of Primary shadowing double. If you’re losing too many frames per second lower the Secondary value first, and then the Primary if problems persist. iBlurDeferredShadowMask will have, at most, a few frames per second impact when going from the Ultra default, 3, to 0.

 

Finally keep in mind a four-channel uncompressed 2048x2048 texture takes up 17 MB of texture memory. For 4096x4096, this is 67 MB. For many GPUs out there, that is more than half of the available texture memory. It's simply not feasible to go bigger than 2048x2048.

 

Also somebody mentioned shadows are done by the CPU. That is simply not the case.

 

The following are quotes from around the web because they say it rather well:


"Arguing that the CPU is rendering shadows is like arguing that the Sun revolves around the Earth. Skyrim uses shadow mapping. Anyone that knows anything about 3D graphics programming will tell you the same thing : If Skyrim was using the CPU to handle shadow mapping, it would be a slideshow. As in, you would measure your speed in frames per hour rather than frames per second."

"Shadow mapping works by creating a special image called a depth buffer from the perspective of every light source. Anything the light source cannot see but the camera can see (the camera is what you see on your screen) is considered shadowed. Every light source has it's own depth buffer (or shadow map, if you will). The shadow map size doesn't refer to the number of samples per second, it refers to the resolution of the texture holding the depth buffer. Higher shadow map sizes mean the precision is higher as far as determining which pixels are shadowed."

"In order to do shadow mapping on the CPU, the CPU would have to render a depth buffer for EVERY light source on the scene. It's simply not possible to do that in real time on a CPU."

"Let's assume the CPU is doing this, and is enchanted with pixie dust that enables it to execute at a stable rate of one instruction per clock cycle with no memory bandwidth or latency issues despite all the other stuff going on, and the shadow-calculating program is an absolute piece of genius that requires an average of 12 instructions per shadow sample, including everything needed to set up the shadowmap render, geometry processing and so on. Some computers have been observed running the game at 60 FPS at least occasionally, even with 4096 by 4096 shadow maps. This means the CPU should be capable of producing 4096x4096x60 shadow samples per second. The CPU core must be running at least at... 4096*4096*60*12 / 10^9 = 12.08 GHz."

 

 

How the CPU affects GPU:

Lets say the CPU takes 33.33ms per frame to complete instructions (This is about 30 frames per second). The GPU takes 16.6ms to render the scene with the information given to it by the CPU (which is about 60 frames per second). Now because the CPU takes LONGER to finish its instructions per frame, your FRAMES PER SECOND are gonna be BOTTLENECKED by the CPU. You will get 30 frames per second and the GPU sitting at 50% utilization as it is idle for 16.6ms per frame. A GPU bottleneck would involve the CPU completing instructions at 16ms and the GPU taking 30ms to render the image.

Now say you lower the draw distance for the shadows or other objects and you get better fps. This ISN'T because the shadows are drawn on the CPU as having not as many draw calls allows the CPU to get everything done in, say 21ms. This is about 47 fps. Your GPU now is rendering less and is able to render the frame in 10ms, which again is ~50% of how long it takes the CPU to complete instructions. Having lots of draw calls is HORRIBLY CPU intensive in older versions of Direct 3D because of the software overhead of the API. Consoles, on the other hand, can handle many more draw calls (~2500-3000) before it starts bogging down the CPU. From my understanding, if the render was coded properly using D3D10 or D3D11, it would allow the GPU to do more without having the CPU tell it what to do (that or they optimise the render). Or I could be wrong and the problem could be in how the engine handles NPC scripting which having a new render won't solve, but only Beth knows what is going on with the engine. Either way, it still doesn't mean the shadows render on the CPU, which stated earlier takes hundreds of milliseconds to draw on the CPU.

I hope this sheds some light on how the CPU and GPU function. I am no expert, but this is my basic understanding of the subject.

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...