Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some animations load improperly #1

Open
z64me opened this issue Aug 8, 2020 · 10 comments
Open

Some animations load improperly #1

z64me opened this issue Aug 8, 2020 · 10 comments

Comments

@z64me
Copy link

z64me commented Aug 8, 2020

The left screenshot is the latest importer, whereas the right is the same ZOBJ imported with an older version.
Settings were left as default for each import:

zelda64-import-blender

Here is the ZOBJ I'm importing:
zelda_skelton_new_generic.zip

Here is the version of the importer that yields the correct result:
io_import_z64_latest.zip

@Dragorn421
Copy link
Owner

Any idea where you got that importer version from, and when? Or even who last touched it?
I'm pretty sure it's nowhere in the commit history, but I made sure to include all releases by SoulOfDeity and Nokaubure, or so I thought.

@z64me
Copy link
Author

z64me commented Aug 9, 2020

It also works upon reverting to this version (Zelda64 Importer v4 by SoulofDeity):

https://github.com/Dragorn421/zelda64-import-blender/blob/9596d5ddcbcfcae93201878545b710ac67df51e4/io_import_z64.py

@Dragorn421
Copy link
Owner

Here is what I got with the latest commit with default settings, after setting the active action to Anim1_7 (and switching frame to update the bone rotations):

image

Here is first frame of Anim1_7 with Texture Clamp/Mirror and Prim/Env Color options ON (they default to OFF in recent versions)

image

The active action after the import is done is always the last imported action (in this case the 12th Anim12_20) which I guess here may either be a junk unused animation in the zobj, or data wrongly detected as animation (I doubt that though, because most of the rotations make sense, only the skull is messed up)

The change of behavior between the old script and the new one is that the newer versions import all animations at once, while old versions only imported one animations (the first one detected in the zobj by default).

TLDR and takeaway: Open the console while importing, notice there are several animations, try them all. Some are messed up, some are ok

@z64me
Copy link
Author

z64me commented Aug 10, 2020

Now testing with the latest version again, the Blender console reports it has imported 12/12 animations. Only one animation appears correct (the anim1_7 you cited). The other eleven are broken. Here is a video showcasing all twelve animations displaying properly in Hylian Toolbox: https://youtu.be/aWCfz3rZBEg

The latest Utility of Time (available here) is also capable of displaying these animations properly.

Because Hylian Toolbox and Utility of Time do not support branch instructions, a modified ZOBJ must be opened in them instead. Here is the one I'm using, which exhibits the same problems with the plugin as the one I posted earlier: zelda_skelton_new_unde.zip

Edit to add that the animation offsets and frame counts detected by the plugin match those displayed in the right pane in the Hylian Toolbox video:

INFO:z64import.F3DZEX.locateAnimations:           Anims found at 00014008 Frames: 7
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 00015660 Frames: 50
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 00015B90 Frames: 13
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 000162E8 Frames: 20
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 000168E0 Frames: 14
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 00017678 Frames: 39
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 00019258 Frames: 60
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 0001A600 Frames: 47
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 0001BC58 Frames: 50
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 0001C388 Frames: 16
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 0001C938 Frames: 13
INFO:z64import.F3DZEX.locateAnimations:           Anims found at 0001D070 Frames: 20
INFO:z64import.F3DZEX.locateAnimations:           Total Anims                         : 12

@Dragorn421
Copy link
Owner

I confirmed that at least animation 2 (offset 0x15660) in zelda_skelton_new_unde.zobj is already messed up in an early version (Nokaubure's).
The same issue shows in the latest version
Just looking at it it seems that at least limb_03 is using very weird rotations values, making the upper half of the body rotate around y (several turns!) unlike in HT, eg at frame 29 Euler XYZ is 8 -4 -19 in HT and -65 -6 -83 in Blender. Will investigate more

@LordFrijole
Copy link

Hello, how do you import animations and view them in blender?

@Dragorn421
Copy link
Owner

Dragorn421 commented Sep 8, 2021

Hi, could you come over on the Hylian Modding discord, it would make it easier to communicate and there are more people there

You can find a link to the discord on the Hylian Modding website: https://hylianmodding.com/ (scroll down)

@LordFrijole
Copy link

LordFrijole commented Sep 8, 2021 via email

@Dragorn421
Copy link
Owner

Dragorn421 commented Nov 6, 2021

"older script" in the context of this message: https://cdn.discordapp.com/attachments/451783162859749386/905955051997126696/io_import_z64_older_script.py

https://discord.com/channels/388361645073629187/451783162859749386/905954013189644318 :

The older one is capable of loading most actor animations properly. The newer script the animations can have certain limbs at incorrect angles/positions.
This older script is also able to load link's animations
Here are blend examples showing the results of importing with each script:
https://cdn.discordapp.com/attachments/451783162859749386/905956973516845156/eyegore_newer_script.blend
https://cdn.discordapp.com/attachments/451783162859749386/905956992538001498/eyegore_older_script.blend
The animation of the eyegore in the blend file using the new script shows the eyegore’s current selected animation to be incorrect with its legs rotated improperly.

TODO:

  1. figure out what version the "older script" is (probably Nokaubure's?)
  2. fix this jank animation code for good
  3. bring back link animations. It isn't that complicated

EDIT:
that "older script" looks like en early version of Nokaubure's changes
it mainly has type 1 meshes and, weirdly, some commented out code ("Please do not do that") that makes it in in what I know as the Noka-edited importer (the revision linked above).
As far as animations go, it doesn't look different from the SoD's v4 or Nokaubure's changes revisions

@Dragorn421 Dragorn421 changed the title Animation and/or skeleton broken Some animations load improperly Nov 6, 2021
@Dragorn421
Copy link
Owner

Dragorn421 commented Nov 9, 2021

+ in most of her animations, Saria's left leg ? (object 188)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants