Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split iIMDShape, separate game state data from display data, + initial graphics overrides support #3350

Merged
merged 19 commits into from
Sep 7, 2023

Conversation

past-due
Copy link
Member

@past-due past-due commented Aug 23, 2023

Note
Requires: #3307

This draft PR implements several key core changes:

  1. Split iIMDShape, separate game state data from display data
    • iIMDBaseShape is the base data that can be safely used for game state calculations, and is always derived from the base model data. It contains a pointer to the display iIMDShape data (used for display purposes only), which may be loaded from a different place (i.e. graphics overrides).
  2. Support tileset TEXTURE overrides in PIE 4
  3. Basic under-the-hood support for new "graphics overrides" support
  4. Refactoring of how textures are compressed as part of the build process

Graphics Overrides

This PR implements the basics to support graphics overrides.

The goal: Use the same (base) game data for all game state calculations / the simulation, but support using a different set of data for rendering / display purposes.

Use-case: To allow future bundling of ARMod / high quality models, and allow players to play versus each other while independently deciding whether to use classic, normal, or ARMod/HQ models for the visual appearance of the game.

To test this right now:

  • Extract ARMod, and place in <config dir>/graphics_overrides/curr (this may change before this PR is ultimately ready for merging)
    • This should cause ARMod models and textures to be rendered, however all game state calculations should use data extracted from the base (default) models.

Future TODOs (in a subsequent PR):

  • Similar to terrain overrides, provide configuration in Options (and enumeration of graphics_overrides). (Presumably allow these to be packaged, like terrain overrides?)

@past-due past-due force-pushed the 2023_08_graphics_mods_3 branch 3 times, most recently from b492fd8 to 9846d66 Compare September 6, 2023 20:36
iIMDBaseShape is the base data that can be safely used for game state calculations, and is always derived from the base model data.

It contains a pointer to the *display* iIMDShape data (used for display purposes only), which may be loaded from a (future) graphics override mod.
The TILESET, TCMASK, NORMALMAP, and SPECULARMAP directives now support using the first parameter to specify a tileset override.

Specifically:
0 = default, arizona
1 = urban
2 = rockies
Convert a specular-map .png to a luma, single-channel, grayscale .png (using the exact same algorithm that WZ uses internally), and exit.
@past-due past-due changed the title [WIP] Split iIMDShape, separate game state data from display data, + new graphics overrides support Split iIMDShape, separate game state data from display data, + new graphics overrides support Sep 6, 2023
@past-due past-due changed the title Split iIMDShape, separate game state data from display data, + new graphics overrides support Split iIMDShape, separate game state data from display data, + initial graphics overrides support Sep 6, 2023
@past-due past-due marked this pull request as ready for review September 6, 2023 23:05
@past-due past-due merged commit c40d591 into Warzone2100:master Sep 7, 2023
31 checks passed
@past-due past-due added this to the 4.4.0-beta1 milestone Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant