Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2 (PC)
THE WITCHER 2 (XBOX)
THE WITCHER 3 (PC)
THE WITCHER 3 (PLAYSTATION)
THE WITCHER 3 (XBOX)
THE WITCHER 3 (SWITCH)
Menu

Register

A compendium of tweaks and fixes for the PC version

+
Status
Not open for further replies.
Prev
  • 1
  • …

    Go to page

  • 39
  • 40
  • 41
  • 42
  • 43
  • …

    Go to page

  • 90
Next
First Prev 41 of 90

Go to page

Next Last
N

natty.dread.011

Forum regular
#801
Jun 9, 2015
Can any of you guys post a tutorial on how you edit the environment files and how you get to them in the first place?
I wonder how different are they compared to the W2 env files since they were jam packed with all kinds of variables. Could they be edited in the previous REDkit maybe?
I want to create / modify some unique moods (edit sun pitch, yaw, roll; tweak fog, etc...) for screenshots only, don't worry about Cinematic Lighting v3 or anything like that.
 
  • RED Point
Reactions: Verrenus
I

IrregularJohn

Banned
#802
Jun 10, 2015
I don't know maybe it was mentioned but here's a couple things I noticed recently:

1) There are only sound effects when you step on puddles, no animation of water splashing under Geralt's boots, no nothing - just sound effects (it applies both to walking and riding).


2) No physics when using Aard while standing on puddles, it only works on larger bodies of water.


Sure would be nice to have those puddle physics and visual effects back.
 
Last edited: Jun 10, 2015
  • RED Point
Reactions: Verrenus
J

jim2point0

Senior user
#803
Jun 10, 2015
This cut scene lighting mod still breaks a lot of the intended look from vanilla.

Weather ID "WT_Mid_Clouds_Dark" in Velen is broken.

http://screenshotcomparison.com/comparison/130604

The lighting in this cave is also broken.

http://screenshotcomparison.com/comparison/130727

I know it's installed properly because here you can actually see it working as intended (gets rid of the blue sheen on Geralt's hair and increases SSAO on foliage)

http://screenshotcomparison.com/comparison/130605

Meh. I'll stick with the vanilla lighting. Don't see this mod being a real game changer regardless. Not unless it can fix interiors....
 
  • RED Point
Reactions: Verrenus
J

jblanc03

Rookie
#804
Jun 10, 2015
Voodooman said:
This is not entirely correct, there is a CascadeShadowCount that tells how many cascades to use and. All cascades in this game seems to be stored in same texture, so rising scale for one not just affects render distance of cascade but also takes more resolution space in texture and leaves less space for other cascades.
I notticed that for example rising cascade 1-3 leads to reduction or resolution of cascade 0 and it goes in opposite direction.

Since cascade 0 is on that that starts from camera position and affects most notticable details its good idea to give most of resolution and distance to it and for latest cascade it would be stupid enough to give much of resolution and distance since its far enough.

Also distance scale of 1.0 seems to be almost equal to 10 meters. Increasing Cascade0 to 10.0 will render a lot of detailed shadows for area 0-100 metters from camer. setting distance scale 10.0 to cascade1 will render cascade1 at distances 100-200 meters, cascade2 = 10.0 will render cascade2 at 300-400 meters, and cascade3 = 10 fill render cascade 3 at distance 400-500 metters.

Since resolution of texture will remain the same, each pixel of shadow will need to cover bigger are, which will lead to decrease of shadow quality.

