Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: VRAM Usage Estimator 1.6.0  (Read 1037 times)

Wispborne

  • Commander
  • ***
  • Posts: 109
  • Discord: Wisp#0302
    • View Profile
VRAM Usage Estimator 1.6.0
« on: September 16, 2020, 02:24:40 PM »




Are you curious how much VRAM each mod uses?
Well, look no further! This helpful thread by Dark.Revenant already has VRAM calculations for many mods: https://fractalsoftworks.com/forum/index.php?topic=8726.0

What's VRAM? How much do I need? What if I don't have enough?
Again, go check out Dark.Revenant's thread! https://fractalsoftworks.com/forum/index.php?topic=8726.0


Not all of my mods/versions are in that thread and/or I'm too lazy to add everything up!
Well, then, I have a tool for you. Based on a Python script by Dark.Revenant, converted to Kotlin, and modified...presenting the creatively-named VRAM Counter for Windows, Linux, and it might even work on MacOS, too!


Download

Source Code

What it does
- Gives mod-by-mod estimates of VRAM usage.
- Gives a total VRAM usage of all mods, plus a total including the vanilla game (this is the amount of VRAM your GPU needs to exceed)
- Additionally lets you see VRAM estimation with different GraphicsLib map options toggled; normal, material, and surface maps. Open up "config.properties" to configure.

What it does not do
- Tell you how much VRAM your computer has
- Tell you if you are exceeding what your PC can handle (just load the game and find out...)
- Promise to be exact. This is an estimate. For exact usage, run the game and compare before & after VRAM usage.

Usage
Unzip the folder into your mods folder, just like you were installing any other mod. Then open the folder and double-click on VRAM-Counter.bat.
On Linux/MacOS, try running "java -jar ./VRAM-Counter.jar" and see how that goes.



How do I check how much VRAM I have on Windows 10?
Spoiler
[close]

I'm a modder and I have a bunch of unused images in my mods that this tool is counting!
If you want, you can add "_CURRENTLY_UNUSED" to your image file name and the tool will ignore it. MesoTroniK specifically requested this feature.

How's it work?
Image VRAM use =
Code
((numOfChannels * bitsPerChannel) / bitsPerByte) * widthRoundedUpToNearestPowerOfTwo * heightRoundedUpToNearestPowerOfTwo * multiplier
Multiplier = 1x for background images and 1.33x for other images. The 1.33x is extra memory used for mipmapping.

Backgrounds are ignored if they are the same size as vanilla's backgrounds (because vanilla always has one background loaded, so a vanilla-sized background is not adding more VRAM use).
If the mod has one or more backgrounds that are larger than a vanilla background, then the largest of them is counted as additional VRAM used (additionalVRAMUse = modBackgroundVRAMUse - vanillaBackgroundVRAMUse).


Changelog
Spoiler
1.6.0
- Prompt for GraphicsLib settings on each run.

1.5.0
- Make it clearer what it and isn't counted when user only copy/pastes a single line from the output.
- Add all enabled mods to the summary view.
- Copy the summary to the clipboard so it may be easily pasted into chat.

1.4.0
- Total estimated use no longer counts images with the same relative path and name multiple times.
  - So if Mods A and B both have /graphics/image.png, both will have the size counted in the per-mod display, but it will be only counted once in the total.

1.3.0
- Now prints out estimated usage of *enabled mods*, in addition to all found mods.
- For readability, only the currently chosen GraphicsLib settings (in 'config.properties') are shown.
- Fixed the # images count incorrectly counting all files.
- Now shows mod name, version, and id instead of mod folder name.
[close]

« Last Edit: November 22, 2020, 06:24:45 PM by Wispborne »
Logged

Draco

  • Ensign
  • *
  • Posts: 19
    • View Profile
    • Email
Re: VRAM Usage Estimator
« Reply #1 on: September 16, 2020, 09:23:23 PM »

Good work
Logged

SukmaZaki

  • Commander
  • ***
  • Posts: 151
    • View Profile
Re: VRAM Usage Estimator
« Reply #2 on: September 17, 2020, 08:11:40 AM »

Thanks for your hardwork! Really appreciate it!  ;D
Logged

Wispborne

  • Commander
  • ***
  • Posts: 109
  • Discord: Wisp#0302
    • View Profile
Re: VRAM Usage Estimator 1.3.0
« Reply #3 on: September 20, 2020, 06:45:11 PM »

1.3.0

- Now prints out estimated usage of *enabled mods*, in addition to all found mods.
- For readability, only the currently chosen GraphicsLib settings (in 'config.properties') are shown.
- Fixed the # images count incorrectly counting all files.
- Now shows mod name, version, and id instead of mod folder name.

https://github.com/davidwhitman/VRAM_Calculator/releases/tag/1.3.0

Wispborne

  • Commander
  • ***
  • Posts: 109
  • Discord: Wisp#0302
    • View Profile
Re: VRAM Usage Estimator 1.4.0
« Reply #4 on: September 21, 2020, 04:48:49 PM »

1.4.0
- Total estimated use no longer counts images with the same relative path and name multiple times.
  - So if Mods A and B both have /graphics/image.png, both will have the size counted in the per-mod display, but it will be only counted once in the total.

Wispborne

  • Commander
  • ***
  • Posts: 109
  • Discord: Wisp#0302
    • View Profile
Re: VRAM Usage Estimator 1.5.0
« Reply #5 on: October 10, 2020, 02:40:12 PM »

1.5.0
- Make it clearer what it and isn't counted when user only copy/pastes a single line from the output.
- Add all enabled mods to the summary view.
- Copy the summary to the clipboard so it may be easily pasted into chat.

Wispborne

  • Commander
  • ***
  • Posts: 109
  • Discord: Wisp#0302
    • View Profile
Re: VRAM Usage Estimator 1.6.0
« Reply #6 on: November 22, 2020, 06:26:26 PM »

1.6.0
- Prompt for GraphicsLib settings on each run.

I suspect that many users did not realize that the default was to assume GraphicsLib was fully enabled, which meant that this tool over greatly overestimate VRAM usage if GraphicsLib was disabled.
If GraphicsLib is not enabled at the mod level, the user is not prompted.