Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Viking Battle for Asgard models

Post questions about game models here, or help out others!
Post Reply
Alek Sander
n00b
Posts: 10
Joined: Sat Sep 04, 2010 1:37 pm

Viking Battle for Asgard models

Post by Alek Sander »

Hi all! I'm new here and so on and etc... :)
I know the game isn't that popular, but I want to get the models from it + some understanding about 3d file format. It's more like a challenge for me (my first).

So, the models are packed in CHR_MDLS.PAK file, for which I've made a BSM script.

I've got 4 types of files:
BNS - bone structure?
COL - collision? the file has something in it only for the player model though.
DNH - have no idea, but it isn't present for all the models
SKIN - model itself, I guess...

Here is my understanding of SKIN files so far (please, don't laugh :))

Code: Select all

long	skmh
long	number of segm?
word	number of segm?
word	??? same for all
long	??? same for all

long	segm
long	number of connections between vertexes?
long	number of vertexes
long	??? not same for all

long	??? same for all
long	number of bytes per description block?
long	dummy?
long	(sometimes) 1/3 of the 8th byte in each point description block
So, a vertex is described by 18 bytes. And here I'm lost. There is no correct float value for a coordinate - it's either too big (like +38) or too small (-20). Maybe they are using half-precision here... Plus I don't know (understand) if there are normals and uv-coords, weights and other 3d data...
Here I need help!
You do not have the required permissions to view the files attached to this post.
Alek Sander
n00b
Posts: 10
Joined: Sat Sep 04, 2010 1:37 pm

Re: Viking Battle for Asgard models

Post by Alek Sander »

A little update:
A vertex is described by 24 bytes, not by 18. (it's 0x18=24)
At the end of file i think there are indices, but they are a bit strange.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Viking Battle for Asgard models

Post by Karpati »

What's about the converted files ?
You do not have the required permissions to view the files attached to this post.
Alek Sander
n00b
Posts: 10
Joined: Sat Sep 04, 2010 1:37 pm

Re: Viking Battle for Asgard models

Post by Alek Sander »

Karpati wrote:What's about the converted files ?
What do you mean?
I see you've made nice progress! But I wanted somebody to help me by actually explaining those moment I don't understand. :)
Thanks for converted files! I've already understood the formation of faces. Trying to see the vertexes...
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Viking Battle for Asgard models

Post by Karpati »

Do you have the texture files for your sample files ?

Can you send me some other sample files to [email protected] ?
(I don't have this game and I would like to test my loader module with other files.)
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Viking Battle for Asgard models

Post by Karpati »

Alek Sander wrote:A little update:
A vertex is described by 24 bytes, not by 18. (it's 0x18=24)
The vertex coords are 2 byte integers.
Alek Sander
n00b
Posts: 10
Joined: Sat Sep 04, 2010 1:37 pm

Re: Viking Battle for Asgard models

Post by Alek Sander »

Karpati wrote:Do you have the texture files for your sample files ?

Can you send me some other sample files to [email protected] ?
(I don't have this game and I would like to test my loader module with other files.)
Sending all the models I extracted from the game (9 Mb)... But I didn't find any textures, like at all! I'll get the image of the game tomorrow and will look harder.

The player model that you've converted doesn't look like the player, you know. It should look like a man. Maybe there is some clue on dimensions inside the model file?
And where did you take the .mtl description?
Image
Alek Sander
n00b
Posts: 10
Joined: Sat Sep 04, 2010 1:37 pm

Re: Viking Battle for Asgard models

Post by Alek Sander »

Karpati wrote:The vertex coords are 2 byte integers.
In your converted models you add 1000 to the X coord for each vertex. Maybe that is the reason model of the player doesn't look right?
And what about vt (vertex textures)? How do you calculate them?
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Viking Battle for Asgard models

Post by Karpati »

Sending all the models I extracted from the game (9 Mb)... But I didn't find any textures, like at all! I'll get the image of the game tomorrow and will look harder.

The player model that you've converted doesn't look like the player, you know. It should look like a man. Maybe there is some clue on dimensions inside the model file?
Thank you for your sample files I received it successfully.

The vertex size=24 works on the other models like swords, shields (geom is OK; UV is OK), but does not work on the player model (geom is not OK; UV is OK).

I don't understand why ?
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Viking Battle for Asgard models

Post by Karpati »

In your converted models you add 1000 to the X coord for each vertex. Maybe that is the reason model of the player doesn't look right?
And what about vt (vertex textures)? How do you calculate them?
You have right, I used that temporally to separate the different submodels.

How to get the UV-s (vertex size=24):

X,Y,Z: 2 bytes Integer
skip the next 7*2 bytes
U=2 bytes Word/8192
V=2 bytes Word/8192
skip the remaining bytes
Alek Sander
n00b
Posts: 10
Joined: Sat Sep 04, 2010 1:37 pm

Re: Viking Battle for Asgard models

Post by Alek Sander »

Look at the player model, the 3rd and 4th submodel (segm part). The vertex size here is not 24, but 44.
Why to divide UV by 8192? Where did you get that number? (Sorry for these lame questions :))
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Viking Battle for Asgard models

Post by Karpati »

Alek Sander wrote:Look at the player model, the 3rd and 4th submodel (segm part). The vertex size here is not 24, but 44.
I know that...
Alek Sander wrote:Why to divide UV by 8192? Where did you get that number?
It stores the 'float' UV on the non float type (word/word ---> float). I checked out the UV datas by my Unwrap UV function and I 'dreamed' this value.
Post Reply