Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe

[Request] Loong

Post questions about game models here, or help out others!
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

Awesomeness.
Didn't notice that about the integer being vertex offsets.
The face direction looks intermittent, even on some fsm models the faces are wrong way around.
I'll have a look see if it's model type.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [Request] Loong

Post by finale00 »

Image

Now...skel files.

It is not obvious which skel file is associated with which model. Kind of weird.

At a glance, it looks like you have the skeleton names, followed by a list of integers which I guess might have something to do with indexing and parenting and stuff. Then you get a whole bunch of floats, which I would suppose are the bone transforms among other things.
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

There's way too much info in the Fskel files to be just skeleton data.
Also the 'skeleton' is identical in all 5 Fskel files I have.
Looking at it with the data visualizer in hex workshop, you can clearly see large chunks which are about 3k each, reckon this is the animation files for the characters.
Chunks are Poses?
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [Request] Loong

Post by finale00 »

Considering that it's in a folder called "animation" that would be a reasonable guess.
But there aren't any other files then.

Maybe the skeleton is at the top, followed by animation?
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

Yeah, I think they are animation frames, but I don't really know how they work.

5th byte in the header gives the number of frames.
Header also gives the offset for the start of the frames.
Each frame seems to consists of:

Code: Select all

62616B31    "bak1" - always the same as the file name
7F00 - num_bones
00 - dunno
byte + 7 floats (num_bones of these)
00 - byte
8988083D - dunno
00000000 - dunno
Edit - seen this before, each file might represent a set of animations for a particular action, like attack, defend, jumping, casting spells....
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [Request] Loong

Post by finale00 »

Oh uh actually when we were looking at those fskin files we found that there was a section of stuff right after the indices, which corresponded bone indices that were referenced in the vertex section.

So....that might be it lol

The format for each struct is

Code: Select all

dword index
float[16] matrix
But if you were to ask me how to connect those, I would have no clue.
Parenting might be implicit based on how they are stored? Though I've looked at a lot of formats, I never really went to look at skeleton data, so I'm not sure of the various ways to store the data that would optimize stuff.
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

Sorta found a hierarchy for the skeleton, it's in the numbers after the names, no idea how it works mind.
Was a bit confusing coz the number of bones x 16 was the chunk size for that data.
Don't know what the extra 0's are at the end.
Makes some sense, the second column goes 0 to num_bones and the end value is the parent bone?
Needs a diagram.
BTW, did some cutting and pasting in the text prog, so it might not be as accurate as it should be.

Anyway:

Code: Select all