The only way to compensate it is to rise cascadeshadowresolution to 8192 (it seems to be maximum game accepts now with tweaks, but my card GTX 680 allows texture sizes up to 16k so i hope CDPR will remove texture size cap for everything and will give me accces to 16k shadow an other resolutions, which i can afford with 4gb vram.
There is a way to rise texture resolution cap, actually i did it by rising 2048 limit to 8192 for everything in startup.bundle, but i cant set 16k since it needs extra symbols added to each line, and with different size i would not be able to re-import it with QuickBMS, so i hope somebody will create proper unpacker\packer for bundle files that will allow me to import file of any size so i can rise limit of texture resolution up to 16k.

Settings ofr @Asmodean778 will give next results:
Cascade0 renders at distance 0-15 meters
Cascade1 renders at distance 15-45 meters
Cascade2 renders at distance 45-70 meters
Cascade3 renders at distance 70-90 meters

And with his settings Cascade1,2,3 gets more space in final shadow texture and reducing details of cascade0 which is bad.

Logic for cascade shadows should always be like this

Cascade0>Cascade1>Cascade2>Cascade3

So best minimal settings to start with would be

CascadeShadowDistanceScale0=4.0
CascadeShadowDistanceScale1=3.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=1.0

This will span shadow map across 10 meters like this
0=0-40 meters >1=40-70 meters>2=70-90 meters>3 = 90-100 meters.
Resolution will change relative to cascade with lowest one, so since cascade3 has 1.0 it will be out start point
C0=C3*4 > C1=C3*3 > C2=C3*2 > C3=C3.
Im not exactly sure how each cascade mapped to texture, they could be for example fixed in Width and have scalable heigh and aligned in one line, or they could be a square shaped and dynamically change position in texture grid depending on scalling, but i bet on 1 fixed dimension and 1 scallable.

In this is true, than with resolution of cascade texture 2048x2048 we will have to solve this (X)+(2X)+(3X)+(4X)=2048 to get idea what resolution each cascade. has. SO with integer values it would be easy and simple 10X=2048, which means x=2048/10=204.8 (most likely converted to lowest closes Power of two integer)
So cascade3 most likely has 204x2048 resolution in my example would be:
818x2048 > 614x2048 > 408x2048 > 204x2048

Seems reasonable decrease or resolution at distant cascades, right?

Now lets do some math to understand why settings of asmodean was bad
1.5X+3.0X+2.5x+2.0X=2048
9X=2048
x=~226
So each cascade woult be scale*x and resolutions would be
~338x2048< ~678x2048 > ~564x2048 > 452x2048

So closes shadows gets less detailed resolution, than most distant? This is why this is no right!

So lets do another example to understand better how shadows works in witcher and how you need to calculate settings for them for best look and expirience:

For example you want shadow to cover distance of 200 meters and want detailed shadows to stay detailed at maximum possible distance, lets say 100 meters

than we need to set it like this for first 100 meter:
CascadeShadowDistanceScale0=10.0

and we have to split remaining 100 meters which is 10.0 between cascades 1-3, and its good idea to keep integer values here (2 and 3 instead of 2.5 and 2.5 ) and even better idea to keep power of two integers (6+2+2 instead of 5+3+2)
it would be
CascadeShadowDistanceScale1=6.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=2.0

So each cascade will cover area:
0-100 meters > 100-160 meters>160-180 meters > 180 - 200 meters

Makes sense, isnt it?

Now what about resolution?

X = CascadeshadowResolution * (Scale0+Scale1+Scale2+Scale3)
Cascade[N]resolution = X * Scale[N]

I suggest to not count X based on cascade shadow resolution but count final resolution based on some pattern X.
Depending on you system performance i would take these as base x, since final shadow resolution is what gives most of performance hit:

16<32<64<128<256<384<512

So lets start with 16 for very slow machines, cascade resolutions would be

16*10=160 > 16*6=96 > 16*2=32 = 16*2 = 32
and cascade shadow texture would be
160 + 96 + 32 + 32 = 320, which is way too low to look good. so lets try better X.

Lets start with 128

Cascade resolutions would be
128*10=1280 > 128*6=768 > 128*2=256 = 128*2=256
and full texture resolution is
1280+768+256+256 = 2560

Now thats a good sweet spot between quality and performance, but lets not forget that cascade 0 should cover 100 meters, so 256 or even 512 are much better values, lets take a look at 256 as X:

Cascade resolutions:
256*10=2560 >266*6 = 1536 > 256*2 = 512 = 256*2 = 512 - now that an improvement we got complete 2560 from previous example just for Cascade 0 alone and minimal size of cascade is 512!

2560+1536+512+512 = 5*120 that good enough resolution, but we still have space up to 8096 (and with proper bundle editor possibly up to 16k ) so lets try 384

384*10=3840 > 384*6= 2304 > 384*2=768 = 384*2=768

3840+2304+768+768 = 7*680 - almost perfect, we almost reached 8096 with good power of two resolutions for each cascade, but lest get a little more

for example we can add 32 or 64 to 384

384+32=416

416*10=4160 > 416*6 = 2496 > 416 * 2 = 832 = 416*2 = 832

8320
Oops. we got 8*320 a little more than budget we have, we can optimise it by lowering render distance to 180 and taking 2.0x out of any cascade like this

CascadeShadowDistanceScale0=10.0
CascadeShadowDistanceScale1=6.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=1.0

416*10=4160 > 416*6 = 2496 > 416 * 2 = 832 = 416*1 =416
4160+1664+832+416 = 7*904

CascadeShadowmapSize=7*904

Perfect! We are under 8192!

Now lets optimize a little more to keep good balance between quallity and performance by reducing cascade shadow map size and render distance of shadow map but yet keeping good looking shadows, lets say we want cascade 0 to be 4096, so lets take X=512 and set cascades like this

CascadeShadowDistanceScale0=8.0
CascadeShadowDistanceScale1=4.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=1.0

We will have cascades rendered like this
C0 = 0-80 meters > C1 = 80-120 meters > C2 = 120-140 meters > C3 = 140-150 meters

And resolutions of cascades would be

C0=512*8=4096 > C1=512*4=2048 > C2=512*2=1024 > C3=512*1=512 - seems like perfect pattern, just like mip maps for textures!

4096+2048+1024+512=7*680

CascadeShadowmapSize=7 680

Seems like perfect mix between quality of each cascade, render distance and performance.

But we have slower machines and can optimize this even further. Lets not change distances and scaling anymore but just take another base X=256.

C0=256*8=2048> C1=256*4=1024> C2=256*2=512> C3=256*1=256

2048+1024+512+256=3*840

CascadeShadowmapSize=3*840

Now thats a good value for perfromance.

But if you have a weaker machine you can reduce resolution twice to

CascadeShadowmapSize=1*920 (its even performs a little better than default high shadow settings with 2048 resolution)

and will have cascade sizes
1024>512>256>128


But if thats still a performance hit because of distance, you can try to reduce each distance scale by 2 (except for last cascade) to :
CascadeShadowDistanceScale0=5.0
CascadeShadowDistanceScale1=3.0
CascadeShadowDistanceScale2=1.0
CascadeShadowDistanceScale3=1.0

This will render shadows like this

C0=0-50 meters>C1=50-80 meters>C2=80-90 meters >C3=90-100 meters.
With such settings you will have shadow render distance double comparing to default (1+1+1.5+1.5=5.0 aka 50 meters) and yet texture resolution and distance proportions would be better re-distributed for quality since you will have half of distance to cascade 0 alone.

You may wonder how come that default values are so different - i will tell you then that i wonder how game which looks and have less advanced tech than Crysis in 2007 can run well on hardware that gives 120+ fps in Crysis. But answer is simple, im not sure who responsible for optimization in CDPR but those people really did a bad job, they cut graphics a lot and yet failed to optimize game, it seems to me like people who was optimizing game like this was not even well aware of how their own engine works and to find sweet spot between graphics and performance, its seems like if level designers, artist, and even testers optimized this game in a rush after someone from above told them "optimize your assets" and forgot to mention that he is lazy to incapable to optimize red engine by art of coding, and it feels like some core programmer of red engine quit company and there was nobody to guide them and tell them they doing something really stupid.

So default settings for shadow cascade distances makes no sense at all, somebody who really is not aware of how red engine and shadow cascade works set these settings or probably just altered a little default stub values of 1.0 set for everything and 1.5 for Scale2 and 3 resulted just by observation of that someone that it increasing shadow distance a little and thats about it.

And everyone who tweaking game by keeping values close to defaults is doing mistake.

So to summarize, forget about default cascade shadow settings! They are joke!

Keep these rules in mind:
1) Cascade 0 should have at least 2x bigger resolution and distance than any of following cascades. Having distant cascades with resolution higher than close cascade is waste of resources and quality for nothing ant total nonsense!

2) Its good to keep cascade scale values ad integers and power of too, except for value of 1, which is not power of two but good values:

3) Final render distance is based on sum of all cascade values, value of 1 equal to about 10 in-game meters of distance.

5) All cascades shares same shadow map texture, increasing its resolution decrease resolution of other cascades

6) With great resolution comes great responsibility greater number of small objects casting shadow.

7) CascadeDistanceScale controls both render distance if meters (multiplied by 10) and proportional size of cascade inside shadow map texture. So this means that increasing distance of cascade 1-3 will make their resolution higer and will reduce resolution of cascade 0, and this will lead to some objects loosing shadows and shadows getting low res jagged and blurred look at close distance.

8) Cascade distance and resolution should be distributed from MAX to MIN, period,
Settings like 1 < 2 < 3 <4 will makes shadows worse and will waste performance and quality for no good reason !
settings like 4 > 3 > 2 > 1 will make shadows look better with almost same performance cost!
But settings like 8 > 4 > 2 > 1 will make everything even more better.
9) Cascade Shadow resolution should be increased to make shadows look good, you can calculate final optimal resolution for it by using formulas and logic explained about, but shorter version would be:

CascadeShadowmapSize=(CascadeShadowDistanceScale0*+CascadeShadowDistanceScale1+CascadeShadowDistanceScale2+CascadeShadowDistanceScale3)*X

where X is value that you can devde by 4 many times (not sure how to tell this right in english, since its not my native lang) and get integers in the end like this
(256\4=64, 64\4\=16, 16\4=4). Minimal good value for X is 128. You can go further by add 16, 32, 64, 128 to it until you will find sweet spot between quality and and performance.

Recommended value for good quality is 512, for medium is 256, and for low is 128. Try not to exceed limits of 4096 by default, and 8192 or 16k if you have modded resolution cap (see below)

10) Best way to set your shadow cascade sizes and distances is to start from last one which is cascade3 (4 actually but you know, in weird programming world everything starts from 0, lol) as base value, and go to previous cascade by multiplying it by 2, and repeat it until you will get to cascade 0.
So this means if your cascade3 is 1 your cascade2 should be 2, cascade1 should be 4 and, cascade0 should be 8! Alternative way for slower machines would be adding 1 to each cascade by going from distance to closes one, so it would be cascade3=1, cascade2=2, cascade1=3, cascade0=4, you can also add 2 instead of 1 and get values like this C3=1 C2=3 C1=5 C0=7 .

11) Some level designers took shortcuts or messed things up during rushed optimisation of game, so some objects does not cast shadows in cascade 0, and only do in 1, you can do nothing GOOD about it now, patched assets or engine needed to force all objects to cast shadow in cascade0 range. Only with official patch, unofficial memory \ or hex assets hack, or redkit this can be done

12) to uncap resolution of shadows and other textures you have to unpack Conten0\Startup.bundle with QuickBMS + Witcher3.bms go to
engine\textures
open textures.xml in good editor like Notepad++ or PSpad and change anything like 1024-2048-4096 to 8192, but until proper bundle editor releaased dont touch 512 and dont try to set 16k since this will change size of file and quick bms would not properly re-import it and game would crash.

