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

Add --dump-sequence-sheets Utility command. #15094

Merged
merged 1 commit into from Apr 30, 2018

Conversation

Projects
None yet
4 participants
@pchote
Copy link
Member

pchote commented Apr 29, 2018

This PR adds a utility command to export the sequence texture atlas that is uploaded to the GPU.
There are two main use cases for this:

  • Allowing mods to be aware of and optimize their sprite layout to improve their rendering performance.
  • Providing a testcase for my next set of PRs that will improve the texture packing to get RA and TD down to a single sheet (4 exported layers).

Testcase:

  • Run OpenRA.Utility.exe ra --extract temperat.pal to extract the temperat.pal
  • Run OpenRA.Utility.exe ra --dump-sequence-sheets temperat.pal TEMPERAT to dump the sheets for the default mod rules on the TEMPERAT tileset (or substitute a different tileset or a path to a map).
  • Inspect 0-6.png in your favourite image viewer.
Add --dump-sequence-sheets Utility command.
This can be used to debug and optimize the texture
data that is uploaded to VRAM.
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Apr 29, 2018

Ping @CombinE88. This is what I have been referring to in the past when I talked about reordering sequences to reduce batch breakage.

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Apr 29, 2018

Wow, TD even needs one more png than RA.

@GraionDilach
Copy link
Contributor

GraionDilach left a comment

👍

@GraionDilach

This comment has been minimized.

Copy link
Contributor

GraionDilach commented Apr 29, 2018

Also pinging @ABrandau since he also has a lot of issues with wrapping his head around this particular logic.

@ABrandau

This comment has been minimized.

Copy link
Contributor

ABrandau commented Apr 29, 2018

Your test case works, tho i tried to use this moving my mod folder to a compiled version of your branch and got some errors, I tested TS on the other hand and I notice some fun waste of space with the UFO, so, what am I supossed to look for on these images?
ts ufo

@reaperrr reaperrr merged commit 952f41b into OpenRA:bleed Apr 30, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@GraionDilach

This comment has been minimized.

Copy link
Contributor

GraionDilach commented Apr 30, 2018

For the record, both AS and SP are over 40 sheets at this point. (is that bad? :D) And I've already noticed some SHP errors in AS and a HUGE flaw in SP. The former won't free a sheet though, but the latter can save 5 I think.

@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Apr 30, 2018

Yes, very bad. On the bright side, it does mean that your render perf should improve significantly when we switch to array textures.

@GraionDilach

This comment has been minimized.

Copy link
Contributor

GraionDilach commented Apr 30, 2018

RA2 also has 35 and I don't see much room for improvement tbh (at best, one-two sheets could be optimized out). IIRC it already has all the civilian assets set up by now, so that is more-or-less the final amount - I guess this is something we have to live with.

@pchote pchote deleted the pchote:dump-sequence-sheets branch Jul 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.