Page MenuHomeWildfire Games

Add a terrain-shadows option
AbandonedPublic

Authored by wraitii on Dec 3 2017, 1:31 PM.

Details

Reviewers
Imarok
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Our terrain is mostly flat, and our sun is mostly vertical, so on most maps terrain doesn't get to have shadows. But we still render it again just in case if shadows are enabled.

This adds a setting to skip that.

(this is an old branch of mine that I just rediscovered)

Test Plan

Mostly decide whether we want this or not. On my computer it seems to make no difference at all.

Event Timeline

wraitii created this revision.Dec 3 2017, 1:31 PM
Owners added a subscriber: Restricted Owners Package.Dec 3 2017, 1:31 PM
elexis added a subscriber: elexis.Dec 3 2017, 1:53 PM

The use case is optimizing performance?
I believe it might not be clear to the player, but that can be fixed by improving the tooltip.
Do we have any remote numbers to show a measurable performance difference?

I actually didn't see any terrain shadow, can you show a screenshot? For instance on Acropolis Bay the starting mountain doesn't seem to show any shadow.

The use case is optimizing performance?

It is (well hopes to be anyways).

Do we have any remote numbers to show a measurable performance difference?

As said in the test plan, on my computer this makes no difference, which is why I'm wondering whether it's useful or not. If somebody with a terrible computer can give some numbers.

I actually didn't see any terrain shadow, can you show a screenshot? For instance on Acropolis Bay the starting mountain doesn't seem to show any shadow.

It's testable on alpine mountains, for example. Acropolis Bay appears to have a very vertical sun that shows no shadows anywhere.

elexis added a comment.Dec 3 2017, 2:20 PM

Okay I saw it on Alpine Mountains. Strange that its not seen on the other maps with hills (Acropolis bay still has significant shadows for trees).
If I set the shadow quality to maximum, I only get 4 FPS, disabling the terrain shadows still doesn't reduce the performance.

I still think its neat to allow configuration of things.

How about making that a user.cfg only option, add a comment that this is doesn't really influence the performance (misses default.cfg entry to begin with)?

source/renderer/scripting/JSInterface_Renderer.cpp
25

needed?

elexis added a comment.EditedDec 3 2017, 2:27 PM

If we go with the manual config only way, I still wouldn't disagree to have the unused JSInterface part in there.
Perhaps we can hide some options under an "expert" checkbox eventually.

Patch looks complete but I wouldn't bet my balls on that.

Vulcan added a subscriber: Vulcan.Dec 3 2017, 5:55 PM
Executing section Default...
Executing section Source...
Executing section JS...
Vulcan added a comment.Dec 3 2017, 6:17 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
vladislavbelov added a subscriber: vladislavbelov.EditedDec 5 2017, 8:00 PM

The problem is other objects requires much more time to render their shadows. Also the vertex buffer of the terrain is pretty simple and not bad ordered. So I think it's not easy to get really improvements, even on slow PCs. But it could be a hidden checkbox or a JS function as @elexis said.

Imarok resigned from this revision.Dec 6 2017, 12:53 PM
wraitii abandoned this revision.Jan 21 2018, 4:24 PM

Probably not worth the pain of maintaining.