Jump to content

Home

The TSL vis format explained


Dashus

Recommended Posts

Apologies if this is covered elsewhere. The vis lightmap format in TSL explained:

vis files near as I can tell act as a sort of table telling the engine which rooms should render when you are standing in a given room. In the case of TSL this is done by simply listing the room models in a plain text file with a .vis extension. It can be placed in override.

Curiously, without the vis file, no frame buffer effects will work. This includes things such security camera effects as well as forcefields (ie "stacking" forcefields to make things very very obscured and the nifty wavy yellow forcefields found in the cut 8** modules). My suspicion is that this is due to the fact that it needs a list of other rooms with possible additions to the frame buffer.

 

This is the vis file I put together for 298tel (Czerka Military Sub-base):

298telg 5
 298telh
 298telf
 298teli
 298tele
 298telj
298telh 5
 298telg
 298telf
 298teli
 298tele
 298teln
298teli 5
 298telg
 298telh
 298telf
 298telj
 298teln
298tela 4
 298telb
 298telc
 298teld
 298tele
298telc 4
 298tela
 298teld
 298tele
 298telb
298teld 3
 298telc
 298tele
 298telb
298tele 7
 298telg
 298telh
 298telc
 298teld
 298telf
 298telj
 298teln
298telf 6
 298telg
 298telh
 298teli
 298tele
 298teln
 298telj
298teln 7
 298telh
 298teli
 298tele
 298telf
 298telo
 298telq
 298telj
298telo 3
 298teln
 298telp
 298telq
298telp 2
 298telo
 298telq
298telq 3
 298telo
 298teln
 298telp
298telj 8
 298telg
 298teli
 298tele
 298telf
 298telk
 298telm
 298teln
 298tell
298telk 2
 298telj
 298tell
298telm 2
 298telj
 298tell
298telb 4
 298tela
 298telc
 298teld
 298tele
298tell 3
 298telj
 298telk
 298telm
298telll 0


The format is:

<room model><space><number of rooms visible from this one>

<space><space><visible room 1>

<space><space><visible room 2>

etc.

-298telll (that's 298TELLL) is a ball. I think it's the planet model in room L. Having no doors it has 0 connections.

-It appears to be case insensitive.

-I'm not sure if the blank line is required but all the games vis files have it.

-The only way to determine which rooms are connected (as far as I know) is to open the map in KT and then import the models into gmax and figure out which room you're looking at and drawing pictures to see which connect.

-In the absence of a vis file it seems to assume that all rooms are visible from all others (obviously very inefficient).

 

(Saving the example above as 298tel.vis and putting it into override will make all the frame buffer effects work for 298tel :))

 

[Edit - Updated with information gleaned below (so far). Thanks all! :)]

Link to comment
Share on other sites

The same problem occurs in 801DRO. It has two (I think) "rooms." Both 298TEL and 801DRO do not have VIS files and in both cases you can see from room to room. I replace the 151HAR module's VIS file with a blank one and I can still see from room to room. Perhaps this only applies to TSL.

 

Edit: Hmm... I must be wrong if two people have independently come to the same conclusion.

Link to comment
Share on other sites

298tel didn't have a vis file. And you can see fine. However, I did some further testing and it appears that the file is not a "connected to" list but rather a list of rooms "visible from" the given room. Stepping into room J in 298 (the west corridor) will stop rendering e and n (the north and east corridors) with my old vis file.

 

[Edit - The updated vis file renders them properly after stepping into the corridor. Thanks for pointing that out! :)]

Link to comment
Share on other sites

I doubt the .vis files have anything to do with the lightmaps- they were just stuffed in that .bif file because they weren't large enough to warrant their own .bif. (BTW, there doesn't seem to be any specific references in the .exe to any .bif file- it might just mount all .bifs in the data folder. If that's true, then new areamodels could be put in their own .bif files instead of having all their parts dumped in Override.)

 

They seem to operate similarly to how the vis tables in BSP-based engines work- instead of a list of which nodes are visible to which, there's a list of which rooms are visible to which.

 

Pavlos, if you used a blank text file (no data), then the game probably fell back on making everything visible. M19aa's .vis file has data that actually has each room set to 0 other visible rooms:

m19aa_03b 0
m19aa_01h 0
m19aa_03a 0
m19aa_02g 0
m19aa_02c 0
m19aa_02f 0
m19aa_02b 0
m19aa_02j 0
m19aa_02d 0
m19aa_02e 0
m19aa_02a 0
m19aa_02i 0
m19aa_02h 0
m19aa_01d 0
m19aa_01e 0
m19aa_01i 0
m19aa_01a 0
m19aa_01c 0
m19aa_01b 0
m19aa_01f 0
m19aa_01g 0

 

232TEL also has some VIS problems. From the room with the two workbences, you can't see the caved-in hallway stub that's directly south of the map start. Here's a screenshot of this problem:

http://www.markshan.com/knightmare/pics/232tel_visbug.jpg

 

There also seems to be a problem in 301NAR with the rail on the walkway to the landing pad disappearing when you get near the door to Tien Tubb's shop

Link to comment
Share on other sites

Yeah I'm inclined to agree at this point that they were just thrown into the lightmap bif.

I've removed any mention of lightmaps from my initial post.

BSP trees was actually what I thought of when I realized what they were doing :)

 

And if somebody can get me the rooms in play in both of those bugs I'll be happy to fix them in TSLRP :)

Link to comment
Share on other sites

(BTW, there doesn't seem to be any specific references in the .exe to any .bif file- it might just mount all .bifs in the data folder. If that's true, then new areamodels could be put in their own .bif files instead of having all their parts dumped in Override.

 

The BIF files are not stand-alone unfortunately, they are listed in (and their content indexed by) the chitin.key file located in the main game folder. Thus it's somewhat troublesome to add new BIF files to the game since the chitin.key file must be updated with their content as well.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...