www.tombraiderforums.com  

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Editor

Reply
 
Thread Tools
Old 10-07-20, 16:13   #1
Feder
Historian
 
Join Date: Jul 2017
Location: Buenos Aires, Argentina
Posts: 264
Default Building a TR3 project in Tomb Editor

After much pondering ( ) I've decided to build my next TR3 project with Tomb Editor. However, this journey will not be easy. I already built the first 8 rooms and came up with quite a few issues to have in mind.

So, in this thread, I attempt to show not the development of my project, but my experience with this new editor, and a test report regarding its functioning with the TR3 engine and whatever problems I encounter on the way.

I hope, in some cases, this could help the developers perfecting the editor for the older engines, and in others, it would be a problem-solving guide for future TR3 builders interested in using Tomb Editor.

So let's see what I found so far:

************************************************** **************************
1) The Texture Limit:

Let me start by saying I love how they add the "Fix Terture Coordinates" tool, which allows you to texture in a very similar way to Dxtre3d. It's good to see this old editor has good ideas to take and improove. Still, always keep in mind the texture limit, because each texture applied with this tool in a different shape, will create a new texture ID. For example, in my first 8 rooms, I already spent 1000 textures IDs (not counting objects textures)

Rememmber TR2 only supports 2048 IDs, but TR3 supports 4096 IDs.

2) The Trigger Names:

Those of you who are used to Dxtre3d will notice trigger names are different, so I made a list showing which trigger corresponds to its counterpart in Dxtre3d:

DO_ACTIVATE = TRIGGER
DO_DEACTIVATE = ANTITRIGGER
LARA_ON_GROUND_DO_ACTIVATE = PAD
LARA_ON_GROUND_DO_DEACTIVATE = ANTIPAD
SWITCH_IS_ON = SWITCH
KEY_IS_ON = KEY
ITEM_IS_PICKED_UP = PICKUP
ITEM_AT_SECTOR = HEAVY
TRAPDOOR = DUMMY
MINECART LEFT = MINECART LEFT (LOCATED ON THE "SECTOR OPTIONS")
MINECART RIGHT = MINECART RIGHT (LOCATED ON THE "SECTOR OPTIONS")
MINECART STOP = MINECART LEFT AND MINECART RIGHT TOGETHER

3) Deleted Sounds:

This is an issue I encounter when building the level for testing.



Some of the sounds are removed by the editor, supposedly for not been included in MAIN.SFX. So far, I only noticed one of the deleted sounds is the 'Passport Open - Passport Close' sound. Will let you know when I find more.

Another curiosity is that the TR3 pistols sound is replaced by TR4's but that's not much of a problem I guess.

4) Messed Up Graphics and Textures:

This is a big one. Sometimes the graphics go crazy and smoke and water waves are square. Also, the game text dissapears, and some textures get completely white, while some others get largely stretched.





I suspect this is caused after tweaking to much with WadTool, but could be other reason. For now, when it happens, I just create a new wad2 file with the minimum object changes and works fine again. Further investigation is required

EDIT: About the stretched textures, I came to the conclusion WadTool had nothing to do with it. It's a TE problem, as I show on the image below, the same base level before compiling with TE and afterwards:



Also, I noticed something that might explain the graphics problem:



Looks like TE increases seriously the file size. Now that's a one room game with Nevada.tr2 as a base level, built with both tools for comparison. The 8 room level I built so far is 5.125 Kb large, which is simply too much, because the largest sized level on TR3 is Sewer.tr2 with 3.585 Kb.

5) Crash When Exit to Title:

When you exit to title the game crashes. Thanks to DaroRaider's advice, I saved the level file with TRviewer and this fixes the issue. But, most of the times, TRviewer also crashed on me while trying the save the file.

I was concern this could prevent you from finishing the level and jumping into the next, but no, the level transition is safe.

************************************************** **************************

This is all I have for now. I will post more things as I progress.

Last edited by Feder; 10-07-20 at 17:03.
Feder is offline   Reply With Quote
Old 10-07-20, 16:16   #2
TokyoSU
Explorer
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 637
Default

for the graphics, do you have imported all the sprites object ?
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old 10-07-20, 16:19   #3
Feder
Historian
 
Join Date: Jul 2017
Location: Buenos Aires, Argentina
Posts: 264
Default

Quote:
Originally Posted by TokyoSU View Post
for the graphics, do you have imported all the sprites object ?
Yes, all corresponding sprites are in the level file.
Feder is offline   Reply With Quote
Old 10-07-20, 18:39   #4
TR-Freak
Professor
 
TR-Freak's Avatar
 
Join Date: Jan 2008
Location: Deutschland
Posts: 4,975
Default

When we developed TR3 support we noticed that sprites and textures get corrupted if you use too many textures.
Have you adjusted the padding settings in The Level Settings?
We noticed that enabling aggressive texture packing and setting the padding to a low value (1-2) has better results for TR2-3.
Aggressive Texture Packing will pack Object and Level textures together so they are mixed in resulting Texture Pages and are not in separate pages which reduces the used texture pages
__________________
"Your perception of good timing is...bad!"

Last edited by TR-Freak; 10-07-20 at 18:41.
TR-Freak is offline   Reply With Quote
Old 10-07-20, 19:50   #5
vasatomb
Student
 
Join Date: Dec 2018
Location: Russia
Posts: 161
Default

