Giter VIP home page Giter VIP logo

ctr-tools / ctr-tools Goto Github PK

View Code? Open in Web Editor NEW
140.0 14.0 14.0 4.78 MB

Crash Team Racing (PS1) tools - a C# framework and a set of tools by DCxDemo to parse files found in the original kart racing game by Naughty Dog (and a bit of Crash Bash too).

Home Page: https://discord.gg/WHkuh2n

License: GNU General Public License v2.0

C# 94.24% Kaitai Struct 4.96% Batchfile 0.22% HLSL 0.58%
ps1 crash-team-racing unpacker ctr psx playstation howl midi converter crash-bandicoot

ctr-tools's Introduction

CTR-tools

GPLv2 License Discord Chat

Various tools to operate Crash Team Racing (PS1) game files.

Download latest release here: https://github.com/CTR-tools/CTR-tools/releases/latest
Tools description: https://github.com/CTR-tools/CTR-tools/wiki/Tools-description

Join the CTR-tools Discord server: https://discord.gg/WHkuh2n

Features

  • fly around the original CTR levels in a 3D viewer, including a stereoscopic 3d mode
  • extract and rebuild BIGFILE.BIG, human readable filenames and folder structure included
  • extract levels in OBJ format featuring medium texture quality
  • extract static models and import untextured models back in the game
  • extract samples in VAG/WAV formats and music tracks in MIDI format from KART.HWL
  • edit level vram textures
  • edit localization files
  • minor Crash Bash support: unpack CRASHBSH.DAT from various CB builds and extract textures

CTR-tools

Building

CTR-tools is being developed in Visual Studio Community 2019.
Target platform is .NET Framework 4.6.2 (ctrviewer is targeting .NET Core 3.1).
It should be enough to install VS and add dependencies via NuGet.

Project dependencies:

Contribution

Game research is welcome, for starters please check:

2016-2022, DCxDemo*.

ctr-tools's People

Contributors

ctr-branch avatar dcxdemo avatar mateusfavarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctr-tools's Issues

[tim/vrm] Optimize Tim class

Texture loading process is currently a slow mess.

  • optimize
  • do all conversions in RAM
  • avoid intermediate 4 bit BMP conversion
  • make sure all tools work with the new approach

Just Infos

Converting txt to .lng doesn't work. And how to convert modified .lev files from .obj back to .lev?

[howl] Convert VAGs to WAVs

HOWL files contain banks, that are basically a list of indexed VAGs. Implement conversion from VAGs to WAV, so sounds are accessible right away without aditional tools (like vagedit).

[viewer] Improve stereoscopic 3D mode

Current implementation simply shifts one camera from center to the side. Proper implementation should move both cameras as well as keep looking at the same target instead of looking straight forward.

  • Move both cameras in different directions
  • Rotate both cameras around the center point
  • Limit separation minimum value at 0 (no 3d effect)
  • Make sure every layer is working fine in 3d mode

[lev] Implement all LOD levels for mesh

CTR rendering engine implements various levels of details:

  • lowest level, using 1 quad and a single low res texture (usually 12x12)
  • mid level, using 4 quads and 4 textures per 3 levels (largest texture is used in tool)
  • hi level, "mosaic", subdivides mid level and uses up to 16 textures (can repeat and rotate) that forms a larger texture (up to 256x256).

Add ability to edit fonts

Hi, you tool is great, so, i wanna to retranslate this game to russian, how long wait about font editor?)

Level events

Hi,

