Extracting simple models

Read or post any tutorial related to file format analysis for modding purposes.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Fri Jul 20, 2018 12:34 pm

Bigchillghost wrote:It's just a piece of pseudo code in C to help you understand the structure of the vertex format. It's equivalent to the following pseudo code.

Code: Select all

Type	Specification

long	boneCount
for i = 1 to boneCount
{
	long	boneID
	float	boneWeight
}
but why you used 'long' for boneCount and boneID (?) — it's 4 bytes each so it should be float, no?

I don't understand all the terminology atm. I know that flot stands for 4 bytes, and half-float is 2 bytes, that's why I used 'float' to define what I found.
alos, how should I call this line of symbols related to single vertex? Vertex block? vertex size long?
shakotay2 wrote:
Tosyk wrote:So any advice on this would be greatfully usefull! Noesis, maxscript?
Why not use python with ModelResearcher (MR)? http://lazov.ru/mr/tutorial.php?name=tut_mr_scripts
wow, I didn't know that, thanks for pointing me :)
shakotay2 wrote:Anyways, here's a Noesis script to just load ellis_head (the eyeball, to be exact) and nothing more
oh, thanks a lot. that's a good start to understand basics :mrgreen:
Thank you for all you do here
my blog | my forum

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 425
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 20 times
Been thanked: 267 times

Re: Extracting simple models

Post by Bigchillghost » Fri Jul 20, 2018 12:56 pm

Tosyk wrote:but why you used 'long' for boneCount and boneID (?) — it's 4 bytes each so it should be float, no?
You really need to get familiar with different data types before you write any programs/scripts. A LONG is a type for storing interger like 1000 while a float is used to store floating point numbers like 3.1415926 etc.. They're encoded differently.
Tosyk wrote:alos, how should I call this line of symbols related to single vertex? Vertex block? vertex size long?
It's just a structure for vertex so any proper terms will be fine.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Fri Jul 20, 2018 9:51 pm

in noesis, how to skip junk data like texture path at the beginning of If the length of this path is before it?

path is: player\texture\eye\eye_brown_d.dds and before is 24 00 00 00 - it's a length of the path, how can I use this length to skip this amount of bytes for now?
Thank you for all you do here
my blog | my forum

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 425
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 20 times
Been thanked: 267 times

Re: Extracting simple models

Post by Bigchillghost » Sat Jul 21, 2018 3:08 am

shakotay2 wrote:
or you just search for a certain byte sequence which I don't really recommend unless there's no other way.
It's the most recommended way for beginners, imho.
Maybe. But you cannot be 100% certain that it works for all meshes and all files.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 425
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 20 times
Been thanked: 267 times

Re: Extracting simple models

Post by Bigchillghost » Sat Jul 21, 2018 3:21 am

Tosyk wrote:in noesis, how to skip junk data like texture path at the beginning of If the length of this path is before it?

path is: player\texture\eye\eye_brown_d.dds and before is 24 00 00 00 - it's a length of the path, how can I use this length to skip this amount of bytes for now?
For absolute position use

Code: Select all

bs.seek(OFFSET, NOESEEK_ABS)
or

Code: Select all

bs.seek(OFFSET, NOESEEK_REL)
for relative position.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Sat Jul 21, 2018 6:20 am

Tosyk wrote:in noesis, how to skip junk data like texture path at the beginning of If the length of this path is before it?

path is: player\texture\eye\eye_brown_d.dds and before is 24 00 00 00 - it's a length of the path, how can I use this length to skip this amount of bytes for now?
You need to use relative position, see my answer here:
viewtopic.php?f=29&t=7760&p=142418#p142418



edit, not related to the actual discussion, but to hex2obj, here's the actual version, I'm using,
but be warned, seems I've introduced one bug at least that I cannot reproduce.
Hex2obj_0.24e_.zip
You might use this version as a fallback:
---------- version 0.24d, autogenerated FIs ----------
viewtopic.php?f=29&t=10894&p=119417&hil ... ed#p119417

