Tomb Raider Forums  

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

Reply
 
Thread Tools
Old 25-03-20, 22:26   #19741
tombraiderfrea
Member
 
tombraiderfrea's Avatar
 
Joined: Nov 2009
Posts: 1,734
Default

Thanks so much for that offer, Kapu!

I Messaged you.
tombraiderfrea is offline   Reply With Quote
Old 26-03-20, 13:42   #19742
Stryke
Member
 
Stryke's Avatar
 
Joined: May 2019
Posts: 348
Default

@Joey79100 & TR-Freak

Wow, both you guys' post are amazing. I never thought about the engine this way. I'm still trying to wrap my head around this concept entirely. Although, I do kinda understand.

Was this the first time this method was used in the TR series?
Stryke is offline   Reply With Quote
Old 26-03-20, 19:26   #19743
Gancian
Member
 
Gancian's Avatar
 
Joined: Jul 2010
Posts: 256
Default

Quick question: How does the SET POSITION command work in the Animation Editor? (WadMerger, WadTool, you name it).
At first I thought that you needed to put Lara's pivot position of the next animation to teleport her there, but inspecting other animations (like the 2 click climb up) it looks like you need to put the offset to add\remove to Lara's current pivot position.
However, the actual numbers inserted by CORE don't seem to line up precisely... I'm not sure how to use the command...
Gancian is offline   Reply With Quote
Old 26-03-20, 19:44   #19744
TR-Freak
Unverified
 
TR-Freak's Avatar
 
Joined: Jan 2008
Posts: 5,140
Default

you exactly put the offset into it.
Most transition animations consist of two parts. One has the Y component and the end animation has the Z component.
TR-Freak is offline   Reply With Quote
Old 26-03-20, 19:49   #19745
Kapu
Member
 
Kapu's Avatar
 
Joined: Feb 2009
Posts: 3,852
Default

Quote:
Originally Posted by Stryke View Post
Was this the first time this method was used in the TR series?
I can remember finding an overlapping room in TR1! When I was playing I had this moment of...wait a minute, this room is so long it would be cutting into the adjourning room...and then I realized they were overlapping. I'm pretty sure it wasn't deliberate, though. It was in one of the Cistern levels...if I have some time I'll look and see if I can find the exact spot.

Quote:
Originally Posted by Gancian View Post
Quick question: How does the SET POSITION command work in the Animation Editor? (WadMerger, WadTool, you name it).
At first I thought that you needed to put Lara's pivot position of the next animation to teleport her there, but inspecting other animations (like the 2 click climb up) it looks like you need to put the offset to add\remove to Lara's current pivot position.
However, the actual numbers inserted by CORE don't seem to line up precisely... I'm not sure how to use the command...
If I remember correctly, SET POSITION will calculate Lara's XYZ position at the very end of the animation, based on the position of her pelvis. The engine will ignore where Lara is positioned in the animation. I.e. you could have Lara physically move one square as part of her animation, but when the next animation plays she will teleport back to the square she was on because the engine was not told to change her position via the command. The pivot of her meshes doesn't play any factor, it's all based on XYZ position.

The coordinates have always confused me, because the WADMerger documentation says the units are based around 1024 being one square, but that's never quite worked for me. I've always had to experiment with changing the numbers little bit by bit to get the desired position. Someone with more experience can probably give you a more detailed explanation of this.
Kapu is offline   Reply With Quote
Old 26-03-20, 19:53   #19746
Joey79100
Member
 
Joey79100's Avatar
 
Joined: Mar 2012
Posts: 3,741
Default

Quote:
Originally Posted by Stryke View Post
Was this the first time this method was used in the TR series?
Deliberately? Maybe. Accidentally? I don't remember (this was discussed somewhere on TRF already), but I think they might have. And they definitely did too in TR4 (I remember Karnak), and I don't know about TR5.

