Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to suppress compression on custom asset type?

We have a custom audio asset type that stores audio sample data in OGG format within the asset. Is it possible to somehow override the packaging settings on a per asset basis, to prevent the asset being compressed even if the user has enabled 'Compress Cooked Packages'?

Product Version: UE 4.13
more ▼

asked Oct 27 '16 at 12:20 PM in Packaging & Deployment

avatar image

2.1k 83 37 121

avatar image AndrewHurley Oct 28 '16 at 09:07 PM

Hey kamrann,

So you are attempting to keep your audio uncompressed when packaging?

You can control the compression on a per sound asset basis within the Sound Wave itself. You can also try to use the option within the Packaging settings called 'Additional Non-Asset Directories to Copy'.

Let me know if you have additional questions.


Andrew Hurley

avatar image kamrann Oct 28 '16 at 09:16 PM

Hi Andrew. This isn't a sound wave, it's a custom asset type, the internal data of which is already compressed. What I want to avoid is the asset itself then being compressed in the pak file.

From what I can see, it appears each uasset ends up as a file within the pak. From my debugging it seems that when -compressed is used on the cook command line, some files within the pak end up compressed, others don't. My asset is being compressed and I don't want it to be, so I was hoping to find out how this is controlled in code.

avatar image AndrewHurley Oct 31 '16 at 03:36 PM

Did you try and read the option I mentioned? alt text

There is also the option of adding 'Directors to Never Cook.'

One of these two options should get you to the correct packaging settings so your custom asset is not added to the .pak file.

Thank you,

Andrew Hurley

avatar image kamrann Oct 31 '16 at 04:09 PM

My custom asset is not a raw file, it is a uasset and needs to be cooked, and added to the pak if the user has chosen to use a pak file. I simply want it to not be compressed.

As I said, from debugging it appears that some assets do avoid being compressed even when 'Create compressed cooked content' is checked, I'm trying to find out if/how I can get the same behavior for my custom asset type.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There is no way currently to control this through an in editor setting or preference, however if you modify the WritePakResponseFile function in CopyBuildToStagingDirectory.automation.cs you can choose which files get compressed or not.

This is the only way to currently control what gets compressed/uncompressed when adding to a .pak file and using the packaging settings aforementioned.

Thank you,

Andrew Hurley

more ▼

answered Oct 31 '16 at 06:59 PM

avatar image kamrann Nov 01 '16 at 11:37 AM

I see, so the compression is performed at a later stage by the automation tool it seems. I wonder why it appeared from debugging that some of the contents were compressed and others not then?

Anyway it seems like what I wanted to do isn't possible without engine changes. Thanks for looking into it Andrew.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question