IF you are lazy to do your own calculations and just want settings you can play with or start tweaking, this is default base with optimal performance and quality on high end machines everyone (who plays with uber settings) should stick to:

Code:
CascadeShadowDistanceScale0=8
CascadeShadowDistanceScale1=4
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=1
CascadeShadowmapSize=7680
For high settings change to this
Code:
CascadeShadowmapSize=3840
For mid settings to this
Code:
CascadeShadowmapSize=1920
For low
Code:
CascadeShadowmapSize=960
Alternate performance optimisation by reducing render distance would this for high settings

Code:
CascadeShadowDistanceScale0=6
CascadeShadowDistanceScale1=4
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=1
This for mid

Code:
CascadeShadowDistanceScale0=4
CascadeShadowDistanceScale1=2
CascadeShadowDistanceScale2=1
CascadeShadowDistanceScale3=1
or

Code:
CascadeShadowDistanceScale0=4
CascadeShadowDistanceScale1=3
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=1
And this for low
Code:
CascadeShadowDistanceScale0=2
CascadeShadowDistanceScale1=2
CascadeShadowDistanceScale2=1
CascadeShadowDistanceScale3=1
Combine distance presets with resolution presets to achieve best balance for you


And for better settings use this (100 meters of C0, 60 meters for C1, 20 meters for C2, 20 meters for C3, 200 meters overall):

Code:
CascadeShadowDistanceScale0=10
CascadeShadowDistanceScale1=6
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=2
CascadeShadowmapSize=8192
or this for ultra uber hardcore settings (160 meters, 80 meters, 40 meters, 20 meters, 300 overall)

Code:
CascadeShadowDistanceScale0=16
CascadeShadowDistanceScale1=8
CascadeShadowDistanceScale2=4
CascadeShadowDistanceScale3=2
CascadeShadowmapSize=8192
Hope CDPR will read this and unlock 16k resolution for shadows to improve uber quallity even better.

There is also a

CascadeShadowQuality

settings,which controls shadow filtering, im not sure about final value, but i play at 4, values like 2 or 1 would probably give a little perfromance boost, while 0 will gve maximum performance with trade of shadow filtering quality.

P.S. - these observation was done by tweaking all of this in a game with my E.D.G.E. mod, its much harder to nottice when you do it by restarting and tweaking settings one by one.

Almost forgot to atach xml file with texture resolution cap raised to 8192, it goes to startup.bundle\engine\texture :
View attachment 16143
Click to expand...
Excuse me but how on earth did you extract or unpack startup.bundle!!!!!??????? i have not been able to find a software tool that allows me to unpack it! please help!
 
  • RED Point
Reactions: Verrenus
C

CaptainCrunch83

Rookie
#805
Jun 10, 2015
Maybe you want to add this little tweak as well.

Go to bin\config\base\gameplay.ini. Open the ini and look for this line:

MotionSicknessFocusMode=false

now set it to

MotionSicknessFocusMode=true

There you go, that blurry effect on the edges of your screen is gone, no more motion sickness and now you can even use witcher senses as a tool for better exploring your surroundings since it still does zoom in.
 
  • RED Point
Reactions: Verrenus
A

agatsuma

Banned
#806
Jun 10, 2015
Voodooman said:
This is not entirely correct, there is a CascadeShadowCount that tells how many cascades to use and. All cascades in this game seems to be stored in same texture, so rising scale for one not just affects render distance of cascade but also takes more resolution space in texture and leaves less space for other cascades.
I notticed that for example rising cascade 1-3 leads to reduction or resolution of cascade 0 and it goes in opposite direction.

Since cascade 0 is on that that starts from camera position and affects most notticable details its good idea to give most of resolution and distance to it and for latest cascade it would be stupid enough to give much of resolution and distance since its far enough.

Also distance scale of 1.0 seems to be almost equal to 10 meters. Increasing Cascade0 to 10.0 will render a lot of detailed shadows for area 0-100 metters from camer. setting distance scale 10.0 to cascade1 will render cascade1 at distances 100-200 meters, cascade2 = 10.0 will render cascade2 at 300-400 meters, and cascade3 = 10 fill render cascade 3 at distance 400-500 metters.

Since resolution of texture will remain the same, each pixel of shadow will need to cover bigger are, which will lead to decrease of shadow quality.

The only way to compensate it is to rise cascadeshadowresolution to 8192 (it seems to be maximum game accepts now with tweaks, but my card GTX 680 allows texture sizes up to 16k so i hope CDPR will remove texture size cap for everything and will give me accces to 16k shadow an other resolutions, which i can afford with 4gb vram.
There is a way to rise texture resolution cap, actually i did it by rising 2048 limit to 8192 for everything in startup.bundle, but i cant set 16k since it needs extra symbols added to each line, and with different size i would not be able to re-import it with QuickBMS, so i hope somebody will create proper unpacker\packer for bundle files that will allow me to import file of any size so i can rise limit of texture resolution up to 16k.

Settings ofr @Asmodean778 will give next results:
Cascade0 renders at distance 0-15 meters
Cascade1 renders at distance 15-45 meters
Cascade2 renders at distance 45-70 meters
Cascade3 renders at distance 70-90 meters

And with his settings Cascade1,2,3 gets more space in final shadow texture and reducing details of cascade0 which is bad.

Logic for cascade shadows should always be like this

Cascade0>Cascade1>Cascade2>Cascade3

So best minimal settings to start with would be

CascadeShadowDistanceScale0=4.0
CascadeShadowDistanceScale1=3.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=1.0

This will span shadow map across 10 meters like this
0=0-40 meters >1=40-70 meters>2=70-90 meters>3 = 90-100 meters.
Resolution will change relative to cascade with lowest one, so since cascade3 has 1.0 it will be out start point
C0=C3*4 > C1=C3*3 > C2=C3*2 > C3=C3.
Im not exactly sure how each cascade mapped to texture, they could be for example fixed in Width and have scalable heigh and aligned in one line, or they could be a square shaped and dynamically change position in texture grid depending on scalling, but i bet on 1 fixed dimension and 1 scallable.

In this is true, than with resolution of cascade texture 2048x2048 we will have to solve this (X)+(2X)+(3X)+(4X)=2048 to get idea what resolution each cascade. has. SO with integer values it would be easy and simple 10X=2048, which means x=2048/10=204.8 (most likely converted to lowest closes Power of two integer)
So cascade3 most likely has 204x2048 resolution in my example would be:
818x2048 > 614x2048 > 408x2048 > 204x2048

Seems reasonable decrease or resolution at distant cascades, right?

Now lets do some math to understand why settings of asmodean was bad
1.5X+3.0X+2.5x+2.0X=2048
9X=2048
x=~226
So each cascade woult be scale*x and resolutions would be
~338x2048< ~678x2048 > ~564x2048 > 452x2048

So closes shadows gets less detailed resolution, than most distant? This is why this is no right!

So lets do another example to understand better how shadows works in witcher and how you need to calculate settings for them for best look and expirience:

For example you want shadow to cover distance of 200 meters and want detailed shadows to stay detailed at maximum possible distance, lets say 100 meters

than we need to set it like this for first 100 meter:
CascadeShadowDistanceScale0=10.0

and we have to split remaining 100 meters which is 10.0 between cascades 1-3, and its good idea to keep integer values here (2 and 3 instead of 2.5 and 2.5 ) and even better idea to keep power of two integers (6+2+2 instead of 5+3+2)
it would be
CascadeShadowDistanceScale1=6.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=2.0

So each cascade will cover area:
0-100 meters > 100-160 meters>160-180 meters > 180 - 200 meters

Makes sense, isnt it?

Now what about resolution?

X = CascadeshadowResolution * (Scale0+Scale1+Scale2+Scale3)
Cascade[N]resolution = X * Scale[N]

I suggest to not count X based on cascade shadow resolution but count final resolution based on some pattern X.
Depending on you system performance i would take these as base x, since final shadow resolution is what gives most of performance hit:

16<32<64<128<256<384<512

So lets start with 16 for very slow machines, cascade resolutions would be

16*10=160 > 16*6=96 > 16*2=32 = 16*2 = 32
and cascade shadow texture would be
160 + 96 + 32 + 32 = 320, which is way too low to look good. so lets try better X.

Lets start with 128

Cascade resolutions would be
128*10=1280 > 128*6=768 > 128*2=256 = 128*2=256
and full texture resolution is
1280+768+256+256 = 2560

Now thats a good sweet spot between quality and performance, but lets not forget that cascade 0 should cover 100 meters, so 256 or even 512 are much better values, lets take a look at 256 as X:

Cascade resolutions:
256*10=2560 >266*6 = 1536 > 256*2 = 512 = 256*2 = 512 - now that an improvement we got complete 2560 from previous example just for Cascade 0 alone and minimal size of cascade is 512!

2560+1536+512+512 = 5*120 that good enough resolution, but we still have space up to 8096 (and with proper bundle editor possibly up to 16k ) so lets try 384

384*10=3840 > 384*6= 2304 > 384*2=768 = 384*2=768

3840+2304+768+768 = 7*680 - almost perfect, we almost reached 8096 with good power of two resolutions for each cascade, but lest get a little more

for example we can add 32 or 64 to 384

384+32=416

416*10=4160 > 416*6 = 2496 > 416 * 2 = 832 = 416*2 = 832

8320
Oops. we got 8*320 a little more than budget we have, we can optimise it by lowering render distance to 180 and taking 2.0x out of any cascade like this

CascadeShadowDistanceScale0=10.0
CascadeShadowDistanceScale1=6.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=1.0

416*10=4160 > 416*6 = 2496 > 416 * 2 = 832 = 416*1 =416
4160+1664+832+416 = 7*904

CascadeShadowmapSize=7*904

Perfect! We are under 8192!

Now lets optimize a little more to keep good balance between quallity and performance by reducing cascade shadow map size and render distance of shadow map but yet keeping good looking shadows, lets say we want cascade 0 to be 4096, so lets take X=512 and set cascades like this

CascadeShadowDistanceScale0=8.0
CascadeShadowDistanceScale1=4.0
CascadeShadowDistanceScale2=2.0
CascadeShadowDistanceScale3=1.0

We will have cascades rendered like this
C0 = 0-80 meters > C1 = 80-120 meters > C2 = 120-140 meters > C3 = 140-150 meters

And resolutions of cascades would be

C0=512*8=4096 > C1=512*4=2048 > C2=512*2=1024 > C3=512*1=512 - seems like perfect pattern, just like mip maps for textures!

4096+2048+1024+512=7*680

CascadeShadowmapSize=7 680

Seems like perfect mix between quality of each cascade, render distance and performance.

But we have slower machines and can optimize this even further. Lets not change distances and scaling anymore but just take another base X=256.

C0=256*8=2048> C1=256*4=1024> C2=256*2=512> C3=256*1=256

2048+1024+512+256=3*840

CascadeShadowmapSize=3*840

Now thats a good value for perfromance.

But if you have a weaker machine you can reduce resolution twice to

CascadeShadowmapSize=1*920 (its even performs a little better than default high shadow settings with 2048 resolution)

and will have cascade sizes
1024>512>256>128


But if thats still a performance hit because of distance, you can try to reduce each distance scale by 2 (except for last cascade) to :
CascadeShadowDistanceScale0=5.0
CascadeShadowDistanceScale1=3.0
CascadeShadowDistanceScale2=1.0
CascadeShadowDistanceScale3=1.0

This will render shadows like this

C0=0-50 meters>C1=50-80 meters>C2=80-90 meters >C3=90-100 meters.
With such settings you will have shadow render distance double comparing to default (1+1+1.5+1.5=5.0 aka 50 meters) and yet texture resolution and distance proportions would be better re-distributed for quality since you will have half of distance to cascade 0 alone.

You may wonder how come that default values are so different - i will tell you then that i wonder how game which looks and have less advanced tech than Crysis in 2007 can run well on hardware that gives 120+ fps in Crysis. But answer is simple, im not sure who responsible for optimization in CDPR but those people really did a bad job, they cut graphics a lot and yet failed to optimize game, it seems to me like people who was optimizing game like this was not even well aware of how their own engine works and to find sweet spot between graphics and performance, its seems like if level designers, artist, and even testers optimized this game in a rush after someone from above told them "optimize your assets" and forgot to mention that he is lazy to incapable to optimize red engine by art of coding, and it feels like some core programmer of red engine quit company and there was nobody to guide them and tell them they doing something really stupid.

So default settings for shadow cascade distances makes no sense at all, somebody who really is not aware of how red engine and shadow cascade works set these settings or probably just altered a little default stub values of 1.0 set for everything and 1.5 for Scale2 and 3 resulted just by observation of that someone that it increasing shadow distance a little and thats about it.

And everyone who tweaking game by keeping values close to defaults is doing mistake.

So to summarize, forget about default cascade shadow settings! They are joke!

Keep these rules in mind:
1) Cascade 0 should have at least 2x bigger resolution and distance than any of following cascades. Having distant cascades with resolution higher than close cascade is waste of resources and quality for nothing ant total nonsense!

2) Its good to keep cascade scale values ad integers and power of too, except for value of 1, which is not power of two but good values:

3) Final render distance is based on sum of all cascade values, value of 1 equal to about 10 in-game meters of distance.

5) All cascades shares same shadow map texture, increasing its resolution decrease resolution of other cascades

6) With great resolution comes great responsibility greater number of small objects casting shadow.

7) CascadeDistanceScale controls both render distance if meters (multiplied by 10) and proportional size of cascade inside shadow map texture. So this means that increasing distance of cascade 1-3 will make their resolution higer and will reduce resolution of cascade 0, and this will lead to some objects loosing shadows and shadows getting low res jagged and blurred look at close distance.

8) Cascade distance and resolution should be distributed from MAX to MIN, period,
Settings like 1 < 2 < 3 <4 will makes shadows worse and will waste performance and quality for no good reason !
settings like 4 > 3 > 2 > 1 will make shadows look better with almost same performance cost!
But settings like 8 > 4 > 2 > 1 will make everything even more better.
9) Cascade Shadow resolution should be increased to make shadows look good, you can calculate final optimal resolution for it by using formulas and logic explained about, but shorter version would be:

CascadeShadowmapSize=(CascadeShadowDistanceScale0*+CascadeShadowDistanceScale1+CascadeShadowDistanceScale2+CascadeShadowDistanceScale3)*X

where X is value that you can devde by 4 many times (not sure how to tell this right in english, since its not my native lang) and get integers in the end like this
(256\4=64, 64\4\=16, 16\4=4). Minimal good value for X is 128. You can go further by add 16, 32, 64, 128 to it until you will find sweet spot between quality and and performance.

Recommended value for good quality is 512, for medium is 256, and for low is 128. Try not to exceed limits of 4096 by default, and 8192 or 16k if you have modded resolution cap (see below)

10) Best way to set your shadow cascade sizes and distances is to start from last one which is cascade3 (4 actually but you know, in weird programming world everything starts from 0, lol) as base value, and go to previous cascade by multiplying it by 2, and repeat it until you will get to cascade 0.
So this means if your cascade3 is 1 your cascade2 should be 2, cascade1 should be 4 and, cascade0 should be 8! Alternative way for slower machines would be adding 1 to each cascade by going from distance to closes one, so it would be cascade3=1, cascade2=2, cascade1=3, cascade0=4, you can also add 2 instead of 1 and get values like this C3=1 C2=3 C1=5 C0=7 .