Quote:
Originally Posted by Gancian View Post
Quick question: How does the SET POSITION command work in the Animation Editor? (WadMerger, WadTool, you name it).
At first I thought that you needed to put Lara's pivot position of the next animation to teleport her there, but inspecting other animations (like the 2 click climb up) it looks like you need to put the offset to add\remove to Lara's current pivot position.
However, the actual numbers inserted by CORE don't seem to line up precisely... I'm not sure how to use the command...
It is an offset indeed, that is applied to her absolute position once the animation is finished. For example, if you put 0,0,1024, at the end she will be moved 1024 units forward (1 square). Getting up on a 2-clicks block means she has to move 512 units up, but also a bit forward (otherwise she'd just end up above where she started, in the empty, and would just fall down).
Where it is confusing is that there are some edge cases where the position you want her to move isn't really intuitive... mostly the animations where she's hanging to a ledge, because her vertical position is not fixed but calculated in real-time based on her collision box (why they did it like that I'm not really sure). So to climb up, she actually goes 735 units up (-735, because negative is upwards), assuming you're using regular animations (animation 96 frame 21 is what matters here, because that's the "animation" for her hanging still on a ledge). But the animation is split, so she only goes up, and then on the next animation she goes forward. Your best bet is just use original values as a basis, and then use trial and error for these annoying cases. But other cases should be easy to figure.
Joey79100 is offline   Reply With Quote
Old 26-03-20, 19:54   #19747
SSJ6Wolf
Member
 
SSJ6Wolf's Avatar
 
Joined: Nov 2004
Posts: 1,531
Default

Quote:
Originally Posted by TR-Freak View Post
you exactly put the offset into it.
Most transition animations consist of two parts. One has the Y component and the end animation has the Z component.
There is a caveat to this. I remember working with titak on a new climbing animation and ended up using trial and error to get the correct set position coordinates. For some reason there was an additional hardcoded change that threw off the numbers. There’s probably very few times this happens though.
SSJ6Wolf is offline   Reply With Quote
Old 26-03-20, 21:39   #19748
Gancian
Member
 
Gancian's Avatar
 
Joined: Jul 2010
Posts: 256
Default

Thank you Joey! So I was right after all.
Gancian is offline   Reply With Quote
Old 26-03-20, 22:18   #19749
Krystian
Member
 
Joined: May 2010
Posts: 1,187
Default

I'll give my 3 cents with a few extra bits of info
Quote:
Originally Posted by Kapu View Post
The coordinates have always confused me, because the WADMerger documentation says the units are based around 1024 being one square, but that's never quite worked for me. I've always had to experiment with changing the numbers little bit by bit to get the desired position. Someone with more experience can probably give you a more detailed explanation of this.
There is a discrepancy between the XYZ offset that wadmerger displays in the "Move" box when you manually move the meshes with the gizmo and how they are actually stored. The way they are actually stored is indeed the 1024 = one square system (and 256 being 1 click). But the way they are displayed in this box is by dividing the actual amount by 1024, so one square is equal to 1.0 (as a floating point decimal), a half block 0.5, one click 0.25. I don't know why this design choice was made and in the end it ends up being confusing rather than helpful.
But the setpositions do indeed follow the 1024 unit system (tried and tested, tracking Lara's XYZ coordinates after applying a test position confirms this).

---

As for why sometimes the offsets for setpositions are different (less or more of what you'd expect) - it's always based on Lara's origin. In WM, the origin is shown where the blue Line ends, at the elevation of the grid plane, while in TE's WadTool it's the intersection of blue lines (again on the grid plane). This means that the origin's location relative to Lara will be different for various animations. For most on land animations it's located at Lara's feet, but for swimming it's approximately located at her hip mesh (0), while for hanging, it's roughly midway between Lara's ankles and her knees.
Anyway, it is from this origin point that Lara's position will offset, and this must be taken into account when you have animations where the origin point changes its position relative to Lara. That's why for the climb up anim 97 there is -735, instead of something like -1024, Lara's origin point changes between the climb up and the default standing stance (indeed, making a block of height 735 upwards in an animating software like 3ds Max and placing it next to Lara's hands replicates what you would see in game).
And as it has been mentioned, calculating this offset is not so trivial, given that we have no way of precisely measuring heights inside WMs animation editor.

---

The third matter is why sometimes animations are split into two parts that apply a set position along one axis then another along another axis. This is due to how the engine works. Lara cannot cross solid room geometry in the process of being moved by a set position. In other words, you can't apply set positions in a way that if Lara were to move to the new location slowly instead of immediately, she would pass through a solid block. Again using the climb up animation as an example, the actual climb up animation (97) displaces Lara along the Y axis, then the animation it leads to (102) displaces Lara along the Z axis, to move her forward. Notice how this animation 102 takes this into account by having Lara moved forward a bit comparing to the normal standing animation 103. This is because the Z displacement will only kick in after the animation has finished.

If you do not follow this rule, then in case you have nothing but solid floor all the way down you won't see anything. But if you have a room below, Lara will fall through the room geometry to the bottom room, because the engine has registered it as Lara being inside a wall (or in this case, ceiling). You obviously don't want this, hence you should follow this two-step setposition rule. The average builder may not ever encounter this, but I have seen a few climb up animations that didn't take this into account and indeed resulted in Lara falling through the floor if there was a room below
The above doesn't apply to the 2-click and 3-click vaulting animations, but I guess the logic here is different, because you aren't changing the pivot between the animations, since both start and end in the standing animation.

I swear I once already made a little visual reference to illustrate it, but I can't find it, so I made it again:



I wrote a wall of text, but perhaps someone will stumble upon it in a few years and find it useful

As a small end note, I'll mention my theory that Core actually forgot to follow this rule correctly for the crawl backwards out of crawlspace move (289), because you can see that in this animation the Y displacement is applied first and in the subsequent (290) the Z displacement, which doesn't go in line with the "no crossing room geometry" rule. I believe they intented for Lara to go to the still hanging animation after this move was performed, but as Lara was ejected outside of the room geometry they couldn't get it to work as intended. So instead they "fixed it in post" by having Lara placed just before the ledge and performed the hard grabbing animation, as if from a forwards jump. It ended up looking jarring and ugly, but oh well. I should put this theory to the test now that I have more spare time, lol

Last edited by Krystian; 26-03-20 at 22:45.
Krystian is offline   Reply With Quote
Old 27-03-20, 00:05   #19750
TR-Freak
Unverified
 
TR-Freak's Avatar
 
Joined: Jan 2008
Posts: 5,140
Default

Did you know that you can have the "Classic Pickup" without TRNG script?
For some reason, Lara's "Next StateID" doesnt change from adjusting to pickup.
You need to add an Anim Change with the 4 walk animations (0,1, 22,21) and link it to the second part of the animation.
TR-Freak 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 09:20.


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.