Norbyte / lslib

Tools for manipulating Divinity Original Sin and Baldur's Gate 3 files
MIT License
764 stars 141 forks source link

Problems exporting animations of metin2 files #15

Open luckk93 opened 6 years ago

luckk93 commented 6 years ago

Hello,

I'm trying to export the models of 'metin2' (2004), using your project. It seems to work well for the meshes, but when I try to export the animations using 'Single File' mode I get an error (see image below).

error_single

I tried to debug the project, and it seems that, it tries to get the number of knots from the curve on the track, but the curve is a null pointer. (see this line) Do you have any idea why this happens? How could I overcome this problem? Do you have some kind of guide about the gr2 file structure?

I tried to open both meshes and animations using granny viewer and it works.

Furthermore when I try to use the 'Batch' mode I get this error (see Image below).

error_bash

Attached you find one of the meshes with its animations if you want to replicate the errors

stray_dog.zip

Thanks in advance for your time.

luckk93 commented 6 years ago

I just saw that a similar issue to mine has been discussed here.

In this reply you said that "the animations were stored in a different format than they are now" and that "it didn't use CurveData yet, it stored data directly in the TransformTrack node".

May I ask how do you know about this? If you could point me to some resources that explain how GR2 files are (or, in this case were) structured, I could modify your program to suit my needs but currently I have no idea where to look for such information.

Thanks again, hope to hear from you soon.

Norbyte commented 6 years ago

I've added generic support for old (tag ID 10) animations in the latest version and it seems to import your animations properly.

luckk93 commented 6 years ago

Thank you.

It seems that now it creates the .dae file for the animations. But I was unable to see the animations using Blender, Unity3D or Cinema 4D.

Have you tried to open it? If yes with which program?

Thanks again for your help.

Norbyte commented 6 years ago

I've checked the anim with Blender v2.77. You have to rescale it though, as the model is way too large and gets clipped, so I scaled it by about 0.01.

luckk93 commented 6 years ago

Hi, I tried to open the model and the animation using the correct settings in Blender, and I have noticed that some things in the mesh and animations are messed up (probably because of blender dae import).

The animation does strange moves, and the bones of the mesh are not all connected together.

If you could explain to me how do you calculate the position of the bones depending on bones translation and rotation (_root.Skeletons.Skeleton.Bones.Bone.Transform.Translation/Rotation) maybe I can try another way to import the model in Blender.

Thanks again for your time, luckk93