I saw you added some event today.
Here is the full events list in the .lev files (valid for SCUS-94426)
Some didn't really made sense, I prefixed them with "xx_"

            -1: nothing
            2: single_fruit
            6: crate_nitro
            7: crate_fruit
            8: crate_weapon
            18: state_burned
            19: state_eaten
            33: state_squished
            34: state_squished_ball
            36: state_rotated_armadillo
            37: state_killed_blades
            39: crate_tnt
            76: pass_seal
            78: state_squished_barrel
            81: state_turle_jump
            82: state_rotated_spider
            84: state_burned_in_air
            85: labs_drum
            87: pipe
            89: vent
            91: state_castle_sign
            92: crate_relic1
            96: crystal
            100: crate_relic2
            101: crate_relic3
            108: warp_pad
            112: teeth
            114: save_screen
            115: garage_pin
            116: garage_papu
            117: garage_roo
            118: garage_joe
            119: garage_oxide
            122: door_unknown
            139: penguin_lose
            147: letter_c
            148: letter_t
            149: letter_r
            150: crashsleep
            151: intro_coco
            152: intro_cortex
            153: intro_tiny
            154: intro_polar
            155: intro_dingo
            157: xx_intro_beam_glow
            158: intro_tiny_kart
            159: intro_dingo_kart
            160: xx_intro_1
            161: xx_intro_2
            165: introoxidebody
            166: finish_lap
            204: intro_flash
            206: crash_select
            207: cortex_select
            208: tiny_select
            209: coco_select
            210: ngin_select
            211: dingo_select
            212: polar_select
            213: pura_select
            223: oxide_speaker
            224: intro_sparks
            225: hub_door

Music Extraction

I have yet to find a program that can successfully extract the vab and seq file from CTR because its semi custom, I know it uses samples and sequences because we can extract individual samples using PSound but we cant extract the sequences/midi or samples/soundfonts from the game, I hope this becomes a thing

Model Export to Ply

I think instead of exporting to Obj, which has less support for vertex shading/colours, you should make the model exporter export .Ply which allows both vertex shading/colours and UV Mapping for textures.

[viewer] Fix occasional mouse stutter

Sometimes mouse would stuck and stop working properly.
It looks like it happens on fullscreen toggle.
This is usually fixed by reloading the level.

[lev] Find double sided flag

Certain flat objects are rendered double sided such as palm trees and signs in Crash Cove. Assumed to be some flag in QuadBlock.

.CTR models are messed up

Hello. I tried converting a .ctr model from the game and the model is messed up. Example: model_reader.exe Crash.ctr. And i view it in meshlab and it's messed up. could this be fixed?

External contribution

You will allow external contribution for documenting and adding information regarding file formats, i can help with level ones.

[viewer] Fix pink outline on mip maps with alpha channel

This happens because the original 4bit texture with pink alpha is used as a source for all mips. Should cut the pink pixels from source bitmap first, then generate all the remaining mip levels. Should also work for obj export.

hi

can you do a hack for chocobo racing to can rip or export the tracks models and racer models and edit the game, to add more objects on the tracks? change music? do you know how traduce psx games?

[viewer] Implement background modes

LEV file contains 4 color fields, used to render the background. There are at least 3 known render modes:

  • 1 color: full screen solid color
  • 2 colors: Top/Bottom solid fill with the horizon line moving based on camera position.
  • 4 colors: gouraud shaded gradient fill (used in papu's pyramid, polar pass, etc.)

[mpk] Extract UI textures

Extract UI textures using layouts found in MPK files.
r10 export is now broken for some reason (pink textures).

[lev] Investigate array referred to as VisData

At this point we know this array is a kind of BSP tree used to render QuadBlocks. Defines sets of visible quads from every other quad in the level.
Every node stores a bounding box. Rendered bounding boxes loosely repeat the level shape.
Every node has some flag, denoting node type.
Some nodes store links to leaves.

[framework] Implement animated models parser

Implement ctr models parser (.ctr files).

Base requirements:

  • read all LODs
  • read mesh
  • apply vcolor data
  • apply texture data

Enhanced parsing (beyond HoRRoR's original specs):

  • fix vcolor ordering
  • fix normals (flag based)
  • figure out all flags (2/4)
  • read mesh with correct flags applied (single sided, normals, etc)
  • research temporal delta compression used in animated data frames
  • extract individual frames as files

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.