Page 7 of 39

Re: Rainbow Six: Siege Models Thread

Posted: Thu Feb 20, 2020 10:21 pm
by Tushkan
I haven't used the ninja ripper so I don't know what type of data you have. I'm pretty sure if it's actual model data than it can be interpreted and parsed. The other question is whether there is any sense in trying to convert it when there is some decent progress on unpacking tool.

Re: Rainbow Six: Siege Models Thread

Posted: Fri Feb 21, 2020 6:12 pm
by Custard
I followed along with process of ripping Mass Effect Andromeda, which was mainly one guy who was passionate and skilled. Took him ages, then he finished and suddenly those big tools had the ability to rip Andromeda, they had taken his work wholesale and used it line-for-line in the code. Just saying those big tools don't run on magic that can access all kinds of data that it hasn't solved before, may be Ninja Ripper will suddenly be able to work on Siege if Tushkan gets the result. It really put that guy off helping any more too, bad lack of respect and community spirit than he had expected.

Re: Rainbow Six: Siege Models Thread

Posted: Mon Feb 24, 2020 5:20 am
by ImEnFuego
Hey guys! I'm so glad to see you working on this, as a 3d artist I'm really interested in this and if you need any help I'd love to, my coding skills are pretty much none but I can provide game files, create shaders for the models or whatever. Keep it up legends <3

Re: Rainbow Six: Siege Models Thread

Posted: Mon Feb 24, 2020 10:58 pm
by Tushkan
God samples of new metas. Doesn't seem to be zstandard as for general .forge chunk packing. Maybe enyone by chance can identify the compressor?

