Did you know? Xentax started the Unepic SID Channel, that brings the latest music composed for the SID chip! Support us by listening and subscribing! Over 50.000 songs already there!

Sniper Elite 3 & 4 .asr/models

Post questions about game models here, or help out others!
dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Fri Jun 11, 2021 1:40 pm

Hey, I was messing around with SE4 and was wondering if anyone ever figured out the models.

Textures are great and easily extracted with asura.bms but about the models, it just extracts them as generic files.
I've attached a model extracted from the game below, I played around with it with MR but couldn't get the right offsets etc.
Was wondering if there's info about this format anywhere.
carcano scope.rar
You do not have the required permissions to view the files attached to this post.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3423
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 948 times
Been thanked: 1852 times

Re: Sniper Elite 3 & 4 .asr/models

Post by shakotay2 » Fri Jun 11, 2021 3:06 pm

Half floats are harder to track, this is not perfect but may serve as a starting point, using hex2obj:
.
l3#carcano_scope_camo.png
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 784
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 26 times
Been thanked: 764 times

Re: Sniper Elite 3 & 4 .asr/models

Post by Bigchillghost » Fri Jun 11, 2021 6:54 pm

Using AXE:
l3#carcano_scope.png
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sat Jun 12, 2021 12:06 pm

Bigchillghost wrote:
Fri Jun 11, 2021 6:54 pm
Using AXE:
l3#carcano_scope.png
Damn, I gotta figure out how to use mesh reaper :s.

Thank you both.
This was the result I was getting with model researcher, same for DJ Normality.

https://i.imgur.com/l1JAVEp.png

I'll try to use Ghost's AXE and see if I can work something out that way. Looks way more complicated than MR but hopefully I can understand how it works (time to read the wonderful tutorial posted by Ghost :D) .
Last edited by dimis9138 on Sat Jun 12, 2021 12:52 pm, edited 1 time in total.

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sat Jun 12, 2021 12:30 pm

Here is the file from said screenshot from above. I used the same format as the one in your post but with the offsets that worked for me in model researcher. I get a same result, was wondering if it's not just me and if it is me using AXE wrong what the difference is with model researcher to get the models to actually work with AXE where-as with model researcher they're broken like in said screenshot above. If you could look at some point ghost since you know how to use AXE better that'd be nice. I also put a link in the bottom of this post to a download of more SE4 stuff including an actual human model if anyone's interested in having a go at that.

Offset I used was 2D7EC.
kar98k_snow.rar
Image

More files: https://mega.nz/file/thp0HLTK#dTlREBNr2 ... bnGtco9A4w
You do not have the required permissions to view the files attached to this post.

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 784
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 26 times
Been thanked: 764 times

Re: Sniper Elite 3 & 4 .asr/models

Post by Bigchillghost » Sat Jun 12, 2021 2:57 pm

dimis9138 wrote:
Sat Jun 12, 2021 12:06 pm
I'll try to use Ghost's AXE and see if I can work something out that way.
You know, it sounds kinda weird that you address me like that and I "officially" disapprove it. :D
dimis9138 wrote:
Sat Jun 12, 2021 12:30 pm
I used the same format as the one in your post but with the offsets that worked for me in model researcher. I get a same result, was wondering if it's not just me and if it is me using AXE wrong what the difference is with model researcher to get the models to actually work with AXE where-as with model researcher they're broken like in said screenshot above.
AXE uses the low-level vertex index count to describe polygons as it's not possible to know the exact polygon amount for encodings like triangle strip without interpreting the data first. You should not just copy the params without adjusting them according to your circumstances, though some of them might still be the same. In your screen you forgot to adjust the relative address for vertex attributes. That's the only param you need to adjust for vertex attributes btw.

It took me a while to figure out what you mean by "broken" then I just realized the data type for positions should actually be unsigned short, which sadly had not been revealed by that previous sample.
kar98k_snow.png
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sat Jun 12, 2021 8:01 pm

Bigchillghost wrote:
Sat Jun 12, 2021 2:57 pm
dimis9138 wrote:
Sat Jun 12, 2021 12:06 pm
I'll try to use Ghost's AXE and see if I can work something out that way.
You know, it sounds kinda weird that you address me like that and I "officially" disapprove it. :D
dimis9138 wrote:
Sat Jun 12, 2021 12:30 pm
I used the same format as the one in your post but with the offsets that worked for me in model researcher. I get a same result, was wondering if it's not just me and if it is me using AXE wrong what the difference is with model researcher to get the models to actually work with AXE where-as with model researcher they're broken like in said screenshot above.
AXE uses the low-level vertex index count to describe polygons as it's not possible to know the exact polygon amount for encodings like triangle strip without interpreting the data first. You should not just copy the params without adjusting them according to your circumstances, though some of them might still be the same. In your screen you forgot to adjust the relative address for vertex attributes. That's the only param you need to adjust for vertex attributes btw.

It took me a while to figure out what you mean by "broken" then I just realized the data type for positions should actually be unsigned short, which sadly had not been revealed by that previous sample.
kar98k_snow.png
Oh so the relative to address in AXE is the address for vertices? I didn't quite understand that hah. I will play around with some more samples and post something here. Thanks a lot man, I really appreciate it. Now all we need like Normality said is a tool that makes another tool off these settings hahah.

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sat Jun 12, 2021 8:41 pm

After using MR I could produce this result: Image

After putting this in AXE I got this error: Polygon vertex index count could not evenly divide by 3. I realized by looking at your screenshots that you simply * 3'd the vertices amount (something I guess MR does automatically with shorts?) to get your results and did the same but I'm now just getting this error: Error occured while checking params, file too small for required size of polygon vertex index data which makes me think I've simply went out of the file's size but reducing it simply gives a pretty damaged result.

MR settings: Image

File attached, sorry for being a pain but I'm just trying to learn how to use AXE better because it seems to be a really great tool and I'm not sure if there's a way to override it or not.

Image
kar98k_scope.rar
You do not have the required permissions to view the files attached to this post.
Last edited by dimis9138 on Sun Jun 13, 2021 3:02 am, edited 2 times in total.

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sun Jun 13, 2021 2:56 am

I've also looked at another file which I linked (g43_snow in the picture & g43) which appears to be everything correctly set up such as vertices, faces etc but the end result is a flat plane with all the faces overlapping. If anyone knows what could be causing this please let me know.

AXE settings: Image

End result: Image

However the positions seem fine in the interpretation.

Also, this program is really great. Thank you for releasing this.
g43.rar
You do not have the required permissions to view the files attached to this post.

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 784
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 26 times
Been thanked: 764 times

Re: Sniper Elite 3 & 4 .asr/models

Post by Bigchillghost » Sun Jun 13, 2021 4:03 am

dimis9138 wrote:
Sat Jun 12, 2021 8:01 pm
Oh so the relative to address in AXE is the address for vertices?
There're two modes for how vertex attribute addresses can be specified. You can either specify the absolute addresses for every vertex attributes, by enabling the "Absolute" radio button, in which way you'll have to modify the values every time for another file or sub-mesh. Or, you could just use the relative mode, to specify a base address for the vertex attributes, and then specify the offsets for corresponding attributes, relative to that address. In this way, so long as the vertex layout doesn't change, you don't need to change the offset for every attribute. Instead, you just need to reassign the base address (or called a relative address), which obvious will be a great relief for the lazy.
dimis9138 wrote:
Sat Jun 12, 2021 8:41 pm
After putting this in AXE I got this error: Polygon vertex index count could not evenly divide by 3. I realized by looking at your screenshots that you simply * 3'd the vertices amount (something I guess MR does automatically with shorts?)
As I wrote here:
Bigchillghost wrote:
Sat Jun 12, 2021 2:57 pm
AXE uses the low-level vertex index count to describe polygons as it's not possible to know the exact polygon amount for encodings like triangle strip without interpreting the data first.
It's not the "vertices amount" that you need to multiply with, it's the polygon amount. For ordinary triangle encoding you get the indices count by multiplying the polygon count with 3, or by dividing the total length of the indices data by 2 (for short indices).

The params you used for polygon vertex indices address and count aren't accurate btw.
kar98k_scope.png
dimis9138 wrote:
Sat Jun 12, 2021 8:41 pm
sorry for being a pain but I'm just trying to learn how to use AXE better because it seems to be a really great tool
AXE inherited pretty much all features from AMR, which has a detailed document for how it works. Furthermore, AXE simply enhanced that, which's why I didn't bother to write another "specification". I'm just too lasy for that. You can however use that document as a reference for a better understanding of the entire workflow. Link attached below.
AMR - Mesh Format Research Helper
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 784
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 26 times
Been thanked: 764 times

Re: Sniper Elite 3 & 4 .asr/models

Post by Bigchillghost » Sun Jun 13, 2021 4:09 am

dimis9138 wrote:
Sun Jun 13, 2021 2:56 am
I've also looked at another file which I linked (g43_snow in the picture & g43) which appears to be everything correctly set up such as vertices, faces etc but the end result is a flat plane with all the faces overlapping. If anyone knows what could be causing this please let me know.
You were just using the wrong params. The relative address for vertex attributes should be 0xA4 and the address for polygon vertex indices is 0x2CB04, and the indices count, 14973.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sun Jun 13, 2021 4:11 am

