Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 15:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] how to extract Rappelz character animations

Discussion on [Help] how to extract Rappelz character animations within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old 07/10/2023, 15:57   #16
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Quote:
Originally Posted by Anothers View Post
I don't know how to explain, but I did a proper research and wrote the python NAF Reader without knowing python.

If anyone knows how to script or animate in Blender can use this code.
Like I said, this is reader only.
You will add their functionality.
What exactly do you want to know about this NAF?


NAF Reader With Python(It was made without knowing Python. Sorry if your eyes bleed.)
thanks, what version of blender supports python 3.10?

and what do you mean by "adding functionality?"
hassuny is offline  
Old 07/11/2023, 11:39   #17
 
Masumichan's Avatar
 
elite*gold: 0
Join Date: Jul 2020
Posts: 190
Received Thanks: 85
Quote:
Originally Posted by hassuny View Post
thanks, what version of blender supports python 3.10?

and what do you mean by "adding functionality?"
This is simply to import the data into blender, You can use this to set the keyframes yourself, What I recommend doing instead as this is probably too hard if you don't know how to program hit up someone called AOR and see if he's willing to sell some animations as I'm pretty sure he's got it figured out
Masumichan is offline  
Thanks
1 User
Old 07/11/2023, 18:26   #18
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Quote:
Originally Posted by Masumichan View Post
This is simply to import the data into blender, You can use this to set the keyframes yourself, What I recommend doing instead as this is probably too hard if you don't know how to program hit up someone called AOR and see if he's willing to sell some animations as I'm pretty sure he's got it figured out
thanks for replying, I know how to program but I don't know how to script with Blender. My aim is to extract models and animations and use them in unity3d.

what do you mean by "You can use this to set the keyframes yourself"?
Do you mean creating new animations? if that is so I'm not interested in creating new animations.
hassuny is offline  
Old 07/11/2023, 19:55   #19
 
Masumichan's Avatar
 
elite*gold: 0
Join Date: Jul 2020
Posts: 190
Received Thanks: 85
Quote:
Originally Posted by hassuny View Post
thanks for replying, I know how to program but I don't know how to script with Blender. My aim is to extract models and animations and use them in unity3d.

what do you mean by "You can use this to set the keyframes yourself"?
Do you mean creating new animations? if that is so I'm not interested in creating new animations.
Keyframes are points in the timeline which indicate a rotation or location changing at a certain time point
Masumichan is offline  
Thanks
1 User
Old 07/11/2023, 21:41   #20
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Quote:
Originally Posted by Masumichan View Post
Keyframes are points in the timeline which indicate a rotation or location changing at a certain time point
I got you.

Now I tried the script with Blender 2.78, and it did not work. do you know which version of Blender this Naf script (by Zone) works with?
hassuny is offline  
Old 07/12/2023, 01:30   #21
 
elite*gold: 0
Join Date: Aug 2013
Posts: 72
Received Thanks: 89
Quote:
Originally Posted by hassuny View Post
I got you.

Now I tried the script with Blender 2.78, and it did not work. do you know which version of Blender this Naf script (by Zone) works with?
I have the official animations on unity and what I can tell you is that the first thing to do will be to convert the naf DIFK to naf BTRF, 90%+ of the character animations are in difk.
Please contact me for more information and to see if I can help you. I'm not often on epvp, so don't be surprised if I don't answer directly.
omgkllz is offline  
Thanks
1 User
Old 07/12/2023, 15:39   #22
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Quote:
Originally Posted by omgkllz View Post
I have the official animations on unity and what I can tell you is that the first thing to do will be to convert the naf DIFK to naf BTRF, 90%+ of the character animations are in difk.
Please contact me for more information and to see if I can help you. I'm not often on epvp, so don't be surprised if I don't answer directly.
thank you very much, I will send you pm.
hassuny is offline  
Old 07/13/2023, 14:29   #23
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Question

Quote:
Originally Posted by Anothers View Post
I don't know how to explain, but I did a proper research and wrote the python NAF Reader without knowing python.

If anyone knows how to script or animate in Blender can use this code.
Like I said, this is reader only.
You will add their functionality.
What exactly do you want to know about this NAF?


NAF Reader With Python(It was made without knowing Python. Sorry if your eyes bleed.)
what version of blender supports python 3.10?
hassuny is offline  
Old 07/15/2023, 16:42   #24
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
up up
hassuny is offline  
Old 07/22/2023, 11:07   #25
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Quote:
Originally Posted by Anothers View Post
I don't know how to explain, but I did a proper research and wrote the python NAF Reader without knowing python.

If anyone knows how to script or animate in Blender can use this code.
Like I said, this is reader only.
You will add their functionality.
What exactly do you want to know about this NAF?


