Page MenuHomeWildfire Games

Camera view config options
Needs ReviewPublic

Authored by anileapen05 on May 15 2018, 7:35 PM.

Details

Reviewers
elexis
vladislavbelov
Trac Tickets
#4638
Summary

Since it can be really useful for players and people who create promotional videos to change the maxzoom or camera movement speed, we should provide a way to change these things in the config page.

The min and max values is best guess and can be changed on feedback.

The final list of options can also be updated on feedback.

Test Plan

User should save with different values in the Settings->Options page->Camera.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 6079
Build 10122: Vulcan BuildJenkins

Event Timeline

anileapen05 created this revision.May 15 2018, 7:35 PM
Vulcan added a subscriber: Vulcan.May 15 2018, 7:37 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/492/display/redirect

  • programming.json entry
  • Wouldn't it be more comfortable to use sliders?
  • tooltips that are identical to the label are useless. (They add more translation work in this case too due to the different case). You can remove it if there is nothing relevant to say. Even better would be an explanation on what the options do though.
  • I think we don't have the trailing zeroes .0 (only in XML templates), (its a JS Number type in any case)
  • (Someone might want to test if those 20k maximum values are reasonable)
  • Do the changes take effect immediately? It were nice if they did. One can specify session function names in the JSON file currently that are called when closing the dialog. There are also Renderer C++ functions called (defined in JSInterface_Renderer.cpp. Perhaps a new one could be added there that is called while the slider is moved? This way the user could get a preview immediately, thus get the feedback required to find the user prefered value.
anileapen05 updated this revision to Diff 6566.EditedMay 18 2018, 1:37 PM
  1. Wouldn't it be more comfortable to use sliders? - Updated to sliders.
  1. Tooltips that are identical to the label are useless. (They add more translation work in this case too due to the different case). You can remove it if there is nothing relevant to say. Even better would be an explanation on what the options do though - Updated to hopefully more meaningful tooltips
  1. I think we don't have the trailing zeroes .0 (only in XML templates), (its a JS Number type in any case) - Removed trailing zeroes

(Someone might want to test if those 20k maximum values are reasonable) - Tested and updated min and max values

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

Link to build: https://jenkins.wildfiregames.com/job/differential/506/display/redirect

In D1493#61192, @elexis wrote:
  • Do the changes take effect immediately? It were nice if they did. One can specify session function names in the JSON file currently that are called when closing the dialog. There are also Renderer C++ functions called (defined in JSInterface_Renderer.cpp. Perhaps a new one could be added there that is called while the slider is moved? This way the user could get a preview immediately, thus get the feedback required to find the user prefered value.

In progress..

Some notes:

  • I don't think near and far plane values should be included. Those aren't settings that most people care about and they can break things.
  • Most of the camera options are broken in the engine. They do not work and need to be fixed or perhaps just implemented before these options will do anything.
  • You'll need scripting hooks to the camera control settings engine side in order for changes to options to have any effect without restarting.
  • Tilt up/down using the (control+) scroll wheel would be nice. Currently it's not implemented and due to the peculiarities of scroll wheel controls it doesn't work if you try to set regular tilt up/down to use the scroll wheel.
vladislavbelov requested changes to this revision.EditedMay 19 2018, 10:46 AM
vladislavbelov added a subscriber: vladislavbelov.

Also I'm not sure about min/max values, because there was a mod, that simulates an isometric view with very low/high values.

The rest looks ok for me.

binaries/data/mods/public/gui/options/options.json
535

Dot after the end of sentences.

537

Empty params can be not mentioned and skipped.

638

It shouldn't be changed currently, because it affects Z-fighting too much. Also we have hardcoded values: https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/shaders/glsl/water_high.fs#L188
So it breaks the water. Also the min value is too hight, it should be at least 4096.

652

Missed EOLN.

This revision now requires changes to proceed.May 19 2018, 10:46 AM
anileapen05 updated this revision to Diff 6621.May 22 2018, 4:49 PM
anileapen05 marked 4 inline comments as done.
This comment was removed by anileapen05.
Stan added a comment.May 22 2018, 4:54 PM

You know you can answer directly on the comments right ? :)

  • Most of the camera options are broken in the engine. They do not work and need to be fixed or perhaps just implemented before these options will do anything.
  • You'll need scripting hooks to the camera control settings engine side in order for changes to options to have any effect without restarting.

.. In progress

  • Tilt up/down using the (control+) scroll wheel would be nice. Currently it's not implemented and due to the peculiarities of scroll wheel controls it doesn't work if you try to set regular tilt up/down to use the scroll wheel.

.. I'll check on this

Also I'm not sure about min/max values, because there was a mod, that simulates an isometric view with very low/high values.

The rest looks ok for me.

535 Dot after the end of sentences - Done

537 Empty params can be not mentioned and skipped - Done

652 Missed EOLN - Done

638 It shouldn't be changed currently, because it affects Z-fighting too much. Also we have hardcoded values:https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/shaders/glsl/water_high.fs#L188 So it breaks the water. Also the min value is too high, it should be at least 4096.

Leaving out near plane, far plane and fov options. So the default values in default.cfg are used near = 2.0 , far = 4096.0 and fov = 45.0

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

Link to build: https://jenkins.wildfiregames.com/job/differential/550/display/redirect

In D1493#61955, @Stan wrote:

You know you can answer directly on the comments right ? :)

Sorry about that getting used to this site.

Stan added a comment.May 22 2018, 5:04 PM

It's okay I'm here to help :)

Stan removed a reviewer: Stan.Jan 23 2019, 11:32 AM

@vladislavbelov Any comment on this patch ?

In D1493#70804, @Stan wrote:

@vladislavbelov Any comment on this patch ?

Did you test it? There is a chance that some values on edges may lead to a strange behaviour.

Currently all settings besides one or two IIRC take effect immediately, so players expect these to take effect immediately too.
Therefore you either have to mention that it requires a restart, like we do with the other settings, or actually make them take effect.

If some of the config values are truly not implemented like aeonios said, they should be removed, at least from this diff.

Therefore you either have to mention that it requires a restart, like we do with the other settings, or actually make them take effect.

The latter would be much better, especially to test out which values work best for one, adapting progressively. (It makes testing this patch much harder even, as one has to restart the game between value changes.)
I suppose it can be done in a separate diff if the c++ code is uncertain territory.

binaries/data/mods/public/gui/options/options.json
538

120 is too few actually. my local.cfg has view.scroll.speed = 300.0 and I couldn't play without it.

1 is the camera movement speed that is used when trailers are created, so perhaps one can even chose 0.5 or 0.1 as the minimum.

(I wonder if a logarithmic scale with 5-10 steps wouldn't be easier to chose values from, but one doesn't have to make things more complicated than necessary.)

Stan added a comment.Aug 21 2019, 2:04 PM

@anileapen05 still interested in working on this ?