11) Some level designers took shortcuts or messed things up during rushed optimisation of game, so some objects does not cast shadows in cascade 0, and only do in 1, you can do nothing GOOD about it now, patched assets or engine needed to force all objects to cast shadow in cascade0 range. Only with official patch, unofficial memory \ or hex assets hack, or redkit this can be done

12) to uncap resolution of shadows and other textures you have to unpack Conten0\Startup.bundle with QuickBMS + Witcher3.bms go to
engine\textures
open textures.xml in good editor like Notepad++ or PSpad and change anything like 1024-2048-4096 to 8192, but until proper bundle editor releaased dont touch 512 and dont try to set 16k since this will change size of file and quick bms would not properly re-import it and game would crash.

IF you are lazy to do your own calculations and just want settings you can play with or start tweaking, this is default base with optimal performance and quality on high end machines everyone (who plays with uber settings) should stick to:

Code:
CascadeShadowDistanceScale0=8
CascadeShadowDistanceScale1=4
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=1
CascadeShadowmapSize=7680
For high settings change to this
Code:
CascadeShadowmapSize=3840
For mid settings to this
Code:
CascadeShadowmapSize=1920
For low
Code:
CascadeShadowmapSize=960
Alternate performance optimisation by reducing render distance would this for high settings

Code:
CascadeShadowDistanceScale0=6
CascadeShadowDistanceScale1=4
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=1
This for mid

Code:
CascadeShadowDistanceScale0=4
CascadeShadowDistanceScale1=2
CascadeShadowDistanceScale2=1
CascadeShadowDistanceScale3=1
or

Code:
CascadeShadowDistanceScale0=4
CascadeShadowDistanceScale1=3
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=1
And this for low
Code:
CascadeShadowDistanceScale0=2
CascadeShadowDistanceScale1=2
CascadeShadowDistanceScale2=1
CascadeShadowDistanceScale3=1
Combine distance presets with resolution presets to achieve best balance for you


And for better settings use this (100 meters of C0, 60 meters for C1, 20 meters for C2, 20 meters for C3, 200 meters overall):

Code:
CascadeShadowDistanceScale0=10
CascadeShadowDistanceScale1=6
CascadeShadowDistanceScale2=2
CascadeShadowDistanceScale3=2
CascadeShadowmapSize=8192
or this for ultra uber hardcore settings (160 meters, 80 meters, 40 meters, 20 meters, 300 overall)

Code:
CascadeShadowDistanceScale0=16
CascadeShadowDistanceScale1=8
CascadeShadowDistanceScale2=4
CascadeShadowDistanceScale3=2
CascadeShadowmapSize=8192
Hope CDPR will read this and unlock 16k resolution for shadows to improve uber quallity even better.

There is also a

CascadeShadowQuality

settings,which controls shadow filtering, im not sure about final value, but i play at 4, values like 2 or 1 would probably give a little perfromance boost, while 0 will gve maximum performance with trade of shadow filtering quality.

P.S. - these observation was done by tweaking all of this in a game with my E.D.G.E. mod, its much harder to nottice when you do it by restarting and tweaking settings one by one.

Almost forgot to atach xml file with texture resolution cap raised to 8192, it goes to startup.bundle\engine\texture :
View attachment 16143
Click to expand...
Great post! But there not only texture res cap problem. The cascade transition is not aligned with camera view direction, and each cascade is somewhat differently rendered. Would be great if CDPR also fix this. Details and screenshots are in this thread:
http://forums.cdprojektred.com/threads/47031-ENGINE-BUG-Shadow-Cascade-levels-distance-and-center-are-calculated-incorrectly

 

Attachments

  • witcher3_CascadeProblem3.jpg
    witcher3_CascadeProblem3.jpg
    419.7 KB Views: 27
  • RED Point
Reactions: Verrenus
K

kilyan82

Rookie
#807
Jun 10, 2015
IrregularJohn said:
I don't know maybe it was mentioned but here's a couple things I noticed recently:

1) There are only sound effects when you step on puddles, no animation of water splashing under Geralt's boots, no nothing - just sound effects (it applies both to walking and riding).



2) No physics when using Aard while standing on puddles, it only works on larger bodies of water.


Sure would be nice to have those puddle physics and visual effects back.
Click to expand...
Amazing water and amazing effects,gone
[video]https://youtu.be/7K9DE7Ve7TE?t=62[/video]
 
Last edited: Jun 10, 2015
  • RED Point
Reactions: Verrenus
E

essenthy

Rookie
#808
Jun 10, 2015
not sure how you managed to disable water puddle splash, but they are definitely there, even in the small puddle in novigrad
 
  • RED Point
Reactions: Verrenus
I

IrregularJohn

Banned
#809
Jun 10, 2015
essenthy said:
not sure how you managed to disable water puddle splash, but they are definitely there, even in the small puddle in novigrad
Click to expand...
That's the thing - I didn't. I don't have those effects on puddles both in Novigrad and in Velen. I'm still on 1.04. Now I seriously wish I didn't buy into all the hype this game had and just waited for another year when it's patched like 200 times over and should run better.

At this point I'm more immersed in the threads discussing how to fix multiple bugs than in the game's storyline.

P.S. Geralt whistling for Roach with no mouth movement is extremely "immersive" as well. I mean these are all minute details but when they pile up they do break immersion and there was A LOT of fuss about said immersion on E3. Witcher 1 was more immersive than this. Granted it had less scope and all but it did all it set out to do. So I'd rather not have those features at all than having them working improperly.
 
Last edited: Jun 10, 2015
  • RED Point
Reactions: zefs and Verrenus
K

kilyan82

Rookie
#810
Jun 10, 2015
essenthy said:
not sure how you managed to disable water puddle splash, but they are definitely there, even in the small puddle in novigrad
Click to expand...
particles has something to do with the splashes? Mybe if he adds the particle string, could work? i'm just trying to guess
 
  • RED Point
Reactions: Verrenus
J

jonwd7

Rookie
#811
Jun 10, 2015
agatsuma said:
Great post! But there not only texture res cap problem. The cascade transition is not aligned with camera view direction, and each cascade is somewhat differently rendered. Would be great if CDPR also fix this. Details and screenshots are in this thread:
Click to expand...
It's actually a rather misinformative post. His "rules" 1-7 are almost completely wrong. Though 6 is nearly correct, it's just that he misuses the word "resolution" instead of "size" (of the cascade).

The issue you are talking about is probably due to the "frustum fitting algorithm". They use a bunch of math to determine how best to fit each cascade to the view frustum (what the camera can see).

I'm not saying all the stuff that you are pointing out in your thread isn't a bug, but the first example just looks to me like the very edge of the camera FOV and the way the frustums are fit (you can see the corners of cascades inside the view). And in this specific example you end up seeing the transitions between the two cascades. The further of which doesn't support bush shadows. So, not a bug, unless you turning up your CascadeShadowDistanceScale values doesn't resolve it.

Also, bush shadows are capped by FoliageShadowDistanceScale, IIRC. So you may need to increase that. The distance to the bush is actually a little closer when viewed dead center, as compared to it being at the edge of FOV.

The later stuff in your thread... I'd have to corroborate myself. I can't trust those cascade lines are drawn correctly, because they do look severely off angle, and so they could be a bug. Does this happen for you outside White Orchard? I know that they rotated the entire White Orchard map to be different from Velen because the sun comes from a different compass direction, so I wonder if maybe the shadow cascade math doesn't take this rotation into account for whatever reason.

----

So since that post has been dug up again, I'll go ahead and post this which I'd written but not decided to share until necessary:


