Terrain exported as .3ds is broken and incomplete

Creating new content for Trespasser!

Moderators: TresCom Support Team, TresCom Board Managers, TresCom Developers

s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

Hi guys, sorry to post so many newbyish questions, but im really into TresEd at the moment, despite the fact it crashes every 2 minutes and locks my machine.

What im doing at the moment is a little test with the map terrain.

I'm exporting the terrain as a .3ds file, but upon opening the files they have large sections missing, which makes them pretty much useless.

Has anyone managed to export the terrain as .3ds with no problems?

If so, any chance someone could email me the 3ds files for each level?

Thanks.
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by machf »

Better export them as .tpm instead of .3ds and then use the TPM import maxscript to open them...
I have them all in .tpm somewhere... probably as .max files too (maybe even all of them in a single file)
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

Hi Machf, unfortunately i don't have max to try that. Do you think the script would work with gmax?

Any chance you could email me the maps as max files or upload them somewhere?

My email is s13n1 at hotmail dot com.

In the mean time ill try gmax, it might work.

Thanks!
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

Well importing into gmax is fine, but exporting from gmax is pathetic.

I've scanned endless pages for a script and found a simple gmax-to-obj script, but all its done so far is crunch some vertice
numbers and then gmax hangs and wont respond. I've tried increasing heapsize to a high number which i needed to do just to run the import script,
but now the export script is the let down.

I dont know whats going to happen first, me make some progress with my trespasser editing or losing all my hair..

Those max files might be the only option Machf? :-)
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by Dragonlord »

You can also import 3ds files in Blender 2.49 and export from there to tpm. Not perfect for the time being but if gmax hangs on export this might be a possibility. That's how I did it so far.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

The problem is the 3ds files exported from TresEd are corrupt and large sections of the mesh is missing, making them unusable.

I'm still looking for a gmax file converter or a script that exports from gmax directly.

The gmax-to-obj script worked after i let it hang for about 20 minutes, but the amount of data it outputs into the script listener
is too large to use. You see the script only outputs the mesh info in text which you have to select then paste into a text editor and name the file
filename.obj which can then be opened as a .obj file. The map files have so much data i cant ctrl+a to select all, which i think is more of a limitation of gmax
then the amount of data. I get the impression its done on purpose so gmax is not a viable alternative to max. Who would buy max otherwise?

The search continues..
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by Dragonlord »

If the export from tresed to 3ds is corrupt you might perhaps not have selected everything properly or not set the right export options. You have to select all objects belonging to a group of geometry including hidden ones. Best way to do this is to rect-select the mesh group while looking down at the map from bird view with hidden layers turned on. Then export with "selection as 3ds" (single object only if you really have only one object). Then you should get all and it should work while importing. Otherwise I had anyways plans for this holiday to port the Blender export script to 2.6 and at the same time make an importer (for TPM). But try first to get the export properly working. I doubt it's the problem of gmax not handling things correctly more an incorrect export. Tresed is picky about that.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

I'm trying to export the terrain as a .3ds file though, not objects. Theres no way to select the terrain from what i can see, only a terrain > export terrain > option.
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

Well i've given up on gmax.
Unless you plan on exporting again to tpa or to the md3 format, which there's plenty of support for,
you're pretty much stuffed.

I'm downloading the 3dsMax Trial, be done in about an hour, so ill use that.

Was really hoping i could avoid such a large download though.

A Blender tpa import and export script would be wonderful. I'm no Blender expert, i've only used it for uvunwrapping,
but if its abilities as a uvunwrapper are anything to go by, then its probably a very good all rounder.

I've got some big plans to put into action once i get this workflow sorted. Will hopefully inspire some more interest
in my Petrolia project for Crysis.
User avatar
awesome24712
Pteranodon
Pteranodon
Posts: 889
Joined: Sun Oct 02, 2011 1:56 am
Antispam: No
Location: USA
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by awesome24712 »

I'm no modeler nor do I have GMax or 3D Studio, so sorry if this is wrong or incorrect, but, as Machf said, aren't there some .tpm import scripts that you could use? I mean, just export them as .tpm in TresEd and then import that as .tpm, since .3ds obviously isn't working?

Also, as it seems you're talking about terrain now, do you mean you're trying to export a terrain object, such as a patch of grass, or are you trying to export the shape of the terrain.

If Terrain Object (CTerrainObject to be more precise), then go to Terrain > Draw Terrain Objects, then find and select the "patch of grass" that you want, and then go to File > Export selection as .tpm

If you're trying to change the shape of the terrain, then use the Terrain edit option within TresEd. (Terrain > Terrain Edit Mode) Quite a handy tool. Also, there is a Terrain > Export Terrain option, but I'm not sure if that exports it as the "shape" of the terrain or the Base Terrain. If you're trying to import the terrain shape into another level, then you can (I know it works) rename the .wtd level file, as all that is is the shape of the terrain, to replace the .wtd file (terrain) of the level you may be making.

