Important information: this site is currently scheduled to go offline indefinitely by end of the year.

3D Model Researcher - extract 3D models with Python

General game file tools that are useful for more than one game
Greg
advanced
Posts: 49
Joined: Tue Dec 15, 2015 5:47 am
Has thanked: 8 times
Been thanked: 41 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Greg »

At least you're finally responding, I thought you got drafted or just hated foreigners.
tianjiegao
ultra-n00b
Posts: 2
Joined: Tue Feb 02, 2021 2:40 pm

Re: 3D Model Researcher - extract 3D models with Python

Post by tianjiegao »

Buy 3D Model Researcher Pro
It is currently not possible to purchase the program.
Lazov
veteran
Posts: 84
Joined: Sat Oct 08, 2016 11:56 am
Has thanked: 17 times
Been thanked: 55 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Lazov »

Machinedramon wrote: Sun Sep 18, 2022 11:19 pm That would be certainly interesting. I would totally be interested in learning how the program works and if possible work on few things, had been using the program for quite some time and i find it one of the most versatile when working with 3d models....

If made open source that would allow for many interesting developments and features.
Are you a programmer?
User avatar
Machinedramon
advanced
Posts: 77
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 13 times
Been thanked: 42 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Machinedramon »

Lazov wrote: Sat Dec 17, 2022 1:18 pm
Machinedramon wrote: Sun Sep 18, 2022 11:19 pm That would be certainly interesting. I would totally be interested in learning how the program works and if possible work on few things, had been using the program for quite some time and i find it one of the most versatile when working with 3d models....

If made open source that would allow for many interesting developments and features.
Are you a programmer?
I wish, no, im more of an aficionado, i probably started learning to program in a more serious fashion ever since i started using MRP, but also in the process i found many things about the program i would rather do in other ways, i have been trying to replicate the same ideas i posted by creating my own program, so far i have tried doing interfaces with C# and winforms, but mostly im having a lot of trouble with the 3d rendering using openGL, thats why id love to see MRP go open source, there i would totally try and and replicate and anylize what the structure of the code is in your program. It would probably take me a lot of tinkering and try and failure, but i'd be really happy to work with it.
Lazov
veteran
Posts: 84
Joined: Sat Oct 08, 2016 11:56 am
Has thanked: 17 times
Been thanked: 55 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Lazov »

The PRO version of the program has become free. Thanks to everyone who supported the development.
Download:
http://mr.game-viewer.org/download.php
UndeadFrankie
ultra-n00b
Posts: 3
Joined: Sun Nov 24, 2019 7:24 pm
Has thanked: 5 times

Re: 3D Model Researcher - extract 3D models with Python

Post by UndeadFrankie »

Thanks for this program Lazov, it's incredibly helpful! Do you mind sharing the formula that tstrip uses for short indices? I'm trying to write my own model converter for a specific series of games but most of the documentation I've seen about tri-strips is involving the vertices instead of the indices. If it ever releases publicly I could credit you for the tstrips.
User avatar
Machinedramon
advanced
Posts: 77
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 13 times
Been thanked: 42 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Machinedramon »

UndeadFrankie wrote: Sun Apr 30, 2023 5:25 pm Thanks for this program Lazov, it's incredibly helpful! Do you mind sharing the formula that tstrip uses for short indices? I'm trying to write my own model converter for a specific series of games but most of the documentation I've seen about tri-strips is involving the vertices instead of the indices. If it ever releases publicly I could credit you for the tstrips.
I'm not lazov but maybe i can help, TStrip or triangle strip is just a way to generate a list of indices that relate to the vertex count/numeration in the sense that you will be able to generate triangles using a compact format in binaries; that is, lets say that for example for a model that has 10 vertexes in total you have the following tstrip:
0 1 2 2 3 4 5 6 6 7 8 9 (this is a normal tstrip, there is also the FF tstrip that does include jumps using FF instead)

here the logic for the faces is:
0 1 2; repeated 2 = jump to new part; 2 3 4; 4 3 5; 4 5 6; repeated 6 means jump; 6 7 8; 8 7 9.

