Blender 3.0 TPM Addon
Moderators: scallenger, Rebel, madppiper, TresCom Support Team
Blender 3.0 TPM Addon
Since Blender has evolved somewhat with the old plugins we had for TPM support, I've developed one for the latest versions of Blender. This add-on was initially developed for 2.xx from 2.80 onwards (although it had issues with a few of the early 2.8x versions - 2.92 worked well, and was the latest version at time of authoring). Blender 3.x is now the current version, so the 2.xx version is no longer available and a 3.x version is provided instead.
Development primarily takes place on GitHub - please do open an issue if you have feedback, a feature request, or wish to report a bug.
This is still a reasonably untested extension - I am aware of it having been used by a few people, but I would urge you to (for the moment) have a backup of your work/.blend before you use this extension, just in case.
Versions:
The latest stable version is 0.5.2, which fixes a bug introduced in 0.5.0 relating to mesh exporting.
Alternatively, see the GitHub releases page.
Documentation:
Please see the GitHub page, especially the user guide.
Development primarily takes place on GitHub - please do open an issue if you have feedback, a feature request, or wish to report a bug.
This is still a reasonably untested extension - I am aware of it having been used by a few people, but I would urge you to (for the moment) have a backup of your work/.blend before you use this extension, just in case.
Versions:
The latest stable version is 0.5.2, which fixes a bug introduced in 0.5.0 relating to mesh exporting.
Alternatively, see the GitHub releases page.
Documentation:
Please see the GitHub page, especially the user guide.
- Attachments
-
- io_mesh_tpm-0.5.2.zip
- (15.44 KiB) Downloaded 24 times
Last edited by LtSten on Wed Aug 09, 2023 4:30 pm, edited 13 times in total.
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]
Re: Blender 2.80+ TPM Addon
Great! People have been wanting soemthing like that for quite a while...
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
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
Re: Blender 2.80+ TPM Addon
Can't figure out how to use Blender for the life of me (not that Max is any easier), but I do hope that this allows more people to get involved in Trespasser modelling. Glad to see this. 

- Deadeyeguy_45
- Brachiosaurus
- Posts: 130
- Joined: Wed Nov 18, 2015 8:17 pm
Re: Blender 2.80+ TPM Addon
This was very cool to read about! Always wanted this for Tres, and seems it's easy enough to install. I can't wait to give this a try later down the line!
- Draconisaurus
- T-Rex Killer
- Posts: 13786
- Joined: Mon Dec 06, 2004 5:21 pm
- Antispam: No
- Location: Isla Sorna
- Contact:
Re: Blender 2.80+ TPM Addon
A crucial addition to the Tres modding app arsenal, many thanks...
Re: Blender 2.80+/3.0 TPM Addon
I've updated the original post to include a 3.0 version, which appears to work mostly unchanged and will be the version I maintain from now on.
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]
Re: Blender 2.80+/3.0 TPM Addon
Legend!
"If I have seen further it is by standing on the shoulders of Giants" Isaac Newton
-
- Dinosaur egg
- Posts: 4
- Joined: Sat Dec 11, 2021 3:07 am
- Location: 'Straya (That place where half of all Trespasser bird noises come from)
Re: Blender 2.80+/3.0 TPM Addon
Wow, thanks for the early Christmas present! Glad I can use this through Steam now too.
This is my ost, notice there is no "P" in it.
-
- -=TresCom Website Manager=-
- Posts: 1495
- Joined: Sun Nov 10, 2002 9:41 pm
- Antispam: No
Re: Blender 2.80+/3.0 TPM Addon
Hey LtSten, something strange cropped up today when I was using your plugin. I was able to replicate the issue in Blender 3.0 with plugin 0.4.0 and Blender 2.93 with plugin 0.3.1.
Issue: TPM was originally designed to handle multiple meshes being exported into a single TPM file. Both versions of the Blender TPM plugin have been importing TPMs containing multiple meshes without issue. But when I attempt to export those same meshes back into a single TPM file, the resulting TPM file has lots of missing faces and additional unexpected and out of scale geometry.

Workaround: Anyone experiencing this issue should export each individual mesh into its own TPM file. Doing this allowed me to export without any issues.
Attachments: I've attached a screenshot of the issue with some descriptive text as well as one of the affected TPM files.
Issue: TPM was originally designed to handle multiple meshes being exported into a single TPM file. Both versions of the Blender TPM plugin have been importing TPMs containing multiple meshes without issue. But when I attempt to export those same meshes back into a single TPM file, the resulting TPM file has lots of missing faces and additional unexpected and out of scale geometry.

Workaround: Anyone experiencing this issue should export each individual mesh into its own TPM file. Doing this allowed me to export without any issues.
Attachments: I've attached a screenshot of the issue with some descriptive text as well as one of the affected TPM files.
- Attachments
-
- DamagedTPM.7z
- The TPM which was damaged upon export from Blender.
- (204.01 KiB) Downloaded 119 times
You can usually find me on our Discord.
Trespasser Mod Manager