Code: Select all

                                               file  index   meta
          datapc64_merged_set02_bnk_meshshape.forge   2231   FF 60 FA 6B 30 80 D1 5F 68 A7 7A DC 9D C1 24 53 37 19 11 66 9C 2C C3 42 C4 80 92 2C 8A 70 45 87 99 E0 0F FB AC 92 FA 99 1A
                datapc64_ondemand_cn_bnk_mesh.forge    249   7C 16 35 03 90 6C 21 0B 27 B2 B2 A0 80 BB 8F 58 BA 1F 27 63 BD D2 1A 65 11 59 F0 3C
               datapc64_merged_set02_bnk_mesh.forge    993   73 4B A6 5C 98 6D 13 17 EC B0 4C EB 80 BD 8F 7D AE 38 D3 B8 83 EC 3C 52 72 A9 5F 71 96 1D 85 4B 30 3B 5A D3 91 53
               datapc64_merged_set02_bnk_mesh.forge   2417   E2 30 EA 73 30 40 0F 3B 6A 88 57 E9 8F BD A4 53 39 E1 CE 9D 9C EA 34 48 C6 46 85 16 DB 6C 85 4B B5 F3 50 FE A0 53
                     datapc64_merged_bnk_mesh.forge  16501   D3 C3 A3 C4 10 40 05 1A 81 76 1B 18 4C 80 92 5F 43 CC A9 CB 7B DC 20 51 1B 3D 51 8E 6A 00 9B 58 8A B9 CB 11 41 6D 3E 89 42 3A 32 9D A0 92 AC 90 5F 50 2E 4F
                     datapc64_merged_bnk_mesh.forge  36563   DD 2D F0 FE 20 40 05 1A 8B 50 4E 67 40 80 93 5B 43 E6 01 1A 6A FB 3C 4F E4 67 93 8D B2 11 99 48 99 93 0A 65 B1 2E 00 AD 6A
                     datapc64_merged_bnk_mesh.forge   5087   CB 86 7A 3E A0 6C 23 37 BE 08 D6 CD 8C EF E5 02 07 AF 48 5D
                datapc64_merged_bnk_meshshape.forge  12956   D8 06 A2 8D 37 80 DB 74 8E BB 1D 41 55 C0 55 40 5E 3A A4 09 96 30 F9 73 21 59 60 93 A8 5F 7E A6 B9 F3 FD 69 B3 B1 C9 8B 6F 65
          datapc64_merged_set02_bnk_meshshape.forge   6611   5D BE 3F E8 64 91 C6 65 25 C1 9F 51 76 F6 67 44 8F 13 26 0B 41 1E C3 35 7D E7 EF E2 5E 76 73 8B 11 0F 77 79 50 92 F6
                     datapc64_merged_bnk_mesh.forge  23151   79 8C 0E 87 C7 41 05 1A 2F 31 8D 41 B2 81 A4 5B AF 6E 57 11 B0 DF 0A 73 5D D1 E9 DD 80 01 9B 32 2E 67 4A 50 D0 41 1C A3
                     datapc64_merged_bnk_mesh.forge  33985   B3 06 5C 8A C6 7D 5C BE 16 BB DE 5C F7 BD EC FF D6
                     datapc64_merged_bnk_mesh.forge   6526   E6 DB 37 2B A8 4B 1E 0B 43 4B BF A4 97 AB B5 7E 36 CD 5D 7C 9E C1 07 63 E3 20 C1 1D 88 1F EE 58 BB A9 4D E2 90 5D 12
               datapc64_merged_set02_bnk_mesh.forge  13194   05 3F F4 C2 B7 50 18 0B DC 41 71 AA A1 BF A4 5F 94 E8 F8 2B B0 DF 0A 73 7A 71 85 C2 80 01 9B 32 D5 87 2F BF EF 41 1C A3
          datapc64_merged_set02_bnk_meshshape.forge   7218   52 54 37 DE 31 80 D1 4F 27 E2 BF 2B A5 C9 76 4D CA 75 75 EB 86 2D F5 63 9D E1 E1 C4 B5 56 48 BC 2F 20 4E 22 8F 81 E8 87
               datapc64_merged_set02_bnk_mesh.forge   8130   BC 06 9C DE A4 27 64 BE 15 AF 13 AB 94 61 E8 C9 EE F5 8E 73 97
                     datapc64_merged_bnk_mesh.forge  40050   BF 06 2C F3 17 C5 31 BF 12 BF D8 71 36 3F 84 F0
                datapc64_merged_bnk_meshshape.forge  23741   0A D9 67 F8 06 80 DB 74 F8 7C F2 74 78 C0 25 67 A1 FB 45 2B 64 33 F3 68 22 1F 00 BA 7E 40 62 81 C4 86 B8 43 50 B0 D7 A6 9D 10 28 0C 47 D0 79 E4 07 56 F9 BC 51 3A DC E2 F7 F1 45 60 AF
                     datapc64_merged_bnk_mesh.forge  33934   10 54 7E BD 36 40 09 0C C6 C9 D3 A3 BC 81 83 52 8B 45 75 57 96 F9 07 40 58 D8 0F CA A7 31 B5 63 CA 36 B5 81 B7 52 10 AA EA B8 7E 09
          datapc64_merged_set02_bnk_meshshape.forge   1298   77 69 09 00 18 80 C6 48 18 BA AC C5 57 EC 72 54 A6 38 60 AF 49 19 F0 68 72 8E C6 43 66 7B 7E AF 30 D8 96 DC 6E AC E6 BB AD 7B 24 B5
              datapc64_merged_playgo_bnk_mesh.forge   2208   DF 92 6A 4D A2 57 00 0B BB 31 C7 0D A4 B1 A6 5F 4C AC 50 9E 8D DC 13 53 F1 E0 24 5B EA 01 96 48 A6 2B BA 2C 9D
                datapc64_merged_bnk_meshshape.forge  15900   B1 A8 D8 EB 2B 80 D7 42 47 CC A1 58 71 F3 7B 7E D7 48 33 EE 53 12 FD 6E B9 E4 87 80 4C 76 73 8B 5A 13 40 5B A2 93 F6
                     datapc64_merged_bnk_mesh.forge  12267   FF 61 BB 0E C5 41 09 0C 55 93 02 D2 A1 81 93 5B 21 33 DB 8A 80 F0 0A 67 D7 95 4A 23 85 1F 85 4B B8 CC A1 C2 91 53
               datapc64_merged_set02_bnk_mesh.forge  14013   02 7B 28 66 4F 49 1C 64 99 99 AE F1 79 BE BC 65 A1 39 3D 8D 6A F1 0A 64 29 86 CB 4C 61 29 BF 58 D7 DC 6C D8 43 50 13 B1 BA 55 CA 9C 99 B9 BC 96 08 95 AA 09 BE DA 58 E4 CF 0D
               datapc64_merged_set02_bnk_mesh.forge  14256   AB 19 40 72 6F 51 18 0B 77 BF 33 DB 48 BA BE 4E F9 E9 80 AF 7F F0 3B 7E A3 46 07 7C 4B 6F 85 44 79
              datapc64_merged_playgo_bnk_mesh.forge   1330   4C 64 67 F7 DE 41 03 07 31 F5 D3 5B B9 8A A2 5F A5 49 B5 39 91 DA 65 7E 51 82
                     datapc64_merged_bnk_mesh.forge  29987   7D DF DC C1 59 51 18 0B CA 7B AE AA 5A B0 A5 54 BA 96 04 2F 6D FA 06 4C 51 3B A3 FB B8 01 88 45 C4 99 59 9B AE 5F 69 B1 98 30 E6 63 B5 9D AE
               datapc64_merged_set01_bnk_mesh.forge   3725   DF 62 D0 A6 5C 51 18 0B AE FE 44 0E 5E B0 A4 65 7D 0F 23 EA 40 ED 34 46 D1 A5 E9 A0 B2 11 9E 37 BF 3B 09
                     datapc64_merged_bnk_mesh.forge  30305   7D DD 2C 04 42 51 18 0B CA 79 9E ED 42 AD BD 79 B6 A1 5C 78 A3 DF 0A 73 72 13 ED 00 93 01 9B 36 B4 B6 44 F6 A8 2E 00 AD 99
                     datapc64_merged_bnk_mesh.forge  34200   BF 06 8C 67 E1 93 40 BE 12 BF 38 E2 C1 E9 FB F1
                     datapc64_merged_bnk_mesh.forge  22783   8E D2 2D A6 1C 40 05 1A 64 46 A3 AB 5E 80 9F 48 EB CA 31 2B 7F DD 3C 53 B0 32 E5 DC 51 11 95 44 69 9A 7C A7 44 59 2D 8F 1F 35 CF 78 A0 92 AC 90 FA A1 B5 EE
                     datapc64_merged_bnk_mesh.forge  14716   B4 99 9C 35 30 40 05 1A 62 3B 70 09 AF 81 83 4E E9 96 FB EC B4 C1 07 63 9C FE 68 6C B1 1F ED 58 60 6E 37 52 B9 5D 12
                     datapc64_merged_bnk_mesh.forge   5850   9B E7 91 06 C4 41 05 1A 49 19 6D DB B8 81 92 5B 1D 8E F5 87 8E FB 0A 62 9E 3C BC 7A A9 3F BD 58 52 32 5E CB 9F 51 1B DE 3A D4 9C
               datapc64_merged_set01_bnk_mesh.forge   4332   02 74 7E D5 47 50 19 0B CE BB FA 95 44 BE A3 5F B0 23 A2 6A 42 D9 27 40 26 A8 27 A1 C0 01 96 48 D7 BB 8F A4 BD
              datapc64_merged_playgo_bnk_mesh.forge   2954   64 A4 C6 C4 6F 78 29 20 DA D8 8A 90 6F 80 82 5F BE 4D 33 3B 8E FD 30 7E 6D DD CE C7 9B 27 BF 63 24 7D 1C 33 B2 4C 1D A8 BF 81 F6 05 A4 EC D1 8B 53 3A BF 81 82 DD 25
               datapc64_merged_set02_bnk_mesh.forge  10654   B5 57 AC 36 30 40 05 1A 63 C9 21 1A 42 80 80 56 E8 44 BB D3 8B D6 34 4F BC D7 56 69 AD 1F 85 55 6F 15 D0 04 8D 41 1E DF 4F B8 47 F2 A6 EE BC 97 9C