NAF Reader With Python(It was made without knowing Python. Sorry if your eyes bleed.)
when I tried the script on (btrf) animation I got this error message!

hassuny is offline  
Old 07/24/2023, 22:24   #26
 
Anothers's Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 128
Received Thanks: 108
Quote:
Originally Posted by hassuny View Post
when I tried the script on (btrf) animation I got this error message!

You can do it with this but I'm not sure it's exactly correct.
You add functions.

Blender 3.0 NAF Reader

Code:
#Writed By ZONE
import bpy
import uuid
import struct
import mathutils

class NAF():
    def __init__(self):
        self.BTRF = ""
        self.header_size = 0
        self.major_version = 0
        self.minor_version = 0
        self.header_pos = 0
       
     
def ReadFixedString(file):
    test = ""
    while True:
        c = file.read(1)
        lw = int.from_bytes(c, "big")
        sd = c.decode('utf-8')
        if lw == 0:
            break
        test += str(sd)
    return test


def readGuid(file, sdw):
    print(sdw)
    tewa = []
    for x in range(sdw):
        w = file.read(16)
        dsw = uuid.UUID(bytes=w)
        tewa.append(dsw)
    return tewa

def ReadInt(file):
    return struct.unpack("i",file.read(4))[0]


def ReadBTRF(file):
    return struct.unpack("4s",file.read(4))[0].decode()
    

def ReadShort(file):
    return struct.unpack("h",file.read(2))[0]

def ReadFloat(file):
    return struct.unpack("f",file.read(4))[0]
    

def ProcessFile():
    file_path = "C:\\asm_cbt_attack01_c_biped.naf"
    with open(file_path,"rb") as file:
        E = NAF()
        
        E.BTRF = ReadBTRF(file)
        E.header_size = ReadInt(file)
        E.major_version = ReadShort(file)
        E.minor_version = ReadShort(file)
        E.header_pos = ReadInt(file)
        header_naf_pos = E.header_size + 8
        
        file.seek(header_naf_pos)
        print(file.tell())
        
        GUIDSIZE = ReadInt(file)
        print("GUID SİZE",GUIDSIZE)
        sz = int(GUIDSIZE / 18)
        GuidSizeList = readGuid(file,sz)
        print(GuidSizeList)        
        header_naf_pos = header_naf_pos + int(GUIDSIZE) + 4
        file.seek(header_naf_pos)
        print("Current Pos",file.tell())
        
        ls = ReadInt(file)
        stringArray = []
        string_count = ReadInt(file)
        for s in range(string_count):
            strings = ReadFixedString(file)
            stringArray.append(strings)
        print(stringArray)
        header_naf_pos = header_naf_pos + int(ls) + 4
        file.seek(header_naf_pos)
        print("Current Pos",file.tell())
        
        next_header_pos = ReadInt(file)
        
        block_num = ReadInt(file)
        
        for b in range(block_num):
            file.read(3)
            types = file.read(1)
            block_size = ReadInt(file)
            temp_index = ReadShort(file)
            guidTableIndex = GuidSizeList[b]
            if guidTableIndex == uuid.UUID('21e0bc81-76ad-6f34-9c7d-19885fd118b6'):
                version = ReadInt(file)
                print("Version",version)
            if guidTableIndex == uuid.UUID('6b29f9e8-ddb9-8040-8bc7-6c69e0aa3feb'):
                bone_counts = ReadInt(file)
                channel_count = ReadInt(file)
                ani_channel_index = ReadShort(file)
                Bone_GUID = GuidSizeList[ani_channel_index - 1]
                if Bone_GUID == uuid.UUID('37c1b381-b8b2-b040-a3ad-d149467f5932'):
                    channel_name = ReadInt(file)
                    channel_flag = ReadInt(file)
                    channel_time_span = ReadInt(file)
                    channel_frame_rate = ReadInt(file)
                    bone_ani_size = ReadInt(file)
                    file.read(4)
                    file.read(4)
                    bone_ani_index = ReadShort(file)
                    Bone_Ani_GUID = GuidSizeList[bone_ani_index-1]
                    if Bone_Ani_GUID == uuid.UUID('de4443b8-b6a1-a74a-afd6-22ca8a4b0cee'):
                        bCount = ReadInt(file)
                        
                        for bk in range(bCount):
                            file.read(4)
                            boneSName = ReadInt(file)
                            boneName = stringArray[bk]
                            print("Bone Name : ", boneName)
                            
                            parent_id = ReadInt(file)
                            parentName = stringArray[parent_id]
                            file.read(64) #Bone TM
                            flag = ReadInt(file)
                            
                            pos_time_size = int(ReadInt(file) / 4)
                            file.read(1)
                            posTimeArray = []
                            for ps in range(pos_time_size):
                                pos_time = ReadInt(file)
                                posTimeArray.append(pos_time)
                            
                            print("POS Time Array ",posTimeArray)
                            
                            posKeyArray = []
                            pos_key_size = int(ReadInt(file) / 12)
                            file.read(1)
                            for pk in range(pos_key_size):
                                x = ReadFloat(file)
                                y = ReadFloat(file)
                                z = ReadFloat(file)
                                matk = mathutils.Vector((x,y,z))
                                posKeyArray.append(matk)
                                
                            print("Pos Key Array",posKeyArray)
                            
                            rotTimeArray = []
                            rot_time_size = int(ReadInt(file) / 4)
                            file.read(1)
                            for rt in range(rot_time_size):
                                rot_time = ReadInt(file)
                                rotTimeArray.append(rot_time)
                                
                            print("Rot Time Array",rotTimeArray)
                            rotKeyArray = []
                            rot_key_size = int(ReadInt(file) / 16)
                            file.read(1)
                            for rk in range(rot_key_size):
                                x = ReadFloat(file)    
                                y = ReadFloat(file)    
                                z = ReadFloat(file)    
                                w = ReadFloat(file)
                                mats = mathutils.Quaternion([w,x,y,z])
                                mats.invert()
                                rotKeyArray.append(mats)
                                
                            print("Rot Key Array",rotKeyArray)
                                  
                            child_size = int(ReadInt(file) / 4)
                            file.read(1)
                            for cz in range(child_size):
                                child_index_array = ReadInt(file)
                                                                         
