The Forum is up for sale: XeNTaX Forum looking for new owner

Harry Potter Magic Awakened - 3D animation

Post questions about game models here, or help out others!
Post Reply
Maechen
ultra-n00b
Posts: 9
Joined: Sun Dec 22, 2019 4:37 pm
Has thanked: 5 times
Been thanked: 4 times

Harry Potter Magic Awakened - 3D animation

Post by Maechen »

Hi guys ! I managed to export the 3D animation of the game Harry Potter Magic Awakened.
Here is an archive of Luna's model : https://cdn.discordapp.com/attachments/ ... a_HPMA.zip
Inside, you could find 5 file types :
- OBJ (mesh)
- DDS (texture)
- XML (some text data, one is the list of the animations)
- SKE (skelton ?)
- RAW (animation ?)

The SKE and RAW files architecture respect those 3 parts : HEAD, DATA and NAME
The NAME part is very helpfull to know which animation (?) or skeleton (?) is.

In order to reach my goal, I would like to know if the SKE and RAW files are indeed respectively skeleton and animation.
What do you think about this ?

Does anyone have knowledges about those formats ?
How can I use them (SKE and RAW) in order to get the animations on this model ?

Thanks in advance for your help!

Image
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: Harry Potter Magic Awakened - 3D animation

Post by shakotay2 »

SKE: should be doable, 40 bytes blocks, maybe position/translation, quaternion/rot and 1.0 1.0 1.0 (but my skeleton looks like an earthworm :D )

Got the first 64 bone names but the parenting seems buggy: upperarms should be connected to clavicles, toe0 should have foot as parent and so on.
Forearm should have upperarm as a parent. So I guess I used the wrong DWORDs table.

Code: Select all

0 "luna_shenqidongwuxuejia" -1
1 "biped" 0
2 "bip001" 1
3 "lower" 2
4 "bip001 l calf" 3
5 "bip001 l foot" 4
6 "bip001 l thigh" 5
7 "bip001 l toe0" 6
8 "bip001 prop3" 7
9 "bip001 r calf" 8
10 "bip001 r foot" 9
11 "bip001 r thigh" 10
12 "bip001 r toe0" 11
13 "upper" 12
14 "bip001 head" 13
15 "bip001 l clavicle" 14
16 "bip001 l finger0" 15
17 "bip001 l finger01" 16
18 "bip001 l finger1" 17
19 "bip001 l finger11" 18
20 "bip001 l finger2" 19
21 "bip001 l finger21" 20
22 "bip001 l finger3" 21
23 "bip001 l finger31" 22
24 "bip001 l finger4" 23
25 "bip001 l finger41" 24
26 "bip001 l forearm" 25
27 "bip001 l hand" 26
28 "bip001 l upperarm" 27 ? 15
29 "bip001 neck" 28
30 "bip001 r clavicle" 29
31 "bip001 r finger0" 30
32 "bip001 r finger01" 31
33 "bip001 r finger1" 32
34 "bip001 r finger11" 33
35 "bip001 r finger2" 34
36 "bip001 r finger21" 35
37 "bip001 r finger3" 36
38 "bip001 r finger31" 37
39 "bip001 r finger4" 38
40 "bip001 r finger41" 39
41 "bip001 r forearm" 40
42 "bip001 r hand" 41
43 "bip001 r upperarm" 42   ? 30
44 "bip001 spine" 43
45 "bip001 spine1" 44
46 "bip001_l_upperarm_fr001" 45
47 "bip001_r_upperarm_fr001" 46
48 "bip001_spine1_bl001" 47
49 "bip001_spine1_bl001_1" 48
50 "bip001_spine1_bl001_2" 49
51 "bip001_spine1_bl001_3" 50
52 "bip001_spine1_bl002" 51
53 "bip001_spine1_bl002_1" 52
54 "bip001_spine1_bl002_2" 53
55 "bip001_spine1_br001" 54
56 "bip001_spine1_br001_1" 55
57 "bip001_spine1_br001_2" 56
58 "bip001_spine1_br001_3" 57
59 "bip001_spine1_fl001" 58
60 "bip001_spine1_fl002" 59
61 "bip001_spine1_fl002_1" 60
62 "bip001_spine1_fm001" 61
63 "bip001_spine1_fm001_1" 62
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

yes its pos, quat, scl.
ske.png

Code: Select all

from inc_noesis import *

def registerNoesisTypes():
    handle = noesis.register("directx", ".SKE")
    noesis.setHandlerTypeCheck(handle, CheckType)
    noesis.setHandlerLoadModel(handle, LoadModel)
    return 1

def CheckType(data):
    if data[:8] != b'SKELETON':
        return 0
    return 1

