CryEngine 5.5.2 max lights casting shadows

#1
Hey there,

Ich have a question about the console command "r_shadowscastinglightsmaxcount". If I get it right, this should adjust the maximum amount of lights that cast shadows?

Per default this is limited to 12 lights as it seems. Since in my case it's about a portfolio scene, performance doesn't really matter and therefore I'd like to increase the amount a bit.

So when changing the variable to 20 or sth similar, the console tells me to restart the app in order to make the changes. After restarting the editor, it's set to 12 again.. so there lies the problem.

Can anyone help me with this?

Thanks guys! Cheers

Edit:

Complementary to the above, is there a possibility to save this variable (along with others like sys_spec) in some sort of system config file so that it loads per default on startup?
If so, I couldn't find such config file. I tried the console command "exec system.cfg" to create one, but as it seems, there is an error and the file won't come out correct.
Thanks again for reading :)

Re: CryEngine 5.5.2 max lights casting shadows

#2
You can either place this in a config file (system.cfg/game.cfg/user.cfg) or place this in your cryproject file.
The recommended approach is inside your cryproject file like so:

Code: Select all

"console_variables": { "r_shadowscastinglightsmaxcount": "20", "sys_target_platforms": "pc,ps4,xboxone,linux" },
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: CryEngine 5.5.2 max lights casting shadows

#4
This CVar will limit the number of lights that can cast shadows in the scene.
Setting this to two, placing a cylinder, and placing 3 shadow casting point lights around it will make the effect more obvious.
12 is usually more than enough for most situations.
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: CryEngine 5.5.2 max lights casting shadows

#7
Thanks for your reply!

I get that and I set it to a value of 20 for my particular portfolio scene.
As I mentioned in my second reply, this doesn't seem to work/ affect the actual amount of lights that can cast shadows at the same time.
That's why I'm asking if this CVar is only there for the purpose of limiting the amount below the standard amount of 12 lights per scene, and that I actually cannot increase the amount above 12?
(because, as I mentioned, in my case, setting the amount to 20, doesn't seem to affect anything and it all stays the same.)

If that's the case, I'd need to rework the scene in some regards and get rid of some wall lamps e.g

Another thing: when I'm correct, in previous versions there was a maximum of 16 lights per scene as default, inculding environment probes, right?
So when talking about the max of 12 lights in 5.5.2, I need to also consider environment probes into that count?

Re: CryEngine 5.5.2 max lights casting shadows

#8
This appears to be a bug in the engine and we are tracking it internally. the CVar does seems to affect lights at a much lower number (restricting), but can vary in effectiveness when try to extend the limit.
Thanks for pointing this out to us.

For now we recommend building the scene around the current limitations while were investigate the issue.
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 0 guests