If Base Terrain (The large pattern that repeats over and over again) then you hould be able to export as you would other Terrain Objects...

Another note, I don't believe there is a way to export the shape of the terrain to add it to another level, meaning you can't combine two maps into one.

Pretty complicated and probably not the easiest to understand (myself included). Helped?
Check out the HL2 mod I'm helping with: Image
Visit my Steam! http://steamcommunity.com/id/awesome24712/
Visit my YouTube! http://www.youtube.com/user/awesome24712

Post benchamrks:
1 [x] 2 [x] 4 [x] 8 [x] 16 [x] 32 [x] 64 [x] 128 [x] 256 [x] 512 [x] 1024 [ ] 2048 [ ] 4096 [ ] 9192 [ ]
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by Dragonlord »

s13n1 wrote:I'm trying to export the terrain as a .3ds file though, not objects. Theres no way to select the terrain from what i can see, only a terrain > export terrain > option.
Ah okay. I used only BMP export in this case. Not perfect but you get the terrain out. Tresed supports anyways only importing terrain from BMP as far as I know so this might be your best bet.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

I'm exporting the terrain itself as a 3d mesh, which i can then open with lightwave and merge all the levels into one large map.
From there i plan to render a high resolution heightmap and use it either as a stand alone test map, or incorporate the geometry into my Petrolia Island.

Exporting the terrain as a 3ds is good because Blender can open it, but because the files were not complete and lots of the mesh was missing,
i had to export as tpa files and use the tpa script to import them into Gmax. Gmax wont save or export to any other file format, and i didnt want to
risk losing information by doing too much converting. I didnt want to convert from tpa to md3 then to 3ds then to lwo. Information can be lost and
i wanted as direct conversion as possible.

I wanted to avoid using 3D Studio because its almost a 1gb download and Gmax is free and unlimited.

Anyway, Max is now installed so i can start to play.

Thanks for you're help guys, once ive made some progress ill post the results :-)
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

So far so good.

Exporting is an easy process. Export from max as 3ds then use another program to convert to lwo (lightwave format).
If the terrain has too many tris then the 3ds format can handle it, so simply extract as a .obj.

Opening the lwo's with lightwave reveals an amazing amount of wasted triangles. There are sometimes up to
twenty triangles used to create the shape of a single flat triangle. This is obviously due to the sculpting process, the
areas are subdivided so they could created the finer details, but in areas where the detail wasn't enhanced, the extra
polygons remain.

To give you an example, the the Beach level has 33715 polys. if i use a simple and very old lightwave script, i can halve that to 15000
with no visible loss in detail. If the developers had access to such tools or even spent the time to manually optimize the terrains, they
could have doubled object detail with no hit on performance.

Its such a shame we cant import the optimized terrain mesh with TresEd and just lay the textures over top as usual.

Maybe one day if Andres returns a new version of TresEd could support it? :-)
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

Here's the original mesh:
Beach level unoptimized mesh
Beach level unoptimized mesh
beach_high_poly.png (400.63 KiB) Viewed 10521 times
Here's the optimized mesh:
Beach level optimized mesh
Beach level optimized mesh
beach_low_poly.png (412.87 KiB) Viewed 10521 times
Remember this is a simple script that did all the work, you could probably get it down another 2000-5000 polys if you did some further optimization by hand.
s13n1
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 550
Joined: Mon Dec 12, 2011 11:54 am
Antispam: No
Location: Australia
Contact:

Re: Terrain exported as .3ds is broken and incomplete

Post by s13n1 »

Okay, a quick update.

So far i've aligned all the levels up to the Lab and they all line up perfectly, including Pine Valley.

You can definitely tell the island was one large map, then was broken down into the smaller pieces.
As mentioned by Seamus Blackley here: http://www.trescom.org/index.php?page=r ... ackley.htm

"The game is broken down into manageable chunks for us! We have nine levels, and each level has close to 15,000 objects in it, and is 2x2 square kilometers in size. That's just an extraordinary amount of data. Our clipping plane is close to 2 kilometers, so you'll see 35 to 50 million polygons at all times. To do that requires an editor that is par excellence, so we use 3D-Max plugged into an incredibly stoked machine, and we have an export process that boils all of this down to something you can actually run with a good frame rate on a Pentium 166 with 32 megs. So the editor is an amazing, prodigious piece of technology, and we have divided the island into these workable areas. At first, we had this idea that it would be one, big space, but our data structures couldn't handle that, though our original memory manager could. Still, why beat yourself?"

After the Lab level, there was an issue with AS not conforming to the rest of the island layout.
If placed where Lab ends, then it over laps pine valley and blocks the dam.

When i first loaded the map, i had to rotate it 90 degrees to match up with lab, so when i discovered it obscured the other
levels, i rotated it back and found a location where it aligns with Lab. This leaves open a small area where im assuming the missing 9th level was,
between Labs and AS.

What is known about this missing level?

Things are looking pretty good. Ill show some shots soon.
Post Reply