-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from LiamBrandt/rip-special-models
Rip special models
- Loading branch information
Showing
12 changed files
with
1,670 additions
and
696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
*.bin | ||
*.png | ||
*.obj | ||
*.mtl | ||
*.mtl | ||
*.pyc | ||
bin | ||
obj | ||
gif | ||
*.bat | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,38 @@ | ||
# WDBRipper | ||
Extracts the 3D models and textures from the Lego Island WORLD.WDB format. | ||
Extracts the 3D models and textures from the Lego Island WORLD.WDB file. | ||
|
||
As of now, only about 300 of the 500 total files can be read. The files that cannot be read are ones that have animations, and I am working on figuring out the format for those ones. | ||
Most of the files in the sub1 folders can be read, the ones in sub0 cannot. This is something that can be worked on for the future. | ||
|
||
As of now, 451 out of 592 .bin files can be extracted! | ||
|
||
##Requirements: | ||
* Python 2.7 https://www.python.org/downloads/ | ||
* Pygame http://www.pygame.org/download.shtml | ||
* PyPNG https://pythonhosted.org/pypng/index.html | ||
|
||
##Usage: | ||
* The wdb file is split into many sections in a folder hierarchy, each section for a different model. The ripper is currently just extracting each of these sections, and saving them as .bin files in their respective folders. You can find these files in the "groups" folder once the tool has been run. There are also loose GIF images that are in the wdb file, not attached to any models, and those are stored in the "images" folder. | ||
* Once the ripper has extracted all of the .bin files, the ripper will create 3D files in .obj file format with .mtl material files with all the textures for that model, in the "obj" folder. | ||
* You can change the path to your WORLD.WDB file in config.txt | ||
* The format of WORLD.WDB is explained more in depth in the format.txt file. | ||
* Run the executable: | ||
|
||
``` | ||
wdb_ripper.exe | ||
``` | ||
|
||
* Or run the python script: | ||
|
||
``` | ||
python wdb_ripper.py | ||
``` | ||
|
||
* You can configure the tool with `config.txt`. | ||
|
||
##Understanding: | ||
The wdb file is split into many sections in a folder hierarchy, each section for a different model. The ripper currently extracts each of these sections, and saves each of them as a .bin file in their respective folder. You can find these files in `./bin` once the tool has been run. There are also loose GIF images in the wdb file not attached to any models, which are stored in `./gif`. | ||
|
||
Once the ripper has extracted all of the .bin files, the ripper will create 3D wavefront .obj files with .mtl material files plus all the textures as .png for that model. These converted models are stored in `./obj`. | ||
|
||
More information on the format of `WORLD.WDB` can be found in `./formats/wdb`, the file used to define what variables are extracted for what purpose. | ||
|
||
* Source Files | ||
* **`wdb_ripper.py`** is the main program that takes data read from the bin files, and exports it as .obj, .mtl, and .gif. | ||
* **`formatter.py`** reads the file `./formats/wdb` and uses it to interpret the data found in `WORLD.WDB` and the .bin files. It hands `wdb_ripper.py` a dictionary containing the structure of the files as described in `./formats/wdb`. | ||
* **`bin_decode3.py`** is a helpful tool to visualize what is going on inside a .bin file in terms of the format of data. It uses `formatter.py` to display the values of each piece of data in the file. You need pygame to run this. | ||
* **`color_console.py`** does not play a role, it was for debug purposes to help make the console output of `formatter.py` more readable. It was taken from an online example. |
Oops, something went wrong.