datapc64_merged_set02_bnk_014061302_meshshape.forge    104   AF 52 77 3E E0 89 74 D6 62 8F 07 C8 D6 C9 D3 E7 C0 10 B7 42 CD
                     datapc64_merged_bnk_mesh.forge  30770   F6 C7 2F 25 6B 6D 21 0B AA 1F 85 97 5D 9C B8 53 27 A8 60 BA 88 F1 26 55 D2 39 C0 27 96 01 96 48 AD D9 4D E8 A6
               datapc64_merged_set02_bnk_mesh.forge   6350   21 BE 78 38 AB 52 09 0B E8 E5 F2 D7 89 8D A4 5B 78 70 6F 78 80 DD 0A 73 1C EB 1B 0C B0 01 9B 36 EF 0D 9C 80 FF 41 1C A3
                datapc64_merged_bnk_meshshape.forge   2619   25 F9 6D 07 5B 8C E6 5B AE 31 B4 D7 B8 DB 44 75 46 9A 6F B2 B6 18 EE 66 0C 33 DB 0F B2 52 6E AA 8D 5F 47 E0 89 81 E8 87
                datapc64_merged_bnk_meshshape.forge   6371   35 B8 EF F3 55 AD FD 59 9C DE 63 71 9A A7 23 17 4A 61 EE 37 A9 13 CF

Re: Rainbow Six: Siege Models Thread

Posted: Tue Feb 25, 2020 7:36 pm
by Tushkan
oryx_mom.jpg
Well, something went wrong xD At least now I do have links per each npc. Strangely enough they have different magic from operator's assets (this one has 0x971a842e while assets have 0x22ecbe63). I hope inner structures will be the same. I'm planning to polish out mesh parser on older models before migrating onto newer assets and modifying the core code. Maybe someone will manage to identify meta compression by that time. I also checked tts exe with x64dbg, it still seems to import mainly zlib for compression but it won't unpack those metas.

