www.tombraiderforums.com

www.tombraiderforums.com (https://www.tombraiderforums.com/index.php)
-   Software Development (https://www.tombraiderforums.com/forumdisplay.php?f=55)
-   -   Meta2tr update. (https://www.tombraiderforums.com/showthread.php?t=135733)

HeinzFritz 27-04-13 09:42

I experimented with the new blending modes now that they can easily be set in Metaseq: The results are spectacular and I can see countless possibilities, especially when combining all so far enabled blending modes.
Thanks once more meta2tr!

HeinzFritz 02-05-13 17:19

Adding objects?
 
I keep playing with this marvelous software like a kid and can not stop. It is simply perfect and once you get used to it, the possibilities open one after the other!
So do the questions and a list of features one would like to have.
Like:
As it allows adding textures in an easy way, I wonder if it would be possible also to add objects from another level decompiled in meta2tr. It is clear that such objects could not animate as moveables but could simply be added from another mqo file, together with their corresponding bitmaps as static meshes and afterwards be merged with the room geometry.

EDIT: Sometime it is enough to write down a question to find the answer without anybody answering.
This can be done by importing any object inside metaseq and merging it with the room geometry, of course.
Anyway, while I am at it, would it be possible to add anything that was not previously in the TR file from another TR file so that it will be written with its meshtree in the newlevel.tr4?

psiko 02-05-13 21:19

if it is not present in the wad initially, you can't use it in the tr4 file, or even see it in game.

To merge objects from different tr4 files (you can do it even in future uploading them in sites like trsearch), it is simply necessary to have the object in the wad, even textured with a fake placeholder texture, then have the mqo file with its own tiles (eventually renamed in order to match the tiles of different tr4 files).

Edit: some spelling.

HeinzFritz 03-05-13 07:24

Renaming bmp tiles
 
Thanks Psiko.
I experimented to create a test library of objects to use them when the level is completely finished and exchange them with the originally placed ones.
A new feature could make the workflow with meta2tr easier:
It would simplify replacement of objects if meta2tr would offer a choice of texture numbering while decompressing the tr4 files, similar as it does for the room geometry. Like: press key X for default numbering from 001.bmp or press key Y to type in a number to start numbering from. Eg: 090.bmp.

psiko 03-05-13 19:19

you can do exactly the opposite, and get the same result :)
I mean, all the new objects you build, can have tiles from that tile090.bmp you mention, as you will be sure all the tga tiles of the prj will be less than 90 (if you are sure of this).
So, you can drag objects and tiles from 090 on, onto meta2tr in any tr4 file :)
the missing tiles will be replaced by empty magenta tiles, with no waste of resources :) I use myself the tile numbered 210, just to be sure, to have common objects for different tr4 files.

A_De 03-05-13 20:22

Will the tail infos number be increased if I use objects which have uv-mapping with textures already present in level? I mean adding the new object which uses an old texture tile from the level. For example, the rock which uses 128x128 floor texture. And how do I avoid increasing tail infos number?
P.S.: sorry if I posted this in wrong thread.

HeinzFritz 03-05-13 20:40

Psiko, I did some experiments and found out that you can modify the meta2tr.exe by opening it in WinHex and changing one hex value from 30 to 31 so that it starts numbering tiles from Tile101.bmp upwards.
But the result was, when adding these tiles together with the modified Moveable.mqo that lots of intermediate empty tiles got created and considerably increased the file size of the newlevel.tr4.
Looks like it is easier to rename the needed tiles to one number plus the last one in the file which gets edited.
Anyway, one of the side results of these experiments was the proof that bump mapping can be applied to moveables like Lara's skin meshes.

meta2tr 03-05-13 22:55

Quote:

Originally Posted by A_De (Post 6772974)
Will the tail infos number be increased if I use objects which have uv-mapping with textures already present in level?

Yes. The number of texture infos is related to the number of faces on the object. If the faces all have the same uv polygon, then the number of texture infos doesn't increase, but this doesn't usually look very good.

