Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

noesis script error applying animations to model. "type is not a list"

Featured Replies

I've been battling this script for the last 3 hours trying to get the animation data to show up. I know the format; it isn't hard, I just.... it won't load. the format is

u32 NumBones @ 0x00;
u32 NumFrames @ 0x04;
u96 Pos @ 0x08;
u32 Unk @ 0x14;
u128 Rotation @ 0x18;
u96 Scale @ 0x28;

u32 Padding @ 0x34;

With numbones and frames being headers that dont repeat. thats it! (I think)

 

The game is Hydro Thunder Hurricane, big Endian.

The current script is attached, along with a sample model and animation file for said model. Any help would be greatly appreciated.

fmt_dat_0.py

Bab_Or.15.zip

Edited by p4ka
stange file location in post.

  • Supporter

Whom is the script from?

If it's yours I'd recommend to convert it to blender python.

Because, using Noesis animations is fine as long as it works but you'll usually hit a wall when an error pops up.

If you urgently need to do it with Noesis find a script for any working format using NoeAnim() and print out the bones.

Compare them to your bone "list" which Noesis claims not to be a list (that's this python "list versa tuple" shxt I guess, so not a matter of Noesis itself):

[(NoeBone:0,root,None,-1), (NoeBone:1,spherebottom,None,0), (NoeBone:2,spherebase,None,1), (NoeBone:3,ringA,None,2), (NoeBone:4,armA1,None,3), (NoeBone:5,armA1a,None,4), (NoeBone:6,armA2,None,3), (NoeBone:7,armA2a,None,6), (NoeBone:8,armA3,None,3), (NoeBone:9,armA3a,None,8), (NoeBone:10,armA4,None,3), (NoeBone:11,armA4a,None,10), (NoeBone:12,ringB,None,2), (NoeBone:13,armB1,None,12), (NoeBone:14,armB1a,None,13), (NoeBone:15,armB2,None,12), (NoeBone:16,armB2a,None,15), (NoeBone:17,sphereArm,None,2), (NoeBone:18,sphereArma,None,17), (NoeBone:19,base1,None,0), (NoeBone:20,base2,None,0)]

 

edit: I compared to a bone list from Durik256's .x script and it starts with ( instead of [:

((NoeBone:0,SCENE_ROOT,'',-1),

 

Edited by shak-otay

  • Author

I am not incredibly knowledgeable with scripting, I was provided a model loading script and am attempting to add animation function. If I were to make this a blender script, how might I go about implementing the model loading + animation loading? Thank you for the response:)

  • Supporter

Well, it's python, either way.

Will be easier to find out why your bones' list doesn't meet the requirements.

(There was an anim project SoF, as of Nov 2024, which contains a def parseBone(self):)

Your bones:

bones.append(NoeBone(x, name, NoeMat43()))

SoF bones:

# create NoeBone
            noeBone = NoeBone(len(noeBones), boneName, boneMatrix, bonePName, -1)

Your line is missing the parent bone's name, maybe that's an issue?

 

edit: too strange - I checked the SoF bones' list, seems [( or (( doesn't matter:

[(NoeBone:0,Bip01,'Scene Root',-1), (NoeBone:1,Bip01 Footsteps,'Bip01',-1), (NoeBone:2,Bip01 Head,'Bip01 Neck',-1), (NoeBone:3,Bip01 L Calf,'Bip01 L Thigh',-1), (NoeBone:4,Bip01 L Clavicle,'Bip01 Neck',-1), (NoeBone:5,Bip01 L Finger0,'Bip01 L Hand',-1), (NoeBone:6,Bip01 L Foot,'Bip01 L HorseLink',-1), (NoeBone:7,Bip01 L Forearm,'Bip01 L UpperArm',-1), ...

(NoeBone:25,Bip01 R UpperArm,'Bip01 R Clavicle',-1), (NoeBone:26,Bip01 Spine,'Bip01 Pelvis',-1), (NoeBone:27,Bip01 Spine1,'Bip01 Spine',-1)]

 

Edited by shak-otay

  • Author
1 hour ago, shak-otay said:

Well, it's python, either way.

Will be easier to find out why your bones' list doesn't meet the requirements.

(There was an anim project SoF, as of Nov 2024, which contains a def parseBone(self):)

Your bones:

bones.append(NoeBone(x, name, NoeMat43()))

SoF bones:

# create NoeBone
            noeBone = NoeBone(len(noeBones), boneName, boneMatrix, bonePName, -1)

Your line is missing the parent bone's name, maybe that's an issue?

 

edit: too strange - I checked the SoF bones' list, seems [( or (( doesn't matter:

[(NoeBone:0,Bip01,'Scene Root',-1), (NoeBone:1,Bip01 Footsteps,'Bip01',-1), (NoeBone:2,Bip01 Head,'Bip01 Neck',-1), (NoeBone:3,Bip01 L Calf,'Bip01 L Thigh',-1), (NoeBone:4,Bip01 L Clavicle,'Bip01 Neck',-1), (NoeBone:5,Bip01 L Finger0,'Bip01 L Hand',-1), (NoeBone:6,Bip01 L Foot,'Bip01 L HorseLink',-1), (NoeBone:7,Bip01 L Forearm,'Bip01 L UpperArm',-1), ...

(NoeBone:25,Bip01 R UpperArm,'Bip01 R Clavicle',-1), (NoeBone:26,Bip01 Spine,'Bip01 Pelvis',-1), (NoeBone:27,Bip01 Spine1,'Bip01 Spine',-1)]

 

pelvis? hand? are you saying these are the bones in the model? the bones in the actual model seem to show up fine, they are properly named and placed. alsow what is SoF?image.thumb.png.4f2208d03cbad91dc35f23bae85e5312.png

  • Supporter

Forget about SoF (Scion of Fate) - it was just meant to be a working example.

Quote

Your line is missing the parent bone's name, maybe that's an issue?

What I meant, to include the parent bone names into your bones' list:

0 root base2
1 spherebottom root
2 spherebase spherebottom
3 ringA spherebase
4 armA1 ringA
5 armA1a armA1
6 armA2 ringA
7 armA2a armA2
8 armA3 ringA
9 armA3a armA3
10 armA4 ringA
11 armA4a armA4
12 ringB spherebase
13 armB1 ringB
14 armB1a armB1
15 armB2 ringB
16 armB2a armB2
17 sphereArm spherebase
18 sphereArma sphereArm
19 base1 root
20 base2 root

Edited by shak-otay

  • Author

are those in the model? i havent seen any trace of anything like that. sorry if im being insufferably stupid here, im new and trying my best :c

Edited by p4ka

  • Author

I am aware, but I haven't seen any parent bones anywhere in these models; the only bones I've seen are shown in the screenshot shared above.

 

 

Edited by p4ka

  • Supporter

Your script reads a parent index. So I used that to get parent bone names. And from the skeleton in Noesis it looks like there are parented bones.

ParentedBones.png

Edited by shak-otay

  • Author

Ah, so it reads the parent index; it just doesn't add the parent bones to the list, is what you're saying?

  • Author

trying to use noeBone = NoeBone(len(noeBones), boneName, boneMatrix, bonePName, -1) tells me that noebones isnt defined. also, what could be causing the type is not a list issue then? durik managed to write a working animation script in around 30 minutes on his phone, but he then refused to send it or explain what i was missing. so i must be missing something obvious.

  • Supporter

Yeah, Durik is king. We need to learn from him.:classic_wink: (From his released scripts.)

Edited by shak-otay

  • Author

i just wish i understood 😞

  • Supporter

We need to find out whether the correct parameters are passed to NoeAnim().

I found NoeAnim(name,bones,animL,matFrame,1)

for example (so 5 instead of 4 parameters). (Where you have to keep in mind that function override might be used.)

anim = NoeAnim("test", bones, frameCount, animFrameMats, 20)

("Mats" means "matrices".)

Well, all examples have those frame matrices as a parameter.

Edited by shak-otay

  • Author

added some debug prints, heres what im getting now.


Loading model...
Reading number of strings...
Number of strings: 10
Looping through strings...
  Reading string 0
  Reading string 1
  Reading string 2
  Reading string 3
  Reading string 4
  Reading string 5
  Reading string 6
  Reading string 7
  Reading string 8
  Reading string 9
String data read successfully.
File extension: .amdl
Loading .amdl model...
Reading number of bones...
Number of bones: 21
Looping through bone names...
  Reading bone name 0
  Reading bone name 1
  Reading bone name 2
  Reading bone name 3
  Reading bone name 4
  Reading bone name 5
  Reading bone name 6
  Reading bone name 7
  Reading bone name 8
  Reading bone name 9
  Reading bone name 10
  Reading bone name 11
  Reading bone name 12
  Reading bone name 13
  Reading bone name 14
  Reading bone name 15
  Reading bone name 16
  Reading bone name 17
  Reading bone name 18
  Reading bone name 19
  Reading bone name 20
Bone names read successfully.
Looping through parent indices...
  Reading parent index 0
  Reading parent index 1
  Reading parent index 2
  Reading parent index 3
  Reading parent index 4
  Reading parent index 5
  Reading parent index 6
  Reading parent index 7
  Reading parent index 8
  Reading parent index 9
  Reading parent index 10
  Reading parent index 11
  Reading parent index 12
  Reading parent index 13
  Reading parent index 14
  Reading parent index 15
  Reading parent index 16
  Reading parent index 17
  Reading parent index 18
  Reading parent index 19
  Reading parent index 20
Bone parent indices read successfully.
Looping through bone matrices...
  Reading bone matrix 0
  Reading bone matrix 1
  Reading bone matrix 2
  Reading bone matrix 3
  Reading bone matrix 4
  Reading bone matrix 5
  Reading bone matrix 6
  Reading bone matrix 7
  Reading bone matrix 8
  Reading bone matrix 9
  Reading bone matrix 10
  Reading bone matrix 11
  Reading bone matrix 12
  Reading bone matrix 13
  Reading bone matrix 14
  Reading bone matrix 15
  Reading bone matrix 16
  Reading bone matrix 17
  Reading bone matrix 18
  Reading bone matrix 19
  Reading bone matrix 20
Bone matrices read successfully.
Skipping extra bone floats...
Skipped extra bone floats.
AMDL bone data processing complete.
Reading vertex stride and size...
Vertex stride: 36 Vertex buffer size: 1264500
Vertex buffer read successfully.
Reading index size and type...
Index buffer size: 162624 Index type: 2
Index buffer read successfully.
Rendering context created.
Position buffer bound.
UV buffer bound.
Setting data type and stride...
Index data type: 4 Index stride: 2
Committing triangles...
Triangles committed.
Model constructed, bones set.
mdlList before append - type: <class 'list'>
mdl before append - type: <class 'inc_noesis.NoeModel'>
Attempting to load animation for .amdl...
Animation path: C:\Users\admin\Desktop\lol\base\AkAnimatedModelAsset\Props\Specific\animation.6.xba
First 8 bytes of anim_data (hex): 000000150000003B
Number of bones in animation: 21
Number of frames: 59
Error loading or applying animation: Type is not a list
Warning: Failed to load animation.
mdlList after append - type: <class 'list'>
Model loaded successfully.

  • Author

am stuck, need help 😞

Edited by p4ka

  • Supporter

Instead of trying to get the whole animation in one rush I'd suggest to keep it simple, doing things step by step and apply translation frames only to the skeleton as a first step.

Without "local matrix to world space" transforms and what not.

edit: I've logged the transform values to a file and will copy them to an smd file asap.

First frame, 21 bones:

0.0 0.0 0.0
-72.64942169189453 0.0 -4.330243427830283e-06
77.16493225097656 1.7507283400775009e-09 4.599949534167536e-06
46.5029182434082 -7.353656172881529e-08 8.415699085162487e-06
4.1263101024924254e-07 -4.545114791199012e-07 35.53275680541992
1.3877228411729448e-05 4.317652155805263e-07 94.50870513916016
6.228190159163205e-06 35.74390411376953 -9.596220970153809
2.0719049643957987e-05 5.4687234296579845e-06 70.68326568603516
7.33379920347943e-06 -20.28306007385254 -29.174890518188477
-8.619622349215206e-07 1.0661287888069637e-06 57.21505355834961
2.019818566623144e-06 -40.31644058227539 3.9794528484344482
1.0784087862703018e-05 -1.0756863957794849e-05 67.97295379638672
64.90574645996094 -2.4104177951812744 1.1687354344758205e-05
1.982336470973678e-06 2.004313046199968e-06 30.847885131835938
-3.346835455886321e-06 5.225934955888079e-07 83.95243835449219
-3.981228019256378e-06 -30.0523624420166 -6.9604315757751465
4.136804818699602e-06 -1.3292576568346703e-06 69.42603302001953
25.403484344482422 25.90843963623047 26.38455581665039
1.7495947304269066e-06 5.802280611533206e-07 53.99333572387695
-41.73711013793945 0.0 -2.4877258510969114e-06
-24.533672332763672 0.0 -1.4623210518038832e-06

 

edit: worked (translation only)

bab-anim-00033.jpg

bab-anim-00040.jpg

bab-anim-00045.jpg

bab-anim-00050.jpg

Edited by shak-otay

  • Author

PROGRESS. this is good, thank you, if this is working, where do you think the error is arising? duriks advice was "

You use NoeAnim, and also KFbones. Look in inc_noesis.py at the NoeAnim class and what arguments it accepts"

and that the format is "

uint numBone
uint numFrame

Key:
    vec4 pos (x,y,z, not use)
    quat rot (x,y,z,w)
    vec4 scl (x,y,z, not use)"

(ill make sure to credit durk on the script as he made the base for it lol)

  • Supporter

Hi, when Durik says that only rot (as quaternions) is used I'm surprised why your script reads

trans = NoeVec3()
quat = NoeQuat()
scale = NoeVec3()

Why? Did you analyse the xba format? Or did you just copy the "creation keyframed bone list" from some other script?

Or did Durik mean to use rot only (to ease the process)?

 

Another thing is that you seem to call NoeAnim() before creating frameMats, afaics. But I may be wrong.

 

Edited by shak-otay

  • Author

the .xba format was just the extension i named it arbitrarily, i set it as vec3's as the 4th float for the trans and scale are unused. padding.

  • Author
On 2/3/2025 at 4:55 AM, shak-otay said:

Instead of trying to get the whole animation in one rush I'd suggest to keep it simple, doing things step by step and apply translation frames only to the skeleton as a first step.

Without "local matrix to world space" transforms and what not.

edit: I've logged the transform values to a file and will copy them to an smd file asap.

First frame, 21 bones:

0.0 0.0 0.0
-72.64942169189453 0.0 -4.330243427830283e-06
77.16493225097656 1.7507283400775009e-09 4.599949534167536e-06
46.5029182434082 -7.353656172881529e-08 8.415699085162487e-06
4.1263101024924254e-07 -4.545114791199012e-07 35.53275680541992
1.3877228411729448e-05 4.317652155805263e-07 94.50870513916016
6.228190159163205e-06 35.74390411376953 -9.596220970153809
2.0719049643957987e-05 5.4687234296579845e-06 70.68326568603516
7.33379920347943e-06 -20.28306007385254 -29.174890518188477
-8.619622349215206e-07 1.0661287888069637e-06 57.21505355834961
2.019818566623144e-06 -40.31644058227539 3.9794528484344482
1.0784087862703018e-05 -1.0756863957794849e-05 67.97295379638672
64.90574645996094 -2.4104177951812744 1.1687354344758205e-05
1.982336470973678e-06 2.004313046199968e-06 30.847885131835938
-3.346835455886321e-06 5.225934955888079e-07 83.95243835449219
-3.981228019256378e-06 -30.0523624420166 -6.9604315757751465
4.136804818699602e-06 -1.3292576568346703e-06 69.42603302001953
25.403484344482422 25.90843963623047 26.38455581665039
1.7495947304269066e-06 5.802280611533206e-07 53.99333572387695
-41.73711013793945 0.0 -2.4877258510969114e-06
-24.533672332763672 0.0 -1.4623210518038832e-06

 

edit: worked (translation only)

bab-anim-00033.jpg

bab-anim-00040.jpg

bab-anim-00045.jpg

bab-anim-00050.jpg

so what exactly allowed for this? how can i access it?

  • Supporter

In the for frame/for boneIndex loop I logged trans to a file, despite the type error (had moved the anim = ... line behind it, iirc).

Then copied the contents to an smd file (created using Noesis).

  • Author

@shak-otay  got it working!!!!! now i just need to find where the bone weights are and how to make the skeleton deform the mesh! 

 

 

 

fmt_dat_0.py
🙂

image.png

Edited by p4ka

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.