Re: Rainbow Six: Siege Models Thread

Posted: Wed Feb 26, 2020 2:21 pm
by Custard
This guy was working on a handler for Anvil engine files: https://zenhax.com/viewtopic.php?f=9&t=9138
His data tool includes lzo2 library in addition to zstandard. I can't verify if his tool decompresses those metas so far, I might be able to do so later.

Re: Rainbow Six: Siege Models Thread

Posted: Wed Feb 26, 2020 6:58 pm
by Tushkan
Afaik lzo was used as main compressor in siege in first years. Then they switched to zstd. It's still worth a try though.
Right now Im having troubles with that mesh I posted earlier. Siege's triangle indices come in 0x180 long blocks. If block ends with valid triangle (3 unique indices) then you can proceed. If there is an invalid triangle (say, [5, 5, 5], ie all 3 angles point to the same vertex) then it means this is an end of a triangle island. These are used for separate objects (pouches, armor, helmet) as well as for separating lods. And generally, for pouches and stuff, you have a chain of triangles, then a boundary (via invalid triange, it gets duplicated till the end of 0x180 block) then it continues from some arbitrary vertex id for the next element. In case of a lod it drops back to 0, 1, 2 and other lower vertices. But in case of that beast, it something fishy is going on. It has 5 body parts and 6 lods. So it's 5*6=30 separate triangle islands. And you would expect first 5 islands to travel all range of vertices than drop to 0 for next lod. But here EACH island drops to 0. So all parts except for first one or it's lods end up messed. It looks like it expects me to cut my 70k vertex buffer into 5 parts and use each one per body part. Each separate vertex buffer would start again from 0 so triangle islands would fit. But I have no clue on where to cut those buffers and if my guess is right at all...
Did anyone encounter similar problems in ubi models?

Re: Rainbow Six: Siege Models Thread

Posted: Thu Feb 27, 2020 11:53 pm
by Custard
6 LODs seem high, considering how tight those levels were. Is that typical on Siege character? And five body part seems low. For this creature in particular, he kinda looks like he's made of separated armor pieces? Just a passing observation of no particular validity.

Image

By the way, can I ask what do you use to examine extracted files in their raw form, is it just the python console?

Re: Rainbow Six: Siege Models Thread

Posted: Fri Feb 28, 2020 8:55 am
by Tushkan
Part separation is nominal. It isn't an island per limb. It goes in groups. On my screenshot you can see legs' and shoulders' armor pads. That all is the first 'island' in that model. Uslands most likely separated by material id, not by triangle connectivity.
And yes, they have up to 5-6 lods, that's 100% positive. There are even youtube vids with fails where menu would load with the lowest lod and Clash would look like a minecraft character.
My research process is this: I unpack a mesh.forge, I build a script inside blender that utilizes my parser. I build meshes and print stats directly in blender. On each execution blender updates imported modules to account for changes in my module. All this is accessible in my dropbox which I posted previously for zaramot. You can download it and play with it. You'll need a blender 2.82 for that and you will also need to fix sys.path.append part of the sctipt to your local path to the modules.

Re: Rainbow Six: Siege Models Thread

Posted: Wed Mar 04, 2020 1:05 am
by Tushkan
beast_parts.jpg
Finally found where block headers are stored and how offsets are organized. These are all the pieces from this mesh file (head is stored separately). Strangely enough I still don't see any value describing the amount of LODs in mesh which is odd. But I guess I should just fig a bit more.

Re: Rainbow Six: Siege Models Thread

Posted: Thu Mar 05, 2020 9:45 am
by Custard
I was having a play with some stuff from your Dropbox. None of the scripts there include any call to sys that I could find. At this point I'm not sure that other dude's extraction tool is working properly for any of the mesh.forges, which complicates my tests. I tried to get some of your unpacked files for cross-examination, and rather unhelpfully Dropbox gives me a generic download error for all those ones, not sure why. This is a bit of a silly round-about way to try and check the unknown compression type, easier done in your own decompression script I expect.

Re: Rainbow Six: Siege Models Thread

Posted: Thu Mar 05, 2020 10:42 am
by floxay
Hello guys, I'm new on this forum and also to this kind if stuff in general.

Looking through this thread I wasn't able to find any information on Operator hitboxes, so are those exportable and if yes how? Any help/information would be useful and much appreciated.

Re: Rainbow Six: Siege Models Thread