Quote:

Originally Posted by A_De (Post 6772974)
And how do I avoid increasing tail infos number?

The first thing to do is to watch the number of polygons in rooms and objects that you inject into the tr4 file.

Also, it helps to rebuild the level completely, since reloading the an object several times while editing it results in unused texture infos building up in the level.

HeinzFritz 13-06-13 22:46

Combining TRNG and Meta2tr
 
I have recently enjoyed some spectacular custom levels, created with TRNG by several authors who are first class artists when it comes to environments, architecture, objects and lights. Yet not one of these did use Meta2tr to polish the final results.
I wondered why, and then I tried to open one of such .tr4 files in Meta2tr, and realized that they were all locked by TRNG converter's lock feature.
It was clear that each TRNG creator is confronted with a dilemma whether to lock and protect their levels so nobody can open them, or use Meta2tr to give them a more organic and natural look, but let them open to everybody to modify them further or extract objects, textures etc.

I wonder if it would be possible to create a protective encryption AFTER the level has been converted and touched up with Meta2tr?

I do not use TRNG (I prefer TREP), so all this interests me from a player's point of view.

A_De 14-06-13 05:39

Quote:

Originally Posted by HeinzFritz
each TRNG creator is confronted with a dilemma whether to lock and protect their levels so nobody can open them, or use Meta2tr to give them a more organic and natural look, but let them open to everybody to modify them further or extract objects, textures etc.

As far as I know, Titak managed to encrypt her MoA levels after editing.
Nothing wrong when the creator wants to keep some things in secret, however I can't understand why some people get crazy about encrypting and don't wish to share their objects or textures. Really, if somebody will take something from my levels after their release, it will be the reason to be proud for me :D I don't use ripped objects though, because I prefer to know who's the creator. Their work worths respect! :D

HeinzFritz 14-06-13 07:52

I have not yet played MoA but If Titak really did manage to encrypt her levels after editing in Meta2tr, then I would be nice if she would write a tutorial about how to do it. I am sure it would be appreciated by all involved level creators, especially those tormented by the horrible dilemma I mentioned.

Niveus 14-06-13 08:22

I think it has been the case for some time, that TRNG had the ability to encrypt .tr4 files that have been messed with by meta2tr. I have no means to check right now though, so I apologise. Maybe it is a feature of meta2tr, instead, but I do not think it is hidden or using some secret method to accomplish it.

meta2tr 14-06-13 08:47

Quote:

Originally Posted by HeinzFritz (Post 6823436)
If Titak really did manage to encrypt her levels after editing in Meta2tr, then I would be nice if she would write a tutorial about how to do it.

Encrypting levels is now very simple thanks to Paolone's TRNG_Crypter tool which is found in the Tools folder. Here's a quote from the readme:

Quote:

The TRNG_Crypter utilty has a precise target: when you wish your levels were crypted but, at same moment, you need to perform changes on tr4 level in post-production, for example using meta2tr program, you need to use TRNG_Crypter, since it gives you the chance to crypt when you wish a tr4 file in same crypting format of trng engine.

Titak 14-06-13 10:01

^
That is indeed what I used, so no big secrets here. :D

I decided to encrypt my levels so people would not be able to make changes to the levels I made.
If someone contacts me about some objects and textures, I'm willing to share most of the time and I'll compile a wad or TGA with the objects and textures requested. :D
Unless I'd like to use the objects and textures myself again in the future, like in my next MoA levels. (Zip, Alister and Winston come to mind)

I just don't want people messing around with the levels themselves simply because most of the stuff in them is custom made and it took me a lot of time and effort to make the levels the way I wanted them to be. Hence the encrypting. :p

HeinzFritz 14-06-13 11:31

@Titak & Meta2tr, thanks for the clarification. I had no idea about this tool for the simple reason that I still use TREP. I suppose that it can not be used for TREP created levels.
Anyway, now it is even more mysterious to me why so few people make use of the wonderful possibilities that the almost limitless Meta2tr tool offers.

Titak 14-06-13 16:37

TRNG does add a header to the levels and the encrypter might need/use this header to work properly.

But you could try and use the tool on your TREP level anyway.
No harm doen when it fails, right? Especially not if you make a backup of the tr4 file first. :D

HeinzFritz 29-06-13 10:32

Modified version of Meta2tr 7e
 
To make adding or changing objects to already finished or half finished levels edited in Metaseq, I have taken the liberty to slightly modify Meta2tr's marvelous tool so that when it unpacks an archive .tr4 with another outfit, object etc, it starts numbering the .bmp tiles from Tile101.bmp, Tile201.bmp or Tile301.bmp, (by using 100m2tr.exe, 200m2tr.exe or 300m2tr.exe - depending on the highest number of Tile.bmp in the .tr4 file to be modified).

You may find it useful or not, for me it works like a charm.

Here is the folder with all 3 versions.

sapper 29-06-13 10:42

Quote:

Originally Posted by Titak (Post 6823838)
TRNG does add a header to the levels and the encrypter might need/use this header to work properly.

But you could try and use the tool on your TREP level anyway.
No harm doen when it fails, right? Especially not if you make a backup of the tr4 file first. :D

It will fail since only TRNG (and Paolone) knows how to decrypt the level data.
A TREP'd tomb4.exe won't know how.

BTW I don't think the header gets encrypted, only the level data.
And for those who know how to use a hex editor you can tell an encrypted TR4 level by the signature first few bytes. Normally it is TR4/0 but for an NG encrypted level it is TR4c.

Cochrane 29-06-13 12:32

Is there any public documentation on the encryption format available somewhere? I'm thinking about the OpenTomb engine. It would be great if that could open encrypted levels, too (it currently fails hard when trying to do so).

If someone knows more about it and wishes to disclose it only in private, under condition of secrecy: Please don't. OpenTomb is open source, so the knowledge how levels get decrypted will be made public. If you don't want that, that's okay, but then the only possibly response for any OpenTomb developer is to not implement the decryption at all, and then all the information is just pointless.

Niveus 29-06-13 12:38

Personally I don't think many will want the encryption format to be public :o

Only those who want to use that encryption format for their own programs, and those who want to take objects, animations and textures without permission. I don't know how useful it would be to the average custom level player, but it still could happen that some programmer might make/edit a program to open the encrypted files.

meta2tr 06-07-13 14:57

Quote:

Originally Posted by HeinzFritz (Post 6837531)
Here is the folder with all 3 versions.

Thanks HeinzFritz. I will check this out. I didn't implement this myself because unfortunately changing the texture table can break NG features such as conveyor belts. (That's why meta2tr only ever adds to the texture table, it never rebuilds it (as trviewer does)). However I will look at how you have done this, I may learn something interesting :)

HeinzFritz 06-07-13 16:20

There is not much to learn. I just changed 3 offsets (+ replaced the name on all occurences) in WinHex. You can just compare it with WinHex or any other hex editor and you will see that it is quite a simple change to make it start numbering from Tile100, Tile200 or Tile300. It does not disrupt anything, neither does it rebuild in a different way.
By the way, that meta2tr of yours is really great. I am using (and misusing) it more than any other tool. The possibilities it offers are almost limitless.

meta2tr 27-08-13 18:22

Version 7f is here.

Changes:
- Added "Insert empty tiles" option.
- When importing BMP files, their real names are displayed.
- An MQM file is now created every time a BMP file is imported.
- The MQM file only contains the BMP files that were imported.
- The names of the BMP files in the MQM file have been corrected.
- Corrected an error when reading uv coords near boundaries.
- Several improvements to error handling.

Happy editing :)

raiderromero 27-08-13 18:43

thank you, i love this tool :jmp:

HeinzFritz 27-08-13 21:01

