Skip to content

Use higher colour depth R16 sprites in D2k.#21240

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
pchote:d2k-r16
Dec 20, 2023
Merged

Use higher colour depth R16 sprites in D2k.#21240
PunkPun merged 1 commit into
OpenRA:bleedfrom
pchote:d2k-r16

Conversation

@pchote
Copy link
Copy Markdown
Member

@pchote pchote commented Dec 6, 2023

The OG D2k shipped with a graphics option to use 8-bit or 16-bit sprites:

  • The "8-bit" option is the R8 that we're all familiar with; indexed sprites that (with a couple of exceptions) used a single global palette.
  • The "16-bit" option (R16) actually mainly still used indexed sprites (to support player remapping) but every frame defined its own individual palette to reduce colour banding. The terrain did use real 16-bit sprites.

This PR completes the transition towards supporting non-paletted sprites as a first-class feature by switching D2k over to these higher colour sprites. The 16-bit and embedded-palette frames are converted to 32-bit when loaded, and remapped to player colours using the ColorShift logic.

The main disruption is that we did not previously install or download the R16 assets, so the content must be reinstalled. I have followed the example from the first time we did this by installing the new asset set to a v3 subdirectory that is independent from the v2 used by current installs. OpenRA/OpenRAWebsiteV3#52 will need to be merged before the downloads will work.

The actual visual improvements are subtle, and mainly visible in the explosion effects and sidebar icons. The quickest way to get an overview of the improvements is to use the --dump-sequence-sheets utility command before and after, then blink between the two versions.

@pchote
Copy link
Copy Markdown
Member Author

pchote commented Dec 6, 2023

I tagged a test build for anyone who wants to try this (but remember that the asset download still requires the website PR to be merged)

https://github.com/pchote/OpenRA/releases/tag/devtest-20231206

@Porenutak
Copy link
Copy Markdown
Contributor

Required patch 1.06 is not on any ISO and cant be downloaded. Manual extraction of 1.06 into V3 folder also dont work. Is there any other option here?

@pchote
Copy link
Copy Markdown
Member Author

pchote commented Dec 7, 2023

Options:

  1. Install gruntmods d2k and use that as the assets source
  2. Nag people to merge the OpenRAWeb PR
  3. Manually extract d2k-quickinstall-v3.zip into Content/d2k/v3

@Porenutak
Copy link
Copy Markdown
Contributor

Porenutak commented Dec 9, 2023

Do we know from where .tpm tiles origins are? because some will need update to r16.
If they are community made Im certain there will be R16 equivalent somewhere.
sand platform:
r8 r16 compare

Rock-Rock tiles are mostly fine:
rock-rock

difference between r8/16 sand is most visible:

rock-sand

@Porenutak
Copy link
Copy Markdown
Contributor

I found R16 Rocktiles:
https://forum.dune2k.com/topic/29942-release-rock-tileset/
SandPlatform will be easy to fix by hand.

I will add them in my own PR.

Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged OpenRA/OpenRAWebsiteV3#52

Screenshot 2023-12-15 at 13 51 14

and a crash

Exception of type `System.NullReferenceException`: Object reference not set to an instance of an object.
   at OpenRA.Renderer.Dispose() in OpenRA/OpenRA.Game/Renderer.cs:line 537
   at OpenRA.Game.Run() in OpenRA/OpenRA.Game/Game.cs:line 896
   at OpenRA.Game.InitializeAndRun(String[] args) in OpenRA/OpenRA.Game/Game.cs:line 313
   at OpenRA.Launcher.Program.Main(String[] args) in OpenRA/OpenRA.Launcher/Program.cs:line 32

a bit later I got
Screenshot 2023-12-15 at 13 55 53

Screenshot 2023-12-15 at 13 57 54

@pchote
Copy link
Copy Markdown
Member Author

pchote commented Dec 17, 2023

Fixed the quickinstall download sha1 (it had incorrectly duplicated the patch106 hash) and rebased.

I'm not able to reproduce the "mirror not available" or NRE errors.

Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PunkPun PunkPun merged commit 34ff23d into OpenRA:bleed Dec 20, 2023
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented Dec 20, 2023

Changelog

@xcom169
Copy link
Copy Markdown

xcom169 commented Mar 5, 2025

Do you need the CD disc for the new sprites or webinstall is enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants