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
Post Reply
EDXZ23
n00b
Posts: 19
Joined: Tue May 07, 2019 7:49 pm
Has thanked: 11 times
Been thanked: 1 time

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

Post by EDXZ23 »

GHFear wrote: Fri Aug 09, 2019 1:13 pm
EDXZ23 wrote: Fri Aug 09, 2019 10:37 am
GHFear wrote: Fri Aug 09, 2019 8:17 am

Hello
You would have to upload the file so I can look at it.

/GHFear

heres the file dude!
6118.zip

the file was extracted to .dat but i know now that its a .rax file
I can not for the life of me figure this format out.
sorry.
that's cool dude i appreciate the response :D
Jamal al dambali
ultra-n00b
Posts: 9
Joined: Sun Apr 16, 2017 5:00 pm
Has thanked: 10 times

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

Post by Jamal al dambali »

Hi Lazov! Please tell me how to find uv.
screenshots.jpg
file link: https://yadi.sk/d/UTleab58Y6cF6w
You do not have the required permissions to view the files attached to this post.
EDXZ23
n00b
Posts: 19
Joined: Tue May 07, 2019 7:49 pm
Has thanked: 11 times
Been thanked: 1 time

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

Post by EDXZ23 »

Jamal al dambali wrote: Sat Aug 17, 2019 1:59 pm Hi Lazov! Please tell me how to find uv.
screenshots.jpg
file link: https://yadi.sk/d/UTleab58Y6cF6w
You need to find the correct start address for the UV’s which vary for different files :D what file type are you working with?
Jamal al dambali
ultra-n00b
Posts: 9
Joined: Sun Apr 16, 2017 5:00 pm
Has thanked: 10 times

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

Post by Jamal al dambali »

