Page 2 of 2

Re: TRR exporter and TRI importer MAXscripts

Posted: Tue Jul 18, 2017 5:39 am
by machf
Draconisaurus wrote:
machf wrote:remember, TresEd doesn't save proper WTD files.
Even when they are modified/resaved retail WTDs?...
I'm not quite sure since we don't have TresEd's source code... but it definitely doesn't save .WTD files in the (100%) proper format. Remember, back then, we were all guessing how it was done, basically attempting to reverse engineer the formats, and one or two things may have been wrong. But they were enough to generate the sort of errors we know.
tatu wrote:So this method is only good for retail WTD's then I guess, not fan made ones. Or unedit GUIApp WTD generated ones.
Maybe at the time I wrote the first post on this topic I should have been more careful... but it was quite a long time after I first wrote those scripts, and I didn't remember too well what it was like with GUIapp. It's better to use a terrain TRI file instead of a TPM one to import Trespasser terrains into MAX whenever possible, but when you have a user-edited terrain, you may have no other option that to use a TPM one in the first place, and later re-import the terrain into MAX using a TRI file after having fixed it with GUIapp. And maybe it's better to make any further edits to the terrain mesh in MAX to prevent having to repeat the process again.

Re: TRR exporter and TRI importer MAXscripts

Posted: Thu Dec 28, 2017 3:13 am
by machf
I've just updated the .TRR exporter script (both the MAX and Gmax versions) to prevent a problem with GUIapp after attempting to generate a .TRI file from a .WTD terrain generated from an exported .TRR file.
trr_export.zip
(1.27 KiB) Downloaded 419 times
trr_export-gmax.zip
(1.12 KiB) Downloaded 423 times
I'm going to upload them to TresCom later...

Re: TRR exporter and TRI importer MAXscripts

Posted: Thu Dec 28, 2017 7:34 am
by Draconisaurus
What problem was fixed exactly?

Re: TRR exporter and TRI importer MAXscripts

Posted: Thu Dec 28, 2017 3:43 pm
by machf
Using the previous version of the exporter, you'd generate a .TRR file which GUIapp could then use to create a .WTD file.

BUT! Sometimes when you tried to use GUIapp to convert the resulting .WTD file into a .TRI file, it would crash. That was because the X and Y values should have been rounded but weren't, I guess GUIapp couldn't process a value like 2e-5 (0.00002) where it expected instead to read something like 0.0

Now it's working fine.

Re: TRR exporter and TRI importer MAXscripts

Posted: Thu Dec 28, 2017 11:21 pm
by Draconisaurus
Huh. I haven't gotten into TRI files, what do they do

Re: TRR exporter and TRI importer MAXscripts

Posted: Thu Dec 28, 2017 11:26 pm
by tatu
TRI are basically the same as the TRR files exported from 3ds Max, but the TRI are exported with GUIApp from .WTD files instead.

Re: TRR exporter and TRI importer MAXscripts

Posted: Thu Dec 28, 2017 11:44 pm
by machf
They're not quite the same... .TRI files can be imported back into MAX as they have a triangle list similar to .TPM files, while .TRR files only have a coordinate list for the mesh vertices.

You can make a .TRR file from a .TRI file by stripping the triangle list, but you can't do the opposite.

Re: TRR exporter and TRI importer MAXscripts

Posted: Fri Dec 29, 2017 12:19 am
by Draconisaurus
Assuming 'twas used by the devs to get an accurate terrain mesh into their level scenes. Nice.