Page 1 of 2

Error when converting files to TPM

Posted: Fri Mar 12, 2021 8:05 pm
by Tormer
Hey there! i am using Blender 2.6 to export a dinosaur as TPM. When i was exporting it, i got this error:
Image
Any way to fix this??? :(

Re: Error when converting files to TPM

Posted: Fri Mar 12, 2021 9:17 pm
by tatu
Sadly I have no experience with Blender. Does this happen to other meshes exported to TPM?

Maybe machf could see what is wrong based on the information, even though the script was written by someone else.

Re: Error when converting files to TPM

Posted: Sat Mar 13, 2021 1:57 pm
by Tormer
I managed to convert the JPOG Gallimimus to TPM format! But now my problem is that, when i open the gallimimus in TPDC, it is so huge that i have to use the zoom out to see the whole shape. Reduced its size in Blender and re-exported it as TPM but nothing changed. Gallimimus is still so big in TPDC. How can i reduce its size and make it ideal for Trespasser gaming?
Image

Re: Error when converting files to TPM

Posted: Sat Mar 13, 2021 4:11 pm
by tatu
I don't think the size will matter in TPDC. In TresEd you can just scale down the base model and it will be fine. :)

Re: Error when converting files to TPM

Posted: Sat Mar 13, 2021 8:20 pm
by machf
Now that Dragonlord is around (I saw him post on another topic here), ask him about the Blender plugin, I thin he was the one who wrote it.

Re: Error when converting files to TPM

Posted: Sun Mar 14, 2021 4:35 pm
by Tormer
I contacted him through ModDb and he told me to try a Scaling option in a Trespasser sub-panel. But I tried this and didn't work. The size stayed big. So, i opened the gallimimus OBJ file in a newer Blender 2.82 and re-scaled it to a lower size. Then, i saved it and re-opened it in Blender 2.6 which has the TPM exporter installed. So, i saved gallimimus from there as TPM. And now has a proper size. The new problem that i have is that the dino uv map and texture display OK in TPDC and Blender 2.6. But, when i imported it to TresEd, it shows the gallimimus with a change on its texture. Seems that, when i save the gallimimus as TPM from Blender 2.6, this causes an alteration in the UV map of the dinosaur.

Gallimimus in TPDC:
Image

Gallimimus in TresEd or in-game:
Image

Does it happen with Gmax too?

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 5:24 am
by tatu
This happens in 3ds Max too. And it sometimes happen with fan-made models that look fine in a level the first time it is imported but then gets exported.

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 4:50 pm
by Tormer
TresEd is the problem. Each time that i import the gallimimus.TPM in TresEd, its texture gets distorted. I didn't write values.txt for the galli because i want to make sure that it looks fine in-game (hope this isn't causing the skin issue). Also, there is a white empty square in right top instead of showing numbers. How can i make this tool work properly?
Image

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 4:57 pm
by tatu
Then the model very likely have some issues with the UV mapping.

Are you running on an Intel graphic card? Either an integrated one (Laptop) or lower-end PC? I know those causes TresEd not to show the location, at least back in the day.

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 6:08 pm
by machf
That has to do with OpenGL drivers...

EDIT: I'm attaching a .dll I use, place it in the same folder as TresEd. The .ini file has my personal settings, too. Hopefully this works for you. Can't remember where I found it originally.

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 7:20 pm
by Tormer
Thanks, Machf. I tried your files but the error is still there. The Galli has a 24bits RGB texture, it is ok? or it should be 8 bits?

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 7:58 pm
by machf
Tormer wrote:Thanks, Machf. I tried your files but the error is still there. The Galli has a 24bits RGB texture, it is ok? or it should be 8 bits?
Never use RGB textures on anything unless you need it to be transparent (glass, water, fire, fog, smoke, etc.). What you're seeing is the texture being displaced 8 pixels as I mentioned somewhere else due to the errors GeomAdd has at the time of importing RGB textures.

And the fix is meant for things in TresEd like the numbers not showing up and black borders at the edges of textures...

Re: Error when converting files to TPM

Posted: Mon Mar 15, 2021 8:39 pm
by Tormer
OK! so, what program should i use to save the dinosaur textures for Trespasser?

Re: Error when converting files to TPM

Posted: Tue Mar 16, 2021 12:08 am
by machf
Any one that lets you specify a palette for it... either an old version (4.x) of Paint Shop Pro, or Wally (which was recently re-uploaded here, I think). Try palettes in use by the other elements in your level (starting with the terrain textures), or if you want a new one, follow the tutorial I wrote a long time ago...

https://www.trescomforum.org/viewtopic.php?f=77&t=4534

Re: Error when converting files to TPM

Posted: Tue Mar 16, 2021 1:21 pm
by Tormer
Excellent tutorial, Thanks! i still use Paint Shop Pro to make mods for Carnivores games (specially to make new menu designs). So, i made a 8 bit texture for the gallimimus and now it looks properly in the game. But, in TresEd the gallimimus texture looks different (it doesn't have body details like the eyes). I wonder why it happens with TresEd:

TresEd view of gallimimus:
Image

View of Gallimimus in the game:
Image

Also, just curious, but the shade in gallimimus body looks rare too:
Image