EDXZ23 wrote: Mon Aug 19, 2019 12:20 pm You need to find the correct start address for the UV’s which vary for different files :D what file type are you working with?
If I knew, I would have done it myself. But I dont know :(
And I left a link to the file.
EDXZ23
n00b
Posts: 19
Joined: Tue May 07, 2019 7:49 pm
Has thanked: 11 times
Been thanked: 1 time

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

Post by EDXZ23 »

Jamal al dambali wrote: Tue Aug 20, 2019 2:55 pm
EDXZ23 wrote: Mon Aug 19, 2019 12:20 pm You need to find the correct start address for the UV’s which vary for different files :D what file type are you working with?
If I knew, I would have done it myself. But I dont know :(
And I left a link to the file.
I'm super busy at the moment with my own project, but if I have time I'll take a look at the file and see if can help you :D !

In the mean time try doing some research about the game and its file types.

You can also use trial and error to find the UV's by pasting the starting offset in DEC and increasing it by 1, then clicking the "View UV's" button until the UV's look correct. However, it may or may not work depending on the file type as you may need to find the padding. Hence why I suggest extensive research into game and the file type :)
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 program has been updated.

Update v2.6

- Added support for normal vectors!
- Template format is now compatible with the Pro version.
- The algorithm for calculating normal vectors has been changed. Now the model looks better.
- Added TStrip, TStripFF formats for texture coordinate indices and normal indices. Perhaps this is never used in models. :)
Aterbust
ultra-n00b
Posts: 1
Joined: Mon Dec 31, 2018 12:06 am

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

Post by Aterbust »

rudi246 wrote: Tue Jun 11, 2019 3:05 pm I'm trying to extract the levels from a PS1 skateboarding game called Grind Session. I found the models inside the level files but they always have missing triangles. I have attatched a rar file that contains the level files for one of the levels as well as some of my templates for different models within the TRACK.DAT file.

https://zenhax.com/download/file.php?id ... 84443f7d43

Image
Hello.
I think that version 2.6 of 3D Model Researcher does not work well.
I loaded the file 'TRACK.DAT' and I got an error message. "Mismatch of faces and vertices!"
In the text section, when I check info, all the table for the faces disappeared.
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 »

Thanks, Aterbust!
I updated 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 »

Big Update v2.7

- Added support Quads!
- The output of data in text form has been changed: texture coordinate indices and normal indices are now displayed in separate blocks with the literals "fvt" and "fvn", 1 is not added to the indices. The old output can be enabled in the menu "View" -> "Print as OBJ";
- Added highlighting of texture coordinate indices and normal indices in the hex-viewer;

- New template format!
Templates have become more compact. Now they have the following format:

Code: Select all

mesh [name] // mesh name (only for Pro)
v [offset] [count] [padding] [padding inter] [type] [format] // vertices
f [offset] [count] [padding] [padding inter] [type] [format] // faces
vt [offset] [count] [padding] [padding inter] [type] [format] // uvs
fvt [offset] [count] [padding] [padding inter] [type] [format] // uvs indices
vn [offset] [count] [padding] [padding inter] [type] [format] // normals
fvn [offset] [count] [padding] [padding inter] [type] [format] // normals indices
inv [x] [y] [z] // invert (0 or 1)
bo [byte order] // byte order (< - Little Endian, > - Big Endian)
It is not necessary that the template contains data of all forms or all parameters of one form. Omitted parameters and forms will be replaced with default values. The sample templates below are correct:
  • v 0x997 3214 0 0 Float XZY
    f 100 826 64 0 Integer Triangles
  • v 15 3015
    f 0x48a 826 64 0 Integer
    bo >
  • v 0x5487 720 0 0 Float XZY
    inv 0 0 1
However, support for old templates will remain.

- Added function to copy template to clipboard ("Tools" -> "Copy Template") and
function for loading a template using the form ("Tools" -> "Paste Template");
- Polygons on the texture in the Texture tab are now drawn without filling;
- Added "Copy-Paste" menu when clicking on a text field in the "Text" tab;
- Returned support for templates of previous versions of the program;
- Small bugs fixed.

Pro version will be updated later.
GHFear
advanced
Posts: 50
Joined: Tue Dec 04, 2018 9:29 am
Has thanked: 7 times
Been thanked: 9 times

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

Post by GHFear »

Thank you for the work you're doing, Lazov :)
I really appreciate it. I have had much good use of this tool.
If you appreciate my work and want to donate:
Paypal: [email protected]
MadTucker
ultra-n00b
Posts: 1
Joined: Sun Apr 12, 2020 4:58 pm

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

Post by MadTucker »

Hi there Lazov. I purchased the Pro ver. of your software a while ago and it seems like I still haven't recieved an e-mail with activation-key. I didn't write you earlier, because I really didn't need the pro features very urgently, just wanted to fool around with it a little and try them out. I don't know if you are still active right now, but if you are, then it would be neat if you can send me the key, if you are not active anymore, then I don't really mind also, because I still had good use of the free version of the tool, so then I'd just see it as a 'lil donation for your efforts :P
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 »

MadTucker
Write to me in the PM. The message may be in the spam folder.
Segal
ultra-n00b
Posts: 7
Joined: Sat May 02, 2020 11:25 pm
Has thanked: 3 times
Been thanked: 2 times

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

Post by Segal »

Hi Mr. Lazov, thanks a lot for 3D Model Researcher, it's a great software.
I had extracted some models and I save them to obj, everything working good.
But I want to edit those models, and convert them from obj to hex or binary (reversing 3D Model Researcher obj-->hex), and replacing the game models by the new models, is this possible?
For this function I had made some codes woking only for vertices in short_signed, but they doesn't work with float or UVs.
This image explain vertices short_signed conversion:Image
Edited:
I found some websites can do the calculation for vetices from obj to float or short_signed, I do this operation manually, and it's so tiring, and it gives not exact values in some cases.
Here is the websites links:
obj to hex [[Float]]: https://gregstoll.com/~gregstoll/floattohex/ "this site do the conversion called "IEEE 754" you can search it in google, check Swap endianess for little endian".
obj to hex [[Short_signed]]: https://www.binaryhexconverter.com/deci ... -converter "this site do only the conversion form decimal to hexadecimal, and this is the short_signed convertion"
The problem now is the UVs, I had them in short_signed in game models, they vary between 0 and 1, so when I put 0.710583 for example, it's always converted to 0 in the short_signed website, I try a lot of attempts but always 0.
Please can you give a website or a calculator or a software or you can make a script or a partition in 3D Model Resercher for converting the obj to hex in all forms (short_signed or float and UVs) to hex, and upload it in new vesrion v2.8 , this will creates a big buzz in 3D modeling.
This is my email: [email protected]
Thanks in advance :] .
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 »

Segal, learn the basics of Python and create this converter.

Code: Select all

# Python 3.6
import struct
struct.pack("f",0.154).hex()
The fact is that all models have a different format, and it is impossible to create a converter for all formats.
Segal
ultra-n00b
Posts: 7
Joined: Sat May 02, 2020 11:25 pm
Has thanked: 3 times
Been thanked: 2 times

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

Post by Segal »

Thanks Mr. Lazov recently I found a method that can convert the models to float in vertices, normals and UVs.
Please can you tell me how can I convert this vertices, normals and UVs from float to short_signed, or another models format that convert obj vertices, normals and UVs to short_signed, or just how to convert 4 bytes of hex to 2 bytes to make it short?
Last edited by Segal on Mon May 18, 2020 10:05 pm, edited 1 time in total.
Post Reply