Thanks for the update!
Before I try it out, just two questions:
What does the "insert empty tiles" exactly mean, as it was possible in the previous versions to insert empty files in any quantity. As the other feature "The MQM file only contains the BMP files that were imported"? Does it mean that the empty files that were inserted automatically in between e.g. Tile032.bmp and Tile155.bmp. will now be deleted?

@Meta2tr, disregard the questions above. After finally having the opportunity to try this update out, I understood what you meant.

It is just what was needed to replace objects with objects from a library. tr4 without burdening the new .tr4 with unneeded Tiles, or burdening onerself with endless renaming of tiles inside Metaseq.

Thank you so much!!! GREAT FEATURE!

HeinzFritz 30-11-13 07:58

Sprites
 
Just for experiment sake I tried to apply waterfall scrolling and animated textures on sprites, but had no luck. Either it is impossible or I am doing something wrong.
Of course, the question why anybody would want to have animated (changing) sprites is easily answered with a simple "Why not!"
If that is not convincing enough, just imagine the shine sprite changing colors or image of the reflection, then the flame sprite, which is animating anyway, getting additional movement etc...

meta2tr 30-11-13 15:13

Quote:

Originally Posted by HeinzFritz (Post 6951548)
Just for experiment sake I tried to apply waterfall scrolling and animated textures on sprites, but had no luck. Either it is impossible or I am doing something wrong.
Of course, the question why anybody would want to have animated (changing) sprites is easily answered with a simple "Why not!"
If that is not convincing enough, just imagine the shine sprite changing colors or image of the reflection, then the flame sprite, which is animating anyway, getting additional movement etc...

Waterfall textures have to be applied to quads. The won't animate on triangles. If you need triangles, you could try creating a quad with two of its vertices close together.

HeinzFritz 30-11-13 16:22

Well, I did use the complete waterfall texture 128x64 pixels and applied it to the "shiny" sprite. I did not scroll. Then I used half of the waterfall texture 64x64 pixels and coated the same sprite with it and it also did not scroll in game.
The sprite polygons are quads by default, so there were no triangles.
The same experiment but with applying a texture from an animation range produced no results either.

meta2tr 30-11-13 19:53

I misunderstood your initial post. Now I see what you are trying to do.

Working in Metasequoia can give you the impression that sprites are just a texture, but in fact they are not stored like textures in the tr4 file. It seems that they are managed differently by the engine.

HeinzFritz 01-12-13 15:31