For both exe-only-versions you need the files in this zip as a base, too:
---------- >>> version 0.24c <<< ----------
hex2obj_0.24c.zip
Don't miss to read the tutorial, hex2obj_tut.rtf, or you will be lost. :)
(well, I assume, you'll be lost in any case...)
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Thu Jul 26, 2018 1:48 am, edited 2 times in total.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Sun Jul 22, 2018 11:46 pm

I'm posting here some progress. I decided to walk away from language that doesn't have any docummented base to the language I familiar with a bit more. I might get back to python later.
I did the basic format research and continue doing it (morphs, skeleton, weights, normals are on the way). My friend from here - zaramot helping me with some maxscript functions and many tips because it's my very first try to build something like that and I'm trying so hard.

Right now I can import all the mesh characters and uv.

Image Image
Bigchillghost wrote:

Code: Select all

Type	Specification

long	boneCount
for i = 1 to boneCount
{
	long	boneID
	float	boneWeight
}
I've just read this one more time and realize that I now understand what that mean and have similar code im ny script :mrgreen:
Last edited by Tosyk on Mon Jul 30, 2018 10:54 am, edited 1 time in total.
Thank you for all you do here
my blog | my forum

User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Mon Jul 30, 2018 10:53 am

some week ago I manage to do the maxscript for this game.

I did the most part and since I have no expirience in bone/weight I got huge help from
zaramot - a local 3ds max guru.

So here's the script: https://forum.xentax.com/viewtopic.php?f=16&t=18517
Thank you for all you do here
my blog | my forum

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Tue Jul 31, 2018 12:44 pm

Tosyk wrote:its ui is confussing shit out off me. I always thought that it can be simplier but then 'Model researcher' came up. I don't claim that "MR" is a super-tool but it is a lot more organized in terms of interface,
hex2obj was the first tool of it's kind, imho, and it's simple, yes. I always considered it as a first-steps-helpertool.
and you don't have to learn tool
That may be your opinion, but I have very strong doubts about that. In my opinion you're simply wrong: there's the different paddings for example and "you don't have to learn tool"?
(Not to speak about this error message "Faces error!" which leaves you lost.)
for hex2obj you need the startaddress of face indices (and the length of that block to get the face indices count). The later seems to be the hurdle for newbies.
You then need the start of vertices, to get it you need an understanding of your 3D format, that's correct.
— you just need to understand the format you want.
Yes, but that's not a matter of ui's design.
Main problem is to distinguish the FVF size which again is a matter of understanding formats.
From what I can see in forum posts there's not too many people that solve format requests using MR.
So if you want bring the begginers through your tool to their desired models you may consider to re-touch h2o's ui :)
nope, I don't. I consider it as finished. (And why should I put any efforts on it now that you have MR? :D )

In the end I'd agree that MR is a very good tool and I encourage people to use it.
Nevertheless hex2obj is the tool of my first choice because it's quick (and dirty).

As I wrote somewhere: you can't expect to get a more complex format solved unless you don't have tried out a dozen of simple formats.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Tue Jul 31, 2018 1:40 pm

thanks for the reply :)

I only speak for myself as a 0-expirience user of this kind of tools thus I think that you can't judge it the same way because of your 100500-expirience. Also I can judge as ui developer.
Thank you for all you do here
my blog | my forum

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Tue Jul 31, 2018 2:27 pm

yes, I see. But in the end (at least for me) it's rather unimportant which tool to use, hex2obj, MR, or Model Inspector from Herbert 3000: viewtopic.php?f=33&t=14648

The point of my post you were replying to was
"I was always thinking about the best way to give beginners a startup with coding or scripting,"
because you normally start with getting the first submesh but don't want to get the others manually, too.

Afaik none of the above mentioned tools will help you find all submeshes automatically by simply entering "numbers".
This is the reason why I mentioned Noesis' python scripting to find patterns indicating the start of the next submesh.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

wordhg
advanced
Posts: 46
Joined: Tue Oct 15, 2013 1:21 am
Has thanked: 20 times
Been thanked: 1 time

Re: Extracting simple models

Post by wordhg » Tue Jul 31, 2018 2:51 pm

I use both, but I think hex2obj is simpler.
Getting used to hex2obj and then operating MR is always not smooth.

Personal feelings, refer to

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 425
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 20 times
Been thanked: 267 times

Re: Extracting simple models

Post by Bigchillghost » Tue Jul 31, 2018 2:59 pm

Well, my opinions:
Tosyk wrote:for me h2o always something like "every time from scratch" because when I want to use it I always start from tutorial for it to then proceed with the format I want.
If you'd never thought about what you were doing with your tool, you're never about to truely understand how everything works.
Tosyk wrote:its ui is confussing shit out off me. I always thought that it can be simplier but then 'Model researcher' came up.
People always get confused about things they don't really understand. So do I when I first came to Hex2obj. But that's how a learning process begins. As for the UI, it totaly depends on personal taste. For example, I'm more fond of the simple and clean UI of Hex2obj.
However, simplicity sometimes causes inconvenience to the researching process, like cases when extra data was inserted in the face buffer, handling which becomes an advantage of MR, as it makes every part independent. But it all depends on how complex the formats are. For example, if different geo data were stored in separate files, none of the existen tools will work directly. So please keep in mind that when things get complicated, it possibly won't be that simple tool for beginners any more.
Tosyk wrote:but it is a lot more organized in terms of interface, and you don't have to learn tool — you just need to understand the format you want.
Actually you do have to LEARN a tool, simple or advanced one. Would you ever know the difference between "Pad Inter" and "Padding" if you hadn't read the specifications of MR? You feel MR to be simplier probably because you have contacted with Hex2obj before and you just got a better understanding when you met the former.

I don't think either of these tools are supposed to be the final solution of extracting models, especially when there're lots of submeshes or when the data is compressed, but merely a quick approach to help you varify your guesses on the format. Still, it's not a proper step to learn things by skipping the most basic part, if you really wish to understand it. That's why I wrote a step by step tutorial, hopefully to help beginners avoid making detours. But I havn't seen anyone pose questions under these topics, which is really disappointing.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Tue Jul 31, 2018 5:49 pm

Bigchillghost wrote:But I havn't seen anyone pose questions under these topics, which is really disappointing.
The audience is getting smaller; many people seem to use Ninja Ripper, for example.
But I'm pretty sure that interested beginners will profit from your tutorial.

(I've updated my sig to link to it.)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Tue Jul 31, 2018 6:34 pm

My only point was: better UI can give better understanding for the beginners, simple as that. This claim is not from nowhere — because of my professional expirience.

p.s.: the fact that you "can" and "have to" learn ANY tool to get what you want is something beyond "usability" terms and doubtlessly but with the approach like this you can also say "draw models yourself".
p.s.: once again: I'm not trying to argue, guys, I'm just saying that ui of h2o could be much more better :]
Thank you for all you do here
my blog | my forum

Post Reply