Re: 3D Model Researcher - extract 3D models with Python
Posted: Mon Oct 03, 2022 11:06 pm
At least you're finally responding, I thought you got drafted or just hated foreigners.
Game Research Forum
https://forum.xentax.com/
Are you a programmer?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.
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 wrote: ↑Sat Dec 17, 2022 1:18 pmAre you a programmer?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.
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: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.
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:Machinedramon wrote: ↑Mon May 01, 2023 10:22 amI'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: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.
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:
here how MRP Renders the file using those parametersLet’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
…
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 asand lastly the output text from MRP, like you said, its the same series you get.
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
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
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 xDmicro777 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
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.
Is it possible to get the version shown in this video ?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
This is a demo video. Skeletal animation is not yet supported.Peakzz wrote: ↑Sun May 14, 2023 5:38 pmIs it possible to get the version shown in this video ?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
https://www.youtube.com/watch?v=Y951j875Xak&t=1s
because the file format that im trying to research has skeletons + animations