The process of getting 3D assets from their source is rather long and pretty tedious (well at first it is). Even having gone through the process many times, its still confusing and doesn't always work.
To begin with, the original game needs to be extracted. Because I already own the game I downloaded and iso version just to make it quicker. Now with an iso of the game, its time to use an emulator, in this case I used Dolphin. Through Dolphin there is an option to "dump" the contents of the game, this is because the iso / files contained within are encrypted, dumping them allows them to be read in their source format.
Now with a dumped version of WindWaker, it is now possible to browse the files and locate what is needed.
For my particular uses, the "res" folder contains most of the assets needed. In this location there are sub-directories for stages, props and other misc assets. Browsing to just the objects is where all the 3D models can be found.
First couple of things to note here are, one: these are all "ARC" files and two: none of the filenames indicate what they contain / or are not English.
After some research I found out that these arc files are useable (thanks to the modding community), through a set of tools I can essentially browse through and see what is what. But this part is the most tedious, because again none / most are not English and another problem is that some wont work or are corrupted.
So, to begin, I will grab an arc file, in this case I shall use "Dalways.arc" (I have no idea what it is).
With this file, I've placed it with the tools needed to extract it, to make it easier for now.
To extract it or any other model, it needs to be dropped on "rarcdump.exe". Doing so will decompress it into it's original folders (very much like a zip file). Though for some unknown reason, this specific arc file will not decompress. This is because some individual arc files have additional encryption on them, as such they need to be dropped on "yaz0dec.exe" first to remove this lock, creating a new version of the arc file "Dalways.arc 0.rarc".
Now with this new un-encrypted arc file, it can now be dropped on "rarcdump.exe" to extract it.
Now with the new folder we can explore its contents!
Still the process isn't over!
This directory now contains all the information such as textures, materials, animations and 3D models needed.
- bck = animation information
- bldi = 3D model
- bldm = 3D model
- brk = unknown
- btk = material animation
- dbz = unknown
- <extra>bti = textures
Thankfully there a couple of model viewers created for exploring these files!
So going into "bldm" and loading the file "boxd.bdl" (bdl is Nintendo's native 3D export file extension) with said viewer I am now able to see exactly what this entire arc file consists of.
So, it turns out "Dalways.arc" is in fact where the games treasure chests are located. In the same "bldm" folder and even "bldi" there are other chests and variations too. In addition to this, if I go to the root folder and look in the "bck" folder, there are animations that can be used. If I drop one of these into the viewer with the model loaded, it will now show what it does:
Now that I've established what this file is, that is has variations and even animations I can now move onto converting this into something native for windows, that in turn I can use in Unity.
To do this, there are three methods, each with pros and cons:
- The first is another model viewer named bmdview2, its much more basic than the one used above. But it does offer the option to export any loaded model and textures. Whilst this is the quickest method of exporting it does have one big downside; animations. It will not display or export them.
- The next option is Blender. a user has created a plugin named Blemd, based on the extraction tools used earlier (yaz0dec and rarcdump). This allows Blender to import the model file with textures and animations which then can be exported at a standard fbx. The downside to this method, is that it will just completely refuse to import on certain models causing Blender to softlock.
- The final method is similar to the previous one, this time we can use 3DS MAX and a similar tool named MaxBMD. Works exactly the same as Blender, this one has the same issue with softlocking, but will sometimes open ones Blender crashes on and vice versa. Both allow for animations to be imported alongside any rigging / bone information to be added.
In this case I shall use 3DS MAX. Running the plugin allows me to browse to where I extracted the "Dalways.arc", I browse to the bldm folder and open "boxd.bdl".
Once I press Import, the plugin now creates a new directory where the bdl file was. In here the plugin stores a save of the scene, the exported textures and the converted animations.
Now that it's finished the scene is loaded, the model is present and textured. A Character modifier is applied which allows any of the saved animations to be imported onto it.

Simply browsing to the new directory the plugin made (\Dalways.arc 0.rarc_dir\archive\bdlm\boxd\Animations) and selecting any will present a window to allow it to be applied to the model.
Its best to note that Max and Blender approach this differently. Blender will batch apply any and all animations in the adjacent "bck" folder and when exported can reduce the amount of files. Max on the other hand only allows for one animation per model, importing more or trying to append more will result in errors and / or a softlock. But from my experience, Max's import method is more accurate with its animations...
Now the model has been imported and it's animation applied, its now ready for export and fir use in Unity! A simple File > Export > FBX will suffice.
Now we have a Chest asset in a native windows format, one that can be read by any 3D application as fbx is the standard for 3D assets.
Once the chest has been imported into Unity, its ready for tweaking. It has lost it's material information, this is due to no textures being imported. So quickly browsing to where the MaxBMD plugin exported the textures and animations I can easy drag these into Unity.
Now that the texture is in Unity, the model has now automatically applied it to itself. Depending on the model it may look fine, but usually this needs editing. The texture's properties are more often than not usually incorrect too.
WindWaker uses a lot of mirrored textures (see the MaxBMD importer screenshot, 4 images above) to save on storage space, so when imported to Unity the textures will look out of place:
This happens because Unity automatically sets any imported texture's wrap mode to "Repeat", this is so that the texture will be tiled if stretched over a large area. But in this case we don't want it to. So changing the Wrap Mode to "Mirror" will fix the issue and display the texture as intended:
Finally, now the material / texture has been fixed, it's time to look at the animation.
On the Chest's inspector window, browsing to the animation tab will show it has one animation, the animation I manually imported in 3dsMax via the Character Assembly modifier.
As you can see, the animation is playing in the preview to the right. If you also look at the top of the preview is the animation name "boxopenbox". If I browse back to the original arc folder I decompressed, in the "bck" folder is said animation!
The final in-game result:
To conclude, the process is very long and tedious. I've mastered my own work flow to be as efficient as possible. But still, it takes a long time because none of the original files express what they contain. How does "Dalways" translate to "Chests"?
Given enough time, it would be possible to explore and catalogue all the files properly into a spreadsheet for easier browsing. At any rate, this is my process, maybe it will help some modders out in the future!
No comments:
Post a Comment