READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Settlers 7 Models help

Post questions about game models here, or help out others!
MaximilianPs
n00b
Posts: 16
Joined: Mon Aug 29, 2011 8:01 pm
Has thanked: 8 times

Settlers 7 Models help

Post by MaximilianPs » Mon Aug 29, 2011 8:08 pm

I've succesfully extracted the S7 models :ninja: (lol)
but i'm lost on importing 'em
they seems more like an xml file than a real meshes file so i'm here asking for help

help :D
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: 296 times

Re: Settlers 7 Models help

Post by finale00 » Mon Aug 29, 2011 8:50 pm

Yes, the xml file is indeed extensible markup language. It is just defining materials; not too special.

Format doesn't look too bad. Only took a quick glance though. Although I say it doesn't look too bad, chances of figuring it out 100% and re-importing, can't say.

There seems to be some chunk tags, but didn't verify. Probably not a chunk-based format; they just decided to throw in random tags and random stuff after it.

The outline looks like this:

Code: Select all

header
textures

vertices section
another vertices section
more vertex related

faces (bunch of indices)
Bones
Some of them have the tag, some of them don't. The tag appears after an integer, and I see VST0, VST1, and VST2. Maybe it just indicates what type of vertex information you're looking at.

Might code something up later to see if my guesses are accurate.
Or maybe someone that's looking for practice can get around to it.

Now, what did you use to extract them?

MaximilianPs
n00b
Posts: 16
Joined: Mon Aug 29, 2011 8:01 pm
Has thanked: 8 times

Re: Settlers 7 Models help

Post by MaximilianPs » Mon Aug 29, 2011 10:35 pm

s7bbaex which coming from here (should be 1.1 but i'm not sure)
written by TheMachine

I've been at your conclusion too, maybe it's just so easy, and it's a 3D ascii file (maybe a directX file), but i'm not so good hex file reading/converting, that's why i'm looking for some ninja which are good to extract the correct vertex/face index.. after that, i think someone can made an importer shouldn't be a problem... maybe with 3dsmax script ;)

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: 296 times

Re: Settlers 7 Models help

Post by finale00 » Mon Aug 29, 2011 11:02 pm

No lol it's not ascii nor is it directx.
It's just less confusing than the more complicated formats.

Post more samples of varying sizes, from small ones to slightly larger ones.
I can't tell much from the same file (although there are 4, it's basically the same thing)

MaximilianPs
n00b
Posts: 16
Joined: Mon Aug 29, 2011 8:01 pm
Has thanked: 8 times

Re: Settlers 7 Models help

Post by MaximilianPs » Tue Aug 30, 2011 12:37 pm

The contents of this post was deleted because of possible forum rules violation.

anujraghav
ultra-n00b
Posts: 1
Joined: Sun Nov 14, 2010 11:28 am

Re: Settlers 7 Models help

Post by anujraghav » Wed Aug 08, 2012 6:45 am

so any news on it , is there anyway to modify them , or use custom made models

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Settlers 7 Models help

Post by TaylorMouse » Wed Aug 08, 2012 12:56 pm

Can't seem to download s7bbaex.

Can anyone help.

I dl the file, checking it right now

T.

delium
n00b
Posts: 18
Joined: Mon Jun 14, 2010 11:26 am
Has thanked: 9 times
Been thanked: 3 times

Re: Settlers 7 Models help

Post by delium » Wed Aug 08, 2012 3:37 pm