def LoadModel(data, mdlList):
    bs = NoeBitStream(data)
    print('magic::',bs.readBytes(8))#SKELETON
    print('fsize:',bs.readInt64())
    print('ver?:',bs.readInt())
    print('stride?:',bs.readInt())
    print('unk:',bs.readBytes(16))
    
    #while...
    #HEAD
    print('chunk_name::',bs.readBytes(4))
    bsize, curPos = bs.readInt(), bs.getOffset()
    print('chunk_size:',bsize)
    print('unk:',bs.readBytes(8))
    print('block_size:',bs.readInt())
    bnum = bs.readInt()
    print('bone_num:',bnum)
    print('unk_name:', bs.readBytes(bs.readInt()).decode())
    print('skel_name:', bs.readBytes(bs.readInt()).decode())
    for x in range(bs.readInt()):
        print(' ', bs.readBytes(bs.readInt()).decode(), ':', bs.readInt(), bs.readInt())
    bs.seek(curPos+bsize)
    
    #DATA
    print('chunk_name::',bs.readBytes(4))#DATA
    bsize, curPos = bs.readInt(), bs.getOffset()
    iname = [bs.readInt() for x in range(bnum)]
    print('name_index:', iname)
    bs.seek(12,1)#zero
    parent = [bs.readShort() for x in range(bnum)]
    print('parent_index:', parent)
    bs.seek(14,1)#zero
    
    matrix = []
    for x in range(bnum):
        pos = NoeVec3.fromBytes(bs.readBytes(12))
        rot = NoeQuat.fromBytes(bs.readBytes(16)).toMat43().transpose()
        scl = NoeVec3.fromBytes(bs.readBytes(12))
        rot[3] = pos
        matrix.append(rot)

    bs.seek(curPos+bsize)
    
    #NAME
    print('chunk_name::',bs.readBytes(4))#NAME
    bsize, curPos = bs.readInt(), bs.getOffset()
    
    names = [bs.readBytes(bs.readInt()).decode() for x in range(bs.readInt())]
    print('names:', names)
    
    #create bones
    bones = []
    for x in range(bnum):
        bones.append(NoeBone(x, names[iname[x]], matrix[x], None, parent[x]))

    bones = rapi.multiplyBones(bones)

    mdl = NoeModel()
    mdl.setBones(bones)
    mdlList.append(mdl)
    return 1
You do not have the required permissions to view the files attached to this post.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: Harry Potter Magic Awakened - 3D animation

Post by shakotay2 »

Hi, Durik256! Well, seems there's nothing that can stop you. :)
(Parent indices at 02F8 in luna.ske. How could I miss that? :cry: I wrongly chose 0xE8 and was wondering about FFFF being at tables end, haha.)

Just as a thought (not a request): did you ever thing about a tool that can get skeletons from hex data? Something like skel2smd or alike.
(I started years ago with it but never finished. Then Bigchillghost came up with his amazing "Approaches of Parsing Bone Representations". Again I gave it a go but still WIP. Main problem is that there's so many different skeleton formats/types. For example, what comes first? Trans or Rot? It's near to impossible to find this out automatically. So you'll need to try it out. A live displaying of the skeleton would be helpful then.)

Stay tuned!
.
skel2smd.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

shakotay2 wrote: Tue Oct 18, 2022 8:53 am Parent indices
anyway they are wrong)
shakotay2 wrote: Tue Oct 18, 2022 8:53 am skel2smd
Yes, there are too many options for storing skeletons. probably it is unrealistic to fit all in a few "switches".
can add a textBox in which the user will write a template. :)
hex2SMD.png
You do not have the required permissions to view the files attached to this post.
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1002
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1171 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Bigchillghost »

shakotay2 wrote: Tue Oct 18, 2022 8:53 amMain problem is that there's so many different skeleton formats/types. For example, what comes first? Trans or Rot? It's near to impossible to find this out automatically.
That's why a text interface is desired for more flexibility and convenience.
Using ASH:
skel.png
Note that there's a bug which prevents from using the boneNameIndex to match with corresponding boneName. Setting the start address of the string pool as 0x185F should do the trick for now.
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

shakotay2 wrote: Tue Oct 18, 2022 8:53 am skel2smd or alike.
I started to make a shape, but in the end I decided to make it based on Noesis. :lol:
(Tools/Display Plagin Tools) after (Tools/Skel Finder)
tools has only 7 commands. but this should be enough for most of the skeletons. (this is a prototype, tested on 3 samples)

examples:
luna.ske from this topic:
Image
IndianaJones.msh:
Image
p1wd.skel:
Image
Skel Finder for Noesis:

*(there is also an import/export in *.skelFinder format)
**(for help: write help in template field and click run)
You do not have the required permissions to view the files attached to this post.
Last edited by Durik256 on Fri Oct 28, 2022 10:22 pm, edited 2 times in total.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: Harry Potter Magic Awakened - 3D animation

Post by shakotay2 »

Hi, having the lastest Noesis (4466?) I get ImportError: No module named noewinext with Skel Finder.
Had to comment out import noewinext to get the Skel Finder launched.
But when searching for luna.ske I get NameError: global name 'noewinext' is not defined. So noewinext is needed (dialog = noewinext.NoeUserDialog("Choose File")).

