Embedded DTS? I'm curious..
by Quest Johnny · in Constructor · 06/16/2008 (10:05 pm) · 7 replies
I have been having a strange problem with fullbright textures, and it made me notice something about constructor, and made me curious...
If I place a static shape into an interior in Constructor, and then export to DIF.. and then later replace the DTS with a more updated one, the DTS that was "embedded" into constructor stays the same
Don't get me wrong! The ability to embed DTS is fantastic, but I'm just curious how it works =) . Is it embedding a copy into the DIF somehow, as it obviously isn't a reference to a filename.. or is it (unlikely) converting it to solid brushes in some way and making it part of the geometry?
If it was a reference copy I bet we could alter and move the placed Statics in the mission-editor
If I place a static shape into an interior in Constructor, and then export to DIF.. and then later replace the DTS with a more updated one, the DTS that was "embedded" into constructor stays the same
Don't get me wrong! The ability to embed DTS is fantastic, but I'm just curious how it works =) . Is it embedding a copy into the DIF somehow, as it obviously isn't a reference to a filename.. or is it (unlikely) converting it to solid brushes in some way and making it part of the geometry?
If it was a reference copy I bet we could alter and move the placed Statics in the mission-editor
About the author
#2
I was more curious about the internal structure - is the DTS stored as a binary within the DIF? The behaviour implies it sort of HAS to be..
That little TXT File that gets generated is handy too =) Within the binary .DIF I can see the names of dts "streetlight" and "Trylight" so it just be a reference, but the way it keeps old copies sort of suggests it dumps the whole .dts as binary info into the DIF and keeps it preserved
06/17/2008 (7:34 am)
Yes, I know and that's a great feature =)I was more curious about the internal structure - is the DTS stored as a binary within the DIF? The behaviour implies it sort of HAS to be..
That little TXT File that gets generated is handy too =) Within the binary .DIF I can see the names of dts "streetlight" and "Trylight" so it
#3
Constructor probably stores "brushes" in the DIF and then references those in the remainder of the file. This way everything needed for the file is inside the file and not relying on external files. So when you open a file in constructor it doesn't have a reference to DTS files at all - it just has the brushes that you have used for the DIF.
At least, that is how every other level editor I've seen worked.
06/17/2008 (8:28 am)
I haven't examined how Constructor works but based on how other level editors work this is my theory (which could be wrong).Constructor probably stores "brushes" in the DIF and then references those in the remainder of the file. This way everything needed for the file is inside the file and not relying on external files. So when you open a file in constructor it doesn't have a reference to DTS files at all - it just has the brushes that you have used for the DIF.
At least, that is how every other level editor I've seen worked.
#4
06/17/2008 (8:35 am)
But how does it store/reference the DTS shapes that are placed in it?
#5
So you would have all the brushes used in the level at the start of the file and then the rest of the file would reference the brushes that are already created at the beginning. This method makes it sothe shape used in the brushes (in this case a dts) does not have to be included with the file because they are contained within the level. Usually editors using this method do not include the texture in the level format (in this case DIF) and place them in them all in a "texture set" (usually a .wad TGE does not use this method, however).
The mechanics behind this are extremely simple and I suggest you look at basic file format programming. Again, I could be very far out on how constructor does things as I am just talking from experience with other programs and file formats.
06/17/2008 (10:46 am)
Again I don't know if Constructor works this way - I honestly don't have it installed at the moment to look - but usually level editors write a "brush" (aka the geometry of a shape) into the start of the level format's file.So you would have all the brushes used in the level at the start of the file and then the rest of the file would reference the brushes that are already created at the beginning. This method makes it sothe shape used in the brushes (in this case a dts) does not have to be included with the file because they are contained within the level. Usually editors using this method do not include the texture in the level format (in this case DIF) and place them in them all in a "texture set" (usually a .wad TGE does not use this method, however).
The mechanics behind this are extremely simple and I suggest you look at basic file format programming. Again, I could be very far out on how constructor does things as I am just talking from experience with other programs and file formats.
#6
06/17/2008 (6:02 pm)
Constructor imports the DTS and deconstructs it into polygons and creates a "ConstructorSimpleMesh" (in TGEA, this evolved into a "InteriorSimpleMesh"). At this point, it is no longer a DTS at all, and changing the DTS will have no effect.
#7
06/17/2008 (8:02 pm)
Awesome! Thanks for the info!
Torque Owner Woody
That's the closest thing to an 'update' button that Constructor has, unfortunately. Have to manually find your file again to replace the old version with the new.