TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Thu Dec 01, 2022 12:16 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Blender 3.0 TPM Addon
PostPosted: Thu May 27, 2021 6:16 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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.0 has since been released, and is readily available. As such, I've since dropped any support for 2.xx and I'm now only providing a 3.0 version.

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.4.4, which includes all fixes relative to 0.4.0. A release candidate of 0.5.0 with skin/bone support is also available - I would especially welcome any feedback on this version if you make use of it.
Alternatively, see the GitHub releases.

Documentation:
Please see the GitHub page, especially the user guide.


Attachments:
File comment: Release candidate.
io_mesh_tpm-0.5.0-rc2.zip [15.12 KiB]
Downloaded 9 times
io_mesh_tpm-0.4.4.zip [10.91 KiB]
Downloaded 7 times

_________________
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]


Last edited by LtSten on Mon Nov 14, 2022 8:09 pm, edited 10 times in total.
Top
 Profile  
 
PostPosted: Fri May 28, 2021 1:45 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 12267
Location: Lima, Peru
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


Top
 Profile  
 
PostPosted: Fri May 28, 2021 7:14 am 
Offline
T-Rex
T-Rex
User avatar

Joined: Thu Feb 20, 2014 9:13 pm
Posts: 3995
Location: Canada, eh?
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. :)

_________________
Current Project: Cloning Facility | My Release Thread
Image


Top
 Profile  
 
PostPosted: Thu Jun 24, 2021 4:35 pm 
Offline
Brachiosaurus
Brachiosaurus
User avatar

Joined: Wed Nov 18, 2015 8:17 pm
Posts: 115
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!


Top
 Profile  
 
PostPosted: Sun Jul 25, 2021 3:51 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 13521
Location: Isla Sorna
A crucial addition to the Tres modding app arsenal, many thanks...

_________________
->Tres2020 Starter Kit

"Well, as long as you're under there, you can check the breakers," Thorne said. ... "There's a box right behind the front bumper. Over on the left."
"I see it." [said Sarah]
...
"The box is in backward. Flip all the switches the other way. Are you dry?"
"No, Doc. I'm soaking wet, lying in the damn mud."

~Michael Crichton


Top
 Profile  
 
PostPosted: Wed Dec 15, 2021 6:11 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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]


Top
 Profile  
 
PostPosted: Wed Dec 15, 2021 8:47 pm 
Offline
Parasaurus
Parasaurus
User avatar

Joined: Thu Jun 24, 2021 12:59 am
Posts: 35
Legend!

_________________
"If I have seen further it is by standing on the shoulders of Giants" Isaac Newton


Top
 Profile  
 
PostPosted: Mon Dec 20, 2021 10:58 am 
Offline
Dinosaur egg
Dinosaur egg

Joined: Sat Dec 11, 2021 3:07 am
Posts: 4
Location: 'Straya (That place where half of all Trespasser bird noises come from)
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.


Top
 Profile  
 
PostPosted: Sun Jan 16, 2022 12:30 am 
Offline
-=TresCom Website Manager=-
-=TresCom Website Manager=-

Joined: Sun Nov 10, 2002 9:41 pm
Posts: 1461
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.

Image

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:
File comment: The TPM which was damaged upon export from Blender.
DamagedTPM.7z [204.01 KiB]
Downloaded 89 times

_________________
You can usually find me on our Discord.

Trespasser Mod Manager
Image
Trespasser 2020: A Trespasser Modding Starter Kit
Image
Trespasser Arena
Top
 Profile  
 
PostPosted: Tue Jan 18, 2022 6:22 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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.

Image

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.


Thanks Mike. I'm hoping this should be fixed in 0.4.1 - give it a go and let me know.

_________________
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]


Top
 Profile  
 
PostPosted: Mon Oct 03, 2022 6:39 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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]


Top
 Profile  
 
PostPosted: Fri Nov 04, 2022 6:51 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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]


Top
 Profile  
 
PostPosted: Mon Nov 07, 2022 12:35 am 
Offline
Parasaurus
Parasaurus
User avatar

Joined: Thu Jun 24, 2021 12:59 am
Posts: 35
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


Top
 Profile  
 
PostPosted: Wed Nov 09, 2022 9:14 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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:
Quote:
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

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:
Quote:
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...)

Consistent with the former, zeroIsValid seems to be passed as true at the call site further down.

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]


Top
 Profile  
 
PostPosted: Fri Nov 11, 2022 9:59 pm 
Offline
Gallimimus
Gallimimus
User avatar

Joined: Fri Nov 27, 2009 8:28 pm
Posts: 608
Location: England, UK
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.

_________________
Bringing TPA CRCs up the well, amongst other file format adventures.
Blender 3.0 TPM Plugin [Project GitHub]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group