Page 1 of 1

Trine 2 fbm models importer

Posted: Mon Nov 24, 2014 9:39 pm
by vallex
I created maxscript for import of Trine 2 fbm files in 3D Studio Max. (Tested with game version: Trine 2 Gobline Menace DLC and Trine 2 Complete Story).
trine2-CS.rar


Works with static meshes only. The bone system is decoded, except that the vertex weights. (Maybe someone will help with this :) but its realy not important. The game has a small group of characters)

About fbi files - just rename *.fbi to *.dss
(About the Normal map:
Gobline Menace - swap red channel with alpha; Complete Story - change the levels to 127-255)

You can unpack fbq files with this bms script get from: viewtopic.php?f=10&t=7621

Code: Select all

# Trine 2 (script 0.2)
# script for QuickBMS http://quickbms.aluigi.org

comtype lzf
get DUMMY long
get FILES long
get BASE_OFF long
math BASE_OFF += 0xc
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get NOZIP byte
    get SIZE long
    get ZSIZE long
    get CRC long
    math OFFSET += BASE_OFF
    if NOZIP == 0
        clog NAME OFFSET ZSIZE SIZE
    else
        log NAME OFFSET SIZE
    endif
next i
Sorry about my bad english ;)

Re: Trine 2 fbm models importer

Posted: Sat Nov 29, 2014 11:02 am
by jmgg
The script works fine! Is there any way of create a batch process?

Re: Trine 2 fbm models importer

Posted: Sun Nov 30, 2014 5:57 pm
by vallex
jmgg wrote:The script works fine! Is there any way of create a batch process?
The batch is easy. Here is an example:
trine2-CS-batch.rar
You have to set up some settings like this:

Code: Select all

tdir = @"d:\3D\materials\_trine2\"
mdir = @"k:\games\Trine 2 Complete Story\Trine 2 Gobline Menace DLC\rip\data\root\instance_base\entity\object\"
sdir = @"d:\3D\game-models\trine2\zzz2\"
where
tdir is texture root folder
mdir is fbm root folder
sdir is for converted max files root folder

The script works with up to 95 % of models, but there is some bugs and I will try to fix them now.
The fbm files are several different versions and that makes some difficulties.
For example, the models are in cubic form in the array of vertices (with values between -1 and 1). After that there is some kind of transform matrix and not works fine with some models

Re: Trine 2 fbm models importer

Posted: Wed Dec 03, 2014 12:39 pm
by raykingnihong
vallex wrote:
jmgg wrote:The script works fine! Is there any way of create a batch process?
The batch is easy. Here is an example:
trine2-CS-batch.rar
You have to set up some settings like this:

Code: Select all

tdir = @"d:\3D\materials\_trine2\"
mdir = @"k:\games\Trine 2 Complete Story\Trine 2 Gobline Menace DLC\rip\data\root\instance_base\entity\object\"
sdir = @"d:\3D\game-models\trine2\zzz2\"
where
tdir is texture root folder
mdir is fbm root folder
sdir is for converted max files root folder

The script works with up to 95 % of models, but there is some bugs and I will try to fix them now.
The fbm files are several different versions and that makes some difficulties.
For example, the models are in cubic form in the array of vertices (with values between -1 and 1). After that there is some kind of transform matrix and not works fine with some models
Hello my friend, thank you for your great work, I tested the latest scripts, but I do not know how to set the path. I decrypted content folder not found

Code: Select all

tdir = @"d:\3D\materials\_trine2\"
mdir = @"k:\games\Trine 2 Complete Story\Trine 2 Gobline Menace DLC\rip\data\root\instance_base\entity\object\"
sdir = @"d:\3D\game-models\trine2\zzz2\"

Re: Trine 2 fbm models importer

Posted: Wed Dec 03, 2014 10:03 pm
by vallex
The paths in your case are somethink like this:

Code: Select all

tdir = { game folder } 
mdir = { game folder } 
sdir = { where you want to save the max files}

Re: Trine 2 fbm models importer

Posted: Tue Dec 09, 2014 8:21 pm
by raykingnihong
vallex wrote:The paths in your case are somethink like this:

Code: Select all

tdir = { game folder } 
mdir = { game folder } 
sdir = { where you want to save the max files}
Hello, my friends, thank you for your reply. I will now test

Re: Trine 2 fbm models importer

Posted: Tue Dec 09, 2014 8:41 pm
by raykingnihong
raykingnihong wrote:
vallex wrote:The paths in your case are somethink like this:

Code: Select all

tdir = { game folder } 
mdir = { game folder } 
sdir = { where you want to save the max files}
Hello, my friends, thank you for your reply. I will now test
Hello, my friends, thank you for your reply. Please also forgive me for my stupidity, I set the path, run the script error, ask for help

Re: Trine 2 fbm models importer

Posted: Fri Jan 02, 2015 11:07 pm
by vallex
just set vraymat = false