Posted: Thu Mar 05, 2020 2:52 pm
by Tushkan
Custard wrote: Thu Mar 05, 2020 9:45 am I was having a play with some stuff from your Dropbox. None of the scripts there include any call to sys that I could find.
sys module is referenced inside blend file. If you open the blend scene and navigate into Text window, you will see a script that actually imports the meshes. It relies on my module so it gets hooked up via sys.paths hack. I just tried to download a random mesh from exports folder and it seems to work. Permissions also seem to be fine. Let me know if the problem persists. Also keep in mind that dropbox scripts are a bit out of date. I update them manually each time I reach a milestone in mesh extraction.
If you don't want to use blender for some reason, let me know, I'll show you an example script on how to extract data into some readable form. You can also PM me your discord id in case you need some immediate help.
floxay wrote: Thu Mar 05, 2020 10:42 am Looking through this thread I wasn't able to find any information on Operator hitboxes, so are those exportable and if yes how?
Those seem to be stored in meshshape files. each meshsape.forge is basically a heap of havok binaries. So you can unpack it with a forge extractor and then convert to xml with tool from Skyrim modding community. However, there are no clear indentifiers for those binaries, so good luck eyeballing 10000's of files. )
Also, I can be wrong on that one actually. I see some strange extra data in 1830 mesh that really resembles another vert\tri buffer. That might turn out to be an actual hitbox mesh.

Re: Rainbow Six: Siege Models Thread

Posted: Fri Mar 06, 2020 9:03 am
by Custard
Aha, it did not cross my mind the .blend file was part of it, thanks for the help! It's making a lot more sense now. I got some results pretty fast but I seem to have a user error. Testing on the helicoper object (9120.mesh); The properly parsed one is already exist in the .blend file, the one below it is my result. I draw pink arrows to my changes, the 9120.mesh file was put in the Meshes folder, and I just hit "Run Script" for this script. So it seems to find it okay, and do something to turn it into an object, but I'm missing something. No complaints or errors in the system console window to give a hint. I'm not sure how that "Usage" code you posted is to be used, it didn't like being run in the console when I tried that.

blenderprscr1.jpg

Btw Dropbox seemed to disagree with my VPN, turning that off solved the download errors. Not a usual problem so I didn't think of it at first. :scaredy:

Re: Rainbow Six: Siege Models Thread

Posted: Fri Mar 06, 2020 10:10 am
by Tushkan
Your edits are completely valid. The mesh is broken for another reason. I can't see the actual blend code, but chances are there is a mesh.getmesh(1) or mesh.getmeshraw(1) in there. It tries to import the second submesh from the binary. Problem is, this functionality was reversed by me on the smasher 2 days ago and is not yet implemented in your version or parser. You can change the code to mesh.getmesh(0) to parse the shell that is alreaty present in blend file. In your case it will also have extra data (normals). I will try to implement shells parsing by monday.
Custard wrote: Fri Mar 06, 2020 9:03 am I'm not sure how that "Usage" code you posted is to be used, it didn't like being run in the console when I tried that.
What console do you mean? if OS' cmd interface, then it won't run there because import script relies on bpy module which is strictly blender-specific. If in blender's python console, then it should run if all script is copy-pasted there, including imports etc (IIRC "Run Script" button and blender console run in different scopes, i.e. they don't share imports or variables). Hitting "Run Script" is actually the way to go.

Also, here is a little rundown on how things are built in r6s module:

r6s.mesh has 2 main classes and a couple utilitary functions. Classes are:
1. Mesh - this is a wrapper for mesh binary. It parses header, stores "pointers" to where vertex\tri data starts.
2. MeshData - actual geometry data container. It's basically a struct with a bunch or arrays (for verts, norms and tris). I should have used a simple dict probably to make it more portable but oh well, that is a subject for future changes.

To get MeshData, you spawn a Mesh and then run Mesh.getmesh(submesh_number) (submesh is what I occasionally call an island, can't settle my naming habits XD )
This extra step is necessary for 2 reasons: importing different LODs and researching the mesh. I might remove it in future.

Now, how do we build an actual mesh from MeshData in blender? This is where r6s.blnd comes into play. It's basically a set of helper functions to make code inside blender less bloated. Main functions that get used are build_mesh(MeshData) which builds and returns actual blender mesh (bpy.types.Mesh) and link(bpy.types.Mesh, collection) which links a given mesh object to the scene so you can see it on screen. There are also some minor helper functions like purge (which doesn't actually purge because it's poorly written xD), render_as(image_path) which saves a viewport snapshot to given location etc. You can read source code to get an understanding of what they do.