Giter Site home page Giter Site logo

ggtool's People

Contributors

jonsth131 avatar r1sc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ggtool's Issues

PNG to KTXBZ

Also ggtool doesnt convert all ktxbz to png, there are many skipped ones.
a few examples:
LowStreetBackHouse1Lamp-hd.ktxbz
BeachHermitCrab-hd.ktxbz
ArrivePart4-hd.ktxbz
and many others

Could you please add decompress and compress methods to ggtool?
PNG to KTXBZ
KTXBZ to PNG

Thanks

Convert ktx-textures to png

Maybe we should consider converting the ktx-textures to something like png?

KTX is a Khronos file format for sending prepared textures to the GPU. Looking at the RTMI-textures, they seem to be compressed with BPTC which is a format the GPU can decompress on the fly.

I couldn't find much about decompressing BPTC, except for this repo which contains C-code for decompressing them:
https://github.com/hglm/detex

I we're really motivated, we could port it to a sys-crate.

Another option is to create an OpenGL context and render the texture to a renderTexture to "read-it-back" so to speak. It can then be encoded to png with the png-crate.

KTXBZ file got extracted but not the PNG (macOS)

Getting this error while extracting some files. The KTXBZ file gets extracted, but not the PNG.

Extracting Locksmith1-hd.ktxbz. Size = 11416, offset = 1088884480
Inflating...
Decompressing BPTC texture...
thread 'main' panicked at 'Contexts must be destroyed explicitly with `destroy_context`!', /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/surfman-0.4.3/src/platform/macos/cgl/context.rs:95:13

Note: Build was compiled with "decompress_ktx"

Works for all files except the first one...

$ ~/ggtool extract-files Weird.ggpack1a "*" extracted/
Extracting AbandonedPirateCamp.wimpy. Size = 8170, offset = 16
Extracting AbandonedShip.wimpy. Size = 14696, offset = 8192
Extracting Alley.wimpy. Size = 4082, offset = 22896
Extracting AlleyPart5.wimpy. Size = 4023, offset = 26992
Extracting BLANK.yack. Size = 227, offset = 31024
Extracting BarPirates.yack. Size = 6338, offset = 31264
Extracting BarebonesIsland.wimpy. Size = 7221, offset = 37616
Extracting BelowCliff.wimpy. Size = 12181, offset = 44848
Extracting BelowCliff.yack. Size = 17840, offset = 57040
Extracting Blizzard.emitter. Size = 2362, offset = 74880
Extracting BlizzardOverview.emitter. Size = 2683, offset = 77248
Extracting BlizzardQuarry.emitter. Size = 2364, offset = 79936
Extracting Bonfire.emitter. Size = 4051, offset = 82304
Extracting Bonfire2.emitter. Size = 8135, offset = 86368
Extracting BonfireDistant.emitter. Size = 7814, offset = 94512
Extracting BonfireScumm.emitter. Size = 6870, offset = 102336
Extracting BottleBubbles.emitter. Size = 2251, offset = 109216
Extracting BrrrMudaOverview.wimpy. Size = 3998, offset = 111472
thread 'main' panicked at '1 is not a known GGValueType', libdinky/src/directory.rs:34:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

list-files works...

[
"AbandonedPirateCamp.wimpy",
"AbandonedShip.wimpy",
"Alley.wimpy",
"AlleyPart5.wimpy",
"BLANK.yack",
"BarPirates.yack",
"BarebonesIsland.wimpy",
"BelowCliff.wimpy",
"BelowCliff.yack",
"Blizzard.emitter",
"BlizzardOverview.emitter",
"BlizzardQuarry.emitter",
"Bonfire.emitter",
"Bonfire2.emitter",
"BonfireDistant.emitter",
"BonfireScumm.emitter",
"BottleBubbles.emitter",
"BrrrMudaOverview.wimpy",
"Bubbles.emitter",
"BubblesBlowfish.emitter",
"BubblesPlungeFloodedCave.emitter",
"BubblesPlungeOffshore.emitter",
"BubblesPlungeUnderShip.emitter",
"BubblesStream.emitter",

too long to paste it all...

Unable to extract KTXBZ (macOS)

There are several KTXBZ files that I am unable to extract. The error seems related with the BZ compression.

Extracting MonkeyHead2-hd.ktxbz. Size = 9530480, offset = 1006135040
Inflating...
thread 'main' panicked at 'Failed to inflate compressed data: "unknown ZLIB method CM=0x0"', libdinky/src/ggpack.rs:136:52

Error when inflating, "unknown ZLIB method CM=0xf"

Hi there, currently using MacOS 12.6.

ggtool v0.1.0

Getting the following error when trying to extract EndStingers_1-hd.ktxbz from Weird.ggpack5a:

Error when inflating, "unknown ZLIB method CM=0xf", saving raw data.

Other ktxbz files don't have this error. Seems like there might be something unique about the "EndStingers_" series of files. (Although I'm getting a blank PNG with other ktxbz files.)

NEW ggtool doesnt make PNG

Your NEW ggtool doesnt make PNG anymore... I have to use old one to make it work.
Please fix it.

Example: extract 5a or 5b ggpack from RTMI. ktxbz is not converted at all. Png doesnt exist.

Release?!

Can you please release windows or linux binaries?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.