Since someone came in here and told me and others that we were wrong for suggesting the shadow values that we did, I've gone ahead and written up a rigorously tested set of assertions that prove that I know what I'm talking about and that also disprove much of what was said. I will link to a set of images after each assertion which show it to be true.

- CSDS will be used as shorthand for CascadeShadowDistanceScale.
- "N" will be the value for any CSDS.
- "C" will be used to refer to any cascade.
- "C+1" will be used to refer to the next cascade (if it exists).
- "C-1" will be used to refer to the previous cascade (if it exists).
- C0 will refer to Cascade 0, C1 will refer to Cascade 1, and so on.
- CSDS0 will refer to CascadeShadowDistanceScale0, and so on.
- The word "resolution" was continually misused to refer to both texture dimensions or cascade size in the same post. So, to make it clear, when I mean cascade size (how much area a cascade covers in-game), I will say depth/size. When I mean shadow texture size, I will say texture size/dimensions. When I mean resolution (as in how detailed something looks), I will say "spatial resolution".


Assertion 1: For CSDS0, N < 1 is invalid.

MaxCascadeCount=1, CSDS0=0.1
MaxCascadeCount=1, CSDS0=0.5 (Different Angle) (Notice that it the shadow is incomplete)

Conclusion: I'm not going to get into the specifics of it because it's unimportant, but when CSDS0 < 1 it only looks correct when the sun and camera are parallel and facing the same way.

This assertion is rather unimportant by itself, but it's used to show later that in certain images that absolutely none of the shadows present are due to CSDS0=0.1.

--

Assertion 2: When N=0, C1, C2, and C3 will not disappear completely.

MaxCascadeCount=1, CSDS0=1
vs
MaxCascadeCount=2, CSDS0=1, CSDS1=0
vs
MaxCascadeCount=3, CSDS0=1, CSDS1=0, CSDS2=0

Conclusion: CSDS is not a strict multiplier on the depth/size of the default cascade. Otherwise N=0 would make them disappear entirely.

Thus, cascade depth calculation would appear to be something like:

Depth_C = B + D_C * sqrt(N)

Where B is an unchangeable minimum base size, D_C is the default depth for that cascade, and N is the CSDS value.

--

Assertion 3: Increasing N will increase C's depth/size.

MaxCascadeCount=1, CSDS0=1
vs
MaxCascadeCount=1, CSDS0=4
vs
MaxCascadeCount=1, CSDS0=16

Conclusion: Easy conclusion. The name "CASCADE SHADOW DISTANCE SCALE" does exactly what it says it does. It scales up the distance that the shadow cascade covers.

--

Assertion 4: Increasing N will decrease C's spatial resolution.

MaxCascadeCount=2, CSDS0=0.1, CSDS1=1
vs
MaxCascadeCount=2, CSDS0=0.1, CSDS1=4
vs
MaxCascadeCount=2, CSDS0=0.1, CSDS1=16

Note: For proof that no portion of these images is due to CSDS0, see Assertion 1.

Conclusion: Spatial resolution definitely decreases with increasing N. Taking into account Assertion 3, it's clear that if N both increases C's depth/size and decreases C's spatial resolution, that C's shadow texture is fixed in size.

It is easy to show this with a formula:
Spatial Resolution = Texture Width / Unit Distance​

So, to increase spatial resolution you either increase texture width (CascadeShadowmapSize) or decrease the distance (CSDS).

Contrary to previous claims in this thread, increasing CSDS does not increase the size of the shadow texture, or you would not notice a decrease in spatial resolution.

--

Assertion 5: For any N, C+1 will reach further than C.
Assertion 6: For any N, C will have a higher spatial resolution than C+1.


MaxCascadeCount=1, CSDS0=4
vs (for Assertion 5)
MaxCascadeCount=2, CSDS0=0.1, CSDS1=4
vs (for Assertion 6)
MaxCascadeCount=3, CSDS0=0.1, CSDS1=0.1, CSDS2=4

Note: For proof that no portion of the second image is due to CSDS0, see Assertion 1.
Note: For proof that the bottom portion of the third image is due to CSDS1=0.1, see this image: MaxCascadeCount=2, CSDS0=0.1, CSDS1=0.1


Conclusion: For N=1 (i.e. default cascade size) each successive cascade is larger than the previous. That is to say if you were to measure the distance along the ground from start to end, C3 > C2 > C1 > C0. As shown in the above images, CSDS1=4 covers a much larger area than CSDS0=4.

So, as previously claimed in this thread, the default distances of each cascade are not equal.

Experimentally, it would seem at N=1, C1 is almost exactly 4x as large as C0. Because MaxCascadeCount=2, CSDS0=1, CSDS1=1 is roughly the same visually as MaxCascadeCount=1, CSDS0=5.

Thus [C0 * 1 + C1 * 1 = C0 * 5] ==> [C1 = C0 * 4]. Given that it's a SCALE and not a DISTANCE, we probably need to take the square root. So if C0 were 10m deep, then C1 would be 20m (10 * sqrt(4)) deep and they would add up to 30m.

I will try to derive these values more rigorously if asked.


Furthermore, Assertion 6 demonstrates that for the same N (i.e. CSDS1=4 and CSDS2=4) that the further cascades will always have a lower spatial resolution than the closer ones.

Experimentally, it would seem that (MaxCascadeCount=2, CSDS0=0.1, CSDS1=4) and (MaxCascadeCount=1, CSDS0=16) cover about the same area and have the same spatial resolution. Actually, CSDS1=4 spreads a little further, but I believe it's because as I theorized there's an unmodifiable Base size to each cascade which increases with each cascade (See Assertion 2).

This is also exactly as I predicted, because the presumption was that if the C0 texture size is for example 2048 that the C1 texture size is 1024. Given the similar spatial resolution of CSDS1=4 and CSDS0=16, you can easily demonstrate this:

C0 Spatial Resolution: 2048 / sqrt(16) = 512

So solve for C1's texture size,

X / sqrt(4) = 512
X = 512 * 2
X = 1024

--

Assertion 7: For any C, increasing its size will not affect the spatial resolution for C-1

MaxCascadeCount=2, CSDS0=4, CSDS1=1
MaxCascadeCount=2, CSDS0=4, CSDS1=16
MaxCascadeCount=2, CSDS0=4, CSDS1=64
MaxCascadeCount=2, CSDS0=4, CSDS1=128
MaxCascadeCount=2, CSDS0=4, CSDS1=256
MaxCascadeCount=3, CSDS0=4, CSDS1=256, CSDS2=256
MaxCascadeCount=4, CSDS0=4, CSDS1=256, CSDS2=256, CSDS3=256

Note: There are small temporal differences as the image is not taken at the exact same frame after savegame load. I can prove this by loading the game and taking a screenshot multiple times, but without changing the values, and you will see the same kind of minute differences in the shadows. I see no point in doing this for every example, but here is an alternate to MaxCascadeCount=2, CSDS0=4, CSDS1=1 (the first image). You can see the same kind of temporal differences in the shadows as in every other example.
Note: Geralt randomly changes positions between each savegame load. Ignore his shadow entirely.


Conclusion: Changing CSDS1-CSDS3 has absolutely zero effect on C0. As previously claimed in this thread, increasing one CSDS does not "steal" resolution away from the other cascades. Each cascade has its own fixed shadow texture size (relative to CascadeShadowmapSize) and is independent from one another. They do not combat for resolution because their shadow texture sizes are predetermined.

Furthermore it's common sense that each further cascade will have a lower shadow texture size than the previous. Because of the way that most third-person games are displayed (with a perspective projection) the required resolution for each cascade drops as the distance from the camera increases. It's also quite clear by the name "CASCADE SHADOW DISTANCE SCALE" that changing these values does one thing only: scale the distance of the cascade. It would defeat the purpose for these values to have two functions that not only contradict each other (Assertion 4) but would also negatively affect other cascades.

