Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 13-11-14, 18:55   #1011
pmatulka
Member
 
Joined: Jun 2013
Posts: 40
Default

How can I compile model viewer?
pmatulka is offline   Reply With Quote
Old 13-11-14, 19:34   #1012
Gh0stBlade
Member
 
Gh0stBlade's Avatar
 
Joined: Dec 2010
Posts: 2,773
Default

On MAIN_SDL.cpp there is

#define SKELETAL_TEST 0

I'm guessing you simply change that. Perhaps a new release configuration would do the trick as well. I've not tried that because when I set #define SKELETAL_TEST 1 it doesn't look like the levels load or anything so I guess i'm doing it wrong.

Quote:
Originally Posted by Lwmte View Post
My goodness! How is that possible at all?! I posted a tweet with your video!

Anyway, seems that Dreamcast format isn't so different from PC format (when comparing to PSX, of course...). That strange ammo means they wanted to make a crossbow for TR5 as well... Cause this ammo doesn't seem like TR4 crossbow ammo.

And that strange "spiky trap" which falls from the ceiling... Not sure I've ever seen it anywhere in TRC.

Also, seems like some polygons are broken in second level... It's a miracle that it loads anyway! Great job!
Thanks for tweeting the video I appreciate it!

That's right! Dreamcast format is so close. PS1 TR4/5 formats have quite a lot of changes due to it needing to be in its most optimal form. TR1/2/3 PS1 files wouldn't be too hard to get loading. Most complex parts would be texture/audio. PS1 format is pretty known now so I could consider it but it might be a waste. I'm not sure what's causing those bad polygons will definitely investigate it!

Did you make any progress with Lara's hair?

Last edited by Gh0stBlade; 13-11-14 at 19:48.
Gh0stBlade is offline   Reply With Quote
Old 15-11-14, 00:53   #1013
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

As I promised, I have updated the source code and scripts to support global pushable flag setting; that is, you don't have to scan through all levels and manually write down pushable IDs. Nevertheless, you can set entity flag afterwards to block out certain pushable; however, I doubt it will be useful until OpenTomb evolves enough for custom level building.

For now, all you have to do is update source code and replace your scripts - and then, all pushables in all game versions should work!

Quote:
Originally Posted by Gh0stBlade View Post
Did you make any progress with Lara's hair?
Well, I got basic principle of matrix transformation multiply from TeslaRus; it's simple in theory - you just multiply own rigid body's transformation matrix upon Lara's head transformation matrix, and you get the position for the root mesh of the hair. But it's not the thing that is actually stopping me from progress. What's more important is that in TR4-5, Core changed the way hair behaves - while in TR2-3 it looked more like a chain of rigid bodies (without rotational limits, so that's why hair meshes could go wild all by themselves), in TR4-5 they used a method which is more similar to modern age soft body dynamics. If you look closely, you will see that Lara's hair can stretch, "compress" and fall from the shoulder very "fluidly", and it's a sign that engine doesn't use constrained chain of meshes as a basis anymore; they used something more complicated.
Lwmte is offline   Reply With Quote
Old 15-11-14, 01:07   #1014
Boobandie
Member
 
Joined: Jul 2012
Posts: 4,286
Default

Quote:
Originally Posted by Lwmte View Post
Well, I got basic principle of matrix transformation multiply from TeslaRus; it's simple in theory - you just multiply own rigid body's transformation matrix upon Lara's head transformation matrix, and you get the position for the root mesh of the hair. But it's not the thing that is actually stopping me from progress. What's more important is that in TR4-5, Core changed the way hair behaves - while in TR2-3 it looked more like a chain of rigid bodies (without rotational limits, so that's why hair meshes could go wild all by themselves), in TR4-5 they used a method which is more similar to modern age soft body dynamics. If you look closely, you will see that Lara's hair can stretch, "compress" and fall from the shoulder very "fluidly", and it's a sign that engine doesn't use constrained chain of meshes as a basis anymore; they used something more complicated.
Are you sure about that? The behavior looks the same to me. The major difference between TR2/3 hair and TR4/5 hair is the connections. In the earlier games her hair was just rectangles connected to each other via a single point at the top/bottom of the polygon, just like all her other meshes. But when TR4 came around they added code to support polygons that could bend and stretch, which they applied all over Lara in seperate meshes known as LARA_SKIN_JOINTS. They did the same thing with the hair meshes. The controlling meshes are the solid ones, just like TR2/3 but shorter and between them are stretchy polygon meshes.

[R]........|S|
[R]........|R|
[R]........|S|
[R]........|R|
[R]........|S|
[R]........|R|

R= Rigid, S= Stretch

Last edited by Boobandie; 15-11-14 at 01:10.
Boobandie is offline   Reply With Quote
Old 16-11-14, 19:37   #1015
Gh0stBlade
Member
 
Gh0stBlade's Avatar
 
Joined: Dec 2010
Posts: 2,773
Default

I guess i'm done with the TR5 Dreamcast level loading into OpenTomb tests. I *fixed* (if that's what it should be called) a small bug I created causing some meshes to render with invisible polys or not at all as Lwmte pointed out

The latest fix has allowed me to successfully load TOM.TRC a small test level used for AI with that mini watercraft thingy. Unfortunately JOBY1.TRC has an alteration to the way the textures are stored. I managed to figure this out and can load the whole level file but OpenTomb just freezes and I don't know the cause at the moment. Chances are it's just a slightly unfinished variant of the title screen level anyway.