ProcessFile()
Anothers is offline  
Thanks
1 User
Old 07/25/2023, 20:54   #27
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Thumbs up

Quote:
Originally Posted by Anothers View Post
You can do it with this but I'm not sure it's exactly correct.
You add functions.

Blender 3.0 NAF Reader

Code:
#Writed By ZONE
import bpy
import uuid
import struct
import mathutils

class NAF():
    def __init__(self):
        self.BTRF = ""
        self.header_size = 0
        self.major_version = 0
        self.minor_version = 0
        self.header_pos = 0
       
     
def ReadFixedString(file):
    test = ""
    while True:
        c = file.read(1)
        lw = int.from_bytes(c, "big")
        sd = c.decode('utf-8')
        if lw == 0:
            break
        test += str(sd)
    return test


def readGuid(file, sdw):
    print(sdw)
    tewa = []
    for x in range(sdw):
        w = file.read(16)
        dsw = uuid.UUID(bytes=w)
        tewa.append(dsw)
    return tewa

def ReadInt(file):
    return struct.unpack("i",file.read(4))[0]


def ReadBTRF(file):
    return struct.unpack("4s",file.read(4))[0].decode()
    

def ReadShort(file):
    return struct.unpack("h",file.read(2))[0]

def ReadFloat(file):
    return struct.unpack("f",file.read(4))[0]
    