--

Assertion 8: For any C, increasing its size will affect the spatial resolution for C+1

Now, this is too difficult to show in engine, but given everything we know to be true about the system via Assertions 1-7 it is easy enough to diagram. Based on testing, this is roughly what their cascade system looks like:

Cascades

IMPORTANT: This view has *no relation* to the shadow texture dimensions. The two things are completely separate. This diagram shows the physical area which the cascades cover in the game.

1. This is a top-down view of the cascades compared to the camera's field of view (the black lines, often called the frustum).
2. The darker lines in the middle of each cascade represent the total distance the cascade covers. The result which is affected by changing the CSDS values. Note that the cascades overlap slightly but I have not yet tested how CascadeFadeThreshold affects this area.
3. I cannot get into detail about the exact frustum-fitting algorithm the cascades employ because it is impossible to test. I only know that the corners of each cascade are visible in the camera's field of view. I am not sure if the cascades remain square or if they change shape to best fit the CSDS values and the camera's frustum.


Now, it can be proven that increasing C0 will affect the spatial resolution of C1-C3. Let's see what happens if we increase C0 without affecting the other cascades:

C0 Increase (Incorrect)

You can see that C0 will overlap C1 if it is not also increased. Now since we cannot know CDPR's exact frustum-fitting algorithm let's assume it has these two requirements:

1. It must maintain a certain distance from the cascade start to cascade end (the dark lines).
2. It must then scale up to cover any gaps at the edge of the camera frustum.

So let's do that:

C0 Increase (Correct)

Comparing "Cascades" and "C0 Increase (Correct)" images, you can see that for C1:

