Blender 2.6 Trespasser Exporter 1.0

Creating new content for Trespasser!

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

Post Reply
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Blender 2.6 Trespasser Exporter 1.0

Post by Dragonlord »

Rewrite of the exporter to work with Blender 2.6 . This script exports models into trespasser formats. Supports writting TPM files as well as values.txt files. Also adds UI elements to configurate the export easily (so no need anymore for Text-block hacks as in 2.49). For the individual types of meshes a basic set of values is exported. For meshes, physics meshes, invisible meshes and magnet meshes parenting as well as configuration values are taken into consideration to produce more useful default values.txt files.

Grab it over at ModDB (you might have to wait a few hours for the download to be authed): Blender 2.6 Trespasser Exporter 1.0

I'll do the importer next after I got something else done first.

EDIT: Important changes:
- no more Text-block configuration (uses now Blender 2.6 UI panel extensions)
- no $-hack required anymore (Blender 2.6 allows now $ in names)
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: Blender 2.6 Trespasser Exporter 1.0

Post by s13n1 »

Nice work!
User avatar
LtSten
Gallimimus
Gallimimus
Posts: 609
Joined: Fri Nov 27, 2009 8:28 pm
Antispam: No
Location: England, UK

Re: Blender 2.6 Trespasser Exporter 1.0

Post by LtSten »

Thanks for this, I've been meaning to get round to doing more Blender stuff recently...
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Dragonlord »

I forgot to write something into the README. Blender 2.6 has a bug in the exporter code which causes file patterns with a dot in it (aka .values.txt ) to explode the file path while changing directories. To counter this the file pattern in the exporter is ".values_txt". The exporter does though replace the "_" before exporting so if you export to bla.values_txt it actually writes to bla.values.txt . Just so you are not surprised what's going on there.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
User avatar
Anna
Gallimimus
Gallimimus
Posts: 582
Joined: Thu Dec 25, 2008 10:04 pm
Location: Denmark

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Anna »

Sounds great! That'll come in handy :-)
Yes, my avatar is indeed a dino cookie.
lardman
Stegosaurus
Stegosaurus
Posts: 70
Joined: Thu Jun 14, 2012 8:22 am
Antispam: No

Re: Blender 2.6 Trespasser Exporter 1.0

Post by lardman »

Is there an importer plugin to go with the exporter?
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Dragonlord »

Not yet but it would be possible to make one since the file formats are not too complicated. In the mean time export from TresED to 3DS and import this file using the 3DS importer existing in the default blender installation.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
lardman
Stegosaurus
Stegosaurus
Posts: 70
Joined: Thu Jun 14, 2012 8:22 am
Antispam: No

Re: Blender 2.6 Trespasser Exporter 1.0

Post by lardman »

I don't have access to 3ds unfortunately.

Being a programmer rather than an artist I was actually wondering about directly extracting from the swp file (or even the compressed data files now the source is available) and automatically generating rigged CryEngine models (as again the animation data is apparently part of the engine).

I need to do some experimentation and see how the rigging is performed. Is there source for TresEd? It would be nice to not need to rewrite the extraction routines.
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Dragonlord »

TresED exports to 3DS besides a TresED specific format (an ASCII format). You can import this then in Blender using the internal importer module. With TresED you can by the way export an entire map into a single tpm file with one export step. Hence you could write a python script or whatever fits your plans to mass export each object from this huge tpm file into something CryEngine can handle. A mass import into Blender would though be interesting too. I'm just short on time the next couple of weeks due to work at the company but otherwise I could maybe hang my nose in there to add import code to the blender scripts. I just have to fix the exporter first though since the blender API changed once again and broke texture coordinates.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
User avatar
Double_G
Brachiosaurus
Brachiosaurus
Posts: 108
Joined: Sun Jul 15, 2012 6:40 am
Antispam: No

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Double_G »

so there's no tmp import script for blender? how do i convert these tmp files to something that is readable by blender?
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14046
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Draconisaurus »

Hold out for others to answers.. but, worst case, TresEd can export models as 3DS, a very versitile format. Just note that, it tends to corrupt models at the same time.
User avatar
Double_G
Brachiosaurus
Brachiosaurus
Posts: 108
Joined: Sun Jul 15, 2012 6:40 am
Antispam: No

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Double_G »

Draconisaurus wrote:Hold out for others to answers.. but, worst case, TresEd can export models as 3DS, a very versitile format. Just note that, it tends to corrupt models at the same time.
that's exactly my problem. I'm trying to do something. I want to combine all the maps into one big island like some people have done before, but when I try to export the terrain as 3ds, half of the terrain is missing

Edit: so I figured it out. good thing I downloaded a trial version of 3ds max 8 yesterday. so in case someone needs to import TPM files from TresEd, this is what you need to do.



1. you need a trial version of 3ds max. get either import or export script from this thread https://www.trescomforum.org/viewtopic.php?f=9&t=5680

2. if you run into this error "Runtime Error: Out of scripter memory- use options to increase", follow these instructions
3dsmax sets aside a set amount of memory for use in scripts, the import plugin you are using is one such script. Load the Listener window (press F11) type "heapsize" and push enter and it will show how much memory is being allocated for use in scripts.

To increase, type "heapsize += 10000000" where 10000000 is the amount of bytes to increase by. You can't decrease, reloading 3dsmax will set the assigned memory to default
done
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Blender 2.6 Trespasser Exporter 1.0

Post by tatu »

Note: You can do it with a trial version of any Max. The latest one work fine as well and doesn't require the heapsize tweak.

And as for the Blender Importer. Yes, sadly it apparently only work on one specific version, and even then it doesn't appear to work properly.
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
Double_G
Brachiosaurus
Brachiosaurus
Posts: 108
Joined: Sun Jul 15, 2012 6:40 am
Antispam: No

Re: Blender 2.6 Trespasser Exporter 1.0

Post by Double_G »

yeah but I didn't feel like downloading an 8gb program just to convert some files. 3ds max 8 was perfectly enough to get it done and that heapsize issue was just a minor inconvenience :) as to blender TPM importer, I wasn't aware there is one. all I knew is that there is a script for exporting TPM
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Blender 2.6 Trespasser Exporter 1.0

Post by tatu »

Double_G wrote:yeah but I didn't feel like downloading an 8gb program just to convert some files. 3ds max 8 was perfectly enough to get it done and that heapsize issue was just a minor inconvenience :) as to blender TPM importer, I wasn't aware there is one. all I knew is that there is a script for exporting TPM
Oh maybe it is the Exporter I meant, I've never used it so I am probably mistaken that it was an importer. :D
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
Post Reply