Settler 7 uses the Vision Engine (http://en.wikipedia.org/wiki/Vision_%28game_engine%29) as you can se there, "Orc Must Die!" uses this engine too.

so perhapse the model import script for noesis works also with the settler 7 models?

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Settlers 7 Models help

Post by TaylorMouse » Wed Aug 08, 2012 8:01 pm

delium wrote:Settler 7 uses the Vision Engine (http://en.wikipedia.org/wiki/Vision_%28game_engine%29) as you can se there, "Orc Must Die!" uses this engine too.

so perhapse the model import script for noesis works also with the settler 7 models?

Naa, already tried that :/

T.

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: 296 times

Re: Settlers 7 Models help

Post by finale00 » Wed Aug 08, 2012 8:03 pm

I couldn't figure it out with just one model sample. Three were included in the folder but they're just LOD's and basically the same thing.

Sammie
veteran
Posts: 106
Joined: Wed Apr 25, 2012 12:27 pm
Has thanked: 9 times
Been thanked: 34 times

Re: Settlers 7 Models help

Post by Sammie » Sun Aug 12, 2012 9:37 am

finale00 wrote:I couldn't figure it out with just one model sample. Three were included in the folder but they're just LOD's and basically the same thing.
I'm interested in a .s7m to obj/3ds-Converter. I've upload 4 more models for you.
1 Unit, 1 Animal, 2 Buildings- if you need more models, let me know.

models.rar (Download-Button is the small one in the center of the page)
Last edited by Sammie on Tue Aug 14, 2012 11:04 pm, edited 2 times in total.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Settlers 7 Models help

Post by TaylorMouse » Sun Aug 12, 2012 11:01 am

I have the settlers 7, so could you upload the s7bbaex extracter so i can do the extraction of the bba file myself. Thnx

T.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Settlers 7 Models help

Post by TaylorMouse » Sun Aug 12, 2012 10:02 pm

Char[4] -> S7MF
UInt32 -> Version Minor
UInt32 -> Major Version

Pos 52 -> Length of the names -2

Pos 65 -> start of the names of the maps, textures and the name of the object devided by \0

Don't seem to find the offset of VST0, VST1 and VST2

The UInt32 just in front of VST is always 24
and the number befor that is (I think) a UInt32 that contains the number of vertices..

Weird... could it be compressed ???

in the list there are a lot of NaN ( Not A Number) ???


T.
Last edited by TaylorMouse on Sun Aug 12, 2012 10:19 pm, edited 1 time in total.

Sammie
veteran
Posts: 106
Joined: Wed Apr 25, 2012 12:27 pm
Has thanked: 9 times
Been thanked: 34 times

Re: Settlers 7 Models help

Post by Sammie » Sun Aug 12, 2012 10:06 pm

TaylorMouse wrote:I have the settlers 7, so could you upload the s7bbaex extracter so i can do the extraction of the bba file myself. Thnx

T.
Download: s7bbaex.rar

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: 296 times

Re: Settlers 7 Models help

Post by finale00 » Sun Aug 12, 2012 11:30 pm

TaylorMouse wrote:Char[4] -> S7MF
UInt32 -> Version Minor
UInt32 -> Major Version

Pos 52 -> Length of the names -2

Pos 65 -> start of the names of the maps, textures and the name of the object devided by \0

Don't seem to find the offset of VST0, VST1 and VST2

The UInt32 just in front of VST is always 24
and the number befor that is (I think) a UInt32 that contains the number of vertices..

Weird... could it be compressed ???

in the list there are a lot of NaN ( Not A Number) ???


T.
I think it is a chunk-based format, where each chunk is 16-byte aligned.
I think it should be parsed sequentially, remembering to pad the end of each chunk appropriately.

First you start by reading in the texture names, then you read the VST0, then VST1, maybe VST2, followed by a bunch of indices.

Code: Select all

short[2] chunkID, ?
int chunksize
int structsize
char[4] chunktag
For example, consider M_MF_Musketeer_01.s7m. At offset 224, you read two shorts. Then the chunk size 26808. The struct size is 24, and the chunk ID is VST0

Then you read 26808 bytes, followed by some padding. Note that in the header at offset 12 you get the vert count 1117, and that * 24 = 26808.

Then you read another two shorts, followed by 4468 chunk size, a 4 for struct size, then VST1.

Read in 4468 bytes, then you see more 0 padding to the next 16 bytes. Again, vert count of 1117 * 4 = 4468.

Repeat for VST2. 8936 / 8 = 1117.

Afterwards, there's a chunk with no ID (1st short is a 1), but if we follow the pattern and pad the chunk, we'll come to the next chunk (1st short is a 4), which doesn't have a chunk ID either but you can see that it follows the same chunk struct and this one holds a bunch of indices.

7206 chunk size for faces, short per index, and 7206 / 2 = 3603, which is the integer right after the vert count, so there's your index count.

It might be using half-floats to store a lot of data, I don't know.

The fact that a couple structs aren't following the chunk struct might mean they just hardcode it as TexNames, VST0, VST1, VST2, unk, faces

EDIT:

Ok ya it's a chunk-based format.
The 4-char tag is not really important.
The first short is the chunk type:

1 - VST0
2 - VST1
3 - VST2
4 - faces
5 - that VBIN chunk, skeleton or whatever "Shadow" could refer to
6 - textures
7 - small chunk, not sure

16-byte aligned

Code: Select all

def seek_padding(self, size):
    ''' 16-byte chunk alignment'''
    
    pad = (16 - (size % 16)) % 16
    self.inFile.seek(pad, 1)
    
def parse_file(self):
    '''Main parser method'''
    
    idstring = self.inFile.readBytes(4)
    unk, unk, numVerts, numIdx = self.inFile.read('4L')
    self.inFile.read('2H')
    self.inFile.read('6f')
    
    # chunk based parsing
    while not self.inFile.checkEOF():
        chunkType, unk = self.inFile.read('2H')
        chunkSize = self.inFile.readUInt()
        structSize = self.inFile.readUInt()
        chunkID = noeStrFromBytes(self.inFile.readBytes(4))
        
        if chunkID == 1:
            self.parse_VST0(structSize)
        elif chunkID == 2:
            self.parse_VST1(structSize)
        elif chunkID == 3:
            self.parse_VST2(structSize)
        elif chunkID == 4:
            self.parse_faces(numIdx)
        else:
            self.inFile.seek(chunkSize, 1)
        self.seek_padding(chunkSize)
        print(chunkType, chunkSize, chunkID)

Post Reply