1. The green line (C1's depth based on CSDS1) remains unchanged.
2. It has moved away from the camera.
3. It has scaled up in size to fit the frustum.

Conclusion: Increasing C0 will cause the other cascades to scale up to maintain the optimal distances. And given that we have proven that each cascade has its own fixed-size texture (relative to CascadeShadowmapSize) via Assertions 3/4, it can be shown that these cascades will reduce slightly in spatial resolution. Which is, again, how detailed the shadows appear, not how large the shadow texture is.

However, this doesn't matter much because by increasing C0 you are also pushing C1-C3 further away from the camera. And due to the game's perspective projection you are very unlikely to notice the slight reduction in resolution of the further cascades. And, as Assertion 7 has shown, it does NOT work the opposite way, i.e. increasing C1 will have no bearing on C0's spatial resolution.

--

Assertion 9: Some objects are set to only be visible to specific cascades.

MaxCascadeCount=2, CSDS0=0.1, CSDS1=1
MaxCascadeCount=2, CSDS0=4, CSDS1=1

Note: For proof that no portion of the first image is due to CSDS0, see Assertion 1.

Conclusion: Some objects are culled when each cascade gets rendered to its texture. This is an LOD system employed by CDPR to lessen the burden of rendering the shadow maps. It also doesn't make sense to render objects under a certain size for each successive cascade because the cascade simply doesn't have the spatial resolution to properly render it.

--

Assertion 10: Dithering is used to blend cascades together.

It's easiest to see in the examples from Assertion 2. Here are the images annotated to clarify:

MaxCascadeCount=1, CSDS0=1 (No Dithering, because no adjacent cascade)
vs
MaxCascadeCount=2, CSDS0=1, CSDS1=0
vs
MaxCascadeCount=3, CSDS0=1, CSDS1=0, CSDS2=0

IMPORTANT: Must be viewed at full-size to see dithering pattern!

Conclusion: Dithering is used for two reasons:

1. To reduce the visible seam between two cascades of differing spatial resolutions. (Image 3)
2. To reduce the harsh edge / pop-in from objects which exist in one cascade but not another (Image 2)

--
---
--

So, I've sort out of run out of juice, but I'll try to recap what was wrong with the earlier posts:

1. Cascade scale does not have to be strictly descending. CSDS3/2/1 does NOT affect the resolution of C0. See Assertion 7. There is nothing wrong with 4/3/2/1, but there isn't anything wrong with 4/3/2/2 either. And something ridiculous like 8/4/2/1 might still not be enough to get distant shadows like in this comparison because the total cascade depth might not be large enough.

An actual reason you do not want CSDS1 to be larger than CSDS0 is because this will just exacerbate the spatial resolution differences at the 0<->1 cascade transition. Since at N=1, C0 has roughly 8x the spatial resolution as C1. So something like 1/4/1/1 is not ideal because you are keeping the 0<->1 transition close to the camera and destroying the spatial resolution of C1. However this doesn't really apply to CSDS2 simply because you can't really see the 1<->2 transition. So, having CSDS2>=CSDS1 is fine if you want to cover more distance with C2.

2. Cascades are not all the same length/depth as previously stated. For example, C1 is twice as deep as C0. This basically nullifies all of his cascade distance math, and suggesting setting C0 above 8 is just absolutely ludicrous. You already destroy C0's spatial resolution at such high values, necessitating a shadowmap size of 8192, but aside from that, a C0 size physically larger than 8x the default is just overkill and defeats the purpose of using cascaded shadow maps entirely.

3. He confounds resolution with size so often that it's hard to even make much sense of what was said. Cascade size is the area it covers in game. Cascade resolution (spatial resolution) is how many texels from the shadow texture are spread over a given distance. Cascade size and texture size are in no way linked. For example, if a cascade covers 100 sq meters, and the shadow texture size is 512x512, there are 5.12 texels per meter (in one direction). If you increase the cascade to cover 200 sq meters, the shadow texture size is still 512x512 and now the resolution is only 2.56 texels per meter (in one direction). This is made obvious in Assertions 3 & 4.


So yes, if you don't care about shadow quality or performance, do use insane values like 8/4/2/1 or 16/8/4/2.
 
Last edited: Jun 10, 2015
  • RED Point
Reactions: SigilFey, ummagoomba, Verrenus and 3 others
A

agatsuma

Banned
#812
Jun 10, 2015
jonwd7, I haven`t been to Valen yet, but those lines are correct, transition between two cascades goes right along them. I also didnt believed at first when I ancountered this, but they are correct. Hope theyll fix their math for cascade fitting.
 
  • RED Point
Reactions: Verrenus
S

svichupocentru

Senior user
#813
Jun 10, 2015
soooo, jonwd7, instead of using something like
Code:
CascadeShadowDistanceScale0=16
CascadeShadowDistanceScale1=8
CascadeShadowDistanceScale2=4
CascadeShadowDistanceScale3=2
CascadeShadowmapSize=8192
we better off using something like
Code:
CascadeShadowDistanceScale0=2
CascadeShadowDistanceScale1=2
CascadeShadowDistanceScale2=4
CascadeShadowDistanceScale3=8
CascadeShadowmapSize=8192
?
 
  • RED Point
Reactions: Verrenus
J

jonwd7

Rookie
#814
Jun 10, 2015
svichupocentru said:
soooo, jonwd7, instead of using something like
Code:
CascadeShadowDistanceScale0=16
CascadeShadowDistanceScale1=8
CascadeShadowDistanceScale2=4
CascadeShadowDistanceScale3=2
CascadeShadowmapSize=8192
we better off using something like
Code:
CascadeShadowDistanceScale0=2
CascadeShadowDistanceScale1=2
CascadeShadowDistanceScale2=4
CascadeShadowDistanceScale3=8
CascadeShadowmapSize=8192
Click to expand...
8192 is too large for those second settings unless you are going for very detailed shadows. One definite thing is that CSDS0=16 is destructive to both your shadow quality and your performance.

I haven't actually gotten to test C3 very much yet, because it's so far away by default and so few objects render in it. However, C3 is so large to start that I really can't imagine needing any larger than 4x . Especially given that C2 at CSDS2=4 will spread out over a very long distance itself.

If you use a FoliageDistanceScale which is higher than ultra, you do need to assure that your C2 stretches far enough. If you're concerned about distant shadows I'd definitely see to raising FoliageDistanceScale above Ultra anyway. This increases how far the lower quality trees will receive shadows, which is actually surprisingly low at the Ultra preset. And also look into upping FoliageShadowDistanceScale which covers small bush shadows and such.

Are you really committed to 8192? On my 980 I saw a measurable FPS drop just from 3072 to 4096. If at CascadeShadowDistanceScale0=4 you still notice a lot of object shadow pop-in between the C1 and C0 transitions, and it really bothers you, then I say stay at 8192 but try out 8/4/2/2 and check that your distant foliage is fully shadowed.

If you'd rather try dropping down to 4096 you can try 4/3/3/2 or 4/3/2/2. Depending on how far you need tree shadows to go. Again, refer to this Nvidia comparison for a good location / time of day to test out your tree shadow distances. Though they seem to leave out what the other cascade scales are for that comparison.

Generally, I would say that you should have a 2 minimum for all the values (if your CascadeShadowmapSize>2048), and an 8 maximum. And by maximum I mean absolute maximum. There is no point of ruining the resolution of your shadows to blanket almost the entire visible area in ONE cascade. That goes against the point of cascaded shadow maps. Increasing the cascade further than you can usually see just includes more small objects in the shadow rendering and reduces your performance with no visual benefit.

I think a good rule is the absolute max for CascadeShadowDistanceScale0 should be the first digit of your CascadeShadowmapSize. So if you are doing the default Ultra value of 3072, then 3 should be your max. If you bump it up to 4096, make 4 your max. If you are on 2048, make 2 your max. If you are on 1024, leave it at 1 (and you really shouldn't be doing shadow tweaks :p).

---

Also, another problem is that distant LOD meshes can be *heavily* glitched at super high CSDS values:

16/8/4/2 8192



8/4/2/2 8192



As you might be able to see in the first image, the group of buildings above Geralt's head messes up quite severely with such extremely high CSDS values. All the wooden framework turns black and that is just not correct.

And that's just the first I was able to find on short notice. I know that it happens to most distant LOD, and it's sometimes even worse. Considering that, you might want to be cautious about putting the 0/1 values over 4, unless the glitched LOD bothers you less than sometimes seeing the cascade transitions.

Edit:

I first noticed the LOD shadow issue here. You can see on the building directly above Geralt's head, the shadows are ALL kinds of messed up on the distant LOD pieces. Really this just shows that they need to give us the option to push the LOD transition distance way back...
 
Last edited: Jun 10, 2015
  • RED Point
Reactions: Verrenus
I

iceternal

Forum regular
#815
Jun 10, 2015
And if I want to stay at 3072 to limit the performance cost, is 3/2/2/2 ok ? will it be a significant improvement ?
 
  • RED Point
Reactions: Verrenus
G

GeraltOrBust

Senior user
#816
Jun 10, 2015
jonwd7 said:
So yes, if you don't care about shadow quality or performance, do use insane values like 8/4/2/1 or 16/8/4/2.
Click to expand...
So, ah, what are the best values to use for:

  • Absolute best shadow quality, performance be dammned
  • A good compromise between quality and performance, erring slightly on quality side (aka above Ultra)
Thanking you in advance!
 
  • RED Point
Reactions: Verrenus
U

ummagoomba

Rookie
#817
Jun 10, 2015
GeraltOrBust said:
So, ah, what are the best values to use for:

  • Absolute best shadow quality, performance be dammned
  • A good compromise between quality and performance, erring slightly on quality side (aka above Ultra)
Thanking you in advance!
Click to expand...
@jonwd7 has written a lot of great info regarding this, especially in this post:

http://forums.cdprojektred.com/threads/36088-A-compendium-of-tweaks-and-fixes-for-the-PC-version?p=1768653&viewfull=1#post1768653

I think you should have a read GeraltOrBust and try to find a setting that suits your system the best. Jon has given you all the information you need but you need to take the time to read through it yourself.
 
  • RED Point
Reactions: Verrenus
B

BrotherCool

Senior user
#818
Jun 10, 2015
Lenkorn said:
@jonwd7 has written a lot of great info regarding this, especially in this post:

http://forums.cdprojektred.com/threads/36088-A-compendium-of-tweaks-and-fixes-for-the-PC-version?p=1768653&viewfull=1#post1768653

I think you should have a read GeraltOrBust and try to find a setting that suits your system the best. Jon has given you all the information you need but you need to take the time to read through it yourself.
Click to expand...

I'm not GeraltOrBust but.. personally I don't understand his post at all.
 
  • RED Point
Reactions: Verrenus
K

kilyan82

Rookie
#819
Jun 10, 2015
Lenkorn said:
@jonwd7 has written a lot of great info regarding this, especially in this post:

http://forums.cdprojektred.com/threads/36088-A-compendium-of-tweaks-and-fixes-for-the-PC-version?p=1768653&viewfull=1#post1768653

I think you should have a read GeraltOrBust and try to find a setting that suits your system the best. Jon has given you all the information you need but you need to take the time to read through it yourself.
Click to expand...
i think it's too technical for us peasants:D
 
  • RED Point
Reactions: Verrenus
A

Asmodean778

Rookie
#820
Jun 10, 2015
A few people were asking me for my own lighting changes. So I've uploaded it. The link is at the end.

  • Before you install the files, ensure you first backup your startup.bundle file. Located in: The Witcher 3 Wild Hunt\content\content0\bundles\startup.bundle

To clean install;
  1. The cleanest way to do so, is to extract the provided folder to the desktop.
  2. Move your startup.bundle to the provided folder (where install_weather_mod.bat is)
  3. To be extra safe, you can right click quickbms, and click properties ->compatibility-> run as administrator.
  4. Run install_weather_mod.bat.
  5. It will finish the repacking, and then hit enter.
  6. Move the modified startup.bundle back to your The Witcher 3 Wild Hunt\content\content0\bundles folder.
  7. Done.


To uninstall;
  1. Simply copy / paste back in your backed up original startup.bundle file (in The Witcher 3 Wild Hunt\content\content0\bundles folder)..

I tried to evade most of the problems from the existing lighting mod. Which forces the cutscene lighting completely. Replacing any original environment lighting for each area. This blends the cutscene lighting model, with the existing default area lighting.

So, basically you get the improved lighting accuracy(stuff that should be lite, is lite. And stuff that should be dark, is dark, etc). Unlike the default lighting, which had random shit glowing bright, when it should be dark, and vice versa. You also get the higher quality ambient occlusion, and shadowing. But you keep all the original weather conditions, sky, draw distance, from the original lighting, etc.

This isn't a 'release', btw. I'm just sharing my own files, for people who wanted them here. But, thanks a lot to essenthy, for bringing this up, and sharing his findings.

Hopefully when REDKit is released it can be done in a cleaner manner, etc. Tbh, I'd like much prefer if CDPR did this for PC, officially lol. Fix that wonky lighting bros.

#Edit: Because people keep asking for them. I've updated the files in this post to the later version, with no truncation, etc.
Link: Lighting installer(OneDrive)
 
Last edited: Jun 18, 2015
  • RED Point
Reactions: Exentryk, Dprelate, matheuscmffa and 10 others
Prev
  • 1
  • …

    Go to page

  • 39
  • 40
  • 41
  • 42
  • 43
  • …

    Go to page

  • 90
Next
First Prev 41 of 90

Go to page

Next Last
Status
Not open for further replies.
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2020 XenForo Ltd.