A guide to var textures optimization

Guides A guide to var textures optimization

hazmhox

Moderator
Featured Contributor
Messages
917
Reactions
5,855
Points
123
hazmhox submitted a new resource:

A guide to var textures optimization - Because SSD space counts!

⚠ PLEASE:
  • If you like this resource, consider liking and reviewing it for the community
  • Take your time to read. I will not answer private messages asking questions about things that are actually explained in the tutorial.

View attachment 186025

Intro

VaM is hard, yeah. Creating content requires a lot of time to understand all the complex mechanics of the game. And optimization is something even harder because it's...

Read more about this resource...
 
Thanks for this guide! I didn't know about SuperPNG, super useful :)

First thing that crossed my mind when I saw that was that I could optimize & even add some textures to the Texture Pack I pulled together.
When I made this pack, I saved all images as JPG unless it was lighter as PNG (which was rarely the case). For size reduction purposes, of course.

Here are the results of my first tries with SuperPNG. In some case, it's heavier that JPG files. In other cases, it's lighter but not by that much:
1670841540315.png


I'm not sure it's worth breaking legacy for a small size gain (even though it's multiplied by maybe close to a hundred of files)...
And as they were previously saved as JPG, I'm not sure about quality loss. By any chance, do you know anything about this?

I think I'll convert only the existing PNG files. I've seen an improvement (size-wise) on all of them so far. It would be a small gain - better than nothing! :)


Anyway, I just wanted to point out that JPG files can be lighter than even SuperPNG ones. Maybe with a bigger quality loss, though - I'm not sure.
 
Last edited:
Thanks for this guide! I didn't know about SuperPNG, super useful :)

{...}

Anyway, I just wanted to point out that JPG files can be lighter than even SuperPNG ones. Maybe with a bigger quality loss, though - I'm not sure.

Thank you for your awesome feedback ZRSX!

I actually just posted an updated talking about jpg and normals.
It is kind of an heresy (for a gamedev) to compress normals as jpgs :p

jpg is perfect for any non-indexed pictures. From diffuse to glossiness, yup you can... and will benefit from the compression. If your textures are indexed on the other hand (and png is extremely good at this). It is really hard to beat the original png filesize even with jpg.

But yeah you're right, if your file is released, it's not cool to break the legacy content. This is more a tutorial to follow and apply before the release of a character or clothings.

Another note (maybe I should add it to the guide): it is pretty pointless to convert back to png if you don't have the source files. Seeing your files, I highly suspect you're working with something like substance, so that might not be your case. But for other people: starting from a lossy format to go to a lossless format will not improve the quality.
 
I actually just posted an updated talking about jpg and normals.
It is kind of an heresy (for a gamedev) to compress normals as jpgs :p
Oh wow, very neat - thanks!
Learnt something new today :)

FYI, I tried on a texture I wanted to add (with the SuperPNG size gain, I should be able to include it).
Original:
1670846727675.png

PNG files optimized with SuperPNG vs JPG (you'll notice I didn't do a JPG version of the normal file ^^):
1670846550252.png

Interestingly, in this case the only winner for PNG is the metallic file, which seems to be a single chunk of unified color.
I'll check into VAM if there are any clear quality loss. Edit: comparing with the source files, there is none - as far as my eyes can see!


Seeing your files, I highly suspect you're working with something like substance, so that might not be your case.
Nope, I work with Photoshop only. I gathered CC0 files, that's all :p

I should have the original files of everything. I'll check if I converted normal PNG files to JPG, just to know if I messed things up a bit. It's been quite a while, I'm not sure how much I could have converted. Hopefully not much.
The few I checked so far were initially JPG, so... not my fault 🤭
 
Last edited:
Yup!

You're confirming the tutorial, and that's super useful :)
  • Pretty much any RGB file will be either smaller with jpg or somewhat similar if you don't compress a bit more. (compared to the png files).
  • It is highly likely that an indexed file will be smaller in png format (which is what your metallic might be) than in jpg.
  • The normal kept as a png will generally be smaller with SuperPNG and max quantization with pretty much no difference.
It's just a matter of knowing how are your source files and which type of target file type you should use.
I'm working with several different batch to handle that pretty quickly before release!
 
Great guide!

My only note would be around the alpha channel description. " don't forget to set the Alpha Channel properly" could use a little clarification, as it assumes everybody knows how to do this. For newbies, this raises questions rather than answering them.

You go on to say that for Vam textures, it should be off. But that's not entirely true, as it should be set to "transparent" for decal textures, right?


For clarity, I'd suggest just saying the alpha channel should be set to "transparent" for decals and "none" for everything else.

Keep up the good work!
 
Great guide!
My only note {...}

Thank you DJ!
Great suggestions, I was indeed way less didactic on that part. Force of habit I guess! I fixed it and made perfectly clear for all the texture channels. I also improved and made more accurate some sentences about the compression in general.

Thank you very much for that feedback!

@ZRSX <3 I'm glad you find an interest in making cool optimized releases : D
 
Amazing resource thank you Hazmhox :love: I hope to try it soon.

I wanted to add this resources link about the normal maps in VAM. For a quicker workflow I made a photoshop action to invert the green channel when creating my normal maps for clothing/skin textures. Although some pre-existing normal maps need the red channel inverted.


1731-d3645309893ee0b70b18d570d8d27967.data
 
Last edited:
Back
Top Bottom