Bigchillghost wrote:
Sun Jun 13, 2021 4:03 am
dimis9138 wrote:
Sat Jun 12, 2021 8:01 pm
Oh so the relative to address in AXE is the address for vertices?
There're two modes for how vertex attribute addresses can be specified. You can either specify the absolute addresses for every vertex attributes, by enabling the "Absolute" radio button, in which way you'll have to modify the values every time for another file or sub-mesh. Or, you could just use the relative mode, to specify a base address for the vertex attributes, and then specify the offsets for corresponding attributes, relative to that address. In this way, so long as the vertex layout doesn't change, you don't need to change the offset for every attribute. Instead, you just need to reassign the base address (or called a relative address), which obvious will be a great relief for the lazy.
dimis9138 wrote:
Sat Jun 12, 2021 8:41 pm
After putting this in AXE I got this error: Polygon vertex index count could not evenly divide by 3. I realized by looking at your screenshots that you simply * 3'd the vertices amount (something I guess MR does automatically with shorts?)
As I wrote here:
Bigchillghost wrote:
Sat Jun 12, 2021 2:57 pm
AXE uses the low-level vertex index count to describe polygons as it's not possible to know the exact polygon amount for encodings like triangle strip without interpreting the data first.
It's not the "vertices amount" that you need to multiply with, it's the polygon amount. For ordinary triangle encoding you get the indices count by multiplying the polygon count with 3, or by dividing the total length of the indices data by 2 (for short indices).

The params you used for polygon vertex indices address and count aren't accurate btw.

kar98k_scope.png
dimis9138 wrote:
Sat Jun 12, 2021 8:41 pm
sorry for being a pain but I'm just trying to learn how to use AXE better because it seems to be a really great tool
AXE inherited pretty much all features from AMR, which has a detailed document for how it works. Furthermore, AXE simply enhanced that, which's why I didn't bother to write another "specification". I'm just too lasy for that. You can however use that document as a reference for a better understanding of the entire workflow. Link attached below.
AMR - Mesh Format Research Helper
Thank you, that answers a lot of my questions. I will try to get into AMR this weekend first and then AXE to try and learn this workflow for reversing models.
Last edited by dimis9138 on Sun Jun 13, 2021 4:15 am, edited 1 time in total.

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sun Jun 13, 2021 4:12 am

Bigchillghost wrote:
Sun Jun 13, 2021 4:09 am
dimis9138 wrote:
Sun Jun 13, 2021 2:56 am
I've also looked at another file which I linked (g43_snow in the picture & g43) which appears to be everything correctly set up such as vertices, faces etc but the end result is a flat plane with all the faces overlapping. If anyone knows what could be causing this please let me know.
You were just using the wrong params. The relative address for vertex attributes should be 0xA4 and the address for polygon vertex indices is 0x2CB04, and the indices count, 14973.
Damn you're a legend man. I keep getting confused because last time I tried to do this was with cyberpunk models where I could at least see the general shape of the model even if the offsets were slightly wrong so when I see a flat plane I tend to get confused. By the way, you should definitely get a tip link or something where people (like me) can tip/thank you for your work and being this patient as a whole. Thanks a lot man.
Last edited by dimis9138 on Sun Jun 13, 2021 7:32 am, edited 1 time in total.

dimis9138
beginner
Posts: 25
Joined: Mon Jul 27, 2020 6:37 pm
Has thanked: 20 times
Been thanked: 1 time

Re: Sniper Elite 3 & 4 .asr/models

Post by dimis9138 » Sun Jun 13, 2021 7:28 am

Only last thing I'd like to ask if it is possible, is how is padding exactly decided/processed/dealt with in AXE? Is it by getting the correct amount of columns for stride so that they're held exactly in 1 row (I'm asking this after briefly reading your AXE demonstration and seeing you detail processing vertex attributes with stride)?

Main reason I'm asking is because I'm confused with the terminology from MR (padding) and assuming that the equal in AXE is stride for attributes.

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 784
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 26 times
Been thanked: 764 times

Re: Sniper Elite 3 & 4 .asr/models

Post by Bigchillghost » Sun Jun 13, 2021 8:11 am

dimis9138 wrote:
Sun Jun 13, 2021 7:28 am
Is it by getting the correct amount of columns for stride so that they're held exactly in 1 row (I'm asking this after briefly reading your AXE demonstration and seeing you detail processing vertex attributes with stride)?
Yes, AXE uses the size (or stride) of a vertex element structure (containing all the attributes for one vertex including positions, normals, texcoords, etc.) to determine how the data are aligned. Otherwise you'll have to measure and specify the amount of bytes to skip after reading each attributes, which'll definitely be a huge pain considering so many vertex attributes.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

Post Reply