see how from A B C we switch every second to B A C; thats how it defines the faces:
(the reason why it changes is because faces originally only have 1 orientation (what we call the culling be the back part, not rendere, and the side of the face that has normal, which gets rendered), this is defined by how the generation works using the clockwise direction here the example of how that looks schematically:
Image
UndeadFrankie
ultra-n00b
Posts: 3
Joined: Sun Nov 24, 2019 7:24 pm
Has thanked: 5 times

Re: 3D Model Researcher - extract 3D models with Python

Post by UndeadFrankie »

Machinedramon wrote: Mon May 01, 2023 10:22 am
UndeadFrankie wrote: Sun Apr 30, 2023 5:25 pm Thanks for this program Lazov, it's incredibly helpful! Do you mind sharing the formula that tstrip uses for short indices? I'm trying to write my own model converter for a specific series of games but most of the documentation I've seen about tri-strips is involving the vertices instead of the indices. If it ever releases publicly I could credit you for the tstrips.
I'm not lazov but maybe i can help, TStrip or triangle strip is just a way to generate a list of indices that relate to the vertex count/numeration in the sense that you will be able to generate triangles using a compact format in binaries; that is, lets say that for example for a model that has 10 vertexes in total you have the following tstrip:
0 1 2 2 3 4 5 6 6 7 8 9 (this is a normal tstrip, there is also the FF tstrip that does include jumps using FF instead)

here the logic for the faces is:
0 1 2; repeated 2 = jump to new part; 2 3 4; 4 3 5; 4 5 6; repeated 6 means jump; 6 7 8; 8 7 9.

see how from A B C we switch every second to B A C; thats how it defines the faces:
(the reason why it changes is because faces originally only have 1 orientation (what we call the culling be the back part, not rendere, and the side of the face that has normal, which gets rendered), this is defined by how the generation works using the clockwise direction here the example of how that looks schematically:
Image
No worries I really appreciate the help! When you say "repeated 2 = jump to new part" do you mean skipping bytes or is that just where the next set of indices starts? I'm confused because lets say I read your example into Model Researcher as short tstrip (00 00 01 00 02 00 02 00 03 00 04 00 05 00 06 00 06 00 07 00 08 00 09 00). I get this:
0 1 2 = A B C
4 3 2 = C B A
3 4 5 = Reversed Previous and Added 1 to each?
6 5 4 = Reversed Previous and Added 1 to each?
6 7 8 = A B C?
9 8 7 = C B A?
Either way it has more bytes and indices then the initial input which is throwing me off.
In my example I think it's counterclockwise but I'm not sure if I calculated them properly because in larger files there's some variation to the pattern. Thanks for taking the time to write the initial reply it's definitely explained a few things I wasn't understanding
User avatar
Machinedramon
advanced
Posts: 77
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 13 times
Been thanked: 42 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Machinedramon »

I would say that you gotta be careful with the output and processing from MRP; for all the documentation regarding triangle strips its regarded as the second series being flipped around, then you restart the count after each jump so it keeps the same orientation for the faces, im not sure if its a bug of MRP or that im totally understanding things wrongly, given so many models from PS2 games i have treated have a problem with faces being flipped im inclined to think its a MRP bug where it goes ABC -> CAB instead of ABC -> BAC

for more information regarding how OpenGL Triangle strips work: (extracted from https://www.learnopengles.com/tag/triangle-strips/)
Let’s look at our index buffer again:

indexBuffer = {
1, 6, 2, 7, 3, 8, 4, 9, ...
}
When drawing with GL_TRIANGLE_STRIP, OpenGL will build triangles by taking each set of three vertices, advancing by one vertex for each triangle. Every subsequent triangle shares two vertices with the previous triangle. For example, here are the sets of vertices that would be grouped into triangles:

Triangle 1 = 1, 6, 2
Triangle 2 = 6, 2, 7
Triangle 3 = 2, 7, 3
Triangle 4 = 7, 3, 8
Triangle 5 = 3, 8, 4
Triangle 6 = 8, 4, 9

OpenGL also maintains a specific order, or winding when building the triangles. The order of the first 3 vertices determines the order for the rest. If the first triangle is counter-clockwise, the rest will be counter-clockwise, too. OpenGL does this by swapping the first two vertices of every even triangle (swapped vertices are in bold):

Triangle 1 = 1, 6, 2
Triangle 2 = 2, 6, 7
Triangle 3 = 2, 7, 3
Triangle 4 = 3, 7, 8
Triangle 5 = 3, 8, 4
Triangle 6 = 4, 8, 9
here how MRP Renders the file using those parameters
Image

here a comparison between how it should be rendered vs how its rendered(the one with 2 different normal values is the one that MRP outputs)
Image

and lastly the output text from MRP, like you said, its the same series you get.
Image

both files as well as the binary i upload here in a .rar file
You do not have the required permissions to view the files attached to this post.
UndeadFrankie
ultra-n00b
Posts: 3
Joined: Sun Nov 24, 2019 7:24 pm
Has thanked: 5 times

Re: 3D Model Researcher - extract 3D models with Python

Post by UndeadFrankie »

That link was really helpful for understanding it better, it's a pretty complex topic. Now that you mention it I've noticed flipped faces on some of my models too.
and lastly the output text from MRP, like you said, its the same series you get.
I didn't realize at first but the text output in MRPF and MR v2.8 displays differently then it exports. With the exact same parameters that sequence displays as

Code: Select all

f  0 1 2
f  4 3 2
f  3 4 5
f  6 5 4
f  6 7 8
f  9 8 7
but in the paid pro version and in the pro demo it displays as:

Code: Select all

f  1 2 3
f  5 4 3
f  4 5 6
f  7 6 5
f  7 8 9
f  10 9 8
both seem to export it as 1 2 3 though so it's no big deal. Originally I was just going off what it displayed in MRPF but now I know I gotta export it first then read the faces / indices. Thanks again for all the help its made it way easier to understand though. Those sample files have been helpful for testing stuff out too.
Sparagas
beginner
Posts: 25
Joined: Thu Feb 18, 2016 7:57 pm
Has thanked: 3 times
Been thanked: 7 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Sparagas »

Generally in computers counting starts from 0, but in .OBJ files counting starts from 1.
It is probably just an oversight in these two versions.
micro777
beginner
Posts: 30
Joined: Sun Sep 30, 2018 10:57 pm
Location: Russia
Has thanked: 51 times
Been thanked: 15 times

Re: 3D Model Researcher - extract 3D models with Python

Post by micro777 »

Hi all!
What am I doing wrong?
Example 3d model:
https://www.mediafire.com/file/i8vtrz1b ... r.rar/file
Image
I continue to study 3D Model Researcher. I use the Pro version.
I use the guide from the program website. I am currently receiving an error (
Traceback (most recent call last):
File "MR", line 27, in
mesh.set_uvs(uvs)
MRError: The form of the matrix should be Nx2)
I have no idea what it is, but there is no model. If you remove the mesh.set_uvs string (uvs), the model appears.
User avatar
Machinedramon
advanced
Posts: 77
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 13 times
Been thanked: 42 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Machinedramon »

micro777 wrote: Thu May 11, 2023 2:08 pm Hi all!
What am I doing wrong?
Example 3d model:
https://www.mediafire.com/file/i8vtrz1b ... r.rar/file
Image
I continue to study 3D Model Researcher. I use the Pro version.
I use the guide from the program website. I am currently receiving an error (
Traceback (most recent call last):
File "MR", line 27, in
mesh.set_uvs(uvs)
MRError: The form of the matrix should be Nx2)
I have no idea what it is, but there is no model. If you remove the mesh.set_uvs string (uvs), the model appears.
What the code is telling you is that you are trying to give some UVS to the mesh that dont use the format (u, v); print the uvs and see what are you trying to give to the mesh and you will see why its not working; simply add print(uvs) before you do it, i would suggest not doing it with a full 100 k vertexes xD
Peakzz
ultra-n00b
Posts: 1
Joined: Thu Aug 25, 2022 7:03 pm

Re: 3D Model Researcher - extract 3D models with Python

Post by Peakzz »

Lazov wrote: Sat Mar 25, 2023 12:45 pm The PRO version of the program has become free. Thanks to everyone who supported the development.
Download:
http://mr.game-viewer.org/download.php
Is it possible to get the version shown in this video ?
https://www.youtube.com/watch?v=Y951j875Xak&t=1s
because the file format that im trying to research has skeletons + animations
Lazov
veteran
Posts: 84
Joined: Sat Oct 08, 2016 11:56 am
Has thanked: 17 times
Been thanked: 55 times

Re: 3D Model Researcher - extract 3D models with Python

Post by Lazov »

Peakzz wrote: Sun May 14, 2023 5:38 pm
Lazov wrote: Sat Mar 25, 2023 12:45 pm The PRO version of the program has become free. Thanks to everyone who supported the development.
Download:
http://mr.game-viewer.org/download.php
Is it possible to get the version shown in this video ?
https://www.youtube.com/watch?v=Y951j875Xak&t=1s
because the file format that im trying to research has skeletons + animations
This is a demo video. Skeletal animation is not yet supported.
Post Reply