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

Trine 2 fbm models importer

Post questions about game models here, or help out others!
Post Reply
vallex
n00b
Posts: 19
Joined: Mon Oct 06, 2014 9:55 pm
Been thanked: 10 times

Trine 2 fbm models importer

Post 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 ;)
You do not have the required permissions to view the files attached to this post.
jmgg
beginner
Posts: 30
Joined: Sun Sep 15, 2013 9:20 pm
Has thanked: 29 times

Re: Trine 2 fbm models importer

Post by jmgg »

The script works fine! Is there any way of create a batch process?
vallex
n00b
Posts: 19
Joined: Mon Oct 06, 2014 9:55 pm
Been thanked: 10 times

Re: Trine 2 fbm models importer

Post 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
You do not have the required permissions to view the files attached to this post.
raykingnihong
mega-veteran
mega-veteran
Posts: 179
Joined: Sun Apr 06, 2014 8:06 pm
Has thanked: 216 times
Been thanked: 6 times

Re: Trine 2 fbm models importer

Post 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\"
You do not have the required permissions to view the files attached to this post.
vallex
n00b
Posts: 19
Joined: Mon Oct 06, 2014 9:55 pm
Been thanked: 10 times

Re: Trine 2 fbm models importer

Post 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}
raykingnihong
mega-veteran
mega-veteran
Posts: 179
Joined: Sun Apr 06, 2014 8:06 pm
Has thanked: 216 times
Been thanked: 6 times

Re: Trine 2 fbm models importer

Post 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
raykingnihong
mega-veteran
mega-veteran
Posts: 179
Joined: Sun Apr 06, 2014 8:06 pm
Has thanked: 216 times
Been thanked: 6 times

Re: Trine 2 fbm models importer

Post 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
You do not have the required permissions to view the files attached to this post.
vallex
n00b
Posts: 19
Joined: Mon Oct 06, 2014 9:55 pm
Been thanked: 10 times

Re: Trine 2 fbm models importer

Post by vallex »

just set vraymat = false
Post Reply