Thanks for the explanation.
Yes, Metasequoia does give a strong impression that sprites are just textures. One can apply any texture file on any sprite (at least to those that were in my focus of interest). I tried also to coat the "shiny sprite" with the first of the 4 flame/smoke sprites which do animate on flames, hoping that the shiny sprite would also animate, but no, just this first sprite is displayed.
Anyway, I hope that sooner or later you (or somebody else) will find out how exactly the engine handles the sprites and will succeed to make animating ones.
There are, by the way, in TREP two sprites whose behavior and attributes can be modified: The blood sprite (which can be changed to opaque and parameters like density, spread etc can be fine tuned in TREP, as well as the water bubbles sprite whose behavior can also be customized.
You may check it out how it is done by comparing two exe files of which one has the corresponding parameters changed, while the other has not.

Titak 01-12-13 15:57

Quote:

Originally Posted by HeinzFritz (Post 6952291)
There are, by the way, in TREP two sprites whose behavior and attributes can be modified: The blood sprite (which can be changed to opaque and parameters like density, spread etc can be fine tuned in TREP, as well as the water bubbles sprite whose behavior can also be customized.

This can also be done with FLEP. :D

Just saying, so both a regular tomb4.exe patched with TREP and a TRNG tomb4.exe patched with FLEP can be checked if needed.


I like your ideas for animating sprites, HeinzFritz. It is quite interesting. :D

HeinzFritz 01-12-13 19:20

Yes, interesting indeed, Titak. Accidentally, when working with meta2tr, I messed the sprites textures up and some amazing effects appeared. Of course, they were out of concept at the time, so I corrected them immediately but I think that this aspect of the game has been neglected by all keen patchers so far, with the two exceptions mentioned above.

Clearly, there are two opposite attitudes in all this playing with and modifying the exe:

1. The "True to life and logic" approach, where the focus is eg. upon blood looking as similar to real blood as possible, and the:

2. "Hey, it is all just a game! Anything makes sense" approach.

Titak 01-12-13 19:28

Quote:

Originally Posted by HeinzFritz (Post 6952426)
2. "Hey, it is all just a game! Anything makes sense" approach.

Kinda like the starry effect I made with the FLEP patch for customizing smoke-emitters.
I assigned a blue sort of shine/starry texture as sprite and adjusted the size and emit time and all that and I've been using it to mark secrets with. :D
(This patch is not present in TREP btw...)

Both optiosn should be present I think so, as a builder, you can both go for realistic and unrealistic, depending on the type of game you are making. :D

meta2tr 19-07-14 23:51

Now available: meta2tr_v8.zip and floor2prj_v3.zip.

What's new in meta2tr

TRNG v1.2.2.7x speech head objects are now exported/imported correctly.

Fixed a bug that sometimes caused a one pixel error in sprite uv coordinates when importing them into the tr4 file.

You can now edit the positions of moveables and statics in your rooms in Metasequoia. Objects you place on the map now appear in RoomsAndFloor.mqo (or RoomAll.mqo). To edit an object's position, you select it in the object list, then click on "Local". You have much greater control on the object's position than in the level editor: it can be anywhere on the sector and it can be at any angle around the vertical axis. Then to update the level with the new position, you import the RoomsAndFloor file into the level in the usual way. Click here to see how this looks for tut1.

Adding empty (magenta) placeholder tiles when first unpacking the tr4 file is now easier. Just choose the section you want (TGA, WAD, BUMP), and choose the number of tiles to add.

You can now group textures for statics and moveables in the tiles. This avoids an object having its textures randomly spread over a lot of BMP files, so it's easier to create libraries, or to copy an object to a different level. Click here to see an example.

Room textures can now be exported so that they have the same layout in the tiles as they do in the project's TGA file. So if they are grouped and ordered in a logical way in the TGA, they will stay like that in the tiles. To use this feature, when you first convert the TR4 file to MQO and BMP files, you drag the project's TGA file with the TR4 file on to meta2tr. Click here for an example showing how tiles would be exported for tut1.

Floor2prj

You may have seen this used in Psiko's tutorials. (He had some problems but they're now fixed).

Floor2prj allows you to import edited collision from RoomNNN(Floor) or (Ceiling) objects back into the original PRJ file. This helps when a level is designed first in external 3d software. Importing edited collision back to the project makes it easier to correctly place triggers, objects, lights, cams and sounds on the map. To use this feature, you drag your PRJ file and the MQO file containing the edited (Floor) and (Ceiling) objects on to floor2prj.exe, it will create a new project file with floor and ceiling collision updated to match the (Floor) and (Ceiling) objects. Click here to see an example of a random height-map imported into an 18x18 room.

Happy editing :)

raiderromero 20-07-14 02:43

:)thank you for this updates

HeinzFritz 20-07-14 10:10

Thanks for the long awaited update. So far I had time only to try out only the floor2prj.exe but when dropping the .mqo and the project file from the editor, it gives me the unrecoglnised file error for the project.

meta2tr 20-07-14 11:04

It looks as if you project file version isn't PROJFILE1. What editor did you use to save the file?

HeinzFritz 20-07-14 11:11

I use the NGLE editor (last version compatible for the non-TRNG.exe). It was, as usual, saved with the .prj extension.
Do I have to rename it to PROJFILE1.prj?

meta2tr 20-07-14 11:17

No, PROJFILE1 should be the first characters in the file, followed by 3 zero bytes.

HeinzFritz 20-07-14 11:20

Does this mean that I have to look the project file up with a Hexeditor and change it accordingly?


All times are GMT. The time now is 20:46.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.