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

import unity's improvements to crnlib #70

Merged
merged 1 commit into from Mar 5, 2018

Conversation

Projects
None yet
2 participants
@illwieckz
Copy link
Member

illwieckz commented Feb 11, 2018

See https://forums.unvanquished.net/viewtopic.php?f=4&t=2158
for a large forum post explaining what's happening.

Basically, Unity is shipping an improved crnlib within their own tools
and they litterally broke the format to make it better.

See https://github.com/Unity-Technologies/crunch/tree/unity
for the original unity's crunch code.

See https://github.com/illwieckz/crunch/tree/unity-daemon
for a temporary branch applying our improvements above unity's ones.

Using their tool on a corpus large by 1979 files from our asset repository
I reported that compression time was divided by more than 4 (reducing from
multiple hours to less than half one) and more than 11% file space saved
in comparison with the crnlib version we currently use (which is an older
version of the same source tree they use).

Since next release will use DPK format instead of PK3 one it's the very good time to
also break this kind of stuff since we already have to re-ship everything. Community mappers
gave permission to repackage and recompress their maps so we can do it
without losing anything: neither our stuff, neither third-party stuff.

See also https://forums.unvanquished.net/viewtopic.php?f=33&t=2153
for a forum post about asset repackaging for next release.

import unity's improvements to crnlib
See https://forums.unvanquished.net/viewtopic.php?f=4&t=2158
for a large forum post explaining what's happening.

Basically, Unity is shipping an improved crnlib within their own tools
and they litterally broke the format to make it better.

See https://github.com/Unity-Technologies/crunch/tree/unity
for the original unity's crunch code.

See https://github.com/illwieckz/crunch/tree/unity-daemon
for a temporary branch applying our improvements above unity's ones.

Using their tool on a corpus large by 1979 files from our asset repository
I reported that compression time was divided by more than 4 (reducing from
multiple hours to less than half one) and more than 11% file space saved
in comparison with the crnlib version we currently use (which is an older
version of the same source tree they use).

Sonce next release will broke the DPK format it's the very good time to
also break it since we already have to re-ship everything. Community mappes
gave permission to repackage and recompress their maps so we can do it
without losing anything: neither our stuff, neither third-party stuff.

See also https://forums.unvanquished.net/viewtopic.php?f=33&t=2153
for a forum post about asset repackaging for next release.
@illwieckz

This comment has been minimized.

Copy link
Member Author

illwieckz commented Feb 11, 2018

I rebuilt the whole unvanquished resources, textures sets and map packages using that new crunch, same with community maps I maintain and the ones from Matth and tvezet, everything looks fine once the engine is running the changes from that PR. It ran around an hour to process everything instead of half a day.

@illwieckz

This comment has been minimized.

Copy link
Member Author

illwieckz commented Feb 18, 2018

To get your textures rendered fine with these changes you need to compress your files using this crunch:

DaemonEngine/crunch

To compress normal maps you must use the -rtopmip option with the --renormalize one.

@illwieckz illwieckz merged commit 41a7746 into DaemonEngine:for-0.51.0 Mar 5, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
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.