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
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.4.2

- Finalized Hex-viewer.
- In the "3D View" tab, a button is added to return the camera to its initial position (useful if you centered on the object with incorrect coordinates).
- There was a version for Windows XP

Pro version:
- Added a Hex-Viewer.
- Added data inspector to Hex-viewer
- Fixed minor bugs

Video:
https://youtu.be/Gzh1i8Dp9Q4
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

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

Post by zaykho »

A very nice tool, actually the best if coupled with TextureFinder !

I bought the Pro version, and started to learn using python with this tool !

( Already reversed a game with it (project gotham racing 2))
JohnCS
ultra-n00b
Posts: 2
Joined: Thu Jul 19, 2018 1:01 am
Has thanked: 2 times

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

Post by JohnCS »

Hi - your program has been a great help to me in extracting models from 'Inquistor - Martyr'

Could you provide a suggestion on how to read strings from the file using the BufferFile API. Every approach I try converts it to a numeric array or gives an error. My closest attempt is:

def getstring(fp,count):
new=""
strname=""

for x in range(count):
strname="{0}".format(fp.reads("s"))
new+=strname
fp.read(1)
return new

but it gives the following output for short word format strings with EBCDIC encoding:

Black_Legion_Marine_v17b_lamb_hitbox:

b'B',)(b'l',)(b'a',)(b'c',)(b'k',)(b'_',)(b'L',)(b'e',)(b'g',)(b'i',)(b'o',)(b'n',)(b'_',)(b'M',)(b'a',)(b'r',)(b'i',)(b'n',)(b'e',)(b'_',)(b'v',)(b'1',)(b'7',)(b'_',)(b'l',)(b'a',)(b'm',)(b'b',)(b'_',)(b'h',)(b'i',)(b't',)(b'b',)(b'o',)(b'x',)

any tips? I'm a novice at Python

thanks!
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

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

Post by chrrox »

bs.readBytes(4).decode("ASCII").rstrip("\0")
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 »

import mrp
f = mrp.get_bfile()
b = f.read(count).decode("utf-8")

Something like this)
JohnCS
ultra-n00b
Posts: 2
Joined: Thu Jul 19, 2018 1:01 am
Has thanked: 2 times

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

Post by JohnCS »

perfect - worked a charm. Thanks!
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

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

Post by Fiammanera628 »

Hi, I'm now working on Planet Hot Wheels files (.mxs) with the Model Researcher, but only half of they are decoded well, and they've got this first string: "*3DSMAX_ENGINE1EXPORTB2 200"

The other half, that I can't understand why, show like this, with the same method:

https://www.dropbox.com/s/3r5iwqftk3f6c ... 6.jpg?dl=0

and they have got, as first string, this: "*3DSMAX_ENGINE1EXPORTFP 200".

Lazov, can you help me, please :?:

P.s. I leave the 63corvette.mxs in attached:
https://www.dropbox.com/s/3gcb6psczawhz ... e.MXS?dl=0
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 »

Fiammanera628, so what is the problem?
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

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

Post by Fiammanera628 »

Lazov wrote:Fiammanera628, so what is the problem?
The problem is when with the files .mxs with "*3DSMAX_ENGINE1EXPORTB2 200" show perfect on MR, despite the files .mxs with "*3DSMAX_ENGINE1EXPORTFP 200" (Like the 63corvette.mxs) show like a tangled cube, and the parametres are more or less the same.

Image

All files must be cars, not half of this cubes.

Image
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 »

When the vertices are in Short, they are divided by 256. But in fact they can be transformed differently.
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

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

Post by Fiammanera628 »

Lazov wrote:When the vertices are in Short, they are divided by 256. But in fact they can be transformed differently.
For example?
(sorry, but I never studied computer programming, so can you explain simply?)
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 »

Update v2.5

- Added the ability to make a screenshot and a screenshot with information
- Fixed minor bugs

I will try to add the normal vectors in the next update.

Fiammanera628, Short is an integer data type that takes 2 bytes. The program divides vertices in this type by 256.
You do not have the required permissions to view the files attached to this post.
alex0809
ultra-n00b
Posts: 1
Joined: Fri Sep 21, 2018 4:38 pm

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

Post by alex0809 »

A simple question for you guys - My boss gave me 30 days (not working days) to learn Python to transfer to the Data Science team. What is the best approach to learn as much as possible?
Honkasumi
ultra-n00b
Posts: 3
Joined: Sun Dec 09, 2018 8:36 am

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

Post by Honkasumi »

Hi, can i extract models from apps from programs like nox or BlueStacks programs.
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 »

Honkasumi wrote:Hi, can i extract models from apps from programs like nox or BlueStacks programs.
The ability to export depends on the format structure.
Post Reply