Trespasser 2020: A Trespasser Modding Starter Kit

Trespasser Arena
Trespasser Mod Manager

Trespasser 2020: A Trespasser Modding Starter Kit

Trespasser Arena
Re: Blender 2.80+/3.0 TPM Addon
Thanks Mike. I'm hoping this should be fixed in 0.4.1 - give it a go and let me know.MikeTheRaptor wrote:Hey LtSten, something strange cropped up today when I was using your plugin. I was able to replicate the issue in Blender 3.0 with plugin 0.4.0 and Blender 2.93 with plugin 0.3.1.
Issue: TPM was originally designed to handle multiple meshes being exported into a single TPM file. Both versions of the Blender TPM plugin have been importing TPMs containing multiple meshes without issue. But when I attempt to export those same meshes back into a single TPM file, the resulting TPM file has lots of missing faces and additional unexpected and out of scale geometry.
Workaround: Anyone experiencing this issue should export each individual mesh into its own TPM file. Doing this allowed me to export without any issues.
Attachments: I've attached a screenshot of the issue with some descriptive text as well as one of the affected TPM files.
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]
Re: Blender 3.0 TPM Addon
I've performed a small update to 0.4.2 in order to more gracefully handle missing texture maps. It should now report this more clearly, with only a warning (in particular, the import should still succeed), and will create a placeholder material instead.
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]
Re: Blender 3.0 TPM Addon
As of 0.4.3, I've added partial support for skin blocks - these will be imported as meshes (so in particular, vertex bone assignments are not preserved). For example, this now means you should be able to import dinosaurs in a limited capacity.
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]
Re: Blender 3.0 TPM Addon
Thanks for the plugin and your continued improvement, it's made my life so much easier 

"If I have seen further it is by standing on the shoulders of Giants" Isaac Newton
Re: Blender 3.0 TPM Addon
I've performed a reasonable refactor of the addon and introduced bone/skin support in a new version, a (release candidate for) 0.5.0 which is now available. I'm holding off on recommending this as the go-to choice until I've gathered some more feedback and it's been tested more widely - for that reason, the latest stable version should still be considered to be 0.4.3 and is still available for download. However, please do feel free to try out 0.5.0 and let me know if it works for you or you encounter any issues.
The main post has been updated accordingly - give it a read and as mentioned, do send any feedback my way as usual (either here or on Discord).
As part of this, I noticed that the TPM spec says:
This perhaps seems like something we should mention in the file format documentation, or just change outright due to the in-practice generation of TPMs (perhaps leaving a "this was a breaking change" note). I've followed the convention of using 0 as a valid bone index in my implementation as well - being incompatible with TresEd or even Trespasser itself would make this part of the addon pretty redundant otherwise. Does anyone here have any insight on the matter?
The main post has been updated accordingly - give it a read and as mentioned, do send any feedback my way as usual (either here or on Discord).
As part of this, I noticed that the TPM spec says:
However, there are valid bones ending 00 actually assigned to vertices in TPMs generated from TresEd, Trespasser itself expects to index joints from 0, and the 3ds Max plugin (tpmimport2.ms) has the following comments:Skins include an extra index for each vertex, which is the bone number. This number may be zero, meaning it is not bound to any bone
Consistent with the former, zeroIsValid seems to be passed as true at the call site further down.NOTE: Following the Trespasser convention, bone numbers start at zero, as
do the bone indicies in the vertex definitions.
... <snip> ...
-- Return list of bones for given mesh, searching through the given object list
-- Bone name is of form "$J%NN" Where % is the mesh name, and NN is a number
-- If zeroIsValid is false, bone number 'k' is returned in list position 'k' as expected.
-- If zeroIsValid is true, then 00 is a valid bone number, and bone number 'k' is
-- returned in position 'k+1' in the list (because MAX lists can only start at 1...)
This perhaps seems like something we should mention in the file format documentation, or just change outright due to the in-practice generation of TPMs (perhaps leaving a "this was a breaking change" note). I've followed the convention of using 0 as a valid bone index in my implementation as well - being incompatible with TresEd or even Trespasser itself would make this part of the addon pretty redundant otherwise. Does anyone here have any insight on the matter?
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]
Re: Blender 3.0 TPM Addon
For those who are interested, I've setup a GitHub repo to better manage the development of this plugin. I'll keep providing files here and updating the main post of this thread as required, but hopefully the benefit of having a GitHub presence for the add-on will be that it's easier to support this as an (admittedly small) piece of software. Additionally (now that there is a dedicated page), if anyone is interesting in contributing, do get in touch and we can talk about what you'd be interested in adding and what would be beneficial to work on.
Also, feel free to use the issues tab for bugs and/or feature requests, as usual.
Also, feel free to use the issues tab for bugs and/or feature requests, as usual.
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]
Blender 3.0 TPM Plugin [Project GitHub]