Giter VIP home page Giter VIP logo

kujata's Introduction

Logo

kujata

Translates Final Fantasy 7 assets to web-friendly formats like JSON and glTF

Current Features

  • Translate FF7 field character models and animations (char.lgp) to JSON and glTF

    • battle model support coming soon
    • reverse translation (glTF-to-ff7) coming soon
  • Translate FF7 field scene data (flevel.lgp) to JSON

    • translates field scripts, gateways, tiles, palettes, textures, etc., but not all sections yet (only encounters is missing)
    • renders separate layers for background images
  • Translate FF7 kernel data (kernel.bin, kernel2.bin) to JSON

    • All sections except commandData, attackData, battleAndGrowthData, initData
    • Some improvements still to be made, mainly around consistent naming and materia data
  • Translate FF7 window data (window.bin) to multiple per palette pngs

    • All window icons and colours
    • All text icons and colours
    • Every asset with it's prefered palette colors in its own separate png
  • TIM and TEX file loaders and converts into per palette pngs

Pre-requisites and setup

How to translate field char data (field/char.lgp) to glTF

  • Run "node test-ff7-to-gltf-translator.js"
    • This translates AAAA.HRC (Cloud skeleton) to aaaa.gltf and aaaa.bin
      • uses AAFE.A (Cloud standing animation) as base structure in the output
      • includes all Cloud animations (based on Ifalna DB) in the output
  • Look at ff7-gltf/viewer/viewer.html for example of how to view in html page
  • Edit the js to translate other models as desired
  • For help, reach out to the author: [email protected]

How to translate field flevel data (field/flevel.lgp) to JSON

How to translate kernel data (kernel/kernel.bin, kernel/kernel2.bin) to JSON

How to translate .TIM of .TEX files into PNGs

  • Look at https://github.com/picklejar76/kujata/ff7-asset-loader/test-kernel-extractor.js
  • new TimFile().loadTimFileFromBuffer(file.buffer).saveAllPalettesAsPngs(outputFilePath)
  • new TimFile().loadTimFileFromPath(file.path).saveAllPalettesAsPngs(outputFilePath)
  • new TexFile().loadTexFileFromBuffer(file.buffer).saveAsPng(outputFilePath)
  • new TexFile().loadTexFileFromPath(file.path).saveAsPng(outputFilePath)

Thanks goes to...

  • qhimm community
  • Aali, for patching FF7, graphics work, lgp/unlgp utility, etc.
  • Borde, for authoring Kimera and TexTool_0.10
  • DLPB, for authoring too many tools to list here
  • ficedula, for authoring multiple tools, including lzs decompressor and Ifalna model viewer
  • Kaldarasha, for model editing experience and design advice, etc.
  • halkun, for evangelizing glTF, FF7 file spreadsheet, etc.
  • Sega Chief, for field model friendly names, etc.
  • quantumpencil, for sister-ray
  • Jusete, for finding a good kujata logo
  • others TBD; please let me know if I left out any person or acknowledgement!

kujata's People

Contributors

dangarfield avatar picklejar76 avatar goodmorninpluto avatar patrick-barnes avatar maciej-trebacz avatar dependabot[bot] avatar

Stargazers

Sumeet Agarwal avatar Vladimir Protopopov avatar Jake Stanley avatar  avatar TurBoss avatar Lucas Domanico avatar  avatar Charlie Wright avatar Man Sun avatar  avatar Mads avatar Robert Russell avatar Tommie Harper avatar Julian Xhokaxhiu avatar Jose Hernandez avatar  avatar Niema Moshiri avatar  avatar

Watchers

James Cloos avatar  avatar Lucas Domanico avatar

kujata's Issues

put animations in separate files

When including all compatible animations in the same output files as the model, the output files become very large. Animations should be split into separate files. Besides, they should be re-usable by multiple models. Use a modular approach.

add lgp support

Note: there is a separate issue to track "unlgp" support.

Users will want to "package" their reverse-translated assets back into *.LGP format.

Reverse translation in general takes higher priority than this issue.

ASPED field script opcode parsed incorrectly.

There's a bug in opcode parser which incorrectly parses ASPED 0xBD opcode. The S operand is a short, but is read as a byte. I've created a pull request #15 to fix this.

Should you accept this, would it be possible for you to regenerate metadata in the kujata-data repository? Because of this bug opcode lists are not correct. Thanks :)

Kujata needs a UI

Kujata currently doesn't have a UI.

Currently, users must run from command-line, and must edit app.js to change which model they want to translate.

The user is already required to install NodeJS, so it actually wouldn't be too difficult.

add glb support

Users should have the option to output a single glb packge file instead of gltf + bin.

add support for battle models (ff7-to-gltf)

The file format for field models and battle models are different.

Need to write a separate translator for battle models.

This issue will track ff7-to-gltf. A separate issue will track the reverse direction.

blender export

after gltf-to-ff7 is done, and after blender importer is done, develop blender exporter. this will finally provide an end-to-end solution for some modders.

Exported GLTFs don't match GLTF spec

Great tool, works really well with Three.js. However, I'm currently trying to migrate over to Babylon.js and it seems to be a bit stricter on how it handles GLTF files.

It's outputting the following error:

Unable to load from ./model/aaaa.hrc.gltf: attempting to construct out-of-bounds TypedArray on ArrayBuffer

From a bit of digging, it looks like this happens when an accessor with type VEC3 uses a buffer view with a non-multiple-of-4 byte offset. As per the spec:

For performance and compatibility reasons, vertex attributes must be aligned to 4-byte boundaries inside bufferView (i.e., accessor.byteOffset and bufferView.byteStride must be multiples of 4).

I'd be happy to take a look at fixing this, but don't actually have a copy of the source files to hand to test it. Wanted to flag it, incase it was something you were aware of/were able to easily fix.

Thanks again.

add unlgp support

Currently, users must use a separate utility, unlgp, to extract models from *.LGP files.

It would be nice if the translators could do this automatically.

translate multiple animations at a time

Add support to translate multiple animations at a time.

Could even be done automatically, since Ifalna DB is already integrated.

Update viewer.html to allow user to select different animation at runtime.

translate from gltf back to ff7 (field models)

Kujata translates from ff7-to-gltf, but not in the reverse direction.

The FF7 modding community will want the ability to translate from gltf back to ff7 so that they can play their modified models in FF7 PC.

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.