03-14-2013, 01:07 AM
(This post was last modified: 03-15-2013, 12:22 AM by SoulofDeity.)
I recently wrote a zobj/zmap import script for blender 2.6x that imports fully skinned Zelda models and maps, and I've always been a fan of models resource so thought you all might have a field day with this
Sorry, I'm too lazy to rip them again, but you can download the latest version of the import script here
It's still a work in progress though. The todo-list is on the download page, and eventually I'll get around to color combiner support as well.
Installation:
Usage:
Import Options:
------------------
Like I said before, this is a work in progress. I post most of my updates on this thread. Now someone please, fix that repository
Sorry, I'm too lazy to rip them again, but you can download the latest version of the import script here
It's still a work in progress though. The todo-list is on the download page, and eventually I'll get around to color combiner support as well.
Installation:
- Download and extract the script to your "%ProgramFiles%/Blender Foundation/Blender/2.6x/scripts/addons" directory"
- Make sure you have Python 3 installed
- Open blender
- Change to the user preferences mode
- Scroll down until you find the script and check it
- Change back to 3d view and hit Ctrl-U to save your preferences
Usage:
- If you have a compressed rom (pretty much anything other than the OoT MQ Debug Rom), use zdec to extract it
- Use GZRT or ZRE (included with Utility of Time) extract the zobj or zmap from the game. It's probably best that you use ZRE even if it is a command-line based utility since it can detect file types where there's no file table
- .zobj's are objects and .zmaps are maps. the script is also capable of importing data from other segments if they are in the same folder as the file you're importing and have the name "segment_XX.zdata" where 'XX' is the segment # (0-15) in hexadecimal. Here's a list of most all the segments:
[_] 02 = current zscene (needed for maps to import)
[_] 03 = current zmap (shouldn't have to use this, script sets this automatically when importing zmaps
[_] 04 = gameplay_keep
[_] 05 = gameplay_field_keep or gameplay_dangeon_keep. only used by maps, which file it is depends on a particular instruction in the header of the scene file. best to just experiment though
[_] 06 = current zobj (shouldn't have to use this, script sets this automatically when importing zmaps
[_] 07 = link_animetion (currently unused)
[_] 08 = animated textures (aka eyes, mouths, etc.)
[_] 09 = animated textures
[_] 0C = matrices (currently unused)
[_] 0D = limb matrices (used to skin mesh in zobjs)
For example, if you were importing link, you'd want to having gameplay_keep.zdata in the same folder, but renamed "segment_04.zdata"; hand-rip the texture for his mouth and name it "segment_08.zdata"; and hand-rip the texture for his eyes and name it "segment_09.zdata"
- Open Blender, go to File->Import->Import Zelda64 (*.zobj; *.zmap) there's a bunch of options you can set for importing (see below)
- When you first load the model, it'll be in an awkward paperclip pose. (that's just how the game stores them). With most models, you can get them into a t-pose just by rotating a few bones 90 or 180 degrees (except a few like Ganon)
Import Options:
- Vrtx Mode - On the n64, there are 2 vertex types. The first utilizes normals, and the second utilitizes vertex colors. Pretty much all Zelda models use normals though. 'Course, some of you may know that Blender can't import normals....so basically, what I do is average the normals as a grayscale color, blend it with the primitive and environment colors, and use it as the vertex colors for the model. It's actually pretty neat
Link with texturing and primitive/environment colors disabled, shading on
There are 3 choices here; using the shading shown above; the vertex colors, or neither.
- Load data from other segments - This allows you to disable loading data such as textures, vertices, display lists, etc. from segments other than the file you're loading.
- Matrices - This allows you to disable loading matrices, which are used to fill joints and stuff
- Prim Color - This allows you to disable blending the primitive color with the vertex color.The primitive color is used to color things like Link's tunic and the Gerudo's swords, so you might want to leave this on
- Env Color - This allows you disable blending the environment color with the vertex color. The environment color is used mainly by maps, though some models like the Fierce Deity's sword use it (NOTE: The Fierce Deity's sword will not appear without editing the display list for his left hand to hook to it; this is because it's not pointed to by the hierarchy)
- Invert Env Color - This option was really just added out of laziness. It was tailored specifically for FD link because the environment color which is used to color his sword is inverted.
- Export Texture - This option allows you to disable dumping the textures to tga files (useful if you're wanting to use your own textures)
- Import Texture - This option allows you to disable importing textures from files (eg. the model will be untextured)
- Texture Clamp - This option allows you to disable texture clamping. It really only works in the 3d view anyway...I'm working on a way perm-clamp the textures so they look the same even when you export the model
- Texture Mirror - This option allows you to disable texture mirroring. Since Blender doesn't support texturing mirroring, the textures are perm-mirrored to get them to appear correctly; which is not suitable for modding.
- Toony UVs - Honestly a stupid option...It just turns off the uv scaling so that the textures are repeated a ridiculous amount of times, making them appear as solid colors which happen to look almost cel-shaded.
------------------
Like I said before, this is a work in progress. I post most of my updates on this thread. Now someone please, fix that repository