Weird MODELDEF behavior with OBJ (or probably FrameIndex)
Posted: Mon Jun 10, 2019 3:50 am
So I'm in the process of adding OBJ support to GZDB-BF, and I noticed that OBJ models are handled in an weird (and as I understand incorrect way).
As a test case I used Spooktober, which has a table made ob OBJ models. The table is made from two OBJs, one for the legs, one for the top of the table. The MODELDEF looks like this:
So, according to the FrameIndex lines it uses Frame 0 and 1 of model 0, which doesn't make sense. However, it works fine in-game. I played around a bit with FrameIndex, and it looks like it's completely irrelevant what you set as model and frame, it always displays all specified models. Even if try to use different models for different frames it will always display all models.
I made a bare-bones example (see attachment) that displays the whole table, even though the FrameIndex line doesn't make sense whatsoever:
So model 0 and 1 are defined, FrameIndex says to display frame -894898 of model 3... and it displays model 0 and 1 in-game.
As a test case I used Spooktober, which has a table made ob OBJ models. The table is made from two OBJs, one for the legs, one for the top of the table. The MODELDEF looks like this:
Code: Select all
Model "SchoolTable"
{
Path "models/flow"
Model 0 "table1.obj"
Model 1 "table2.obj"
Skin 0 "FLOWTEX9"
Skin 1 "FLOWTEXA"
Scale 0.5 0.5 0.6
FrameIndex TABL A 0 0
FrameIndex TABL A 0 1
}
I made a bare-bones example (see attachment) that displays the whole table, even though the FrameIndex line doesn't make sense whatsoever:
Code: Select all
Model SchoolTable
{
Model 0 "models/table1.obj"
Model 1 "models/table2.obj"
Skin 0 "FLOWTEX9"
Skin 1 "FLOWTEXA"
Scale 0.5 0.5 0.6
FrameIndex STIM A 3 -894898
//FrameIndex STIM A 0 12
}