Quote:
Originally Posted by Feder View Post
Yes, all corresponding sprites are in the level file.
for tr2, almost all restrictions are removed if you use tr2main. I have in wad2 all the enemies all the traps other objects and everything works. supports 370 sounds per level. the dozy cheat works.
The limitations of the game engine (textures, polygons) are expanded by 4 times.
Added full inventory cheat on I key (cheat flag in "TOMBPC.DAT" file required). It gives full health, all weapons, ammo, medipacks, flares and all keys.
Added Dozy cheat on O key (cheat flag in "TOMBPC.DAT" file required). It gives fly mode and full health, use Shift key to disable it.
Lara has golden skin while in Dozy mode
SFX number limit increased from 256 to 370.
Z-Buffered mode is improved. Now every polygon is sorted and Z-Buffered, but sprites ignore Z-Buffer, so they're rendered properly, as if Z-Buffer was disabled.

Last edited by vasatomb; 10-07-20 at 20:06.
vasatomb is offline   Reply With Quote
Old 10-07-20, 20:42   #6
Feder
Historian
 
Join Date: Jul 2017
Location: Buenos Aires, Argentina
Posts: 264
Default

Quote:
Originally Posted by TR-Freak View Post
When we developed TR3 support we noticed that sprites and textures get corrupted if you use too many textures.
Have you adjusted the padding settings in The Level Settings?
We noticed that enabling aggressive texture packing and setting the padding to a low value (1-2) has better results for TR2-3.
Aggressive Texture Packing will pack Object and Level textures together so they are mixed in resulting Texture Pages and are not in separate pages which reduces the used texture pages
I just did what you suggested and it worked file size is now 2.605 Kb, texture pages are reduced and I'm sure the graphics problem won't be an issue anymore! Thanks

I adjusted the padding settings to 1, because if I put a 0 value all the texture lines are visible, including objects. However, that explains the stretching of some objects textures:



Apparently, the padding value 1 causes the texture to grab one extra pixel above and one to the left, and leave out one to the right and one on the lowest part. The higher the padding value, the more stretched it looks ingame. This is solved if I place the value 0, bye extra pixels, but hello texture lines

Quote:
Originally Posted by vasatomb View Post
for tr2, almost all restrictions are removed if you use tr2main. I have in wad2 all the enemies all the traps other objects and everything works. supports 370 sounds per level. the dozy cheat works.
The limitations of the game engine (textures, polygons) are expanded by 4 times.
Added full inventory cheat on I key (cheat flag in "TOMBPC.DAT" file required). It gives full health, all weapons, ammo, medipacks, flares and all keys.
Added Dozy cheat on O key (cheat flag in "TOMBPC.DAT" file required). It gives fly mode and full health, use Shift key to disable it.
Lara has golden skin while in Dozy mode
SFX number limit increased from 256 to 370.
Z-Buffered mode is improved. Now every polygon is sorted and Z-Buffered, but sprites ignore Z-Buffer, so they're rendered properly, as if Z-Buffer was disabled.
That's amazing! I heard that was what Danath was using in his huge project where can I get this TR2main?
Feder is offline   Reply With Quote
Old 10-07-20, 20:52   #7
dcw123
Relic Hunter
 
dcw123's Avatar
 
Join Date: Nov 2007
Location: England, UK Gender:Male
Posts: 7,355
Default

While I find all this information fascinating - I REALLY wish you talented guys would make a tutorial / mini manual on how to build TR2/3 levels using Tomb Editor.
I really wanna give it a try, but dunno where to start. I got it to kinda work - but it was a bit glitchy.

Not to mention the fact a lot of the U.I doesn't change when using TR2/3 (like the unofficial editor has different terms for things)
So its all quite confusing.

Maybe I should just stick with the Unofficial Editor?
dcw123 is offline   Reply With Quote
Old 10-07-20, 20:55   #8
vasatomb
Student
 
Join Date: Dec 2018
Location: Russia
Posts: 161
Default

feder go to

https://drive.google.com/file/d/1jVC...ew?usp=sharing

instructions:
https://www.tombraiderforums.com/sho...92&postcount=7

watch this: https://youtu.be/yhLMXsPCtHM

Last edited by vasatomb; 10-07-20 at 21:31.
vasatomb is offline   Reply With Quote
Old 10-07-20, 20:55   #9
Lwmte
Archaeologist
 
Lwmte's Avatar
 
Join Date: Aug 2010
Posts: 1,280
Default

Thanks for the report about texture shifting.

It seems that TR2-3 use different texel alignment method, and I tried to adjust UV coordinates properly so textures perfectly match in position. But it seems engine processes coordinates differently for textures of different size or depending on their placement in texture map, because for 64x64 room textures, it works perfectly fine. Maybe it has something to do with non-power-or-2 textures?

With shifting UV coordinates by 1 pixel I was able to implement seamless texturing in TR2-3 too, but it works correctly only if padding is set to anything bigger than 0. When padding is set to 0, ultra weird texture glitches start to happen. That's why internally TE disables 1px shifting if padding is 0.

It seems it's not solveable in TR2-3 other way than disabling 1px shift, although this will break seamless texturing possibility in the process. But making textures look okay is more important. Anyway, if ever someone will decide to use seamless texturing, for 99% he'll be using TR4/TRNG, because only these engines doesn't put extreme limits on texturing and allow to do anything you want.

Long story short: this problem will be fixed in next version
Lwmte is offline   Reply With Quote
Old 11-07-20, 15:18   #10
Feder
Historian
 
Join Date: Jul 2017
Location: Buenos Aires, Argentina
Posts: 264
Default

Great

Meanwhile, I'll keep reporting anything weird that comes up
Feder is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



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


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