What am I doing wrong?
(I know you were the first (here on xentax) to use userEditBox, getControlById and such with Noesis, but I can't seem to find the concerning thread/post.)
Ha, found it:
shakotay2 wrote: Tue Jan 04, 2022 6:45 pm
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Spiritovod
mega-veteran
mega-veteran
Posts: 171
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 31 times
Been thanked: 153 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Spiritovod »

@shakotay2: I suppose it's the same third-party template, used by some other noesis plugins (or its variation). Should be placed in the same folder with noewin, noesis\plugins\python.
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

shakotay2 wrote: Sat Oct 22, 2022 8:08 pm import noewinext
wow. yes in the new version there is no noewinext. I have it from the old version.
I fixed everything. noewinext is no longer needed.
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

i made form. All the same, I want to fit everything into a few "switches". :lol:
can save it in .SkelFinder and open with the plug-in what i published earlier, or as an .obj point cloud. I used yours prog for visualization:
shakotay2 wrote: Fri Jun 11, 2021 8:05 pm mesh_viewer.exe
(if someone didn't know: key "P" scale points. key "L" on unlit, key "CAPS" swith +/- scale)
before saving or viewing, you must first press "run".
*(big Endian not implemented yet)
Image

i have a problem. how to inverse a 4x3 matrix. because only square matrix can be inverse. and if you just add a column, then there will be the same values ​​​​as 4x4

mat43.cpp :gives the same result as 4x4
edit: aаа, the attachment didn't add, I don't know why
Last edited by Durik256 on Thu Oct 27, 2022 4:43 am, edited 3 times in total.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: Harry Potter Magic Awakened - 3D animation

Post by shakotay2 »

Durik256 wrote: Sun Oct 23, 2022 5:13 am i made form. All the same, I want to fit everything into a few "switches". :lol:
can save it in .SkelFinder and open with the plug-in what i published earlier, or as an .obj point cloud. I used yours prog for visualization:
shakotay2 wrote: Fri Jun 11, 2021 8:05 pm mesh_viewer.exe
Well, it's not my program. Original code was made by Szymon Rusinkiewicz, whom I credited in the about box of hex2obj.
---------------------
i have a problem. how to inverse a 4x3 matrix. because only square matrix can be inverse. and if you just add a column, then there will be the same values ​​​​as 4x4

mat43.cpp :gives the same result as 4x4
Maybe this helps? https://www.quora.com/How-do-I-find-the ... 4-3-matrix
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

shakotay2 wrote: Sun Oct 23, 2022 10:04 am whom I credited in the about box of hex2obj.
ah, ok)
shakotay2 wrote: Sun Oct 23, 2022 10:04 am Maybe this helps?
Maybe, I left it for better times :D

this is probably the last my post on this thread. :lol:
no one will use this anyway.
implement 3d view in Windows Form is just fuc** :ninja: (3D points convert to 2D, and draw as bmp in pictureBox)
Image
*(mousedown and move for rotate, scroll mouse wheel for zoom)
**(the archive also has samples, Biped and cube)
***(to load a template from a file: Tools>open temp.txt)
Image
You do not have the required permissions to view the files attached to this post.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: Harry Potter Magic Awakened - 3D animation

Post by shakotay2 »

Durik256 wrote: Thu Oct 27, 2022 4:52 amno one will use this anyway.
How can you think so? :eek: "And then there were three." At least. You, me and reh. :D
Durik256 wrote: Thu Oct 27, 2022 4:52 amthis is probably the last my post on this thread. :lol:
You've done much more than to be expected. :D Thanks!

I will continue to find a way to get the parameters (addresses) required to feed both tools, yours and Bigchillghost's ASH.

My (working) skel2smd code contains DWORD addr[3]= {0x2F8, 0x1844, 0x408} ; // luna, parentIndices, bone names, ref pose matrices

I fear the task of finding those addresses must be left to the users. But with some basic knowledge they're not too hard to find.
(Says then one who chose a wrong address for luna's indices.:D )
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Durik256
ultra-veteran
ultra-veteran
Posts: 425
Joined: Wed Nov 21, 2018 7:26 pm
Has thanked: 45 times
Been thanked: 411 times

Re: Harry Potter Magic Awakened - 3D animation

Post by Durik256 »

shakotay2 wrote: Thu Oct 27, 2022 7:03 am At least. You, me and reh. :D
ha ha. need to create a new topic. :lol:
shakotay2 wrote: Thu Oct 27, 2022 7:03 am (Says then one who chose a wrong address for luna's indices.:D )
don't underestimate your abilities, you ripped models at a time when I didn't yet know how many bytes are in the float. :lol:
shakotay2 wrote: Thu Oct 27, 2022 7:03 am But with some basic knowledge they're not too hard to find.
those who do not understand at all, can perform a search for keywords like: "root", "bip", "spine", e.t.c to find a block with bones. or search for the zero matrix 4x4, 4x3...
Post Reply