Still no sound effects support... I don't think it's worth the hassle implementing those. They're Yamaha ADPCM encoded which is different to the standard Microsoft ADPCM. It would require a complete decode then re-encode to Microsoft's ADPCM since that's what OpenTomb's audio system currently supports. Ffmpeg can convert the Dreamcast sound effects thanks to someone who figured this on another forum I had posted a sample on.

If anyone wants to try out the test/final Dreamcast levels from their Dreamcast files they can simply compile this separate test branch for Dreamcast only. It is *hacked* to just load TR5 Dreamcast files since there's no file magic to do any checks. For the test levels you'll have to set DREAMCAST_BETA 1 because the sound map is smaller than that of the final game files. TR5_Dreamcast_Test Branch link

Not much use for OpenTomb itself, but useful for those who might be interested in what exactly changed between the Dreamcast/PC files. Should be VERY easy to make most existing tools support editing/viewing Dreamcast files with this knowledge.

-----------------------

Video: Skip to 4:25 for TOM.TRC!

------------------------



Regards.
Gh0stBlade is offline   Reply With Quote
Old 16-11-14, 19:50   #1016
Krystian
Member
 
Joined: May 2010
Posts: 1,187
Default

^ You set the video as private, so it can't be watched unless a registered user is allowed by the video uploader. Set it as unlisted instead.
Krystian is offline   Reply With Quote
Old 17-11-14, 15:39   #1017
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Well, it's more up to SDL2, which could support Yamaha ADPCM, but currently is not (however, it's a big plus that they at least support MS-ADPCM, which saved us a lot of time with sound engine)...

I think you should save a loader somewhere (I'll download your branch and put it into my archive of TR-related stuff, so it won't get lost), because who knows how OpenTomb will evolve in the future... Maybe we'll be able to switch level file formats or loaders, which will allow us to load levels for various platforms at the same time.

Now for the latest news!

Currently TeslaRus is rewriting render section which is responsible for correct alpha blending with multiple layers of polygons with different blending operations. That is, if you have lots of objects (or rooms) with alpha blending in scene, they will be correctly sorted by their depth related to the camera. The technique is known as BSP tree, and is very common in contemporary 3D engines (it was actually there since Quake, but Carmack and his engines were always ahead of time ). Original engine never does that, which is most obvious when you try to combine different emitters or statics with different blending modes applied - things just get wrong with different translucent objects placed in different parts of the screen - I stumbled onto this while developing blending modes patch for TR4 engine. Most common example is Lara's shadow, which seems like it's always "sits" above any other translucent faces on the screen.

So, I request someone (meta2tr, maybe? ) to create a test level with differently placed translucent statics and rooms featuring different blending modes to test out this new OpenTomb feature! I will try to create one for myself, but I'm completely not familiar with meta2tr software... And applying blending modes to TexInfos via TrTextur is a big pain!

Last edited by Lwmte; 17-11-14 at 15:40.
Lwmte is offline   Reply With Quote
Old 18-11-14, 14:18   #1018
teme9
Member
 
teme9's Avatar
 
Joined: Nov 2005
Posts: 3,252
Default

Quote:
Originally Posted by Lwmte View Post
Well, it's more up to SDL2, which could support Yamaha ADPCM, but currently is not (however, it's a big plus that they at least support MS-ADPCM, which saved us a lot of time with sound engine)...

I think you should save a loader somewhere (I'll download your branch and put it into my archive of TR-related stuff, so it won't get lost), because who knows how OpenTomb will evolve in the future... Maybe we'll be able to switch level file formats or loaders, which will allow us to load levels for various platforms at the same time.

Now for the latest news!

Currently TeslaRus is rewriting render section which is responsible for correct alpha blending with multiple layers of polygons with different blending operations. That is, if you have lots of objects (or rooms) with alpha blending in scene, they will be correctly sorted by their depth related to the camera. The technique is known as BSP tree, and is very common in contemporary 3D engines (it was actually there since Quake, but Carmack and his engines were always ahead of time ). Original engine never does that, which is most obvious when you try to combine different emitters or statics with different blending modes applied - things just get wrong with different translucent objects placed in different parts of the screen - I stumbled onto this while developing blending modes patch for TR4 engine. Most common example is Lara's shadow, which seems like it's always "sits" above any other translucent faces on the screen.

So, I request someone (meta2tr, maybe? ) to create a test level with differently placed translucent statics and rooms featuring different blending modes to test out this new OpenTomb feature! I will try to create one for myself, but I'm completely not familiar with meta2tr software... And applying blending modes to TexInfos via TrTextur is a big pain!
Exciting! Sounds good! There indeed are plenty of things to "fix" in the old engine, luckily now you're able to make all the bad things right in this engine.

Psst-- while you're at fixing and coding the transparency: add in the soft particles support!
http://www.gamerendering.com/2009/09/16/soft-particles/
teme9 is offline   Reply With Quote
Old 20-11-14, 00:50   #1019
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

So, here is the first BSP transparency test! Currently it's still buggy, as transparency doesn't work properly for movables, and it seems that double-sided transparency is wrongly assigned to all textures, and framerate significantly drops with lots of transparent objects in scene - but still...

Look how dark and light plants blend into each other - it is not possible in original TR engines, as it doesn't sort polygons by their position - hence, you will get misplaced polygons from one side or another. In OpenTomb, it looks proper from all sides.


TeslaRus continues to optimize the feature, so the final one should be more reliable than now!
Lwmte is offline   Reply With Quote
Old 20-11-14, 02:44   #1020
Zebra
Member
 
Zebra's Avatar
 
Joined: Jun 2007
Posts: 26,911
Default

Wow, that's so pretty. Great job !
Zebra 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 12:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.