01000000 00000000 00000000 FFFFFFFF 
05000000 01000000 7B000000 7C000000 7D000000 7E000000 01000000 00000000 
07000000 02000000 5D000000 62000000 67000000 6C000000 71000000 76000000 02000000 01000000 
05000000 03000000 4B000000 50000000 55000000 59000000 03000000 02000000 
01000000 04000000 04000000 03000000 
05000000 05000000 45000000 47000000 49000000 4A000000 05000000 04000000 
03000000 06000000 10000000 2A000000 06000000 05000000 
04000000 07000000 08000000 0E000000 0F000000 07000000 06000000 
00000000 08000000 06000000 
01000000 09000000 09000000 08000000 
01000000 0A000000 0A000000 09000000 
01000000 0B000000 0B000000 0A000000 
01000000 0C000000 0C000000 0B000000 
01000000 0D000000 0D000000 0C000000 
00000000 0E000000 06000000 
00000000 0F000000 06000000 
00000000 10000000 05000000 
02000000 11000000 29000000 11000000 10000000 
01000000 12000000 12000000 11000000 
01000000 13000000 13000000 12000000 
06000000 14000000 18000000 1C000000 20000000 24000000 28000000 14000000 13000000 
01000000 15000000 15000000 14000000 
01000000 16000000 16000000 15000000 
01000000 17000000 17000000 16000000 
00000000 18000000 13000000 
01000000 19000000 19000000 18000000 
01000000 1A000000 1A000000 19000000 
01000000 1B000000 1B000000 1A000000 
00000000 1C000000 13000000 
01000000 1D000000 1D000000 1C000000 
01000000 1E000000 1E000000 1D000000 
01000000 1F000000 1F000000 1E000000 
00000000 20000000 13000000 
01000000 21000000 21000000 20000000 
01000000 22000000 22000000 21000000 
01000000 23000000 23000000 22000000 
00000000 24000000 13000000 
01000000 25000000 25000000 24000000 
01000000 26000000 26000000 25000000 
01000000 27000000 27000000 26000000 
00000000 28000000 13000000 
00000000 29000000 10000000 
00000000 2A000000 05000000 
02000000 2B000000 44000000 2B000000 2A000000 
01000000 2C000000 2C000000 2B000000 
02000000 2D000000 43000000 2D000000 2C000000 
06000000 2E000000 32000000 36000000 3A000000 3E000000 42000000 2E000000 2D000000 
01000000 2F000000 2F000000 2E000000 
01000000 30000000 30000000 2F000000 
01000000 31000000 31000000 30000000 
00000000 32000000 2D000000 
01000000 33000000 33000000 32000000 
01000000 34000000 34000000 33000000 
01000000 35000000 35000000 34000000 
00000000 36000000 2D000000 
01000000 37000000 37000000 36000000 
01000000 38000000 38000000 37000000 
01000000 39000000 39000000 38000000 
00000000 3A000000 2D000000 
01000000 3B000000 3B000000 3A000000 
01000000 3C000000 3C000000 3B000000 
01000000 3D000000 3D000000 3C000000 
00000000 3E000000 2D000000 
01000000 3F000000 3F000000 3E000000 
01000000 40000000 40000000 3F000000 
01000000 41000000 41000000 40000000 
00000000 42000000 2D000000 
00000000 43000000 2C000000 
00000000 44000000 2A000000 
00000000 45000000 04000000 
01000000 46000000 46000000 45000000 
00000000 47000000 04000000 
01000000 48000000 48000000 47000000 
00000000 49000000 04000000 
00000000 4A000000 04000000 
00000000 4B000000 02000000 
01000000 4C000000 4C000000 4B000000 
01000000 4D000000 4D000000 4C000000 
01000000 4E000000 4E000000 4D000000 
01000000 4F000000 4F000000 4E000000 
00000000 50000000 02000000 
01000000 51000000 51000000 50000000 
01000000 52000000 52000000 51000000 
01000000 53000000 53000000 52000000 
01000000 54000000 54000000 53000000 
00000000 55000000 02000000 
01000000 56000000 56000000 55000000 
01000000 57000000 57000000 56000000 
01000000 58000000 58000000 57000000 
00000000 59000000 02000000 
01000000 5A000000 5A000000 59000000 
01000000 5B000000 5B000000 5A000000 
01000000 5C000000 5C000000 5B000000 
00000000 5D000000 01000000 
01000000 5E000000 5E000000 5D000000 
01000000 5F000000 5F000000 5E000000 
01000000 60000000 60000000 5F000000 
01000000 61000000 61000000 60000000 
00000000 62000000 01000000 
01000000 63000000 63000000 62000000 
01000000 64000000 64000000 63000000 
01000000 65000000 65000000 64000000 
01000000 66000000 66000000 65000000 
00000000 67000000 01000000 
01000000 68000000 68000000 67000000 
01000000 69000000 69000000 68000000 
01000000 6A000000 6A000000 69000000 
01000000 6B000000 6B000000 6A000000 
00000000 6C000000 01000000 
01000000 6D000000 6D000000 6C000000 
01000000 6E000000 6E000000 6D000000 
01000000 6F000000 6F000000 6E000000 
01000000 70000000 70000000 6F000000 
00000000 71000000 01000000 
01000000 72000000 72000000 71000000 
01000000 73000000 73000000 72000000 
01000000 74000000 74000000 73000000 
01000000 75000000 75000000 74000000 
00000000 76000000 01000000 
01000000 77000000 77000000 76000000 
01000000 78000000 78000000 77000000 
01000000 79000000 79000000 78000000 
01000000 7A000000 7A000000 79000000 
00000000 7B000000 00000000 
00000000 7C000000 00000000 
00000000 7D000000 00000000 
00000000 7E000000 00000000 
00000000             
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [Request] Loong

Post by finale00 »

Which file is this?
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

It's bak1.FSKEL. offset 3908 (decimal)
Think they are all the same in the ones I have.
pixellegolas
ultra-veteran
ultra-veteran
Posts: 423
Joined: Mon Aug 11, 2008 11:30 pm
Has thanked: 27 times
Been thanked: 15 times

Re: [Request] Loong

Post by pixellegolas »

I noticed that a game called Blood and soul uses the same format as Loong:

Image

Almost all files seem to work except som .FAK files

I attached one .fak here
You do not have the required permissions to view the files attached to this post.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [Request] Loong

Post by finale00 »

Might be a different vertex format that I didn't catch.

It may even be the same game just published under a different name.
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

It's a rat type thing on a chest.
You got the texture for that? TW_d.TGA (or .dds)

16 bytes per vertex instead of 22.
Had to hash out 4 lines of materials code for it to work.

Code: Select all

    def parse_vertices(self, numVerts, vertGroups):
        
        for vertCount in vertGroups:
            vertBuff = self.inFile.readBytes(vertCount*16)
            self.vertBuffs.append(vertBuff)

Code: Select all

            rapi.rpgBindPositionBufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, 16, 0)
            rapi.rpgBindNormalBufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, 16, 6)
            rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, 16, 12)
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [Request] Loong

Post by finale00 »

Ok I've fixed my script.

The vertType appears to be that float when you start the vertex section (0.125 vs 0.033333....).
I rounded it off to 3 places in the script cause I don't like floating point comparison.

The matNum I wrote down before is correct.
It's just that some of them might be -1 and I didn't check that lol

I still haven't figured out how to determine whether the faces should be drawn backwards or not...
pixellegolas
ultra-veteran
ultra-veteran
Posts: 423
Joined: Mon Aug 11, 2008 11:30 pm
Has thanked: 27 times
Been thanked: 15 times

Re: [Request] Loong

Post by pixellegolas »

Forgot adding the dds before. Here it is
You do not have the required permissions to view the files attached to this post.
Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

Re: [Request] Loong

Post by Ninja »

Thanks, btw errors on D06.fak (in the original samples)

A lot of the models need both sides of a face drawn.
Maybe they just don't bother? they are fairly low poly.
Post Reply