Opened 10 years ago

Closed 8 years ago

Last modified 7 years ago

#2596 closed defect (fixed)

[PATCH] Graphical settings in option menu do not enable spec/normal/ao maps.

Reported by: Michael D. Hafer Owned by: mimo
Priority: Must Have Milestone: Alpha 20
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by fabio)

The current graphics menu options will not switch on spec maps, normal maps, and AO maps for buildings and/or units.

A more comprehensive look at these graphical features may be needed in order to make them changeable/enabled via the options menu.

EDIT: once this is implemented hwdetects.js could be updated to enable by default maximum material quality when on OpenGL4+.

Attachments (3)

ticket2596.patch (21.8 KB ) - added by mimo 8 years ago.
ticket2596.2.patch (23.0 KB ) - added by mimo 8 years ago.
updated version with update of messages.json and checks on function use
options.patch (2.4 KB ) - added by fabio 8 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 by Michael D. Hafer, 10 years ago

Description: modified (diff)

comment:2 by historic_bruno, 10 years ago

Copied for convenience:

If anyone wonders, those come from material quality settings in default.cfg, and it's not obvious how they work, you really have to look at the material XML to understand. We should change that (also needs a ticket), but for now, we could have material quality settings like "High", "Medium", "Low" in the options screen, and explain roughly what they change. In other words, don't directly put numeric controls for them in the UI because they are so arbitrary.

comment:3 by Michael D. Hafer, 10 years ago

Ticket #2506 is relevant.

comment:4 by historic_bruno, 10 years ago

Did a little digging, here is what material quality does with the current materials:

0-1: "default"
2: AO
3-7: AO+specular
8+: AO+specular+parallax

Except a few aren't consistent, player_trans_spec.xml and player_trans_spec_helmet.xml enable specular at 1, and basic_trans_spec.xml enables specular at 2.

comment:5 by historic_bruno, 10 years ago

Looked at the options code, and as it's designed now, I don't see a way of doing this that isn't a messy hack. It basically pre-populates a bunch of GUI controls in predefined locations, so I couldn't place a dropdown (low, medium, high) in there very easily. I don't see the advantage of this approach either, IMO options screens will need to be designed by hand to be usable. It's just a semi-ordered jumble of options now.

comment:6 by historic_bruno, 10 years ago

Priority: Release BlockerMust Have

comment:7 by Stan, 10 years ago

Can't you just add a enable advanced graphics ?

in reply to:  7 comment:8 by historic_bruno, 10 years ago

Replying to stanislas69:

Can't you just add a enable advanced graphics ?

I don't really like adding a config option to change another config option, it creates a yucky dependency (it would have to set the material quality, but also test the material quality so the default value matches any manual config). This is a flaw in the current system, but not the worst.

Last edited 10 years ago by historic_bruno (previous) (diff)

comment:9 by Itms, 10 years ago

Milestone: Alpha 17Alpha 18

The options page should be improved somehow in A18.

Last edited 10 years ago by Itms (previous) (diff)

comment:10 by Stan, 9 years ago

Not likely to happen before A18 pushing...

comment:11 by Stan, 9 years ago

Milestone: Alpha 18Alpha 19

comment:12 by mimo, 9 years ago

Milestone: Alpha 19Alpha 20

comment:13 by fabio, 8 years ago

Description: modified (diff)

by mimo, 8 years ago

Attachment: ticket2596.patch added

comment:14 by mimo, 8 years ago

Keywords: review added
Summary: Graphical settings in option menu do not enable spec/normal/ao maps.[PATCH] Graphical settings in option menu do not enable spec/normal/ao maps.

The previous patch adds a dropdown capacity for the options, and fixes this ticket by allowing Low, mediam and High quality for the material quality option. In addition, the list of options which were previously in the js file are now put into a separate json file.

by mimo, 8 years ago

Attachment: ticket2596.2.patch added

updated version with update of messages.json and checks on function use

comment:15 by mimo, 8 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 17657:

add dropdown capacity for options, fixes #2596
remove use of eval for function execution

comment:16 by mimo, 8 years ago

Component: Core engineUI & Simulation
Keywords: review removed

comment:17 by fabio, 8 years ago

Thanks, this is a lot better now! Some comments:

  • eventually there could be an additional level for quality=0 (lower than the current default of 2, to disable everything as explained in comment:4) and map the higher level to 10 (default.cfg says this is the higher value, and may be used somewhere), so to have Low=0, Medium=2, High=5, Maximum=10; (and is using a float value needed? the current default uses 2.0)
  • it would be nice to support changing it without restarting the game, as with other options. IIRC this should also be needed to be able to modify it from hwdetect.js;
  • also I would move the quality setting in third position after Post Processing (since this is dependent on it and one of the most useful graphic setting).

comment:18 by mimo, 8 years ago

Not sure about the levels going up to 10. Doing a grep of quality in public/art/materials, we only see values ranging from 1 to 8. Maybe there are other values defined elsewhere, and i don't know that part well enough. But feel free to modify it if you know more than me about it. Same thing about a possible improved ordering of the options. Modifying the display of the options is now mainly editing the options.json file: options are displayed in the same order as they are written in the json. You would only need to modify the code (options.js) if you want to add new entries in the dropdown quality because of the non one-to-one correspondance between the quality levels and the dropdown values, but this is only editing lines 192 and 212 of options.js (if more dropdowns are added later, we may implement a nicer way to also automatize that directly from the json).

comment:19 by fabio, 8 years ago

A proposal:

  • add the lowest level with quality 0;
  • use 10 for the maximum level, as suggested by default.cfg (to include eventual future values higher than 8);
  • move quality setting under Post Processing, also move Shadow Filter under Shadow;

by fabio, 8 years ago

Attachment: options.patch added

comment:20 by mimo, 8 years ago

Have you checked what the c++ code does with your proposed changes:

  • does level 0 exists ? I've only find indications from 1 to 8. And if not, have you checked that the code switches to 1 when it finds 0 ? and if 0 does not exist, why not have 1 for the minimum level (having in the config file levels which really exist would simplify any future debug if ever needed. We should only change the options when new levels are added, and not anticipate them based on a comment written somewhere some years ago).
  • same questions for 10 ? does the code switches to the highest value which exists ? and even if it does, what is the rationale to not have this highest existing value in the options ?

Apart from that, the patch itself to change the order and add a 4th level looks ok to me.

comment:21 by fabio, 8 years ago

I don't have time currently to properly check this, I proposed values of 0 and 10 as it was stated in default.cfg (0 was the default until r17195, 10 is still suggested to enable effects).

comment:22 by mimo, 8 years ago

I suppose what we need at this stage is somebody to go through all these material qualities, and understand what they really mean. But it's maybe better to continue this discussion on #3737 or reopen a new ticket for this improvment.

comment:23 by elexis, 7 years ago

In 20102:

Remove unneeded parameters nesting from the options page following rP17657, refs #2596.
Add +1 tab for the affected lines following rP20101, refs D805.

Note: See TracTickets for help on using tickets.