def ProcessFile():
    file_path = "C:\\asm_cbt_attack01_c_biped.naf"
    with open(file_path,"rb") as file:
        E = NAF()
        
        E.BTRF = ReadBTRF(file)
        E.header_size = ReadInt(file)
        E.major_version = ReadShort(file)
        E.minor_version = ReadShort(file)
        E.header_pos = ReadInt(file)
        header_naf_pos = E.header_size + 8
        
        file.seek(header_naf_pos)
        print(file.tell())
        
        GUIDSIZE = ReadInt(file)
        print("GUID SİZE",GUIDSIZE)
        sz = int(GUIDSIZE / 18)
        GuidSizeList = readGuid(file,sz)
        print(GuidSizeList)        
        header_naf_pos = header_naf_pos + int(GUIDSIZE) + 4
        file.seek(header_naf_pos)
        print("Current Pos",file.tell())
        
        ls = ReadInt(file)
        stringArray = []
        string_count = ReadInt(file)
        for s in range(string_count):
            strings = ReadFixedString(file)
            stringArray.append(strings)
        print(stringArray)
        header_naf_pos = header_naf_pos + int(ls) + 4
        file.seek(header_naf_pos)
        print("Current Pos",file.tell())
        
        next_header_pos = ReadInt(file)
        
        block_num = ReadInt(file)
        
        for b in range(block_num):
            file.read(3)
            types = file.read(1)
            block_size = ReadInt(file)
            temp_index = ReadShort(file)
            guidTableIndex = GuidSizeList[b]
            if guidTableIndex == uuid.UUID('21e0bc81-76ad-6f34-9c7d-19885fd118b6'):
                version = ReadInt(file)
                print("Version",version)
            if guidTableIndex == uuid.UUID('6b29f9e8-ddb9-8040-8bc7-6c69e0aa3feb'):
                bone_counts = ReadInt(file)
                channel_count = ReadInt(file)
                ani_channel_index = ReadShort(file)
                Bone_GUID = GuidSizeList[ani_channel_index - 1]
                if Bone_GUID == uuid.UUID('37c1b381-b8b2-b040-a3ad-d149467f5932'):
                    channel_name = ReadInt(file)
                    channel_flag = ReadInt(file)
                    channel_time_span = ReadInt(file)
                    channel_frame_rate = ReadInt(file)
                    bone_ani_size = ReadInt(file)
                    file.read(4)
                    file.read(4)
                    bone_ani_index = ReadShort(file)
                    Bone_Ani_GUID = GuidSizeList[bone_ani_index-1]
                    if Bone_Ani_GUID == uuid.UUID('de4443b8-b6a1-a74a-afd6-22ca8a4b0cee'):
                        bCount = ReadInt(file)
                        
                        for bk in range(bCount):
                            file.read(4)
                            boneSName = ReadInt(file)
                            boneName = stringArray[bk]
                            print("Bone Name : ", boneName)
                            
                            parent_id = ReadInt(file)
                            parentName = stringArray[parent_id]
                            file.read(64) #Bone TM
                            flag = ReadInt(file)
                            
                            pos_time_size = int(ReadInt(file) / 4)
                            file.read(1)
                            posTimeArray = []
                            for ps in range(pos_time_size):
                                pos_time = ReadInt(file)
                                posTimeArray.append(pos_time)
                            
                            print("POS Time Array ",posTimeArray)
                            
                            posKeyArray = []
                            pos_key_size = int(ReadInt(file) / 12)
                            file.read(1)
                            for pk in range(pos_key_size):
                                x = ReadFloat(file)
                                y = ReadFloat(file)
                                z = ReadFloat(file)
                                matk = mathutils.Vector((x,y,z))
                                posKeyArray.append(matk)
                                
                            print("Pos Key Array",posKeyArray)
                            
                            rotTimeArray = []
                            rot_time_size = int(ReadInt(file) / 4)
                            file.read(1)
                            for rt in range(rot_time_size):
                                rot_time = ReadInt(file)
                                rotTimeArray.append(rot_time)
                                
                            print("Rot Time Array",rotTimeArray)
                            rotKeyArray = []
                            rot_key_size = int(ReadInt(file) / 16)
                            file.read(1)
                            for rk in range(rot_key_size):
                                x = ReadFloat(file)    
                                y = ReadFloat(file)    
                                z = ReadFloat(file)    
                                w = ReadFloat(file)
                                mats = mathutils.Quaternion([w,x,y,z])
                                mats.invert()
                                rotKeyArray.append(mats)
                                
                            print("Rot Key Array",rotKeyArray)
                                  
                            child_size = int(ReadInt(file) / 4)
                            file.read(1)
                            for cz in range(child_size):
                                child_index_array = ReadInt(file)
                                                                         
ProcessFile()
thnx, It worked without problems. but I don't know how to add functions to apply the animations data to the character
hassuny is offline  
Old 07/28/2023, 15:14   #28
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
up up
hassuny is offline  
Old 07/28/2023, 21:07   #29
 
Masumichan's Avatar
 
elite*gold: 0
Join Date: Jul 2020
Posts: 190
Received Thanks: 85
Not to sound like a douche, But I really don't think anyone is going to give you a fully working work flow for free, Unless you're willing to put in the effort yourself I'm pretty sure you probably wont get it.
Masumichan is offline  
Thanks
1 User
Old 07/29/2023, 07:08   #30
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
Quote:
Originally Posted by Masumichan View Post
Not to sound like a douche, But I really don't think anyone is going to give you a fully working work flow for free, Unless you're willing to put in the effort yourself I'm pretty sure you probably wont get it.
I agree with you and appreciate your advice. nevertheless, I got a lot of information from this thread.
hassuny is offline  
Reply

Tags
animations, character, rappelz


Similar Threads Similar Threads
[GUIDE/ANIMATIONS] Creating run/walk animations which work properly
09/25/2012 - Metin2 PServer Guides & Strategies - 2 Replies
Good afternoon elitepvpers, in this brief guide I will explain how to create any animation that implies a movement of the model in the world space. Many have been wondering why new run or walk animations wouldn't work properly, and today I will explain the reason. I'm sorry but I did not include any screenshot, for lack of both willingness and time. An animations works by moving various bones, and I think this part is clear to everyone. The thing is, the Granny3D engine cannot know if the...



All times are GMT +1. The time now is 15:25.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.