Users browsing this thread: 1 Guest(s)
Zelda64 Models
#1
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

[Image: linkhj.png]
[Image: prevm.png]
[Image: posezi.png]
[Image: ohshitk.png]

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
    [Image: pic0a.png]
    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 Tongue
#2
Let me be the first to say HOLY SHIT THIS IS AWESOME, THANK YOU!

Now that that's out of the way, glad to have you on board! Models seem to be the next logical progression after sprites, so we're always happy to get what we can. It looks like this program works with both Ocarina and Majora, yes? Do you plan to make similar programs for other N64 games?

Again, thanks! I hope everyone gets some great usage out of this!
[Image: b1.php?u=39480955]
Quote:You had wasted MY LIFE... waiting for just a goddamn bunnelby model.
-The prestigious Farlavor
Thanked by: Garamonde, Ploaj
#3
(03-14-2013, 01:14 AM)Tonberry2k Wrote: Let me be the first to say HOLY SHIT THIS IS AWESOME, THANK YOU!

Now that that's out of the way, glad to have you on board! Models seem to be the next logical progression after sprites, so we're always happy to get what we can. It looks like this program works with both Ocarina and Majora, yes? Do you plan to make similar programs for other N64 games?

Again, thanks! I hope everyone gets some great usage out of this!

I'm not really a big fan of other game series aside from Metroid, but I hear F3DEX and Fast3D aren't too different from F3DEX2. If the file layout is similar, I could add support; but I won't go lookin for it

Also, yeah, it supports both OoT and MM Smile I'm working on adding support for ripping animations as well
Thanked by: Ton
#4
Since this isn't exactly a model submission thread, I moved it to Model Discussion. I hope we'll see more of this, though! Cute
Thanked by: Garamonde, Ton
#5
I'm certain the TMR mod would be delighted to see this. Wink
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by:
#6
(03-14-2013, 05:45 AM)Previous Wrote: Since this isn't exactly a model submission thread, I moved it to Model Discussion. I hope we'll see more of this, though! Cute

Yeah...I was originally gonna post some models with it, but I didn't feel like extracting the textures for the eyes at the time.

(03-14-2013, 07:47 AM)Mighty Jetters Wrote: I'm certain the TMR mod would be delighted to see this. Wink
What's that?
Thanked by:
#7
this? a new easy way to extract the models? Tongue
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by:
#8
(03-14-2013, 09:02 AM)Mighty Jetters Wrote: this? a new easy way to extract the models? Tongue

OH DERP. TMR = The Models Resource >_<

sorry for noobing out on ya....btw, I'm not sure if you guys would care or not since I doubt many of you are into Zelda modding, but I eventually plan on making an export script as well.

EDIT:
I know that this is almost completely irrelevant to this topic, but I wanted to share these old sprites I made, and starting a new topic just for that would kinda be stupid...
Thanked by:
#9
it's okay lol, I should've specificed probably.
oh and this isn't for exporting the models yet? that's what we'd all want, tbh. Tongue
think you could have .DAE support for bones/rigging and whatnot? Big Grin
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by:
#10
(03-14-2013, 11:18 AM)Mighty Jetters Wrote: it's okay lol, I should've specificed probably.
oh and this isn't for exporting the models yet? that's what we'd all want, tbh. Tongue
think you could have .DAE support for bones/rigging and whatnot? Big Grin

Lol, you had it right the first time, it rips models. It's a .zobj / .zmap import script. By export, I was referring exporting models created in blender as .zobj or .zmap.

Also, I think there's a .dae export plugin for Blender. Keep in mind, this isn't a standalone application Tongue
Thanked by: Ton, Shade, Garamonde
#11
Smells like... model ripping project?
[Image: b1.php?u=39480955]
Quote:You had wasted MY LIFE... waiting for just a goddamn bunnelby model.
-The prestigious Farlavor
Thanked by:
#12
oh I just wondered it if would export the bones and all that good stuff. Tongue
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by: Ton
#13
i think i love you
for long i have been using that awkward idle posed link, and it just looked deformed, thank you man Big Grin!!!!
Original signature...
Thanked by: Ton
#14
(03-14-2013, 02:01 PM)Mighty Jetters Wrote: oh I just wondered it if would export the bones and all that good stuff. Tongue
It does import bones Tongue
You can start posing the models the second you import them, and it doesn't take but 30-sec to get them into a t-pose.

(03-14-2013, 04:05 PM)wat Wrote: i think i love you
for long i have been using that awkward idle posed link, and it just looked deformed, thank you man Big Grin!!!!
No prob Smile

EDIT:
Also, I forgot to state this before, but you might need Python 3 as well for the script to work.
Thanked by: wat
#15
A good test for .ZOBJ export would be the "Very Old Link" model from the "Ocarina of Time" minigame in "Wario Ware Smooth Moves". Big Grin
Thanked by:


Forum Jump: